<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 12, 2013 at 12:55 AM, Lee Eddington <span dir="ltr"><<a href="mailto:lee.w.eddington@gmail.com" target="_blank">lee.w.eddington@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Anna,<div><br></div><div>I tried your suggestion, but now I'm unable to import the data.  Here's some output showing the region and the error messages:</div>

</div></blockquote><div><br></div><div><br></div><div>What does the gdalinfo says about the subdataset?</div><div>gdalinfo NETCDF:geo_em.d03.nc:HGT_M</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div dir="ltr"><div><br></div><div><p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">
GRASS 6.4.3 (bali_d03_ll):~ > g.proj -p</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">-PROJ_INFO-------------------------------------------------</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">name       : Lat/Lon</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">proj       : ll</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">datum      : wgs84</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">ellps      : wgs84</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">no_defs    : defined</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">towgs84    : 0.000,0.000,0.000</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">-PROJ_UNITS------------------------------------------------</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">unit       : degree</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">units      : degrees</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">meters     : 1.0</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">GRASS 6.4.3 (bali_d03_ll):~ > g.region -p</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">projection: 3 (Latitude-Longitude)</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">zone:       0</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">datum:      wgs84</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">ellipsoid:  wgs84</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">north:      6:19:40.44S</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">south:      10:27:59.04S</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">west:       112:19:46.2E</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">east:       117:43:20.64E</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">nsres:      0:01:36.12</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">ewres:      0:01:37.56</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">rows:       155</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">cols:       199</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">cells:      30845</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">GRASS 6.4.3 (bali_d03_ll):~ > r.in.gdal -o input="NETCDF:grassdata/bali/geo_em.d03.nc:HGT_M" output="d03_HGT_M"</p>

<div class="im">

<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">Warning 1: No UNIDATA NC_GLOBAL:Conventions attribute</p>
</div><p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">WARNING: Over-riding projection check</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">WARNING: G_set_window(): Illegal latitude for North</p></div></div><div class=""><div class="h5"><div class="gmail_extra">

<br><br><div class="gmail_quote">
On Mon, Nov 11, 2013 at 9:21 PM, Anna Petrášová <span dir="ltr"><<a href="mailto:kratochanna@gmail.com" target="_blank">kratochanna@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div dir="ltr">Hi,<div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Mon, Nov 11, 2013 at 11:37 PM, Lee Eddington <span dir="ltr"><<a href="mailto:lee.w.eddington@gmail.com" target="_blank">lee.w.eddington@gmail.com</a>></span> wrote:<br>




<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">I'm trying to import a NetCDF file from the WRF weather forecast model with r.in.gdal, but I can't get it to georeference.  Instead I end up with a x,y coordinate system of rows and columns.  The file georeferences fine in a number of other weather graphics programs.  I tried to follow the directions at:<div>





<br></div><div><a href="http://www.gdal.org/frmt_netcdf.html" target="_blank">http://www.gdal.org/frmt_netcdf.html</a><br></div><div><br></div><div>but when I run gdalinfo I get the following:</div><div><br></div><div><p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">





$ gdalinfo <a href="http://geo_em.d03.nc" target="_blank">geo_em.d03.nc</a></p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">Warning 1: No UNIDATA NC_GLOBAL:Conventions attribute</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">Driver: netCDF/Network Common Data Format</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">Files: <a href="http://geo_em.d03.nc" target="_blank">geo_em.d03.nc</a></p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">Size is 512, 512</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">Coordinate System is `'</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">Metadata:</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#BOTTOM-TOP_GRID_DIMENSION=0</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#CEN_LAT=-8.4095154</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#CEN_LON=115.02</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#corner_lats={ -10.454437, -6.3537445, -6.3537445, -10.454437, -10.454437, -6.3537445, -6.3537445, -10.454437, -10.46785, -6.3401871, -6.3401871, -10.46785, -10.46785, -6.3401871, -6.3401871, -10.46785 }</p>






<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#corner_lons={ 112.3332, 112.3332, 117.70679, 117.70679, 112.31956, 112.31956, 117.72044, 117.72044, 112.3332, 112.3332, 117.70679, 117.70679, 112.31956, 112.31956, 117.72044, 117.72044 }</p>






