[Thread Prev][Thread Next][Index]

Re: [ferret_users] Extracting wrf variables for specifc times

> I have many files from wrf output like this etc..
> wrfout_d01_1982-02-01_00:00:00
> wrfout_d01_1982-06-06_00:00:00
> wrfout_d01_1982-10-09_00:00:00
> wrfout_d01_1997-02-01_00:00:00
> wrfout_d01_1997-03-03_03:00:00
> wrfout_d01_1997-06-04_03:00:00
> wrfout_d01_1997-07-04_03:00:00
> wrfout_d01_1997-07-29_03:00:00
> wrfout_d01_1997-09-29_15:00:00
> I want to extract only 6variables for MAM and OND seasons for all the files
> so that whatever files I will finally  have will contain only 6variables for
> times march-May and October -Dec

Do you mean that you want only the 6 months of March, April, May,
October, November, and December?

If you use a Linux, Unix, or Mac system, you can chose the file names
you want like

   ls *19??-0[3-5]-??_* *19??-1?-??_* > list-of-filenames.txt

or if you can afford to, you can delete, or move elsewhere, the files
you don't need, using the syntax like the above.

> Is there a way I can do this, I am trying to check the ferret
> documentations script but can get way out

If you need to do this from within Ferret, you can use the SPAWN
command to execute a shell command like the above and get the result
as a Ferret array, on which you can iterate by the REPEAT command.


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement