hot to setmiss after smooth
Added by Shizhu Wang about 1 year ago
Hi, I want to do a spatial smooth on my data.cdo smooth,nsmooth=5 in.nc out.nc
As this post said, the more points that are included in the smooth, the smaller the area with missing value is. So, how do I set where the missing values are in in.nc to out.nc ?
My way in doing this is:cdo setrtoc,-100,100,1 in.nc nan_mask.nc
cdo mul out.nc nan_mask.nc out_with_right_nan.nc
My question is that is there a way in which I can directly set the missing values in out.nc according to in.nc ?
Thanks,
Shizhu
Replies (3)
RE: hot to setmiss after smooth - Added by Estanislao Gavilan about 1 year ago
Hi Shizhu,
There are diferent way to set missing values (see documentation 2.6.15 SETMISS - Set missing value ). The easiest one is
cdo setmissval,newmiss infile outfile
RE: hot to setmiss after smooth - Added by Shizhu Wang about 1 year ago
Hi Estanislao,
thanks for the reply. Yes I know we have several setmiss fucntions in cdo , but I don't know how these functions can set missing values in a.nc according to the position of missing values in b.nc directly
RE: hot to setmiss after smooth - Added by Karin Meier-Fleischer about 1 year ago
I don't know if I understand the question right.
Do you mean the following: assuming you have two files a.nc and b.nc, you want to have the missing values from file b.nc also in a.nc?
Then try
cdo ifthen b.nc a.nc outfile.nc