创建一个NetCDF文件,其数据被屏蔽以仅保留着陆点 [英] Create a NetCDF file with data masked to retain land points only

查看:180
本文介绍了创建一个NetCDF文件,其数据被屏蔽以仅保留着陆点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已在研究生中使用basemap.gs脚本屏蔽了NetCDF文件.这是我使用口罩得到的:

I have masked a NetCDF file using basemap.gs script in grads. Here is what I got using the mask:

所以,我想获得一个仅包含大陆数据的NetCDF文件,有人可以帮我吗?

So, I would like to obtain a NetCDF file which only contains the continental data, can anyone help me with this?

推荐答案

如果我正确理解了这个问题,则希望拥有一个netcdf文件,该文件的所有值都设置为在海点上丢失(即_Fillvalue).如果是这样,可以从命令行中找到两种解决方案:

If I have understood the question correctly, the desire is to have a netcdf file with all the values set to missing (i.e. _Fillvalue) over the sea points. If so there are two solutions from the command line:

一种方法是使用CDO创建陆地-海洋遮罩,然后将所有海洋点设置为丢失:

One way is to use CDO to create a land-sea mask and then set all the sea points to missing:

cdo -f nc2 setctomiss,0 -gtc,0 -remapcon,your_data_.nc -topo seamask.nc

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