NCO:使用另一个NETCDF蒙版文件掩盖NetCDF文件,其中(0-1)值
我有两个.nc文件data.nc
和mask.nc
。 其中:data.nc
包含一个称为temp
未掩盖的变量,而bask.nc
在一个称为tmask 带有
(0-1)
值。 使用nco
,如何应用data.nc
文件的掩码,以便将零掩码值设置为丢失,而Unity掩码值则保持不变?
I have two .nc files data.nc
and mask.nc
.
Where: data.nc
contain a variable called temp
unmasked, while mask.nc
contain the mask within a variable called tmask
with (0 - 1)
values.
Using NCO
, how can I apply the masking for the data.nc
file, such that zero mask values are set to missing, and unity mask values are retained unchanged?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
目前尚不清楚您想对面具做什么。这是一个常见的过程,请使用掩码将实际值替换为缺少的值:
and and
get_miss
在如果
temp
比tmask
有更多的记录被广播到temp
的大小:It's unclear what you wish to do with the mask. Here is a common procedure, use the mask to replace the actual values with missing values:
Documentation for
where
andget_miss
is in the manual.If
temp
has more records thantmask
then make thewhere()
condition operate on a copy oftmask
that has been broadcast to the size oftemp
:要在
cdo
中执行相同的操作,您可以尝试此操作,该操作在服用产品之前先在掩码中设置为零:cdo
自动重复掩码以使其相同时间长度为数据文件,称为数据“广播”。我在 broadcasting 。
To do the same operation in
cdo
you could try this, which sets zero to missing in the mask first before taking the product:cdo
automatically repeats the mask to make it the same length in time as the data file, known as data "broadcasting".I have a youtube video on masking here for further guidance, and other material on temporal broadcasting.