[Thread Prev][Thread Next][Index]
Re: [ferret_users] anomaly and climatology
Patrick's solution is fine, but since you have a monthly climatology,
you can do better by reading it in on a monthly climatological axis
to begin with:
use climatological_axes ! pre-made modular axes
can dat climatological_axes ! don't need the file any more
define grid/t=month_reg gcl ! use the modular monthly axis to
define the grid
file/format=(...)/var=pc/g=gcl filename_of_pc.dat ! read in your
climatology on the modular grid
! If pa is on any calendar time axis, then the regridding is easy:
let pc_rg = pc[gt=pa] ! regrid the climatology onto the time axis
of pa
let p = pa + pc_rg ! add them
Note that this does not depend on pa being monthly. It can have any
calendar axis.
A similar usage is to find anomalies from climatology of a variable:
If q is a time series on any calendar axis, then
let q_cl = q[gt=month_reg@mod] ! make a climatology (12 average
months) from the data
let q_cl_rg = q_cl[gt=q] ! regrid the monthly climatology back
to the original time axis
let q_anom = q - q_cl_rg ! anomalies from climatology on the
original time axis
The file climatological_axes.cdf also defines the axes seasonal_reg
and month_irreg, which have similar usage.
Billy K
On Feb 8, 2006, at 5:18 AM, DELCLAUX Francois wrote:
Hi Ferret users,
I have a grid(x,y) monthly time-series data of an anomaly variable,
say : pa (n values)
I have a grid(x,y) monthly climatological variable, say pc (12
values)
Now I would like to build a time series data of the real variable
p, on the same time-axis as pa
such as : (in the following, the index corresponds to L index
according to ferret definition)
p(1) = pa(1) + pc(1)
p(2) = pa(2) + pc(2)
p(12) = pa(12) + pc(12)
....
p(13) = pa(13) + pc(1)
p(14) = pa(14) + pc(2)
....
p(n) = pa(n) + pc(12)
What is the best way for doing that operation ?
Thanks a lot for answers.
Sincerely yours.
--
Francois DELCLAUX
------------------------------------------------------------
UMR HydroSciences Montpellier
Universite Montpellier II - Place Eugene Bataillon
Case courrier MSE
34095 Montpellier Cedex 5 FRANCE
http://www.hydrosciences.org/
mailto: delclaux@msem.univ-montp2.fr
Tel : (33) (0)4 67 14 90 11 Fax : (33) (0)4 67 14 47 74
------------------------------------------------------------
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement