[Thread Prev][Thread Next][Index]

Re: [ferret_users] saving from a descriptor file



Another nice way to write a repeat loop and avoid any confusion about the repeat index and I, J, K, or L is to use the named repeat:

REPEAT/RANGE=2:122/NAME=m (save/file=u_1949.nc/append uvel[L=`m`])




william s. kessler wrote:
Hi Jaci, Jaison -

I think the problem is that the index L in the REPEAT statement is not being interpreted as the time index of the variable uvel. How about something like the following:

save/file=u_1949.nc/clobber/l=1 uvel ! omit LLIMITS which should not be necessary for a time axis
repeat/l=2:122 (let ll='l'; define symbol lll 'll'; save/file=u_1949.nc/append uvel[l=($lll)])

I'm not sure why you need to do the variable and symbol definitions like this, which seem redundant, but I'm pretty sure that otherwise Ferret will not interpret the REPEAT index L in evaluating the variable uvel. It should, but it doesn't. You could test these things by doing a LIST (of just a bit of uvel) instead of SAVE.

Billy K

On 6Nov 2006, at 11:03 AM, Jaclyn Brown wrote:

Thanks Jaison,
I have to save the data one time step at a time because it is so large. So
doing save/file=u_1949.nc/append uvel won't work.
Also the L='L' returned an error.

I tried defining the time axis again (define axis/t=..), and assigning it to
the variable (u=uvel[gt=taxis@asn]) even though this seems to be redundant.
Nevertheless it did the trick. No idea why. I think there must be some
problem with my descriptor file that I can't see.

I made the descriptor with make_des.pl one_file.nc>collated_files.des and
then added the extra files by typing in extra stepfile_records. I did this
because the descriptor file wouldn't join the files together automatically.
I guess this is where some error has been introduced.

Cheers,
Jaci

-----Original Message-----
From: Jaison Kurian [mailto:jaison@caos.iisc.ernet.in]
Sent: Monday, November 06, 2006 1:22 PM
To: Jaclyn Brown
Cc: ferret_users@noaa.gov
Subject: Re: [ferret_users] saving from a descriptor file

Hi Jaclyn,
If you want to write the data for l=1:122, there is
no need to open the output file with /LLIMITS qualifier. Just
go like this :

use "/kuroshio/jb842/POP/ful.....
set reg/l=1:122
save/fie=u_1949.nc uvel

That is all !

In your method, The following line is fine

save/file=u_1949.nc/clobber/llimits=1:122/l=1 uvel

I think the next line should be

repeat/l=2:122 (save/file=u_1949.nc/L=`L`/append uvel)

Because, each time you have to specify the L index or indices
that you are appending to the file opened with /LLIMITS. This
method is used only if there is a basic difference between the
time axis of source data and that of the final output one or
say you want to do some processing only for a give period. In
normal case "set reg" or specifying region as
"save/L=1:122/file=somefile.nc/append uvel" will work just fine.

Hope this helps,

Jaison

On Mon, 6 Nov 2006, Jaclyn Brown wrote:


Hi,
I am trying to save a subset of a descriptor file I created. When I open
the
descriptor file in ferret the time axis is as it should be. When I save
some
of it (see below) the new file does not have the correct time axis. Every
point has the same time 2-Jan-1949, which is the first time step.
Any ideas where I am going wrong?
Cheers,
Jaci


use "/kuroshio/jb842/POP/full_output_July2006/Pacific1949.des" !reads in
datafiles

save/file=u_1949.nc/clobber/llimits=1:122/l=1 uvel
repeat/l=2:122 (save/file=u_1949.nc/append uvel)





--

~> ~> ~> ~> ~> ~> ~> ~> ~> ~> ~>
Ansley Manke, NOAA/PMEL ansley.b.manke@noaa.gov
7600 Sand Point Way NE, Seattle WA
Phone 206-526-6246, FAX 206-526-6744



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement