[Thread Prev][Thread Next][Index]

Re: [ferret_users] query in ascii to nc conversion

For ascii data every point needs a value.  Where there is missing data, you need to put in some value, which can be 0, or some other value. Make sure it is a value that the data itself will never take on; people often things like 999 or -9999,or -1.e34 (Ferret's default value).  Then in your script before writing the data, you define that value to be the missing-value for the variable:
save/file=ncfile.nc var
It's a good idea to use the /UNITS="units string"  and /TITLE=:title string"  qualifiers on the SET VARIABLE command as well, giving your variable the appropriate units and a descriptive title. That way your file will be self-documenting.

Also notice that when you define your coordinate axes, /units=LONGITUDE and /units=LATITUDE do not comply with the CF data standard for longitude and latitude axes.  Use:

On 12/23/2014 12:11 AM, Nitin Patil wrote:
Dear ferret users,

I am converting ascii to nc using ferret script.

It needs input as lat, lon with corresponding values in ascii/.txt.

But the issue is when there is no value on corresponding lat-lon it writes the lat value but I don't need value in that grid.

If I enter 0 instead of keeping blank in the input file (lat_lon_withzero.txt) it grids fine but I don't need zero to be gridded.
Did anyone knows how to take no value while gridding or ignore zero so that I can get the nc with 1 over selected grids (lat_lon_without_zero.txt).

Please find the relevant files attached.

Nitin Patil

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement