[Thread Prev][Thread Next][Index]

Ferret how-to: odd time axes in models

Ferret how_to:

	* How to deal with non-standard year-lengths in models *

On Mar 1,  5:39pm, Joachim Dengg wrote:

> Oh, by the way, I keep running into time inconsistencies because my model
> years are only 360 days long. Is there any way to deal with that?


Yes. The key is to make sure that your axis has these two properties:

	1) it has 360 points (corresponding to the model "year")
	2) it spans the correct number of hours for an "average" year

An average year must take leap years into account. You can use the
coads_climatology data set as a reference:

	set data coads_climatology
	show grid/l=1:3 sst
	show grid/l=1:24000:1200 sst		==> no drift in 2000 years
	set list/precision=7
	list t[l=13,g=sst] - t[l=1,g=sst]	==> 8765.82 hours per ave yr

So for a 360 day year

	list (t[l=13,g=sst]-t[l=1,g=sst])/360   ==> 24.3495 hours per day

A 360 day year time axis would then be:

    define axis/modulo/t0=1-jan-0000/t=1:8765.2:24.3495/units=hours tadjusted

To test that this axis is correct try

	define grid/t=tadjusted gadj
	show grid/l=1:756000:36000 gadj		==> no drift in 2000 years

Now, how do you use this axis? There are actually two distinct "views" of your
model data - by day number and by calendar date. You can preserve both views
using this technique:

  1) Create your model output using simply the day number 1, 2, 3, ...

     For example, this abstract variable is based on such an axis

	define axis/t=1:360:1/modulo/units=days t360
	define grid/t=t360 gmodel
	let model_var = SIN(PI*T[g=gmodel]/180)
	let PI = 3.14159
	plot/l=1:720 model_var

  2) Create the "calendar view" of the same variable using "regridding by

	define grid/like=model_var/t=tadjusted gcalendar
	let calendar_model_var = model_var[g=gcalendar@asn]
	plot/l=1:720 calendar_model_var


		|  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

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / ERL / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement