[Thread Prev][Thread Next][Index]

Re: [ferret_users] Extracting wrf variables for specifc times



thanks for your response
I think maybe I was not clear
For example an output file like this wrfout_d01_1982-02-01_00:00:00 has timestep from 1982-02-01 to 1982-05-15-00.
That means the file contain feb, march, april and may data for 38variables.
Now what I want is extract only 6 varibales for timestep march, april, may.
And do the same for October-Nov-Dec for all the many files I have.


On Sun, Dec 6, 2015 at 6:20 PM, Ryo Furue <furue@xxxxxxxxxx> wrote:
> 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.

Ryo


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

Privacy Policy | Disclaimer | Accessibility Statement