Re: [GRASS-user] Import GRIB files to GRASS

2010-06-09 Thread Randy Bradley
 I'm planning on using some global meteo datasets that are
 distributed in GRIB format. has anyone ever tried to parse
 GRIB NCEP files to GRASS?

It is so interesting to see vastly different approaches to solve a
similar problem.  I'm downloading NOAA forecast data which is in GRIB
format.  I run the files through degrib and then parse the shape files with
a C program using the shapelib libraries and create a new shape file which I
import into GRASS with v.in.ogr.  I plot the values with d.vect.thematic.

The resulting maps can be viewed at:
http://www.ars.usda.gov/npa/marc/heatstress

That reminds me, I originally set up a location for each region with an
eye forward on multithreading the map generation phases.  I forgot the
reason in the middle of the project and created several regions in one
location.  I had to revert back to a location for each region when I
implemented multithreading but reduced the total map generation time from
several hours to 15 minutes.  :-)


Randy


___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Newbie, running python on Mac, error on execl

2010-04-06 Thread Randy Bradley
The first thing to check would be the file permission bits on the file
hi.py to be sure the execute bit is set.  From your command line, just
type ls -al hi.py.  The first 10 characters from the output should show
you what bits are set and you are looking for an x in the fourth
character.  For example:

-rwxr--r--

This means the owner has read,write,execute privileges while group and world
have read only.  If you don't have execute privileges, simple type:

chmod u+x hi.py


Hope this helps.  The same thing was driving me batty until this morning on
a Linux machine after splitting a script into two parts.  The old one had
the execute bit set but the new one didn't.

Randy

On 04/06/10 12:31 PM, AhmadKhaled vb...@yahoo.com wrote:

 
 python hi.py map=geol...@permanent
 
  and I got the following error:
 
 execl() failed: Permission denied
  

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Newbie... Locations, Projections, Regions, choices? (long)

2010-03-31 Thread Randy Bradley
On 03/31/10 2:57 AM, Micha Silver mi...@arava.co.il wrote:

 It looks like you're off to a good start. All you need to do, in the aeaConUs
 location, is save a few regions. Begin with:
 g.region vect=states_vect save=ConUS
 You might want to save this Continental zoom as the default with
 g.region -s ConUS
 Then zoom to each of the E,Central,W etc areas and save an additional region,
 i.e. (after zooming to central region):
 g.region save=Central
 You can alternatively specify the region bounds with something like:
 g.region save=Central west=-120 east=-110 ...
 This all can be done in the GUI with Config-Region.
 
 Now you jump to each of the saved regions with
 g.region reg=Central
 etc...

Thanks Micha.  Good to know I¹m on the right course.  After the first step:
³g.region vect=States save=ConUS² I can indeed ³zoom to saved region² in the
display to view the map.  However, g.region region=ConUS shows:

projection: 99 (Albers Equal Area)
zone:   0
datum:  wgs84
ellipsoid:  wgs84
north:  1838.08985202
south:  34.12860299
west:   -1467.66023444
east:   1403.23869107
nsres:  0.0531
ewres:  0.0498
rows:   36079
cols:   57418
cells:  2071584022

Unfortunately, the bounds are all offset from the central axis so I can¹t
use the lat.  lon. values for the boundaries as you suggest.  (ie west=-120
east=-110)  I can overlay a grid and get a good estimate of values that will
work to define my regions.  
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Newbie... Locations, Projections, Regions, choices? (long)

2010-03-30 Thread Randy Bradley
All,

I need to create 6 regional maps of the continental U.S., north and
south by west, central, and east.  My first thought was to create 7
locations (one for the entire continental US) but my second thought was to
create just one location with the default region as the entire continental
US and 6 other regions. Is this sound logic?

First I downloaded the States data from the National Atlas.  I then
created a latitude - longitude location and imported the shape file
excluding Alaska, Hawaii, Puerto Rico, and the Virgin Islands.
 g.proj -p
-PROJ_INFO-
name   : Latitude-Longitude
datum  : wgs84
towgs84: 0.000,0.000,0.000
proj   : ll
ellps  : wgs84
-PROJ_UNITS
unit   : degree
units  : degrees
meters : 1.0

 g.region -p
projection: 3 (Latitude-Longitude)
zone:   0
datum:  wgs84
ellipsoid:  wgs84
north:  49N
south:  25N
west:   125W
east:   67W
nsres:  0:00:30
ewres:  0:00:30
rows:   2880
cols:   6960
cells:  20044800

The map displays fine but I want to change the projection to Albers
Equal Area or Lambert Conformal Conical since it is such a large area.  So I
created a new location: aeaConUS with one caveat.  It said the eastern value
had to be larger than the western value so I (perhaps wrongly) used ­125 for
the western boundary and ­67 for the eastern.  Using the GUI selected the
³VectorDevelop mapReproject vector² menu item and selected the vector from
the above location.  Here is what the new location and default region looks
like:

 g.proj -p
-PROJ_INFO-
name   : Albers Equal Area
datum  : wgs84
towgs84: 0.000,0.000,0.000
proj   : aea
ellps  : wgs84
a  : 6378137.00
es : 0.0066943800
f  : 298.2572235630
lat_0  : 23.00
lat_1  : 29.50
lat_2  : 45.50
lon_0  : -96.00
x_0: 0.00
y_0: 0.00
-PROJ_UNITS
unit   : mile
units  : miles
meters : 1609.344000

 g.region -p
projection: 99 (Albers Equal Area)
zone:   0
datum:  wgs84
ellipsoid:  wgs84
north:  49
south:  25
west:   -125
east:   -67
nsres:  0.05
ewres:  0.05
rows:   480
cols:   1160
cells:  556800

When I first try to display this map, nothing is displayed unless I
select ³Zoom display to selected map² at which point my nice Albers map gets
displayed.  Or I can ³zoom out² about 20 times to make the Albers map start
showing up near the top of the screen.  Obviously I¹m doing something wrong
here but I¹m not sure if its the units (meters vs miles) or something more
fundamental.


Drowning in a sea of GRASS and loving it!

Thanks for any
suggestions,

Randy
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user