I have a bunch of meteorological stations (157) on a
postgres table and their respective DAILY data
(precip, temp, wind) on another table. The thing is, I
need to create daily surface maps, interpolating those
points in the database. Is there a way to do this in
GRASS, that is, input the points from the SQL table,
interpolate the data for one day and get a surface,
change the day and interpolate again, and again, for
about 1 year worth of data? Do I need grass 5.7? 5.3?
Any help would be greatlly appreciated
Thanks
Daniel
__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html
I have a bunch of meteorological stations (157) on a
postgres table and their respective DAILY data
(precip, temp, wind) on another table. The thing is, I
need to create daily surface maps, interpolating those
points in the database. Is there a way to do this in
GRASS, that is, input the points from the SQL table,
interpolate the data for one day and get a surface,
change the day and interpolate again, and again, for
about 1 year worth of data? Do I need grass 5.7? 5.3?
Yea, sure. Works really well once you have a script written.
Time to learn some bash scripting though!
You can use 5.0, but I suggest using 5.3+, so that you can compile
r.series which lets you do stats on the year's worth of resultant maps
(after increasing r.series' MAXFILES to something bigger than 365!).
general idea is to extract a single day's data to a sites file, do the
interpolation, & repeat.
If you have Markus & Helena's hardbound GRASS book, there's an example
there regarding r.sun I think.
general idea:
#!/bin/bash
i=1
while [ $i -le 365 ] ; do
# generate map names convenient for xganim or r.out.mpeg
DAY=`echo $i | awk '{printf "%03i", $1}'`
echo
echo "Computing radiation for day $DAY..."
sql_extraction_command day=$i sites_out=rain.$DAY
# maybe dump to temp. file & feed that into s.in.ascii ?
s.surf.idw sites_in=rain.$DAY rast_out=insitu_data.$DAY
You can use 5.0, but I suggest using 5.3+, so that you can compile
r.series which lets you do stats on the year's worth of resultant maps
(after increasing r.series' MAXFILES to something bigger than 365!).
That should say "after increasing libgis' MAXFILES". Specifically, the
macro in question is defined in src/libes/gis/G.h.
> I have a bunch of meteorological stations (157) on a
> postgres table and their respective DAILY data
> (precip, temp, wind) on another table. The thing is, I
> need to create daily surface maps, interpolating those
> points in the database. Is there a way to do this in
> GRASS, that is, input the points from the SQL table,
> interpolate the data for one day and get a surface,
> change the day and interpolate again, and again, for
> about 1 year worth of data? Do I need grass 5.7? 5.3?
Yea, sure. Works really well once you have a script written.
Time to learn some bash scripting though!
You can use 5.0, but I suggest using 5.3+, so that you can compile
r.series which lets you do stats on the year's worth of resultant maps
(after increasing r.series' MAXFILES to something bigger than 365!).
general idea is to extract a single day's data to a sites file, do the
interpolation, & repeat.
If you have Markus & Helena's hardbound GRASS book, there's an example
there regarding r.sun I think.
general idea:
#!/bin/bash
i=1
while [ $i -le 365 ] ; do
# generate map names convenient for xganim or r.out.mpeg
DAY=`echo $i | awk '{printf "%03i", $1}'`
echo
echo "Computing radiation for day $DAY..."
sql_extraction_command day=$i sites_out=rain.$DAY
# maybe dump to temp. file & feed that into s.in.ascii ?
s.surf.idw sites_in=rain.$DAY rast_out=insitu_data.$DAY