[Thread Prev][Thread Next][Index]

Re: [Ferret] calculate climatologies from multiple LARGE files



Hi Zhen,
Bill answered the original question, suggesting descriptor files, which is exactly the right answer to the question. Then Zhen ran into a difficulty creating the climatology, because his data is on a Julian calendar, and the monthly_climatology time axes use a Gregorian calendar. (Relevant topics in the Users Guide are "Climatology", "Calendar, axis, discussion", "modulo, regridding")

There are two possible solutions:

1) create your own climatological axis having a Julian calendar, and use @MOD to regrid to that axis.

or

2) regrid the data to a Gregorian calendar, and then apply the modulo regridding and regrid to month_reg

I think I'd recommend the first option, creating a Julian climatological axis. This will require less interpolation. A climatological axis is one which spans one year or less, and has dates in year 0000 or 0001. It has the /MODULO qualifier. A regularly-spaced monthly climatological axis can be defined as:

DEFINE AXIS/MODULO/CALENDAR=julian/EDGES/t0="1-jan-0000"/t="1-jan-0000":'31-dec-0000":1/units=months jul_month_reg

I use the /EDGES qualifier to specify that the start and end I am giving refer to the edges of the grid cells; this means that the axis coordinates are centered at the middle of each month. (An example of defining an irregular monthly axis is in the Users Guide under "define axis, /EDGES"

Now you can do

let temp_clim=temp[d=1,GT=jul_month_reg@MOD]

zhen.li@gsfc.nasa.gov wrote:

Bill:

Thank you very much for your help. I got the descriptor file created by using the perl script, make_des.

When calculating the climatology using the des file, I found that my yearly data can
not be regridded to the monthly climatology because the yearly data is on Julian calendar.

Here is all my text output from ferret section:
=============================================================================
yes? use temp_6484
*** NOTE: netCDF bounds variable definition error
*** NOTE: Bounds definition "time_bounds" points to no existing axis
*** NOTE: Ignoring BOUNDS attribute
*** NOTE: netCDF parent axis definition error
*** NOTE: Edges definition "zt_edges_ocean" points to no existing axis
*** NOTE: Edge definitions ignored
yes? show data
currently SET data sets:
1> ./temp_6484.des (default)
name title I J K L
TEMP Potential temperature 1:700 1:390 1:43 1:252

yes? use climatological_axes
*** NOTE: regarding /home/zhenli/ferret/go/climatological_axes.cdf ...
*** NOTE: Climatological axes SEASONAL_REG, MONTH_REG, and MONTH_IRREG defined
yes? let temp_clim=temp[d=1,GT=month_reg@MOD];
yes? list temp_clim
**ERROR: regridding: only @ASN, @LIN, or @NRST regridding between calendar types: JULIAN, GREGORIAN
===============================================================================

My "temp_6484.des", looks like this:


#################################################################################

&FORMAT_RECORD
D_TYPE = ' MC'
D_FORMAT = ' 1A'
/

&BACKGROUND_RECORD
D_TITLE = 'pacific ocean exp'
D_T0TIME = '01-JAN-0001 00:00:00'
D_TIME_UNIT = 86400
D_TIME_MODULO = .FALSE.
D_CALTYPE = 'JULIAN'
/

&MESSAGE_RECORD
D_MESSAGE = ' '
D_ALERT_ON_OPEN = .FALSE.
D_ALERT_ON_OUTPUT = .FALSE.
/

&EXTRA_RECORD
/

&STEPFILE_RECORD
S_FILENAME = 'temp_1964.nc'
S_AUX_SET_NUM = 0
S_START = 717000.5
S_END = 717335.5
S_DELTA = 30.4545454545455
S_NUM_OF_FILES = 1
S_REGVARFLAG = ' '
/

&STEPFILE_RECORD
S_FILENAME = 'temp_1965.nc'
S_AUX_SET_NUM = 0
S_START = 717366.5
S_END = 717700.5
S_DELTA = 30.3636363636364
S_NUM_OF_FILES = 1
S_REGVARFLAG = ' '
/

Here is my script:
yes? use temp_6484
*** NOTE: netCDF bounds variable definition error
*** NOTE: Bounds definition "time_bounds" points to no existing axis
*** NOTE: Ignoring BOUNDS attribute
*** NOTE: netCDF parent axis definition error
*** NOTE: Edges definition "zt_edges_ocean" points to no existing axis
*** NOTE: Edge definitions ignored
yes? show data
currently SET data sets:
1> ./temp_6484.des (default)
name title I J K L
TEMP Potential temperature 1:700 1:390 1:43 1:252

yes? use climatological_axes
*** NOTE: regarding /home/zhenli/ferret/go/climatological_axes.cdf ...
*** NOTE: Climatological axes SEASONAL_REG, MONTH_REG, and MONTH_IRREG defined
yes? let temp_clim=temp[d=1,GT=month_reg@MOD];
yes? list temp_clim
**ERROR: regridding: only @ASN, @LIN, or @NRST regridding between calendar types: JULIAN, GREGORIAN









[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement