Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMIP6: thkcello problem to regrid #190

Closed
leilanepassos opened this issue Oct 27, 2021 · 5 comments
Closed

CMIP6: thkcello problem to regrid #190

leilanepassos opened this issue Oct 27, 2021 · 5 comments

Comments

@leilanepassos
Copy link

Hei, I'm working with the AWI-CM-1-1-MR data on the DKRZ server (CMIP6: historical r1 until r3). I'm trying to regrid the variable thkcello using CDO:
cdo remapycon,global_1 thkcello_Ofx_AWI-CM-1-1-MR_historical_r1i1p1f1_gn.nc output.nc
but I'm receiving the message:
Warning (cdf_read_ycoord): Unsupported array structure, skipped variable thkcello!
Warning (cdfInqContents): No data arrays found!
cdo select: Open failed on >thkcello_Ofx_AWI-CM-1-1-MR_historical_r1i1p1f1_gn.nc<
Unsupported file structure

Questions:
1)I've managed to regrid the variable areacello with this command. Should I use the same command with thkcello?
2)Is it the most indicated way to regrid variables: hfds (Downward Heat Flux at Sea Water Surface), wfo (Water Flux into Sea Water), tos(sea surface salinity), sos (sea surface temperature), and mlotst (Ocean Mixed Layer Thickness Defined by Sigma T)?

@helgegoessling
Copy link
Contributor

Hi, I also have difficulties with that file. A simple "cdo copy" results in the same error. I also tried to set the axis of that variable as follows:

ncatted -a axis,thkcello,c,c,"Z-" thkcello_Ofx_AWI-CM-1-1-MR_historical_r1i1p1f1_gn.nc
... but that also results in an error:

_ERROR: nco__open() unable to open file "thkcello_Ofx_AWI-CM-1-1-MR_historical_r1i1p1f1_gn.nc"
ERROR NC_EHDFERR Error at HDF5 layer
HINT: NC_EHDFERR errors indicate that the HDF5-backend to netCDF is unable to perform the requested task. NCO can receive this devilishly inscrutable error for a variety of possible reasons including: 1) The run-time dynamic linker attempts to resolve calls from the netCDF library to the HDF library with an HDF5 libhdf5.a that is incompatible with the version used to build NCO and netCDF. 2) The file system does not allow the HDF5 flock() function, as of HDF5 1.10.x, to enable multiple processes to open the same file for reading, a feature known as SWMR (Single Write Multiple Read). The fix is to disable the HDF5 flock() by setting an environment variable thusly: "export HDF5_USE_FILE_LOCKING=FALSE". 3) An incorrect netCDF4 library implementation of a procedure (e.g., nc_rename_var()) in terms of HDF function calls (e.g., HDF5Lmove()) manifests an error or inconsistent state within the HDF5 layer. This often occurs during renaming operations (Unidata/netcdf-c#597). 4) Attempting to compress or decompress a netCDF4 dataset with a non-standard (i.e., non-DEFLATE) filter when the requisite shared library to encode/decode that compression filter is not present in either the default location (/usr/local/hdf5/lib/plugin) or in the user-configurable location referred to by the HDF5_PLUGIN_PATH environment variable. One can determine if missing plugin libraries are the culprit by dumping the hidden attributes of the dataset with, e.g., ncks --hdn -m in.nc or ncdump -s -h in.nc. Any variables with (hidden) "_Filter" attributes require the corresponding shared libraries to be located in HDF5_PLUGIN_PATH. 5) Bad vibes.
nco_err_exit(): ERROR Short NCO-generated message (usually name of function that triggered error): nco__open()
nco_err_exit(): ERROR Error code is -101. Translation into English with nc_strerror(-101) is "NetCDF: HDF error"
nco_err_exit(): ERROR NCO will now exit with system call exit(EXIT_FAILURE)

Does anyone else know how to tame that file?

@koldunovn
Copy link
Member

koldunovn commented Oct 28, 2021

I am not really sure it make sense to regrid fx variables. The areacello is area of the cells, and you can't just take it and regrid to another grid, it will be plainly wrong. You have to compute areacello for your new grids based on the parameters of this grid, isn't it?

Same thing with thkcello - it should be used to compute integral values on original grid, but what do you get, when you interpolate it? Cells with 500 m depth on the shelf? Especially with conservative remapping, that redistribute error all over the place. Yes, you will conserve volume of the ocean, but how does it help you?

Or I am missing something here?

@leilanepassos
Copy link
Author

Hei @koldunovn, thanks for your question. It's the first time I'm working with AWI-CM-1-1-MR results and I'm not familiar with FESOM's unstructured grid. My main goal is to calculate water mass transformation in the Subpolar North Atlantic and for that, I need the area of the cell and the thickness of the layer. To compare the results of different CMIP6 models I'm interpolating all of them to a regular grid (1degree), and since I'm interpolating the variables hfds, wfo, tos, sos, and mlotst for this regular grid I thought that I should do the same for areacello and thkcello. However, I'm not sure of my steps with FESOM, so if you have any suggestions for my problem it'd be nice. Now I'm using CDO to separate the files and area I need and afterward, I'll process these NetCDF files in Matlab.

@koldunovn
Copy link
Member

Hi @leilanepassos Interpolation of areacello and thkcello does not make sense to me for any of the models. areacello is the area of the cell. The moment you interpolate to regular grid, the area of the cell is the area of your regular grid cell, and you should do computations using it. So, to put it in other way areacello is property of the grid, not property of the ocean. Same story with thkcello - this is thickness of you water column, that will be defined by the mesh you interpolate your data to.

On a side note, @dsidoren publish a couple papers recently arguing that study water mass transformation in z coordinate framework might not be the best idea :)

https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2020MS002317
https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2021MS002582

@koldunovn
Copy link
Member

Please reopen if the issue is still not addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants