Here are some useful things to keep in mind when using Ferret to
analyze diagnostic output in Netcdf format.
- Ferret recognized files as being Netcdf format by the ``use''
command. For example, to analyze the diagnostic file
``snapshots.dat.nc'', try
use snapshots.dat.nc
If a message about negative values at the start of the
time axis appears, it just means that the time stamp in the file is
before year 1900.
If a message appears complaining that ``evenly spaced
axis has edges definition: xt_i - ignored'', it just means that the
grid has constant resolution and edges specifications which have been
added to the NetCDF file to account for non-uniform grid resolution is
being ignored. Nothing to worry about.
- All data on land points are currently set to a flag value of
-1.E34 in MOM_3. In early versions, the flag value was set
to zero. Ferret can use either of these values to mask out land
points for plots. For example, if a flag value of zero was used, the
temperature (variable ``temp'') at level k=1 from a snapshot file
``snapshots.yyyyyy.mm.dd.dta.nc'' can be plotted using
shade if temp ne 0 then temp
If the flag value is -1.E34, the following command
will produce the same plot
shade temp
because Ferret interprets -1.E34 as missing data.
- When analyzing data from global models where option cyclic
has been enabled, it is sometimes useful to move the Greenwich Meridian
to the middle of a plot. Otherwise, the Atlantic ocean will be split at
the Greenwich Meridian between the eastern and western sides of the
plot. As an example, consider the file ``snapshots.yyyyyy.mm.dd.dta.nc'' from the
test case. Moving the Greenwich Meridian can be done in Ferret by
defining a new longitude axis ``xnew'' by cloning a portion of the
original x-axis without the extra longitudes (i=1 and
i=92), and using option ``modulo''. The Ferret command is
define axis/from_data/name=xnew/x/units=degrees x=[g=temp,i=2:91]
set axis/modulo xnew
The following Ferret commands will contour the
stream function from file ``snapshots.yyyyyy.mm.dd.dta.nc'' with the Greenwich with
a longitudinal region specified from
to
.
set reg/x=20w:20e
fill psi[gx=xnew]
- Some NetCDF datasets such as Hellerman windstress which has been
interpolated to model resolution by script run_sbc or Levitus
data which has been interpolated to model resolution by
script run_ic do not have land values flagged. The interpolated
data from which NetCDF formatted data is constructed contains linearly
extrapolated values over land (there is no information on which cells
are land and which are ocean). The reason for this is so that if
changes are made to topography the datasets don't need to be
re-generated. However, the un-interpolated Levitus NetCDF dataset
produced by script run_levitus_netcdf) has land values flagged.
When comparing interpolated datasets (without flagged land values) with
model generated data, the land flags can easily be generated for
plotting purposes. For instance, suppose model generated temperature
(variable ``temp'' from ``snapshots.yyyyyy.mm.dd.dta.nc'' which is
assumed to be the first dataset [d=1]) is to be compared with
interpolated Levitus temperature (variable ``t_lev'' from
``levitus.dta.nc'') for March at level k=2 (the second dataset
[d=2]). The following commands will show the interpolated Levitus data
with land masked out
shade if temp[d=1] ne -1.E34 then t_lev[k=2,l=3,d=2,j=2:60]
If the flag value of ``-1.E34'' does not work then
use a ``0'' instead. The l=3 signifies the month of March and the
range on ``j'' is to make the latitude range match the range from the
file snapshots.yyyyyy.mm.dd.dta.nc for the test case resolution.