[Thread Prev][Thread Next][Index]

Re: Ferret: MC datasets, how?

Hi Ben,

Ferret supports Multi-file NetCDF data sets. See the ferret manual on MC data
sets (pp, 23, 149 in the most recent edition).

Let me also point you to a previous message that detailed the use of the MC
dataset in NetCDF. That message will follow.

For general consumption, there are three good sources of ferret info besides
the listserver. These are the "official ferret faq" at:
The unofficial (but still good) "Ferret Infrequently Asked Questions" by
Joachim Dengg at:
And the compilation of listserver messages at:


Hi all,

Days ago, I got some problems on using multi CDF data. My previous email
is included at the bottom. Steve figured out that the problems are from my
netCDF data. According to Steves's suggestion, I revised them, everything
is going fine. Now, I would like to share his advice with Ferreters.

An "MC" data set in Ferret ties a collection of files together into a time
series, but each of the files in the collection must contain valid time
information describing the time steps that it contains. The documentation
on MC data sets (Chapt. 9, sect. 4) says

 "Ferret performs sanity checking on the data set by comparing these time
  coordinates with those found in the data files as the data are read."

This means that the values of "T" contained in each individual file must
match the values that are given in the $STEPFILE_RECORD of the MC
descriptor file. And the time dimension should be named as "t" or "time"
instead of others, like "l" in my case. So Steve's suggestions are:

1) change dimension name "l" to "t" or "time"

2) (optionally) add the time origin value on the units, as in, for

        float t(t) ;
                t:long_name = "time" ;
                t:units = "seconds since 1972-01-01" ;

3) Insert the correct numerical value of "t" into each file.

>From my experience, 1) plays the key role, i.e., the file should looks
like this:
        t = UNLIMITED ;
        float t(t) ;
                t:long_name = "time" ;
Even you don't have correct numerical value of "t" in each file(t=0 in all
my files), but you give the values in descriptor file, Ferret will work,
it will compare the time, give you the information about what value is
expected and what is in reality, finally it will follow descriptor file.

Note: you should test this and take your own responsibility.

It is not hard to follow all Steve's suggestion when you extract model
outputs to netCDF files.

Happy ferreting and thanks to Ferret group,

Dongxiao Zhang(Graduate Student)
Division of Meteorology and Physical Oceanography
Rosenstiel School of Marine and Atmospheric Science
4600 Rickenbacker Causeway
Miami, FL 33149
Phone  : (305)361-4806
Fax    : (305)361-4696
Office : MSC Room 309
> Hi, all,
> I am trying to make a single NetCDF data set as a collection of NetCDF
> files referred to as "MC"(multi CDF) data sets. Then I need a MC
> descriptor. I tried and met the following problems:
> In my case, I have model output. They are hundreds of NetCDF
> files, with
> variables: depth index--KMT(j,i), SSH(l,j,i), U(l,k,j,i), V(l,k,j,i),
> TEMP(l,k,j,i) and SALT(l,k,j,i). I made a MC descriptor for 10 files,
> example. In ferret, "show data" command gave the following:
>  name     title             I      J      K     L
>  T        time             1:1    1:1    1:1   1:1
>  KMT      depth index      1:481  1:9    1:1   1:1
>  SSH                       1:481  1:9    1:1   1:1--note:it should be
>  U                         1:481  1:9    1:20  1:10
>  V                         1:481  1:9    1:20  1:10
>  TEMP                      1:481  1:9    1:20  1:10
>  SALT                      1:481  1:9    1:20  1:10
> I could only plot KMT and SSH(only one time level). When I tried to plot
> V, for example, ferret showed error:** netCDF error: Variable not found
> Then I excluded KMT variable in the NetCDF files, and the "show data"
> command gave the following:
>  name     title             I      J      K     L
>  SSH                       1:481  1:9    1:1   1:1--note:it should be
>                                                          1:10, too.
>  U                         1:481  1:9    1:20  1:10
>  V                         1:481  1:9    1:20  1:10
>  TEMP                      1:481  1:9    1:20  1:10
>  SALT                      1:481  1:9    1:20  1:10
> This time, everything was fine except that I only got one time level of
> SSH(I need 10 levels).
> Can somebody explain this to me? It seems to me, MC descriptor can not
> work on the variables with different dimentions at the same time. Is it
> right? Is there a way to go around? I don't want to exclude the KMT and
> SSH out of the files one file by one file because I have hundreds of
> files.

 Mark Verschell                     NASA/Goddard Space Flight Center
 verschell@neptune.gsfc.nasa.gov    Code 970/Lab. for Hydrospheric Proc.
 301-286-2027  Fax: 301-286-1761    Greenbelt, MD 20771

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement