Regridding Differences Between CDMS2 and xCDAT #505
Replies: 4 comments 2 replies
-
@manaster thank you very much for the careful write up of this issue! Peter gave a heads-up to the xCDAT team about this issue. And I think @jasonb5 mentioned some hypotheses about the difference in implementation earlier. Jason would you please help on this issue? |
Beta Was this translation helpful? Give feedback.
-
I believe the first issue raised ("3-hourly Resampling") does not involve use of a horizontal regridder, with the subtle discrepancies only in the first time step, with the other (7) time steps all being identical. |
Beta Was this translation helpful? Give feedback.
-
plotting code and plots now available at /p/user_pub/PCMDIobs/RSS_tests to help identify discrepancies. |
Beta Was this translation helpful? Give feedback.
-
Hey @manaster, can you check to see if you still get these differences with the latest version of xcdat (v0.7.1) compared to CDAT? There were enhancements and bug fixes that might have addressed them. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Question criteria
Describe your question
Recently, I have encountered some differences that arise when NASA's Integrated Multi-satellitE Retrievals for GPM (IMERG) data are resampled with CDMS2 and xCDAT. Specifically, the IMERG data were resampled from 30-minute, 0.1 degree gridded ‘.nc4’ files to 3-hourly, 0.1 degree gridded netCDF4 files and then regridded to 3-hourly, 2 degree gridded netCDF4 files. The resampling and re-gridding are done with both CDMS2 and xCDAT and differences are seen, which are described below. The folders containing the codes and files necessary to examine and recreate this problem are on “gates” at
/p/user_pub/PCMDIobs/RSS_tests
(see Peter Gleckler for more information).3-hourly Resampling
Background
In this specific test, IMERG 30-minute, 0.1 gridded ‘.nc4’ files were downloaded for June 1st, 2010 and averaged to 3-hourly maps on the same initial 0.1 degree grid and were written out as netCDF4 files.
resampling-code/make_IMERG.3hr.cdms.py
resampling-code/make_IMERG.3hr.xcdat.py
resampled-imerg-files/IMERG_Final.Run.V06B_0.1deg_3hr_201006-cdms.nc
resampled-imerg-files/IMERG_Final.Run.V06B_0.1deg_3hr_201006-xcdat.nc
Comparison of output files
In terms of the output rain rate, the 3-hourly averages are the same when the two files are compared with the exception being the first 3-hourly interval.
2 Degree Regridding
Background
After the files are resampled to 3-hour averages, the 3-hourly, 0.1 degree gridded netCDF4 files are regridded to a uniform 2-degree latitude/longitude Earth grid.
make_IMERG_2deg.cdms.py
- CDMS2 horizontal regridder (regrid2.Horizontal
)make_IMERG_2deg.xcdat.py
- xCDAT horizontal regridder (regridder.regrid2.Regrid2Regridder
)resampled-imerg-files/IMERG_Final.Run.V06B_2deg_3hr_201006-cdms.nc
resampled-imerg-files/IMERG_Final.Run.V06B_2deg_3hr_201006-xcdat.nc
Comparison of output files
When the 2-degree regridded outputs (are compared, the data between 60S and 60N are identical for both the CDMS2 and xCDAT files. However, at high latitudes, differences appear between the two files.
Hypothesis
As an additional part of this exercise, a 0.1 degree, 3-hourly file was created with xCDAT and regridded to 2 degrees using both the CDMS2 and xCDAT 2-degree regridding codes.
make_IMERG_2deg.cdms.py
andmake_IMERG_2deg.xcdat.py
codes in the "resampling-code" folder).How to Recreate the Issue
Please do not hesitate to reach out with any questions or if clarification is needed on anything.
Are there are any possible answers you came across?
No response
Minimal Complete Verifiable Example (MVCE)
No response
Relevant log output
No response
Environment
xCDAT Version is 0.3.3
xr.show_versions() output listed below:
INSTALLED VERSIONS
commit: None
python: 3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:36:39) [GCC 10.4.0]
python-bits: 64
OS: Linux
OS-release: 5.14.0-70.26.1.el9_0.x86_64
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: ('en_US', 'UTF-8')
libhdf5: 1.12.2
libnetcdf: 4.8.1
xarray: 2022.11.0
pandas: 1.5.1
numpy: 1.23.3
scipy: 1.9.3
netCDF4: 1.6.1
pydap: None
h5netcdf: None
h5py: None
Nio: None
zarr: None
cftime: 1.6.2
nc_time_axis: None
PseudoNetCDF: None
rasterio: None
cfgrib: None
iris: None
bottleneck: None
dask: 2022.10.2
distributed: 2022.10.2
matplotlib: None
cartopy: None
seaborn: None
numbagg: None
fsspec: 2022.10.0
cupy: None
pint: None
sparse: 0.14.0
flox: None
numpy_groupies: None
setuptools: 65.5.0
pip: 22.3
conda: None
pytest: None
IPython: None
sphinx: None
Anything else we need to know?
No response
Beta Was this translation helpful? Give feedback.
All reactions