Re: COARDS-compliant

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Sun, 05 Jul 2009 14:29:35 -0600

Mark Fenbers wrote:
> Dennis Shea wrote:
>> Mark Fenbers wrote:
>>> I just learned about and installed NCL today. My starting netCDF
>>> file is not COARDS-compliant, but ncl_filedump reads the file,
>>> interprets the information, and outputs variable:data pairs without
>>> errors. From what I read, I understand that ncl_convert2nc is
>>> capable of creating a COARDS-compliant netCDF file (presumably if
>>> given the proper options).
>> I believe that ncl_convert2nc will create COARDS compliant nc files from
>> grib1 or grib2 source files.
> But I don't have a grib1 or grib2 file. I have a netCDF file (non-COARDS).
>> It will not convert non-COARDS compliant netCDF to COARDS-compliant.
>> Not sure that could be done.
> Yes, that is my complaint. Most NCL utilities will read (and
> understand) my non-COARDS netCDF, but ncl_convert2nc is not one of them.

---
What does it not 'understand' ?
---
>> It should be straight forward to write an NCL script that
>> converts your initial non-CF file to COARDS compliant.
>> You could then call that script.
> This confuses me because you said in the previous paragraph, "Not sure 
> that could be done. " and now you're saying how I could go about it, I 
> think.
----
It can not be done *automatically*.
----
>>> However, ncl_convert2nc will not ingest a netCDF file like 
>>> ncl_filedump can.  
>> This is not clear what you mean here.
> Sorry...  Just that ncl_filedump reads in the netCDF file and seems to 
> "understand" the data, but ncl_convert2nc complains when reading the 
> same file (saying that it cannot read netCDF files).
>>> So how would I go about converting one netCDF file to another?
>>      fi = addfile("initial_file","r")
>>      fo = addfile("output_file.nc", "c")
>>
>> then read all the variables frim 'fi';
>> use
>> http://www.ncl.ucar.edu/Document/Functions/Built-in/getfilevarnames.shtml
>>
>> loop over each variable; change what u want to change and output
>> each variable
>>
>> Good luck
> Thanks!  I'll need lots of it, because:  1) I know nothing about NCL 
> aside from what I've read in the past day or so, and 2) I know little 
> about netCDF format and COARDS-compliance and probably not enough to 
> create my own COARDS-compliant netCDF (even if I was an expert at NCL).  
> So I have a *lot* of learning to do in the next week or two.  I was just 
> hopeful that I had found a utility that would read my non-COARDS netCDF 
> and convert it into a COARDS netCDF without me having to add another 
> lengthy project to my overflowing plate.
---
My opinion is that it would not be that difficult.
Of course, you have to read the COARDS standard.
It refers to the udunits standard supported by Unidata.
---
> 
> Thanks for the help!
> Mark
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Jul 05 2009 - 14:29:35 MDT

This archive was generated by hypermail 2.2.0 : Tue Jul 07 2009 - 11:13:18 MDT