Project

General

Profile

rewriting nc file using land mask

Added by kartk ram about 9 years ago

Hello folks,
I am looking for some priliminary help. I have global netcdf data file. I want to make a new .nc file from it but only with ocean data points. I understand from general reading taht i have to mask the land but dont have a clue about it. Seekiing your valuable help.

thanks in advance


Replies (1)

RE: rewriting nc file using land mask - Added by Jaison-Thomas Ambadan about 9 years ago

Hi,

you can use the topo operator along with comparison operators for your purpose: https://code.zmaw.de/boards/53/topics/1605

For more info regarding the comparison operators: https://code.zmaw.de/projects/cdo/embedded/1.6.4/cdo.html#x1-1470002.5

here is an example,

cdo -f nc -gtc,0 -topo land_sea_mask.nc

will give half degree regular grid mask file (1s over the land and 0s over the ocean). To change the resolution of the mask, use remap operators on topo and then use the comparison operator

Another option is to use the GMT tool grdlandmask : http://gmt.soest.hawaii.edu/doc/latest/grdlandmask.html

Cheers

    (1-1/1)