[GRASS-SVN] r63313 - in grass-addons/grass7: raster/r.sun.daily raster/r.sun.hourly vector/v.habitat.dem
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Dec 1 07:21:35 PST 2014
Author: annakrat
Date: 2014-12-01 07:21:35 -0800 (Mon, 01 Dec 2014)
New Revision: 63313
Modified:
grass-addons/grass7/raster/r.sun.daily/r.sun.daily.html
grass-addons/grass7/raster/r.sun.daily/r.sun.daily.py
grass-addons/grass7/raster/r.sun.daily/test.r.sun.daily.sh
grass-addons/grass7/raster/r.sun.hourly/r.sun.hourly.html
grass-addons/grass7/raster/r.sun.hourly/r.sun.hourly.py
grass-addons/grass7/raster/r.sun.hourly/test.r.sun.hourly.sh
grass-addons/grass7/vector/v.habitat.dem/v.habitat.dem.py
Log:
r.sun.* addons: improve option names
Modified: grass-addons/grass7/raster/r.sun.daily/r.sun.daily.html
===================================================================
--- grass-addons/grass7/raster/r.sun.daily/r.sun.daily.html 2014-12-01 14:57:58 UTC (rev 63312)
+++ grass-addons/grass7/raster/r.sun.daily/r.sun.daily.html 2014-12-01 15:21:35 UTC (rev 63313)
@@ -22,7 +22,7 @@
<h2>EXAMPLE</h2>
<div class="code"><pre>
-r.sun.daily elev_in=elevation start_day=30 end_day=40 beam_rad_basename=beam beam_rad=beam_sum nprocs=4 -t
+r.sun.daily elevation=elevation start_day=30 end_day=40 beam_rad_basename=beam beam_rad=beam_sum nprocs=4 -t
# show information about newly created space time dataset
t.info beam
Modified: grass-addons/grass7/raster/r.sun.daily/r.sun.daily.py
===================================================================
--- grass-addons/grass7/raster/r.sun.daily/r.sun.daily.py 2014-12-01 14:57:58 UTC (rev 63312)
+++ grass-addons/grass7/raster/r.sun.daily/r.sun.daily.py 2014-12-01 15:21:35 UTC (rev 63313)
@@ -22,20 +22,20 @@
#%option
#% type: string
#% gisprompt: old,cell,raster
-#% key: elev_in
+#% key: elevation
#% description: Name of the input elevation raster map [meters]
#% required : yes
#%end
#%option
#% type: string
#% gisprompt: old,cell,raster
-#% key: asp_in
+#% key: aspect
#% description: Name of the input aspect map (terrain aspect or azimuth of the solar panel) [decimal degrees]
#%end
#%option
#% type: string
#% gisprompt: old,cell,raster
-#% key: slope_in
+#% key: slope
#% description: Name of the input slope raster map (terrain slope or solar panel inclination) [decimal degrees]
#%end
#%option
@@ -233,9 +233,9 @@
def main():
options, flags = grass.parser()
- elevation_input = options['elev_in']
- aspect_input = options['asp_in']
- slope_input = options['slope_in']
+ elevation_input = options['elevation']
+ aspect_input = options['aspect']
+ slope_input = options['slope']
beam_rad = options['beam_rad']
diff_rad = options['diff_rad']
Modified: grass-addons/grass7/raster/r.sun.daily/test.r.sun.daily.sh
===================================================================
--- grass-addons/grass7/raster/r.sun.daily/test.r.sun.daily.sh 2014-12-01 14:57:58 UTC (rev 63312)
+++ grass-addons/grass7/raster/r.sun.daily/test.r.sun.daily.sh 2014-12-01 15:21:35 UTC (rev 63313)
@@ -41,23 +41,23 @@
# The @test
NAME="Missing parameter test (module should fail)"
-r.sun.daily elev_in=terrain start_day=26 end_day=37 day_step=3
+r.sun.daily elev=terrain start_day=26 end_day=37 day_step=3
echo "$NAME: r.sun.daily returned: $? (expecting 1)"
NAME="Wrong start and end day parameter values test (module should fail)"
-r.sun.daily elev_in=terrain start_day=82 end_day=37 day_step=3 reflrad_basename=${should_not_be_created_map}
+r.sun.daily elevation=terrain start_day=82 end_day=37 day_step=3 reflrad_basename=${should_not_be_created_map}
echo "$NAME: r.sun.daily returned: $? (expecting 1)"
NAME="Wrong day step parameter values test (module should fail)"
-r.sun.daily elev_in=terrain start_day=82 end_day=85 day_step=9 reflrad_basename=${should_not_be_created_map}
+r.sun.daily elevation=terrain start_day=82 end_day=85 day_step=9 reflrad_basename=${should_not_be_created_map}
echo "$NAME: r.sun.daily returned: $? (expecting 1)"
NAME="Wrong day step parameter and cumulative parameters values test (module should fail)"
-r.sun.daily elev_in=terrain start_day=1 end_day=85 day_step=9 refl_rad=${should_not_be_created_map}
+r.sun.daily elevation=terrain start_day=1 end_day=85 day_step=9 refl_rad=${should_not_be_created_map}
echo "$NAME: r.sun.daily returned: $? (expecting 1)"
NAME="Map creation test"
-r.sun.daily elev_in=terrain start_day=26 end_day=37 day_step=3 reflrad_basename=${map_basename}
+r.sun.daily elevation=terrain start_day=26 end_day=37 day_step=3 reflrad_basename=${map_basename}
g.list -e type=rast pattern=${map_basename}_[0-9]{3} sep=newline > ${created_map_names_file}
@@ -65,11 +65,11 @@
echo "$NAME: Diff returned $? (expecting 0)"
NAME="Overwrite flag test"
-r.sun.daily elev_in=terrain start_day=26 end_day=37 day_step=3 reflrad_basename=${map_basename} --overwrite
+r.sun.daily elevation=terrain start_day=26 end_day=37 day_step=3 reflrad_basename=${map_basename} --overwrite
echo "$NAME: r.sun.daily returned: $? (expecting 0)"
NAME="Map already exists test (module should fail)"
-r.sun.daily elev_in=terrain start_day=26 end_day=37 day_step=3 reflrad_basename=${map_basename}
+r.sun.daily elevation=terrain start_day=26 end_day=37 day_step=3 reflrad_basename=${map_basename}
echo "$NAME: r.sun.daily returned: $? (expecting 1)"
# clean
Modified: grass-addons/grass7/raster/r.sun.hourly/r.sun.hourly.html
===================================================================
--- grass-addons/grass7/raster/r.sun.hourly/r.sun.hourly.html 2014-12-01 14:57:58 UTC (rev 63312)
+++ grass-addons/grass7/raster/r.sun.hourly/r.sun.hourly.html 2014-12-01 15:21:35 UTC (rev 63313)
@@ -22,7 +22,7 @@
<h2>EXAMPLE</h2>
<div class="code"><pre>
-r.sun.hourly elev_in=elevation start_time=8 end_time=15 beam_rad_basename=beam nprocs=4 -t
+r.sun.hourly elevation=elevation start_time=8 end_time=15 beam_rad_basename=beam nprocs=4 -t
# show information about newly created space time dataset
t.info beam
Modified: grass-addons/grass7/raster/r.sun.hourly/r.sun.hourly.py
===================================================================
--- grass-addons/grass7/raster/r.sun.hourly/r.sun.hourly.py 2014-12-01 14:57:58 UTC (rev 63312)
+++ grass-addons/grass7/raster/r.sun.hourly/r.sun.hourly.py 2014-12-01 15:21:35 UTC (rev 63313)
@@ -22,20 +22,20 @@
#%option
#% type: string
#% gisprompt: old,cell,raster
-#% key: elev_in
+#% key: elevation
#% description: Name of the input elevation raster map [meters]
#% required : yes
#%end
#%option
#% type: string
#% gisprompt: old,cell,raster
-#% key: asp_in
+#% key: aspect
#% description: Name of the input aspect map (terrain aspect or azimuth of the solar panel) [decimal degrees]
#%end
#%option
#% type: string
#% gisprompt: old,cell,raster
-#% key: slope_in
+#% key: slope
#% description: Name of the input slope raster map (terrain slope or solar panel inclination) [decimal degrees]
#%end
#%option
@@ -259,9 +259,9 @@
def main():
options, flags = grass.parser()
- elevation_input = options['elev_in']
- aspect_input = options['asp_in']
- slope_input = options['slope_in']
+ elevation_input = options['elevation']
+ aspect_input = options['aspect']
+ slope_input = options['slope']
beam_rad_basename = options['beam_rad_basename']
diff_rad_basename = options['diff_rad_basename']
Modified: grass-addons/grass7/raster/r.sun.hourly/test.r.sun.hourly.sh
===================================================================
--- grass-addons/grass7/raster/r.sun.hourly/test.r.sun.hourly.sh 2014-12-01 14:57:58 UTC (rev 63312)
+++ grass-addons/grass7/raster/r.sun.hourly/test.r.sun.hourly.sh 2014-12-01 15:21:35 UTC (rev 63313)
@@ -69,19 +69,19 @@
# The @test
NAME="Missing ouput parameter test (module should fail)"
-r.sun.hourly elev_in=terrain start_time=11.50 end_time=18.20 time_step=3 day=80
+r.sun.hourly elevation=terrain start_time=11.50 end_time=18.20 time_step=3 day=80
echo "$NAME: r.sun.hourly returned: $? (expecting 1)"
NAME="Wrong start and end time parameter values test (module should fail)"
-r.sun.hourly elev_in=terrain start_time=11.50 end_time=9.00 time_step=3 day=80 reflrad_basename=${map_basename}
+r.sun.hourly elevation=terrain start_time=11.50 end_time=9.00 time_step=3 day=80 reflrad_basename=${map_basename}
echo "$NAME: r.sun.hourly returned: $? (expecting 1)"
NAME="Wrong time step parameter value test (module should fail)"
-r.sun.hourly elev_in=terrain start_time=10.60 end_time=11.20 time_step=0.60 day=80 reflrad_basename=${map_basename}
+r.sun.hourly elevation=terrain start_time=10.60 end_time=11.20 time_step=0.60 day=80 reflrad_basename=${map_basename}
echo "$NAME: r.sun.hourly returned: $? (expecting 1)"
NAME="Map creation test"
-r.sun.hourly elev_in=terrain start_time=11.50 end_time=20.00 time_step=3 day=80 reflrad_basename=${map_basename}
+r.sun.hourly elevation=terrain start_time=11.50 end_time=20.00 time_step=3 day=80 reflrad_basename=${map_basename}
g.list -e type=rast pattern=${map_basename}${map_number_separator}${map_number_pattern} sep=newline > ${created_map_names_file}
@@ -89,7 +89,7 @@
echo "$NAME: Diff returned $? (expecting 0)"
NAME="Map creation test with too much decimal places"
-r.sun.hourly elev_in=terrain start_time=7.0000 end_time=11.0000 time_step=1.3333 day=80 reflrad_basename=${decimal_map_basename}
+r.sun.hourly elevation=terrain start_time=7.0000 end_time=11.0000 time_step=1.3333 day=80 reflrad_basename=${decimal_map_basename}
g.list -e type=rast pattern=${decimal_map_basename}${map_number_separator}${map_number_pattern} sep=newline > ${decimal_created_map_names_file}
@@ -97,7 +97,7 @@
echo "$NAME: Diff returned $? (expecting 0)"
NAME="Temporal dataset creation test"
-r.sun.hourly -t elev_in=terrain start_time=11.50 end_time=20.00 time_step=3 day=100 year=${year} reflrad_basename=${temporal_map_basename}
+r.sun.hourly -t elevation=terrain start_time=11.50 end_time=20.00 time_step=3 day=100 year=${year} reflrad_basename=${temporal_map_basename}
t.list type=strds > ${temporal_created_dataset_file}
@@ -110,7 +110,7 @@
echo "$NAME (maps sub-test): Diff returned $? (expecting 0)"
NAME="Map already exists test (module should fail)"
-r.sun.hourly elev_in=terrain start_time=11.50 end_time=20.00 time_step=3 day=80 reflrad_basename=${map_basename}
+r.sun.hourly elevation=terrain start_time=11.50 end_time=20.00 time_step=3 day=80 reflrad_basename=${map_basename}
echo "$NAME: r.sun.hourly returned: $? (expecting 1)"
# clean
Modified: grass-addons/grass7/vector/v.habitat.dem/v.habitat.dem.py
===================================================================
--- grass-addons/grass7/vector/v.habitat.dem/v.habitat.dem.py 2014-12-01 14:57:58 UTC (rev 63312)
+++ grass-addons/grass7/vector/v.habitat.dem/v.habitat.dem.py 2014-12-01 15:21:35 UTC (rev 63313)
@@ -479,10 +479,10 @@
# Run r.sun.hourly in binary mode for light/shadow
grass.message( "Run r.sun.hourly in binary mode for light/shadow for a certain day in the year ..." )
- grass.run_command("r.sun.hourly", elev_in = r_elevation,
+ grass.run_command("r.sun.hourly", elevation = r_elevation,
flags = 'tb',
- asp_in = r_aspect,
- slope_in = r_slope,
+ asect = r_aspect,
+ slope = r_slope,
start_time = d_start_time,
end_time = d_end_time,
day = d_day,
More information about the grass-commit
mailing list