<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#DX=3000</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#DY=3000</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#DYN_OPT=2</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#FLAG_MF_XY=1</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#grid_id=3</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#GRIDTYPE=C</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#i_parent_end=99</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#i_parent_start=34</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#ISICE=24</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#ISLAKE=-1</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#ISOILWATER=14</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#ISURBAN=1</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#ISWATER=16</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#j_parent_end=84</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#j_parent_start=34</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#MAP_PROJ=3</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#MMINLU=USGS</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#MOAD_CEN_LAT=-8.4095078</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#NUM_LAND_CAT=24</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#parent_grid_ratio=3</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#parent_id=2</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#POLE_LAT=90</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#POLE_LON=0</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#SIMULATION_START_DATE=0000-00-00_00:00:00</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#SOUTH-NORTH_GRID_DIMENSION=154</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#SOUTH-NORTH_PATCH_END_STAG=154</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#SOUTH-NORTH_PATCH_END_UNSTAG=153</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#SOUTH-NORTH_PATCH_START_STAG=1</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#SOUTH-NORTH_PATCH_START_UNSTAG=1</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#sr_x=1</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#sr_y=1</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#STAND_LON=115.02</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#TITLE=OUTPUT FROM GEOGRID V3.4</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#TRUELAT1=-8.4095001</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#TRUELAT2=0</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#WEST-EAST_GRID_DIMENSION=199</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#WEST-EAST_PATCH_END_STAG=199</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#WEST-EAST_PATCH_END_UNSTAG=198</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#WEST-EAST_PATCH_START_STAG=1</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  NC_GLOBAL#WEST-EAST_PATCH_START_UNSTAG=1</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">Subdatasets:</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  SUBDATASET_1_NAME=NETCDF:"<a href="http://geo_em.d03.nc" target="_blank">geo_em.d03.nc</a>":Times</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  SUBDATASET_1_DESC=[1x19] Times (8-bit character)</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  SUBDATASET_2_NAME=NETCDF:"<a href="http://geo_em.d03.nc" target="_blank">geo_em.d03.nc</a>":XLAT_M</p>





<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  SUBDATASET_2_DESC=[1x153x198] XLAT_M (32-bit floating-point)</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  SUBDATASET_3_NAME=NETCDF:"<a href="http://geo_em.d03.nc" target="_blank">geo_em.d03.nc</a>":XLONG_M</p>





<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  SUBDATASET_3_DESC=[1x153x198] XLONG_M (32-bit floating-point)</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">  SUBDATASET_4_NAME=NETCDF:"<a href="http://geo_em.d03.nc" target="_blank">geo_em.d03.nc</a>":XLAT_V</p>




</div><div>.</div>
<div>.</div><div>.</div><div>.</div><div><p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">Corner Coordinates:</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">Upper Left  (    0.0,    0.0)</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">Lower Left  (    0.0,  512.0)</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">Upper Right (  512.0,    0.0)</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">Lower Right (  512.0,  512.0)</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(255,255,255);background-color:rgb(0,0,0)">Center      (  256.0,  256.0)</p></div><div><br></div><div>The warning - </div><div><br></div><div><span style="color:rgb(255,255,255);font-family:Menlo;font-size:11px;background-color:rgb(0,0,0)">Warning 1: No UNIDATA NC_GLOBAL:Conventions attribute</span><br>





</div><div><span style="color:rgb(255,255,255);font-family:Menlo;font-size:11px;background-color:rgb(0,0,0)"><br></span></div><div>leads me to believe that all the projection info is not being recognized, but I'm not sure why.  Is it possible that GDAL wasn't compiled with <span style="font-size:medium;font-family:Times">libnetcdf?  </span>But if that's the case I would think that gdalinfo wouldn't work at all.</div>





<div><br></div><div>I've imported the data into GRASS using:</div><div><br></div><div>r.in.gdal input="NETCDF:geo_em.d03.nc:HGT_M" output="d03_HGT_M" location="bali_d03"</div><div><br></div>





<div>to create a new location.</div><div><br></div><div>I also created a location with the Mercator projection of the data and tried importing using:</div><div><br></div><div><div>r.in.gdal -o input="NETCDF:grassdata/bali/geo_em.d03.nc:HGT_M" output="d03_HGT_M"</div>





</div><div><br></div><div>but as far as I can tell still get an x,y row,column coordinate system.</div><div><br></div><div>I also have the lat and lon of each cell.  Is there anyway to georeference using that data?</div>




<div>
<br></div></div></blockquote><div><br></div><div><br></div></div></div><div>try to create a WGS84 latitude-longitude projection (EPSG 4326) and then run r.in.gdal with -o flag. At least that worked for me and I had similar gdalinfo output.</div>




<div><br></div><div>Anna</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">



<div dir="ltr">
<div></div><div>Thanks,</div><div>Lee</div></div>
<br>_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br></blockquote></div><br></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>