Project

General

Profile

cdo selregion and dcw in the ocean

Added by Luca Reißig 9 days ago

Hi All,

I am looking for a reliable way to select specific ocean regions and stumbled across the selregion operator.
I downloaded the dataset from the dcw (https://www.soest.hawaii.edu/pwessel/dcw/) and set the path as an environment variable.
With that, it is possible to select specific country codes via something like

cdo -selregion,dcw:US+CA <myinputfile> <outputfile> # (for usa+canada selection)

It is even possible to select specific states, such as alaska from the dcw-states.txt file.

In the dcw data there is also a dcw-collections.txt , containing collections like all the countries in the EU, as well as regions of the different maritime sea boundaries.
Is there a way to acces these collections in the dcw-collections.txt via cdo selregion? I could not find anything in the documentation.

If it is not implemented, I think this would be a very useful addition as it would allow to easily compute statistics over well defined regions without the need for grid-specific masks.
Or is there a better way to select ocean regions that I am missing?

Thanks in advance
Luca


Replies (3)

RE: cdo selregion and dcw in the ocean - Added by Karin Meier-Fleischer 9 days ago

I guess the answer is yes. From the documentation:

Regional regular grid: dcw:<CountryCode>[_<DXY>]

dcw:<CountryCode>[_<DXY>] defines a regional regular lon/lat grid from the country code. The default value
of the optional grid increment <DXY> is 0.1 degree. The ISO two-letter country codes can be found on https:
//en.wikipedia.org/wiki/ISO_3166-1_alpha-2. To define a state, append the state code to the country code, e.g.
USAK for Alaska. For the coordinates of a country CDO uses the DCW (Digital Chart of the World) dataset from
GMT. This dataset must be installed on the system and the environment variable DIR_DCW must point to it.

RE: cdo selregion and dcw in the ocean - Added by Luca Reißig 9 days ago

Hello,

thank you for the reply. I think i understand now.
I was referring to the additional txt files that come with the dcw data, but it seems like cdo is just directly accesing the netcdf, where the coordinates are located. In the netcdf the countries and some country states are included, but not the collections of countries that are listed in the dcw-collections.txt.

I was hoping there was a way to select from the collections.txt file. But I suppose that is more a problem with the dcw netcdf data not containing this information than with cdo itself.

RE: cdo selregion and dcw in the ocean - Added by Uwe Schulzweida 4 days ago

Hello Luca,

Yes, collections.txt is not currently supported by CDO. This file did not yet exist when this feature was implemented. We will be adding support for collections.txt in the next CDO release 2.6.4. Thank you for pointing this out!

Cheers,
Uwe

    (1-3/3)