<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi, Georgia --&nbsp;<div>There are two problems:</div><div>1. The time_counter coordinate has size 0, but the variables vomecrty and sometauy list this as one of their dimensions. I don't think I've ever seen a netcdf file like this; I would try removing the "t," from your variable declarations and see if that fixes anything.&nbsp;</div><div>2. The variables nav_lon and nav_lat reveal that the data are not on a rectilinear grid -- GrADS requires 1-dimensional grid coordinates.&nbsp;</div><div><br></div><div>If you want to look at the data in GrADS on an abstract grid that won't be georegistered, you will have to change your XDEF and YDEF statements to:</div><div>&nbsp; &nbsp;XDEF 198 linear 1 1</div><div>&nbsp; &nbsp;YDEF 224 linear 1 1</div><div>Then use 'set mproj off'. This is obviously not ideal.&nbsp;</div><div><br></div><div>I have been working on a solution to this problem, using PDEF and a regridding tool from ESMF called RegridWeightGen that will interpolate this kind of ocean model output on a curvilinear grid to a rectilinear grid that GrADS can handle. It is still in the testing/development stage. If you want to know more about how to make this work, please write to me offline.&nbsp;</div><div>--Jennifer</div><div><br></div><div><br><div><div>On May 29, 2012, at 12:26 PM, <a href="mailto:pigiottini@libero.it">pigiottini@libero.it</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Hi all,</div><pre>I have some output data in NetCDF4 format from NEMO model.<br>I'd like to display my output variables.<br><br>I used the <code>"open" </code>command to open the file.nc because "sdfopen" had failed. So I wrote a GrADS descriptor file .ctl <br>When I try to display a variable, for example ga-&gt; d vomecrty, I get the following error: <br>  gancgrid error: nc_get_vara_double failed; NetCDF: Index exceeds dimension bound<br>  Data Request Error:  Error for variable 'vomecrty'<br>  Error ocurred at column 1<br>  DISPLAY error:  Invalid expression <br>  Expression = vomecrty<br><br>This is my AMM12_5d_20070101_20070101_grid_V.ctl:
DSET ^AMM12_5d_20070101_20070101_grid_V.nc<br>DTYPE netcdf<br>TITLE 4-D Ocean Variables: Meridional Components<br>UNDEF 9.96921e+36f<br>OPTIONS zrev<br>XDEF 198 linear -19.8333 0.16667 <br>    <br>YDEF 224 linear 40.16667 0.11111<br>  <br>ZDEF 33 levels  3.107505 10.04362 18.13503 27.66259 38.97338 52.49526 <br>    68.75394 88.39286 112.1955 141.1104 176.2764 219.0491 271.0224 <br>    334.0439 410.218 501.8885 611.5969 742.007 895.795 1075.506 <br>    1283.386 1521.216 1790.151 2090.625 2422.302 2784.11 3174.342 <br>    3590.799 4030.965 4492.172 4971.748 5467.131 5975.949   <br>    <br>TDEF 0 linear 01jan2007 5dy<br>VARS 2<br>vomecrty    33  t,z,y,x   ocean current along j-axis(m/s)<br>sometauy     0  t,y,x  Wind Stress along j-axis (N/m^2)<br>ENDVARS<br>___<br>And This is the first part of my AMM12_5d_20070101_20070101_grid_V.cdl (output of ncdump -b):<br>netcdf AMM12_5d_20070101_20070101_grid_V {<br>dimensions:<br>        x = 198 ;<br>        y = 224 ;<br>        depthv = 33 ;<br>        time_counter = UNLIMITED ; // (0 currently)<br>        tbnds = 2 ;<br>variables:<br>        float nav_lon(y, x) ;<br>                nav_lon:standard_name = "longitude" ;<br>                nav_lon:units = "degrees_east" ;<br>                nav_lon:valid_min = 4.002733e-05f ;<br>                nav_lon:valid_max = 359.8334f ;<br>                nav_lon:long_name = "Longitude" ;<br>                nav_lon:nav_model = "Default grid" ;<br>        float nav_lat(y, x) ;<br>                nav_lat:standard_name = "latitude" ;<br>                nav_lat:units = "degrees_north" ;<br>                nav_lat:valid_min = 40.16667f ;<br>                nav_lat:valid_max = 64.94442f ;<br>                nav_lat:long_name = "Latitude" ;<br>                nav_lat:nav_model = "Default grid" ;<br>        float depthv(depthv) ;<br>                depthv:axis = "Z" ;<br>                depthv:standard_name = "model_level_number" ;<br>                depthv:units = "m" ;<br>                depthv:positive = "down" ;<br>                depthv:valid_min = 3.107505f ;<br>                depthv:valid_max = 5975.949f ;<br>                depthv:title = "depthv" ;<br>                depthv:long_name = "Vertical V levels" ;<br>        double time_counter(time_counter) ;<br>                time_counter:axis = "T" ;<br>                time_counter:standard_name = "time" ;<br>                time_counter:units = "seconds since 2007-01-01 00:00:00" ;<br>                time_counter:calendar = "gregorian" ;<br>                time_counter:title = "Time" ;<br>                time_counter:long_name = "Time axis" ;<br>                time_counter:time_origin = " 2007-JAN-01 00:00:00" ;<br>                time_counter:bounds = "time_counter_bnds" ;<br>        double time_counter_bnds(time_counter, tbnds) ;<br>        float vomecrty(time_counter, depthv, y, x) ;<br>                vomecrty:units = "m/s" ;<br>                vomecrty:standard_name = "ocean current along j-axis" ;<br>                vomecrty:_FillValue = 9.96921e+36f ;<br>                vomecrty:long_name = "ocean current along j-axis" ;<br>                vomecrty:online_operation = "ave(X)" ;<br>                vomecrty:interval_operation = 150.f ;<br>                vomecrty:interval_write = 432000.f ;<br>                vomecrty:coordinates = "time_counter depthv nav_lat nav_lon" ;<br>        float vomeeivv(time_counter, depthv, y, x) ;<br>                vomeeivv:units = "m/s" ;<br>                vomeeivv:standard_name = "EIV ocean current along j-axis" ;<br>                vomeeivv:_FillValue = 9.96921e+36f ;<br>                vomeeivv:long_name = "EIV ocean current along j-axis" ;<br>                vomeeivv:online_operation = "ave(X)" ;<br>                vomeeivv:interval_operation = 150.f ;<br>                vomeeivv:interval_write = 432000.f ;<br>                vomeeivv:coordinates = "time_counter depthv nav_lat nav_lon" ;<br>        float sometauy(time_counter, y, x) ;<br>                sometauy:units = "N/m2" ;<br>                sometauy:standard_name = "Wind Stress along j-axis" ;<br>                sometauy:_FillValue = 9.96921e+36f ;<br>                sometauy:long_name = "Wind Stress along j-axis" ;<br>                sometauy:online_operation = "ave(X)" ;<br>                sometauy:interval_operation = 150.f ;<br>                sometauy:interval_write = 432000.f ;<br>                sometauy:coordinates = "time_counter nav_lat nav_lon" ;<br><br>// global attributes:<br>                :Conventions = "CF-1.1" ;<br>                :file_name = "AMM12_5d_20070101_20070101_grid_V.nc" ;<br>                :production = "An IPSL model" ;<br>                :TimeStamp = "2012-MAY-25 12:53:46 GMT+0200" ;<br> .......<br><br>Thanks in advance for your help!<br>Regards<br>Giorgia<br></pre><div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;" id="_mcePaste">&nbsp;</div><span>&lt;AMM12_5d_20070101_20070101_grid_V.cdl&gt;</span>_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>http://gradsusr.org/mailman/listinfo/gradsusr<br></blockquote></div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Jennifer M. Adams</div><div>IGES/COLA</div><div>4041 Powder Mill Road, Suite 302</div><div>Calverton, MD 20705</div><div><a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></span>
</div>
<br></div></body></html>