Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

ocean_mask file

praveenvk

Praveen
New Member
Could you please provide some clarification on this?. It might sound trivial but i have few doubts.
1) So if i needed to mask out regions, should i make edits in the topography file as well as mask file?.
2) Would i need to change anything in the mosaic grids once the masking is done.

Regards
What I understand is that, there are two way to achieve this

1. you have to edit topography file before creating the mask file (setting land areas as 0 or -ve values), let say using editTopo.py of GitHub - COSIMA/topogtools: Tools related to changing ocean model topography and regenerating dependent model inputs.. Then creating the mask files as described in steps after make_topog.

2. Edit the mask file and then apply this on to the topography file again by using ./apply_mask.py in GitHub - COSIMA/topogtools: Tools related to changing ocean model topography and regenerating dependent model inputs..

I am new to MOM. So not sure about the procedure. But you will get a desired result.
 

sajidh

Sajidh C K
New Member
Thanks a lot.
I have already made a topography file and ocean mask using FRE-nctools so i am assuming i can proceed with editing the ocean mask using the tools you mentioned and then apply the changes to the topography file.
Thanks again for providing the tools.
 

praveenvk

Praveen
New Member
Thanks a lot.
I have already made a topography file and ocean mask using FRE-nctools so i am assuming i can proceed with editing the ocean mask using the tools you mentioned and then apply the changes to the topography file.
Thanks again for providing the tools.
Yes. You can edit the mask and then apply or even edit the topography by using editTopo.py mentioned in above package.

Cheers
 

sajidh

Sajidh C K
New Member
Yes. You can edit the mask and then apply or even edit the topography by using editTopo.py mentioned in above package.

Cheers
Sorry to bother you again, i have a query. I made an ocean_topog file using FRE-NCtools make_topog but the ocean mask created from the topography file doesn't look very good. i used the the commands below
//////
make_hgrid --grid_type regular_lonlat_grid --nxbnd 2 --nybnd 2 --xbnd 20,120 --ybnd -30,30 --nlon 200 --nlat 120 --grid_name ocean_hgrid --verbose

make_vgrid --nbnds 3 --bnds 0.,220.,5500. --dbnds 10.,10.,367.14286 --grid_name ocean_vgrid

make_solo_mosaic --num_tiles 1 --dir . --mosaic_name ocean_mosaic --tile_file ocean_hgrid.nc --periodx 0

make_topog --mosaic ocean_mosaic.nc --topog_type realistic --topog_file new_dep.nc --topog_field z --scale_factor -1 --vgrid ocean_vgrid.nc --output ocean_topog.nc --deepen_shallow
//////
should i add any additional arguments to make_topog ( i tried changing kmt_min to 6, seemed to produce a better mask,still not that great. but i don't really understand how it makes a difference). i'll add the pic of the mask below

Regards
1690041448612.png
 
Whatever you do, they all have to have a consistent view of the land mask: the land_null, the atmos_null, the ice and ocean models. Rob was helping me with the land mask editing, so I don't know exactly how it works.
 

praveenvk

Praveen
New Member
Hi sajidh
Yes the topography will be too much smooth and many islands will disappear.
What I did was created another merged topography reference file with raw topography from GEBCO (but only in location above minimum depth and below from the smoothed ocean_topog file). and then use it as the reference file in editTopo,py and then manually bring back all the islands by clicking. It was a tiring work.
You can simply use the merged topography file too. But make sure nothing is wrong (There are chances to have spikes in topography).

Other solution-2, I already mentioned, by creating a mask file first and then apply on to your topography file using ./apply_mask.py in topogtools.

I am new to MOM, there might be other easy solutions. I hope someone will post that here.

Note: topogtools have a program called "deseas' you may have to use that before doing all this edits to remove lakes.

as kshedstrom@alaska_edu cautioned here: to avoid this, run make_quick_mosaic and make_coupler_mosaic (if needed) after doing all this edits on ocean_topog file. So that all mask files are consistent.​

 

sajidh

Sajidh C K
New Member
Thanks for the replies,
I'll try the stuff you mentioned, the ocean masks produced by the preprocessing tools from MOM5 seems to produce a better mask. I have not explored it properly. Thanks again

Cheers
 

praveenvk

Praveen
New Member
Thanks for the replies,
I'll try the stuff you mentioned, the ocean masks produced by the preprocessing tools from MOM5 seems to produce a better mask. I have not explored it properly. Thanks again

Cheers
Yes you are right, older versions of MOM preprocessing tools gives better mask. May be we are missing something in the make_topog settings!!.
 
Top