Hi, I discovered an odd inconsistency when time regridding with Ferret that is most likely a bug, or at least an annoying feature, assuming I am not doing something wrong. Attached is a script and data files necessary
to reproduce the issue. If I read a variable directly from a netcdf file, assign a time axis to it, and then regrid to a second time axis I get the desired result. In my case, the data in the netcdf file is every 3 hours and I would like to regrid to daily
data. So far so good. Next, I wrap the netcdf file with a descriptor file to take care of mapping the 3-hourly time axis for the data in the netcdf file. Then, I do the same time regridding to the daily time axis. This time the result is missing values instead
of daily data. For the attached simplified case, there is the trivial fix of not using the des file. However, in production situations, this complicates things a lot for me. Is this "missing value" feature a bug? Am I doing
something wrong? I have been able to reproduce the problem in both Ferret v6.9.3 and v7.1 on a Linux box. Thanks for any suggestions. -Bill The script that produces the error: ---SCRIPT BEGIN--- ! Script demonstrating a Ferret bug/feature when doing time interpolation ! from input directly from a netCDF file vs. input that has been read via ! a descriptor file. For some reason, when regridding data read via the ! descriptor file results in all missing values. However, bypassing the ! des file and assigning the time grid from the Ferret command line ! before doing the regridding works. ! William.Gustafson@xxxxxxxx, 18-Apr-2017 use timeseries.nc use timeseries.des ! Define needed time axes define axis/t/t0="1-jan-2011:00"/t="1-jan-2011:00":"1-may-2011:00":3/units=hour tax3h define axis/t/t0="1-jan-2011:00"/t="1-jan-2011:00":"1-may-2011:00":1/edges/units=day taxday ! Set up daily data from 3-hourly data via nc file. First, map the data ! to the 3-h grid, and then regrid to the final daily grid. This works. let nc3h = t2[gt=tax3h@asn,d=1] let nc1day = nc3h[gt=taxday] ! Set up daily data from 3-hourly data via des file. The descriptor file ! is responsible for putting the data on the 3-h grid this time. Then, ! we regrid to the daily grid. This returns missing values. let des3h = t2[d=2] !des file defines this as 3-hourly let des1day = des3h[gt=taxday] list nc1day, des1day ---SCRIPT END--- ---TRUNCATED OUTPUT FROM SCRIPT BEGIN--- TIME: 01-JAN-2011 00:00 to 01-MAY-2011 00:00 X: 100 Y: 100 Column 1: NC1DAY is NC3H[GT=TAXDAY] Column 2: DES1DAY is DES3H[GT=TAXDAY] NC1DAY DES1DAY 01-JAN-2011 12 / 1: 250.5 .... 02-JAN-2011 12 / 2: 256.0 .... 03-JAN-2011 12 / 3: 253.7 .... 04-JAN-2011 12 / 4: 250.0 .... 05-JAN-2011 12 / 5: 241.8 .... 06-JAN-2011 12 / 6: 237.3 .... 07-JAN-2011 12 / 7: 251.9 .... 08-JAN-2011 12 / 8: 247.3 .... 09-JAN-2011 12 / 9: 247.0 .... ---TRUNCATED OUTPUT FROM SCRIPT END--- ___________________________________________________________________ William I. Gustafson Jr., Ph.D. Scientist
ATMOSPHERIC SCIENCES AND GLOBAL CHANGE DIVISION
Pacific Northwest National Laboratory P.O. 999, MSIN K9-30 Richland,WA 99352 Tel: 509-372-6110 http://www.pnnl.gov/atmospheric/staff/staff_info.asp?staff_num=5716 |
Attachment:
reproduce_t_regrid_problem.tar
Description: reproduce_t_regrid_problem.tar