Hi Yangxing,
I would have to look at the internal code to know exactly why, but in
general I'm not surprised at this kind of thing happening. Reading in
data has the effect of loading data and grid information into Ferret,
and so it is in a particular state when the next data request comes
in, and it goes to match variable names and grids. Once you've changed
your file for time L=21, does everything work?
The stepfiles all need the same description of the variables and their
axes is essential for a descriptor file to work.
Ansley
yangxing zheng wrote:
I think the problem occurs due to the .cdf file at
l=21 which I made in a small different way. I use
ncdump to check this file with others, it appears some
difference, like in the name of T axis, time_origin
and units. Now I recreate the file at l=21 so that the
attribute is identical, especially for T axis.
Attached are the cdl file for file(l=21) and
file(l=20) which appears identical.
Most surpring to me is if I repeat/l=20:22 shade u
first, then I repeat/l=20:22 shade temp, the latter
works! but if I just repeat/l=20:22 shade temp before
executing u, the error occurs: netCDF eror: Variable
not found.
The detail is :
.......
repeat/l=20:22 shade temp
!-> REPEAT: L=20
!-> REPEAT: L=21
** netCDF error: Variable not found
shade temp
Command file, command group, or REPEAT execution
aborted
yes? repeat/l=20:22 shade u
!-> REPEAT: L=20
!-> REPEAT: L=21
!-> REPEAT: L=22
yes? repeat/l=20:22 shade temp <---- It works!
!-> REPEAT: L=20
!-> REPEAT: L=21
!-> REPEAT: L=22
So I am curious about ferret working inside. It seems
if it is initialized correctly, ferret is willing to
do that. By the way, the variables u,v,temp in the
same files have the identical strucuture (grid,axis,
etc). So the question is why ferret seems to prefer u
rather than temp?
Ansley Manke wrote:
Hi,
I'm not sure what more to suggest. If you look at that file for time 21
with ncdump, is there anything different about the way the variable
temp is specified?
You might try one of these tools for creating the descriptor file
that's listed in Chapter 10.4.1 of the Ferret documentation:
http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/converting-to-netcdf/CREATING-A-MULTI-FILE-NETCDF-DATA-SET#_VPID_367
You give the tool a list of your files and it'll check their time
information and write the .mc file.
Ansley
yangxing zheng wrote:
Hi,
Thank you for kind help. Ansley, I try your way,
using
repeat/l=1:22 shade temp
it stops at l=21. It can not plot temp, however, if I
plot u first,
yes?shade u
then I plot temp at l=21 again,
yes?shade temp
it works! It is really surpring to me about ferret
working.
P.S.: I using the individual cdf file (l=21), it has
no problem to plot temp
The following is what I try:
yes? set region/k=1/x=110w:100w/x=10s:0
yes? repeat/l=1:22 shade temp
.........
!-> REPEAT: L=15
!-> REPEAT: L=16
!-> REPEAT: L=17
!-> REPEAT: L=18
!-> REPEAT: L=19
!-> REPEAT: L=20
!-> REPEAT: L=21
** netCDF error: Variable not found
shade temp
Command file, command group, or REPEAT execution
aborted
yes? set region/l=21
yes? shade temp
** netCDF error: Variable not found
yes? shade u
yes? shade temp
......
------------------
Do you think it is a bug for ferret v5.70 Mac OS?
--- Ansley Manke <Ansley.B.Manke@xxxxxxxx> wrote:
Hi Yangxing,
Accessing data in Ferret occurs in several stages.
The command
yes? set data test.mc
reads the .mc file to see what's in there, and it
uses that information
to create the time axis. Then the first file is
opened, and information
about the other axes and the variables is stored
from what's in that
file. This is all that has happened at the point
where you do a SHOW
DATA command. The other stepfiles are opened and
read only when data
from them is required by the other commands - plot,
shade, load, or
other commands that produce an output.
I wonder if one of the step files is missing the
variable TEMP. Since
you're seeing the error in the first 100 time steps,
you could try:
yes? cancel region
yes? repeat/L=1:100
(shade/x=110w:80w/y=10s:10n/k=1 temp)
And see if you hit an error message.
yangxing zheng wrote:
Thank all of you for prompt response. Now I
include
the .mc file to diagnose what the problem is.
--- Roman Tonkonojenkov <romantonk@xxxxxxx> wrote:
Hi Yangxing,
Maybe a stupid remark, but I had similar problems
in
the past and
at least in one instance I was using the wrong
case
(i.e. the variable was
TEMP instead of temp). I don't think it is the
issue
with you,
but at least try it
Cheers,
Roman
On Tue, Nov 13, 2007 06:39 PM, yangxing zheng
<yangxingz@xxxxxxxxx> wrote:
I have a problem about reading mc file from
ferret.
The following is an example. The files are
there.
We
show data/variables, the variable temp exists.
If I
make a plot by seting an individual l (set
region/l=11), it works. But if I want to plot
time
series of temp, it says: ** netCDF error:
Variable
not
found.
But variable temp is obvious there. Also if I
plot
a time series of u and v (the grid is identical
to
temp), it does work! Do you think what the major
problem is? I attached the .mc file to you as a
reference.
[mac35:yzheng/HYCOM/Pacific] yzheng%
ferret
NOAA/PMEL TMAP
FERRET v5.70 (alpha)
Mac OS X 10.3.4 - 10/08/04
13-Nov-07 16:08
yes? set data test.mc
yes? show data/variables
currently SET data sets:
1> ./test.mc (default)
HYCOM-NCODA Assimilation Run NOGAPS
name title I
J K L
U Zonal Velocity 1:1376
1:937 1:19 1:425
cm/s on grid GFP1 with -9999 for
missing
data
X=180E:70W Y=35.1S:35.1N Z=-5:1050
V Meridional Velocity 1:1376
1:937 1:19 1:425
cm/s on grid GFP1 with -9999 for
missing
data
X=180E:70W Y=35.1S:35.1N Z=-5:1050
TEMP Temperature 1:1376
1:937 1:19 1:425
DegC on grid GFP1 with -9999 for
missing
data
X=180E:70W Y=35.1S:35.1N Z=-5:1050
time range: 03-NOV-2003 00:00 to 31-DEC-2004
00:00
yes? set region/l=12
yes? yes? set region/x=110w:80w/y=10s:10n/k=1
yes? yes? fill temp
yes? set region/l=1:100/i=100/j=700/k=1
yes? yes? plot temp
** netCDF error: Variable not found
yes? plot u
yes? plot v
----------------------------
____________________________________________________________________________________
Be a better sports nut! Let your teams follow
you
with Yahoo Mobile. Try it now.
http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
|