problem using interpolation with cdo
Added by mab ab about 4 years ago
Hi, I have a problem using interpolation with cdo:
I did:
cdo griddes final_WCPS_atmos_modified.nc > gridWCPS.txt
cdo remapbil,gridWCPS.txt, RDPS_SFCWRO_20210121_06_1.nc RDPS_SFCWRO_20210121_06_1_interpolated.nc
when I look to the result file (RDPS_SFCWRO_20210121_06_1_interpolated.nc) and target file(final_WCPS_atmos_modified.nc) in ncview, there is some difference of min and max of rlon and rlat (see the red circles in .jpg files). Any idea?
after that I want to merge final_WCPS_atmos_modified.nc and RDPS_SFCWRO_20210121_06_1_interpolated.nc sorted by date and time. How can I do that (taken into account the issue defined above)?
thank you
Replies (5)
RE: problem using interpolation with cdo - Added by Karin Meier-Fleischer about 4 years ago
Hi Mab,
with the files and the CDO commands from above I'm not able to reproduce the problem. The file final_WCPS_atmos_modified.nc seems to be another one than the one of the JPEG file.
cdo griddes final_WCPS_atmos_modified.nc > gridWCPS.txt cdo remapbil,gridWCPS.txt RDPS_SFCWRO_20210121_06_1.nc RDPS_SFCWRO_20210121_06_1_interpolated.nc
cdo sinfon -seltimestep,1 final_WCPS_atmos_modified.nc cdo(1) seltimestep: Process started File format : NetCDF4 zip -1 : Institut Source T Steptype Levels Num Points Num Dtype : Parameter name 1 : unknown unknown v instant 1 1 3332 1 F32z : WCPS_atmos_P_N0_SFC Grid coordinates : 1 : curvilinear : points=3332 (49x68) lon : -81.98837 to -71.37656 degrees_east lat : 43.43177 to 50.0458 degrees_north mapping : rotated_latitude_longitude rlon : 321.4019 to 325.7219 by 0.09000015 degrees rlat : -20.34 to -14.31 by 0.09000001 degrees Vertical coordinates : 1 : surface : levels=1 Time coordinate : 1 step RefTime = 2016-01-01 00:00:00 Units = hours Calendar = gregorian YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss 2019-03-01 00:00:00
cdo sinfon -seltimestep,1 RDPS_SFCWRO_20210121_06_1.nc cdo(1) seltimestep: Process started File format : NetCDF2 -1 : Institut Source T Steptype Levels Num Points Num Dtype : Parameter name 1 : unknown unknown v instant 1 1 770440 1 F32 : WCPS_atmos_P_N0_SFC Grid coordinates : 1 : projection : points=770440 (935x824) mapping : polar_stereographic x : 0 to 9340000 by 10000 m y : 0 to 8230000 by 10000 m Vertical coordinates : 1 : surface : levels=1 Time coordinate : 1 step RefTime = 2021-01-21 06:00:00 Units = hours Calendar = proleptic_gregorian YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss 2021-01-21 13:00:00
cdo sinfon -seltimestep,1 RDPS_SFCWRO_20210121_06_1_interpolated.nc cdo(1) seltimestep: Process started File format : NetCDF2 -1 : Institut Source T Steptype Levels Num Points Num Dtype : Parameter name 1 : unknown unknown v instant 1 1 3332 1 F32 : WCPS_atmos_P_N0_SFC Grid coordinates : 1 : curvilinear : points=3332 (49x68) lon : -81.98837 to -71.37656 degrees_east lat : 43.43177 to 50.0458 degrees_north mapping : rotated_latitude_longitude rlon : 321.4019 to 325.7219 by 0.09000015 degrees rlat : -20.34 to -14.31 by 0.09000001 degrees Vertical coordinates : 1 : surface : levels=1 Time coordinate : 1 step RefTime = 2021-01-21 06:00:00 Units = hours Calendar = proleptic_gregorian YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss 2021-01-21 13:00:00
-Karin
RE: problem using interpolation with cdo - Added by mab ab about 4 years ago
Hi Karin, yes with sinfon I can't see any difference but when I do ncview there is some difference in rlon and rlat (see attached):
I want to merge these two files (final_WCPS_atmos_modified and RDPS_SFCWRO_20210121_06_1_interpolated). do you think that works?
thank you
ncview_RDPS_SFCWRO_20210121_06_1_interpolated.JPG (144 KB) ncview_RDPS_SFCWRO_20210121_06_1_interpolated.JPG | interpolated grid | ||
ncview_final_WCPS_atmos_modified.JPG (203 KB) ncview_final_WCPS_atmos_modified.JPG | target grid |
RE: problem using interpolation with cdo - Added by Karin Meier-Fleischer about 4 years ago
When I open the netCDF file with ncview ncview is not responding anymore and I have to kill it. But I trust CDO because when reading and plotting with NCL everything is ok (as shown in your last cdo support issue).
RE: problem using interpolation with cdo - Added by mab ab about 4 years ago
Hi Karin, how do you plot these data with NCL?
Other point, can I merge final_WCPS_atmos_modified.nc and RDPS_SFCWRO_20210121_06_1_interpolated.nc sorted by date and time? because the first file contains a mask
thank you
RE: problem using interpolation with cdo - Added by Karin Meier-Fleischer about 4 years ago
You can merge files with the operator mergetime.
The NCL plot shows that the destination area is really small and the data values will be all 0.
And the NCL scriptis attached.
plot_test.png (143 KB) plot_test.png | |||
script.ncl (3.57 KB) script.ncl |