[gradsusr] Cannot contour grid - all undefined values - GRADS

Jennifer Adams jma at cola.iges.org
Tue Dec 17 08:44:44 EST 2013


Hi, Anil -- 
This is not a silly problem. The sdfopen command opens this file because it has coordinates that have an attribute named "axis" with values of "X", "Y", and "T". This is enough information for GrADS to decide to map those to LON, LAT, and TIME. Unfortunately, the actual grid latitude and longtidue values are 2-dimensional data values, and so the mapping returned by sdfopen is for the abstract grid, not the real lat/lon grid. Here is the relevant info from the ncdump output:

       float Latitude(Y, X) ;
                Latitude:standard_name = "latitude" ;
                Latitude:units = "degrees_north" ;
        float Longitude(Y, X) ;
                Longitude:standard_name = "longitude" ;
                Longitude:units = "degrees_east" ;

This is a curvilinear grid, so GrADS will not handle it properly without some intervention. Go ahead and 'display latitude' after opening the file with sdfopen and you will see how the contours bend at high northern latitudes. If you are not interested in data that is northward of ~45N (the approximate latitude where the grid starts to curve), then you could truncate the grid and only look at the gridpoints where the grid values are rectilinear. Otherwise, you will need a PDEF file to interpolate. I have used ESMF's RegridWeightGen tool to do this for CMIP5 data that are on curvilinear grids. Details about that workflow are in ftp://cola.gmu.edu/pub/jma/cmip5. Depending on how ambitious you are, you can try to adapt these scripts to this data set. 

--Jennifer



On Dec 17, 2013, at 5:50 AM, Anil Kumar Sharma wrote:

> Hi All,
> This might be silly problem, but I am Stuck.
> I have NetCDF file downloaded from NCEP containing ocean current components. When I opened NetCDF using SDFOpen command in Grads
> 
> ga-> sdfopen C:\t1\20131212_rtofs_glo_2ds_n024_daily_prog.nc
> 
> It gave the text on screen
> 
> Scanning self-describing file:  C:\t1\20131212_rtofs_glo_2ds_n024_daily_prog.nc
> SDF file C:\t1\20131212_rtofs_glo_2ds_n024_daily_prog.nc is open as file 1
> LON set to 1 4500
> LAT set to 1 3298
> LEV set to 1 1
> Time values set: 2013:12:10:0 2013:12:10:0
> E set to 1 1
> 
> I can see LON value upto 4500, and LAT value upto 3298. 
> 
> I want to plot current variables for
>           longitude  -179 - 179 degree
>           latitude -89 to 89 degree
> 
> So what I need to change or How can I get this working??
> when I set these values using SET command 
> ga-> set lon -179 179
> LON set to -179 179
> ga-> set lat -89 89
> LAT set to -89 89
> ga-> d skip(u_velocity,5,5);skip(v_velocity,5,5)
> its gives me error 
> Cannot contour grid - all undefined values.
> 
> 
> Please lead me.
> 
> Thanks in Advance !!!
> 
> B/Regards,
> Anil Kumar
> Pune, India
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

--
Jennifer M. Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
111 Research Hall, Mail Stop 2B3
George Mason University
4400 University Drive
Fairfax, VA 22030 





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20131217/d0b2a61d/attachment-0001.html 


More information about the gradsusr mailing list