* Nikos Alexandris <[email protected]> [2015-05-15 23:18:18 +0300]:
> * Nikos Alexandris <[email protected]> [2015-05-15 16:34:38 +0300]: > > > * Vaclav Petras <[email protected]> [2015-05-15 08:41:17 -0400]: > > > > > On Fri, May 15, 2015 at 8:10 AM, Nikos Alexandris > > > <[email protected]> > > > wrote: > > > > > > > I have another use-case, hence another update to the script. Does > > > > anyone care to have a look at the proposed diff (really a quick hack, no > > > > extensive testing done but it works for me). > > > > > > > > > > Looks good except for computing the slope and aspect on the fly. > > > r.slope.aspect runs twice once for slope, once for aspect. With current > > > code, it actually looks that there might be some override issues. Try > > > harder to preserve current mechanism where one r.slope.aspect call is > > > build > > > according to missing inputs. You need to change the if conditions somehow. > > > (Only reading the diff.) > > > > Known issue, thanks for reading Vaclav. Will rework another day on it. > > I am not getting easily away from this script. > > I want to check whether a strds already exists, and if it does, don't > re-create it (overwrite it). Rather, register follow-up maps in the existing > strds. > > Makes sense? This need rose from the attempt to loop r.sun.daily over > different monthly Linke Turbitidy values. Something like the following: correction: > --%<--- > for LINE in `cat monthly_linke_map_start_day_end_day.csv` ;do set -- > $(echo ${LINE} |tr "|" " ") && r.sun.daily elevation=srtm4@PERMANENT > aspect_value=0 slope_value=0.0 albedo=albedo@albedo linke=$1 > start_day=$2 end_day=$3 glob_rad_basename=global_rad_zero > insol_time_basename=insol_time beam_rad_basename=beam_rad_zero > diff_rad_basename=diff_rad_zero --o -t ;done > --->%-- Like this, > ...each subsequent call of creating a strds, will overwrite if > it exists. Hence, only the maps involved in the last run of the above > loop will appear in the strds. If using different names for output maps after each loop, multiple strds are created, naturally, which is unwanted. Nikos _______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev
