[GRASS-dev] Re: [GRASS-user] how to import NetCDF data??
Kirk Wythers
kirk.wythers at gmail.com
Wed Feb 8 11:16:30 EST 2012
Michael,
I could not open the file in GRASS either. I have attached the errors I got. They look like the same that you were describing (I tried both with and without the -o flag). I did however remember the work around I used, which was to:
1. import the .nc files into MATLAB
2. Export as GeoTIffs
3. Read the GeoTiffs into GRASS
This made sense for me partly because I needed to aggregate daily values to monthly means which I did in step 1, but then never thought much more about why I couldn't import directly into GRASS . Your problem motivated me to look into why I needed this workaround in the first place (which is not much of a workaround unless you have access to MATLAB)… which appears to be that my gdal does not have GMT/netcdf support either (as Markus pointed out yesterday). I am also using WIlliams binaries and frameworks.
I agree that more detail in the wiki would be helpful, but I think the first step is to compile to update gdal with GMT/NetCDF support. Perhaps William would be interested?
===================================================================================================================================
GRASS ERRORS:
GRASS 6.4.1 (latlon):~ > r.in.gdal input=~/Desktop/ppt_SRESA2_mid_annual_down_anomaly.nc output=ppt_SRESA2_mid_annual_down_anomaly
ERROR: Projection of dataset does not appear to match current location.
Location PROJ_INFO is:
name: Lat/Lon
proj: ll
datum: nad83
ellps: grs80
towgs84: 0,0,0,0,0,0,0
no_defs: defined
Import dataset PROJ_INFO is:
cellhd.proj = 0 (unreferenced/unknown)
You can use the -o flag to r.in.gdal to override this check and use
the location definition for the dataset.
Consider generating a new location from the input dataset using the
'location' parameter.
GRASS 6.4.1 (latlon):~ > r.in.gdal -o input=~/Desktop/ppt_SRESA2_mid_annual_down_anomaly.nc output=ppt_SRESA2_mid_annual_down_anomaly
WARNING: Over-riding projection check
WARNING: G_set_window(): Illegal latitude for North
GRASS 6.4.1 (latlon):~ >
===================================================================================================================================
On Feb 7, 2012, at 9:10 PM, Michael Barton wrote:
> Thanks Kirk,
>
> Here is a copy of the smallest file we tried. The big ones gave identical errors.
>
> Michael
>
> <ppt_SRESA2_mid_annual_down_anomaly.nc>
>
> ____________________
> C. Michael Barton
> Director, Center for Social Dynamics & Complexity
> Professor of Anthropology, School of Human Evolution & Social Change
> Arizona State University
>
> voice: 480-965-6262 (SHESC), 480-727-9746 (CSDC)
> fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)
> www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu
>
>
>
>
>
>
>
>
>
>
>
> On Feb 7, 2012, at 11:49 AM, Kirk Wythers wrote:
>
>> I had to import a bunch of SSURGO NetCDF data not too long ago Michael (I was going back and forth with GRASS and MATLAB). I don't seem to remember having any trouble with gdal (which means that it must have worked!) Are you sure that the NetCDF is Lat Long?
>>
>> What was your error exactly? Is the file too big to share? If not send it to me and I'll take a look.
>>
>> Best,
>>
>> Kirk
>>
>> Kirk R. Wythers
>> Department of Forest Resources
>> University of Minnesota
>> St. Paul, MN 55108
>> tel: 612.625.2261
>> email: kwythers at umn.edu
>>
>>
>> On Feb 7, 2012, at 12:33 PM, Michael Barton wrote:
>>
>>> I'm trying to help someone at NCAR import NetCDF data and we keep getting an illegal north latitude error. Looking at the GDAL info, I think we need to specify some additional metadata, but the GDAL page stops short of giving an example of how to do this. Has anyone imported climate data this way?
>>>
>>> Thanks
>>> Michael
>>> ____________________
>>> C. Michael Barton
>>> Director, Center for Social Dynamics & Complexity
>>> Professor of Anthropology, School of Human Evolution & Social Change
>>> Arizona State University
>>>
>>> voice: 480-965-6262 (SHESC), 480-727-9746 (CSDC)
>>> fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)
>>> www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> grass-user mailing list
>>> grass-user at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-dev/attachments/20120208/0af7495e/attachment-0001.html
More information about the grass-dev
mailing list