[Thread Prev][Thread Next][Index]
Re: D_TIME_UNIT (monthly axis time encoding)
*** HELP WITH FERRET MONTHLY AXES ***
see also discussion in the FAQ at
http://tmap.pmel.noaa.gov/ferret/FAQ/data_management/equal_months.html
--------------------------
Hi Patrick,
A "month" is always a problematic unit, since it is ambiguous. The best
solution is to use a well-defined unit such as an hour (i.e. D_TIME_UNIT=3600
seconds) and then encode your months in terms of the number of hours. I will
attach the descriptor file coads_climatology.des that illustrates this
approach.
If you already have a collection of NetCDF files that have embedded in them a
time step encoding of 1.0, 2.0, 3.0, ... representing month number then the
easiest solution is fix the data set on-the-fly in a Ferret script using
use climatological_axes ! defines axis "MONTH_REG"
cancel data climatological_axes ! axes are persistent
set data my_MC_data
LET/D=my_MC_data var1_corrected = var1[GT=MONTH_REG@ASN]
.
.
.
Put these lines into a script called "my_MC_data.jnl" and then use
"yes? GO my_MC_data" instead of "yes? use my_MC_data" -- the variables
var1_corrected (etc.) will have the time encoding that you want.
Note that Ferret does have a unit "month" defined. It is 2628000 seconds (730
hours) ... 1/12 of a 365 day year (for modeling purposes). It is not a good
idea to build a modulo climatological axis from this axis since it will "drift"
significantly off over many years due to the absence of leap years.
- steve
P.S. The bug you found earlier in the L=12 point of the climatological axis has
been fixed in version 4.9 -- expect to see it early next week!
========================================================================
On Nov 20, 1:03pm, BROCKMANN_Patrick wrote:
> Subject: D_TIME_UNIT in a multi netCDF descriptor file
> Dear ferreters,
>
> Thank you for the trick to get the last timestep of
> a climatological axes (shade/L=12 clim[L=11:12]).
>
> But I still have a problem using this time climatological axes
> and my own Multi netCDF.
>
> The problem comes from the unrecognition of my time axis which
> is not read as monthly.
> To correct this, I'd like to know what is the exact value of
> the namelist entity called D_TIME_UNIT in the descriptor file if
> I want to represent months.
>
> I have already tried 2592000s (for a month of 30 days),
> 2629746s (for a month of 730.485 hours), 2635200 (for a month of 30.5
> days)
> but none of them are recognized when I open my multi netCDF
> and I look to the time axis.
>
> **************************************************
> yes? show grid/T AM_29
> GRID GDV11
> name axis # pts start end
> LON LONGITUDE 360mr 179.5W 179.5E(539.5)
> LAT LATITUDE 180 r 89.5S 89.5N
> normal Z
> TIME8 TIME 24 r 17-JAN-1988 19:46 09-DEC-1989
> 22:53
>
> L T BOX_SIZE TIME_STEP ()
> 1> 17-JAN-1988 19:46:40 1 1056.5
> 2> 16-FEB-1988 22:00:00 1 1057.5
> 3> 18-MAR-1988 00:13:20 1 1058.5
> 4> 17-APR-1988 02:26:40 1 1059.5
> ...
>
> --> Nothing is written in the parenthesis after TIME_STEP
>
> **************************************************
>
> Thanks again
>
> --
> Patrick BROCKMANN - Laboratoire de Meteorologie Dynamique
> Groupe d'Analyse du Rayonnement Atmospherique
> Ecole Polytechnique - Route Departementale 36
> 91128 Palaiseau Cedex - FRANCE
> Tel: 01 69 33 31 91 - Fax: 01 69 33 30 05
> mailto:Patrick@Jungle.Polytechnique.Fr
> http://Jungle.Polytechnique.Fr
>-- End of excerpt from BROCKMANN_Patrick
--
| NOAA/PMEL | ph. (206) 526-6080
Steve Hankin | 7600 Sand Point Way NE | FAX (206) 526-6744
| Seattle, WA 98115-0070 | hankin@pmel.noaa.gov
1 ********************************************************************************
* NOAA/PMEL Tropical Modeling and Analysis Program, Seattle, WA. *
********************************************************************************
$FORMAT_RECORD
D_TYPE = ' GT',
D_FORMAT = ' 1C',
D_SOURCE_CLASS = 'OBSERVED DATA ',
D_SOURCE = ' ',
D_SUBSOURCE = 'SURFACE MARINE',
D_PROG_REV = '0.00'
$END
$BACKGROUND_RECORD
D_EXPNUM = 'COAD',
D_MODNUM = 'MNCL',
D_TITLE = 'COADS Monthly Climatology (1946-1989)',
D_MOD_TITLE = ' ',
D_FORCING_SET = '??? ',
D_T0TIME = '1-JAN-0000 00:00:00',
D_TIME_UNIT = 3600.000 ,
D_TIME_MODULO = .TRUE.,
D_NTEGRATE_TSTEP = 1.000000 ,
D_NTUPLE = 1,
D_TIME_RUN = '1-JUL-1991',
D_WHO_RANIT = 'Jerry Davison',
D_TIME_MADE = '1-JUL-1991',
D_WHO_MADEIT = 'Jerry Davison',
D_AUX_MODNUM = 6*' ',
D_ADD_PARM = 6*' ',
d_grid_filename = 'coads.grd',5*' '
$END
$MESSAGE_RECORD
D_MESSAGE = ' ',
D_ALERT_ON_OPEN = F,
D_ALERT_ON_OUTPUT = F
$END
$VARIABLE_RECORD
D_VAR_CODE = 'SST',
D_VAR_TITLE = 'SEA SURFACE TEMPERATURE',
D_VAR_TITL_MOD = ' ',
D_VAR_UNITS = 'Deg C',
D_GRID_NAME = 'COADS',
D_MISSING_FLAG = -1.0e34,
D_BAD_FLAG = -1.0e34,
D_ORDERING = 'WE', 'SN', 'UD', 'TI',
D_GRID_START = 1, 1, 1, 1,
D_GRID_END = 180, 90, 1, 12,
D_PRECISION = 'SINGLE ',
D_AUX_SET_NUM = 0
$END
**************************************************
$VARIABLE_RECORD
D_VAR_CODE = 'AIRT',
D_VAR_TITLE = 'AIR TEMPERATURE',
D_VAR_UNITS = 'DEG C'
$END
**************************************************
$VARIABLE_RECORD
D_VAR_CODE = 'SPEH',
D_VAR_TITLE = 'SPECIFIC HUMIDITY',
D_VAR_UNITS = 'G/KG'
$END
**************************************************
$VARIABLE_RECORD
D_VAR_CODE = 'WSPD',
D_VAR_TITLE = 'WIND SPEED',
D_VAR_UNITS = 'M/S'
$END
**************************************************
$VARIABLE_RECORD
D_VAR_CODE = 'UWND',
D_VAR_TITLE = 'ZONAL WIND',
$END
**************************************************
$VARIABLE_RECORD
D_VAR_CODE = 'VWND',
D_VAR_TITLE = 'MERIDIONAL WIND',
$END
**************************************************
$VARIABLE_RECORD
D_VAR_CODE = 'SLP',
D_VAR_TITLE = 'SEA LEVEL PRESSURE',
D_VAR_UNITS = 'MB'
$END
**************************************************
$VARIABLE_RECORD
D_VAR_CODE = '**END OF VARS**'
$END
**************************************************
$EXTRA_RECORD
$END
**************************************************
$STEPFILE_RECORD
s_filename = 'coads_climatology.001' ,
S_AUX_SET_NUM = 0,
S_START = 366.0 ,
S_END = 8401.336 ,
S_DELTA = 730.485 ,
S_NUM_OF_FILES = 1,
S_REGVARFLAG = ' ',
S_INDEX = ' '
$END
* UNIX precision bug... S_END = 8401.335 ,
**************************************************
$STEPFILE_RECORD
s_filename = '**END OF STEPFILES**'
$END
**************************************************
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement