[GRASS-user] Question about r.sun2 and r.horizon
Nikos Alexandris
nikos.alexandris at felis.uni-freiburg.de
Mon Jun 16 10:27:39 EDT 2008
On Mon, 2008-06-16 at 07:03 -0700, Hamish wrote:
> > > r.horizon elevin=srtm3_stel step=45 horizon=horizon_45 coord=4275945
>
> coord= should be x,y not just a single number.
>
> So the parser knows to expect two numbers, in the option setup code should include the line:
> parm.coord->key_desc = "east,north";
I remember using the centre x,y in the beginning and changing it later
only to x because I read the r.sun2 help which is:
[...]
lat A single value of latitude
[...]
> > > for i in `seq 92 304`; do
> > > r.sun2 -s --o elevin=srtm3_stel aspin=aspect_stel \
> > > slopein=slope_stel alb=0.23 lin=5.2 lat=4275945 \
> > > horizon=horizon.45 horizonstep=45 \
> > > glob_rad=global_rad_$i day=$i; done
>
> lat= must be in the range 0-90. it will be converted to radians and so does not take projected northings as input.
You give me more homework ;-) I didn't really checked that and the loop
is running the last 2 hours!!!
>
> the parser option to ensure the 0-90 range is:
> parm.lat->options = "0-90";
>
> although it might be nicer to allow DDD:MM:SS.SSS strings (e.g. "23:55N") then use G_lat_scan() to convert to a float. check the return value of that function to see if it is out of range and a G_fatal_error() is needed.
>
> but as far as I can tell looking through the r.sun2 code, the *lt string is only ever used when writing out the map's metadata/history. (??)
> Hamish
More information about the grass-user
mailing list