Project

General

Profile

Error when using cdo invertlat

Added by German Aragon about 2 years ago

Hi everyone!

I'm new at the forum, but I've used CDO for a couple of years, mainly to manage ocean and coastal data.

I am suffering some struggles trying to make a latitude inversion of a NetCDF. You can download this bathymetry from our thredds with the following command:

wget https://ihthredds.ihcantabria.com/thredds/fileServer/Bathymetry/Europe/Emodnet_2020/Emodnet_2020.nc

I am trying to execute invertlat cdo command which I used successfully in other ocassions, the command I am using reads as follows:

cdo --verbose invertlat Emodnet_2020.nc out.nc

The NetCDF is big +20Gb of information in a single variable called "elevation".

But unfortunately the process crashed, specificing:

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

I tried with the cdo installation of my local computers (installed directly with apt under ubuntu) and also with CDO compilation that we have installed in our HPC (CDO/1.9.1-foss-2016b under CentOS). The same error occurs!
I do not know if this occurs because of the size or if something is wrong with this specific netCDF.

Any help with this error is highly welcome! Thank you for your time in advance!


Replies (4)

RE: Error when using cdo invertlat - Added by Uwe Schulzweida about 2 years ago

I can't download the large file at the moment.
But the error message indicates that there is not enough memory to load the data in CDO.

RE: Error when using cdo invertlat - Added by German Aragon about 2 years ago

Ok, great! I will request the maximum RAM I can reach per node in the HPC (~60GB) and let you know if the issue persists.

RE: Error when using cdo invertlat - Added by German Aragon about 2 years ago

Something is wrong with this netcdf. If make

cdo info 

same error occurs.
Seems that this netcdf was created by a mate by means of a merge in ArcGis and the format is not right for CDO. So that, I am downloading from source again. I have one netcdf per tile and I am trying to generate a unique netcdf with "mergegrid".

!

!

I see how works mergegrid and I need to generate a netcdf with the grid of the entire domain in order to merge all the downloaded netcdf's. I use griddes and modify the number of points to overcome my final grid definition but now I do not know how to create a netcdf with nan values from this file... any suggestion?

RE: Error when using cdo invertlat - Added by Uwe Schulzweida about 2 years ago

cdo -f nc setctomiss,0 -const,0,<gridDefinitionFile> result.nc
    (1-4/4)