Project

General

Profile

remapping CMIP6 data from MPI-ESM

Added by Levi Silvers 2 months ago

Greetings,

I recently downloaded MPI-ESM1-2-LR data from the cmip6 historical run at the Copernicus Climate Data Store. The data was supposed to include data at all longitudes and from 20S to 20N.

I have not bee able to use this data due to the irregular grid and haven't been able to figure out how to use cdo to help.

FIRST example:
silvers$ cdo remapbil,r360x40 tos_Omon_MPI-ESM1-2-LR_historical_2tsteps.nc output.nc

cdo remapbil (Abort): Unsupported generic coordinates (Variable: tos)!

SECOND example:
silvers$ cdo -O sellonlatbox,-100,0,5,15 -setgridtype,unstructured tos_Omon_MPI-ESM1-2-LR_historical_2tsteps.nc tmp.nc
cdo(1) setgridtype: Process started

cdo sellonlatbox (Abort): Cell center coordinates missing!

Can you please help me understand how to use cdo with this grid? Thank you in advance.

for reference, I am including below the info from an ncdump command on the tos_Omon_MPI-ESM1-2-LR_historical_2tsteps.nc

netcdf tos_Omon_MPI-ESM1-2-LR_historical_2tsteps {
dimensions:
i = 256 ;
j = 45 ;
time = 2 ;
bnds = 2 ;
vertices = 4 ;
variables:
int i(i) ;
i:units = "1" ;
i:long_name = "cell index along first dimension" ;
int j(j) ;
j:units = "1" ;
j:long_name = "cell index along second dimension" ;
double latitude(j, i) ;
latitude:standard_name = "latitude" ;
latitude:long_name = "latitude" ;
latitude:units = "degrees_north" ;
latitude:bounds = "vertices_latitude" ;
double longitude(j, i) ;
longitude:standard_name = "longitude" ;
longitude:long_name = "longitude" ;
longitude:units = "degrees_east" ;
longitude:bounds = "vertices_longitude" ;
double time(time) ;
time:bounds = "time_bnds" ;
time:axis = "T" ;
time:long_name = "time" ;
time:standard_name = "time" ;
time:units = "days since 1850-01-01" ;
time:calendar = "proleptic_gregorian" ;
double time_bnds(time, bnds) ;
float tos(time, j, i) ;
tos:standard_name = "sea_surface_temperature" ;
tos:long_name = "Sea Surface Temperature" ;
tos:comment = "Temperature of upper boundary of the liquid ocean, including temperatures below sea-ice and floating ice shelves." ;
tos:units = "degC" ;
tos:original_name = "tos" ;
tos:cell_methods = "area: mean where sea time: mean" ;
tos:cell_measures = "area: areacello" ;
tos:history = "2019-09-11T14:21:40Z altered by CMOR: replaced missing value flag (-9e+33) and corresponding data with standard missing value (1e+20)." ;
double vertices_latitude(time, j, i, vertices) ;
double vertices_longitude(time, j, i, vertices) ;


Replies (3)

RE: remapping CMIP6 data from MPI-ESM - Added by Uwe Schulzweida 2 months ago

The coordinates attribute is missing for the variable tos:

ncatted -a coordinates,tos,c,c,"latitude longitude" tos_Omon_MPI-ESM1-2-LR_historical_2tsteps.nc

RE: remapping CMIP6 data from MPI-ESM - Added by Levi Silvers 2 months ago

Thank you Uwe! This solved my problem. Now I can use remapbil to get the data on the grid that I need.

One further question came up from using the remapbil command:
cdo(1) sethalo: Process started
cdo remapbil (Warning): Using a non-thread-safe NetCDF4/HDF5 library in a multi-threaded environment may lead to erroneous results!
cdo remapbil (Warning): Use a thread-safe NetCDF4/HDF5 library or the CDO option -L to avoid such errors.

Can you tell me an example of a thread-safe NetCDF4/HDF5 library? I ended up just using the -L option, but feel uncertain if there are
errors that result from my libraries.

RE: remapping CMIP6 data from MPI-ESM - Added by Uwe Schulzweida about 2 months ago

The HDF5 library must be configured with the following options so that it can be used thread-safe by netcdf:

./configure --enable-threadsafe --enable-unsupported ....

    (1-3/3)