[Thread Prev][Thread Next][Index]

Re: [ferret_users] regridding of time axis



Hi Steffie,

This would be similar to what is described here for creating a yearly time series; using either @AVE or another regridding transformation
http://ferret.pmel.noaa.gov/Ferret/faq/averaging-to-regrid-a-time-series

Except that you will want to define a seasonal axis instead of a yearly one.  You can base one axis on the definition of an existing axis, taking every nth point, so starting with a monthly axis is an easy way to do this.  If your incoming data already has a well-defined time axis, you can base it on that.  Here's how that looks, using the dataset monthly_navy_winds that comes with the Ferret distribution:

yes? use monthly_navy_winds
yes? show grid uwnd
    GRID GDN1
 name       axis              # pts   start                end                 subset
 FNOCX     LONGITUDE          144mr   20E                  17.5E(377.5)        full
 FNOCY     LATITUDE            73 r   90S                  90N                 full
 normal    Z
 TIME      TIME               132 r   16-JAN-1982 20:00    17-DEC-1992 03:30   full

! Use the coordinate values of the time axis from the file to define a new time axis
yes? let tt = t[gt=uwnd]
yes? define axis/t/t0="`uwnd,return=t0`"/units="`uwnd,return=tunits`" time4 = tt[L=2:144:3]
 !-> define axis/t/t0="14-JAN-1980 14:00:00"/units="hour" time4 = tt[L=2:144:3]

! The original data:
yes? list/t=1-jan-1982:1-jan-1983/x=180/y=0 uwnd
             VARIABLE : ZONAL WIND (M/S)
             FILENAME : monthly_navy_winds.cdf
             FILEPATH : /home/users/tmap/ferret/linux/fer_dsets/data/
             SUBSET   : 12 points (TIME)
             LONGITUDE: 180E
             LATITUDE : 0
                     180E 
                     65
 16-JAN-1982 /  1: -2.738
 16-FEB-1982 /  2: -2.331
 18-MAR-1982 /  3: -3.251
 18-APR-1982 /  4: -3.124
 18-MAY-1982 /  5: -1.818
 18-JUN-1982 /  6: -2.007
 18-JUL-1982 /  7: -0.367
 17-AUG-1982 /  8: -0.900
 17-SEP-1982 /  9:  3.223
 17-OCT-1982 / 10:  2.167
 17-NOV-1982 / 11:  2.875
 17-DEC-1982 / 12: -0.007

! The data on the seasonal axis:
yes? list/t=1-jan-1982:1-jan-1983/x=180/y=0 uwnd[gt=time4@ave]
             VARIABLE : ZONAL WIND (M/S)
                        regrid: 2192 hour on T@AVE
             FILENAME : monthly_navy_winds.cdf
             FILEPATH : /home/users/tmap/ferret/linux/fer_dsets/data/
             SUBSET   : 4 points (TIME)
             LONGITUDE: 180E
             LATITUDE : 0
                    180E 
                    65
 16-FEB-1982 / 1: -2.773
 18-MAY-1982 / 2: -2.316
 17-AUG-1982 / 3:  0.652
 17-NOV-1982 / 4:  1.678


If you are reading data from a text file, then you'd first define the monthly time axis (See DEFINE AXIS) and a grid for the data, and set up to read the data as described here,  and then define the seasonal axis as above.

-Ansley



On 11/19/2017 10:25 PM, Steffie Tom wrote:
hii

We have data from 1979-2015, which consists of various parameters like temperature etc. we need to create seasonal data i.e. say for summer jan-feb-march for all years i.e. separately for 1979, then jan-feb-march for 1980 etc. i.e in one file we want 111 months.

First of all how to achieve this ?

After that how to achieve the seasonal average of the same data above ?


thanks




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

Privacy Policy | Disclaimer | Accessibility Statement