[Thread Prev][Thread Next][Index]

Re: [ferret_users] which climatology should I use



Hello,

The stride syntax that you're using should be given with the index L not the time-coordinate T, so all of the January data is

 pr[L=1:480:12]

A stride using T=  is acting on the underlying time units of the time axis, which is a monthly axis but with units of days. So that means that [T=1:480:12] is asking for data at every 12th day for the first 480 days.  The clue that I noticed was the time label at the top of your second plot, where it's reporting that the plot used data from the range 7-jan-1969 to 2-May 1970 .

With that change, I think the plots agree pretty well, and of course @MOD is simplest to use.

The @MOD regridding will work with any time axis whether it starts out as a monthly series or not, so if you started with daily data, it gathers all of the January data for each year, taking into account the calendar's definition of months, and returns the climatological average; and so on for each month. It'd also handle partial grid cells, so if the source data somehow timesteps which don't fall exactly within the climatological grid-cell definitions, it takes the correct portions of grid cells to contribute to each monthly result.

Ansley


On 9/27/2018 10:37 AM, Xiaoyu Bai wrote:
Dear ferreters,

I have a monthly rainfall .nc file which has Gregorian calendar. I wanted to compute climatology for each month. I tried with  "MONTH_GREGORIAN@MOD", tried with pick every month out then take the average, "repeat/i=1:12:1 let pr_`i`=pr[T=`i`:480:12]; repeat/i=1:12:1 let pr_`i`_clim=pr_`i`[T=@AVE]", tried with sum them up then divide them by the total years  "repeat/i=1:12:1 let pr_`i`_clim_sumave=pr_`i`[T=@SUM]/40". I compared these results and found that none of them were the same. Any suggestions on which climatology should I use? By the way, for the Gregorian calendar, if I want to make the rain rates by month, is there a better way than *60*60*24*(days of the month)? 

Attach are the December climatology comparison figures I made. 

My script was as follows:
set region/X=-30:70/Y=-40:40
let pr_mod=pr[gt=MONTH_GREGORIAN@MOD]
repeat/i=1:12:1 let pr_`i`=pr[T=`i`:480:12]
repeat/i=1:12:1 let pr_`i`_clim=pr_`i`[T=@AVE]
repeat/i=1:12:1 let pr_`i`_clim_sumave=pr_`i`[T=@SUM]/40  
repeat/i=1:9:1 (contour/fill/palette=blue_darkred (pr_`i`_clim_sumave-pr_`i`_clim)*60*60*24*30; frame/file=0`i`_CNRM.png)
repeat/i=10:12:1 (contour/fill/palette=blue_darkred (pr_`i`_clim_sumave-pr_`i`_clim)*60*60*24*30; frame/file=`i`_CNRM.png)

Thank you very much. 😸
--
Xiaoyu

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

Privacy Policy | Disclaimer | Accessibility Statement