NOAA-PMEL / Ferret

The Ferret program from NOAA/PMEL
https://ferret.pmel.noaa.gov/Ferret/
The Unlicense
55 stars 20 forks source link

bugs regridding 360-day calendar to NOLEAP calendar #1270

Open karlmsmith opened 7 years ago

karlmsmith commented 7 years ago

Reported by @AnsleyManke on 29 Nov 2012 21:11 UTC When regridding data on a 360_DAY calendar axis to a NOLEAP calendar axis, the result for many but not all times, is no-valid-data.

Here is a script. The data are taken from some CMIP5 datasets downloaded to do a demo of creating an ensemble dataset.

! 
! use "/home/raid/data/hankin/CMIP5/ts_Amon_GISS-E2-R_past1000_r1i1p121_090001-094912.nc"
! use "/home/raid/data/hankin/CMIP5/ts_Amon_IPSL-CM5A-LR_past1000_r1i1p1_085001-104912.nc"

! save/x=300:330/y=0:20/file=ts_Amon_GISS-E2-R_past1000_r1i1p121_090001-094912_subset.nc ts[d=1]
! save/x=300:330/y=0:20/file=ts_Amon_IPSL-CM5A-LR_past1000_r1i1p1_085001-104912.nc ts[d=2]  

use ts_Amon_GISS-E2-R_past1000_r1i1p121_090001-094912_subset.nc
use ts_Amon_IPSL-CM5A-LR_past1000_r1i1p1_085001-104912.nc

show axis time
! name       axis              # pts   start                end
! TIME      TIME               600 i   16-JAN-0900 12:00    16-DEC-0949 12:00
!T0 = 01-JAN-0900 00:00:00
!CALENDAR = NOLEAP
!   Axis span (to cell edges) = 18250

show axis time1
! name       axis              # pts   start                end
! TIME1     TIME              2400 r   16-JAN-0850 00:00    16-DEC-1049 00:00
!T0 = 01-JAN-0850 00:00:00
!CALENDAR = 360_DAY
!   Axis span (to cell edges) = 72000

! Regrid in time, TS in dataset 2 to the grid of TS in dataset 1
let t2 = ts[d=2,gt=ts[d=1]]

! No Valid Data
shade t2[t="1-jan-0922"] ;pause 

! Different time step, a valid shade plot
shade t2[t="1-jan-0922:00:00:10"] ;pause

! Many other timesteps, No valid data
shade t2[t=15-aug-0904];pause

shade t2[t=5-aug-0904];pause

Migrated-From: http://dunkel.pmel.noaa.gov/trac/ferret/ticket/1998

karlmsmith commented 7 years ago

Modified by @AnsleyManke on 28 Feb 2013 23:15 UTC