[Thread Prev][Thread Next][Index]

[ferret_users] CF compliant netcdf file



Hello fellow Ferreters,

I'm using this script to read in (satellite) data (in BSQ format) from a fil
e (the data has been moved to a lat/lon grid):
define axis/x=1:51:1 xax
define axis/y=1:51:1 yax
define axis/z=1:164:1 zax
define grid/x=xax/y=yax/z=zax gax1
file/format=stream/type=i2/swap/skip=`2048/4`/grid=gax1/var=pr_scale PR2A25_
200210030119_cpr 
let pr=pr_scale/10
set var/bad=999.9 pr

define axis/x=98.44E:100.94E:.05 xax
define axis/y=16.58N:19.08N:.05 yax
set var/title="TRMM PR Rain Rate" pr
set var/units="mm/h" pr


I then use the save/file function to write one of the levels out to a netcdf
 file.  My problem is I want to clean up my script to create a CF compliant 
file.


I need the following changes/fixes:

1. Add a global statement "Conventions=CF 1.0"

2. Add standard_name or long_name attributes to x, y and z axes.

3. I need to define the units of measure of the Z axis (this is the critical
 problem making it non-compliant). 
a. I have satellite data in various channels (i.e. frequency/polarity combin
ations).  I would like to define the z axis as Channel, with units of Channe
ls.  Perhaps something like Define Axis/z=1:7:1/UNITS=channel/Channels
However, I notice in the CF convention that "level" or "layer" is allowed so
 level or layer is fine, but I don't know how to specify this as the axis, o
r what units to use.

b. I have another type of satellite data where the z axis value is a level f
rom 1 to 80 (each level is 250 meters, so this this 0 to 20,000 meters, but 
I want to specify this as level 1 to 80).
So this might be Define Axis/z=1:80:1/UNITS=level/Level zax  (or something, 
I don't know).


Help in fixing up my script and file will be greatly appreciated.

Thanks,

Ben




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement