[Thread Prev][Thread Next][Index]

Re: [ferret_users] SHF transformation on time axis



Dear Pierre,

On Thu, Feb 23, 2023 at 2:47 AM 'Friedlingstein, Pierre' via _OAR PMEL Ferret Users <ferret_users@xxxxxxxx> wrote:


I have a time series (annual values) of a variable GPP, with L as a time axis and J as the land surface model axis (19 models). I want to shift the variable GPP by N years on its time axis.

I tried using the transformation l=@SHF with a shift of `itau` but it doesn’t work as itau is a vector on the J axis, itau being model dependent.



If I had to do this within Ferret, I would save the 19 models separately into 19 files within a loop:

! pseudo Ferret.  Doesn't work as is.
! Likely I've made some mistakes.
repeat/J=1:19
   let shift = (-1)*itau ! for each J
   let GPP_lag = GPP[L=@SHF:`shift`,J=`J`@MAX] ! erase the J axis.
   save/file=model`J,zw=2`.nc GPP_lag
end repeat

assuming that itau has only the J axis.

In this way, you get model01.nc, model02.nc, . . . , without J axis.  You then read them in with

ensemble shifted = {SPAWN:"ls model??.nc"}

Then, you have the 19 models along the M axis.

By the way, it's better to use the M axis instead of J to represent different models.

Ryo


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

Privacy Policy | Disclaimer | Accessibility Statement