[ncl-talk] Write netcdf data with CF compliant

Dennis Shea shea at ucar.edu
Fri Sep 12 15:17:26 MDT 2014


Well, almost all of NCL's examples would be CF-1.0 even if not listed with
a "Conventions" attribute.
----
Offline you sent a sample GEOS file. You also sent a long script to regrid
the GEOS5 (721,1152)  to a 1x1 grid (181,360).

You used bilinear interpolation ( linint2 ) to regrid. Then you did
'something' with the time variable. To me it
looks like you tried to create a time coordinate variable that was
yyyymmdd. This is not a CF conforming
time because the udunits package does not recognize these units.

I had a script I modified which does what (I think you want). It uses NCL's
'simple' method of writing netCDF.
Yes, it may be a bit inefficient for large files with many variables but
the simplicity is worth the time.
See attachment.

---

Also, given that the files contain aerosols, I think conservative
regridding (specifically, ESMF conservative
regridding) would be a better choice. The 1st few examples are all
rectilinear to rectilinear.
You could modify an choose the 'conserve' method.

      http://www.ncl.ucar.edu/Applications/ESMF.shtml

Please *read* the assorted ESMF options. The examples may not be exactly
what you need.
The weight file need be generated only once. You then use the weight file
for all subsequent runcs.


---
Also, I think a good read of the Mini-Language Manual would be of use to
you.

   http://www.ncl.ucar.edu/Document/Manuals/


---
Good luck




On Fri, Sep 12, 2014 at 9:04 AM, Partha Bhattacharjee <pbhatta2 at jhu.edu>
wrote:

>
>  Are there any examples available to see how to write netcdf files in CF convention
> using NCL ? I am  reading a big GEOS-5 .nc4 file and trying to write some
> of the variables into netcdf file. Thanks.
>
>
>   Partha
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140912/90707921/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: g5varmap.ncl
Type: application/octet-stream
Size: 2400 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140912/90707921/attachment.obj 


More information about the ncl-talk mailing list