[Thread Prev][Thread Next][Index]
Fwd: Re: [ferret_users] CF compliant netcdf file
Hi Ansley and All,
Thanks very much Ansley, However, I still don't have any solutions.
I studied the NCO User's Guide and the (10) Ferret archive messages pertaini
ng to CF. I found various routines for renaming, combining, concatenating,
etc. but no functions for adding something new into a file. If anyone knows
what NCO function can be used to insert a global statement "Conventions=CF
1.0" please let me know, I would greatly appreciate it. If you can show me
the right syntax, that would be even better.
Also, I used the define axis/z=1:80:1/UNITS=level zax to define units for
the z axis in my file, and the CF compliance checker gave me an error (ERROR
: Invalid units: LEVEL). I searched and found the file "udunits.txt" which
seems to give the allowed names for units, but there was nothing like "chann
el" or "level". I gave up and set the units to "m" (define axis/z=1:80:1/UN
ITS=m zax). I tried this file in the online CF compliance checker and got t
he error:
Checking variable: ZAX71_71
------------------
ERROR: axis attribute inconsistent with coordinate type as deduced from unit
s and/or positive
I don't know what the problem is, but it may be the strange axis name of ZAX
71_71. To write the data out to a netCDF file I use the command: save/k=71
/file=abc.nc pr (I need the data in level 71, of the 80 levels in the orig
inal BSQ data file).
I guess this is what causes the z axis to be named ZAX71_71 in the file. Do
es anyone know what I need to do to fix this error?
Thank you,
Ben
> Delivered-To: benb@restec.or.jp
> X-Authentication-Warning: ferret.pmel.noaa.gov: majordom set sender to own
er-ferret_users@ferret.pmel.noaa.gov using -f
> Date: Fri, 14 Oct 2005 11:17:16 -0700
> From: Ansley Manke <ansley.b.manke@noaa.gov>
> User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
> X-Accept-Language: en-us, en
> To: Ben Burford <benb@restec.or.jp>
> Cc: ferret_users@noaa.gov
> Subject: Re: [ferret_users] CF compliant netcdf file
> Sender: owner-ferret_users@pmel.noaa.gov
>
> Hi Ben,
> At the moment we can't define a long_name attribute for an axis when
> writing to a netcdf file, but you can certainly define the Z axis with
> any units you want -- this would be fine:
>
> define axis/z=1:80:1/UNITS=level zax
>
> Also, note that you can use the real definitions of all of the axes to
> begin with if you wish, the ones with xax and yax in units of degrees,
> and zax with the levels, rather than first defining abstract axes and
> then redefining the axes.
>
> To set a global dataset attribute, or add standard_name or long_name
> attributes to the coordinate axes, for now you'll need to use NCO
> operators on your file after writing it. For more on the NCO tools,
> search in the Ferret users archives, there are messages about that, e.g.
>
> http://ferret.pmel.noaa.gov/Ferret/Mail_Archives/fu_2005/msg00835.html
>
> You can do the SAVE command, and then spawn the NCO command to edit
> attributes right from your Ferret session or scripot. In the next Ferret
> release we'll have syntax to let you edit and add to attributes.
>
> Ansley
>
> Ben Burford wrote:
>
> >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 PR2A
25_
> >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 net
cdf
> > file. My problem is I want to clean up my script to create a CF complia
nt
> >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 criti
cal
> > problem making it non-compliant).
> >a. I have satellite data in various channels (i.e. frequency/polarity com
bin
> >ations). I would like to define the z axis as Channel, with units of Cha
nne
> >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 leve
l f
> >rom 1 to 80 (each level is 250 meters, so this this 0 to 20,000 meters, b
ut
> >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 somethin
g,
> >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