Project

General

Profile

sethalo - comment and bug

Added by Stefan Hagemann about 1 year ago

I have some issues with the sethalo command.

1. sethalo can be used to add columns on the left and right side of a grid. However, in my understanding, a halo is a surrounding everywhere. Hence, it should also be possible to add rows on top and in the bottom. Is this already implemented in cdo, e.g. either in sethalo or in another command?

2. I have a NEMO sea-land mask (regional, curvilinear grid) and wanted to add 5 columns to the left and right.
cdo sethalo,5,5 NEMO_grid_GCOAST.nc slm_halo5.nc
added these columns, but the new left columns had values and coordinates associated with the right part and vice versa (see figure). This seems to be a bug.
The files are stored in levante:/scratch/g/g260122/tmp/pub


Replies (7)

RE: sethalo - comment and bug - Added by Uwe Schulzweida about 1 year ago

Hi Stefan,

sethalo was developed for the ocean model MPIOM and does exactly what is needed there. This information is missing in the docu, I will add it soon.
Unfortunately, there is no function in CDO for what you have in mind, sorry.

Cheers,
Uwe

RE: sethalo - comment and bug - Added by Stefan Hagemann about 1 year ago

Hi Uwe
thanks for the response.

a) Bug
However, should sethalo work correctly only for MPI-OM? Obviously, using sethalo with the NEMO grid led to an incorrect behavior.

b) Isn't it easily possible to add the functionality for top and bottom extension, e.g. with using a parameter that specifies whether the halo is used at left/right sides, top/bottom sides or on all sides? The latter would actually be the expected behavior from a halo.
I assume this would be quite useful for various coupling purposes or limited area activities related to forcing at the area boundaries. With regard to the latter I discovered the sethalo function.

Note that a) is just a remark as I am personally more interested in b)

Best regards
Stefan

RE: sethalo - comment and bug - Added by Estanislao Gavilan about 1 year ago

Hi Stefan,

there are some cdo functions that are exclusive for MPIOM and REMO grid such as sethalo or vector rotation. If you want to use that function with the NEMO output, you need to flip the grid. MPIOM and NEMO have similar tripolar grid, but the starting point is different. MPIOM starts in the top left corner whereas NEMO starts in the bottom left corner. I agree with the second point though. It would be fantastic to update (maybe upgrade) some of those functions

Regards,

Estanislao

RE: sethalo - comment and bug - Added by Uwe Schulzweida about 1 year ago

Hi Stefan,

I have now extended the operator sethalo as you suggested.
I had to change the interface a bit. Now there are the parameters east/west/south/north and value. Value sets the fill value, which is otherwise missing value.
The following example fills the new border of 5 cells around the field with the missing value:

  cdo sethalo,east=5,west=5,south=5,north=5 infile outfile
You can find a test version on levante:/home/m/m214003/local/bin/cdo. Your feedback is very welcome!
Best regards,
Uwe

RE: sethalo - comment and bug - Added by Stefan Hagemann about 1 year ago

Hallo Uwe,

excellent. Thanks a lot. It works well on the NEMO mask I used before.

Best regards
Stefan

RE: sethalo - comment and bug - Added by Brendan DeTracey about 1 year ago

This is a great idea, but will it still accept the old interface i.e. backwards compatibility?

RE: sethalo - comment and bug - Added by Uwe Schulzweida about 1 year ago

Yes, the old interface is still available, but it is no longer documented.

    (1-7/7)