[gradsusr] Still chasing the elusive leap-year...

Christopher Gilroy chris.gilroy at gmail.com
Sun Nov 22 01:19:28 EST 2015


Alright, so I was thinking, if I could (seems easy enough with CDO) get
each of the years 1981, 1982... into single files, I can then do this:

Assume the file names for non-leap year & leap year climatology as:
filename.leap.year.climo
filename.non-leap.year.climo

set up soft-links for non-leap years in a do loop as (in cshell) as:

foreach year  (1979 1981 1982 1983 1985 1986 1987 1989 1990 1991)
ln -s filename.non-leap.year.climo  climatology.$year
end

similarly set up soft-links for leap years in a do loop as (in cshell) as:

foreach year  (1980 1984 1988 1992)
ln -s filename.leap.year.climo  climatology.$year
end

add as many non-leap/leap years as necessary within the parentheses for
the data
period in your analysis. Note: the newly created common (for both leap &
non-leap year)
climatology file name for each YEAR of analysis is:
climatology.YEAR

now for the grads control file use for dset as:

dset climatology.%y4
options template


----

open currentrun.ctl
open climodaa.ctl

define tmp2mcur = tmp2m.1
define tmp2mcli = ave(tmp2m.2,t=1,t=43228,1460)

Which would at least get me SOMEWHERE but I'm still confused on how then I
would do: ave(tmp2m.2,t=1,t=43228,1460)' -or- ave(hgt500mb,t=1,t=43228,1464)'
during the leap years to get tmp2m from climo files for Nov 22 00z? Because
my original point of the t=1 in that example needs to be the current dates
zhour value no? Nov 22 00z is 1301 on a non-leapyear or 1305 during a
leapyear... even if you used that in a loop t=i (current loop iteration)
wouldn't do anything magical either.

Now, unless there's some sort of crazy magical unicorn stuff happening
where-by opening the current model runs .ctl file first, t=1 suddenly
becomes Nov 22 00z, t=2 would be Nov 22 06z... I can't seem to find any
information on that.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20151122/6d229545/attachment.html 


More information about the gradsusr mailing list