Project

General

Profile

masking data

Added by Serena ILLIG almost 14 years ago

Hello,

I would like to mask data using masked SST data.
I have downloaded ECMWF ERA INTERIM wind at 10 meter depth (surface fields) and the SST, in two different Grib files and with different time axes.
The grid is gaussian reduced.
The SST is nicely masked. I would like to use it to mask the wind circulation at 10 meters.
I used NCO to convert into NetCDF file temp.nc. Then I used the MATLAB to mask my data and save again in temp.nc.
I wanted to use NCO to interpolate my masked fields onto my model grid using -setgrid t256grid -R remapbil... but It does not work :

cdo -s -f nc -setreftime,19000101,000000,days -setpartab,ecmwf /data/Observations/ERA_INTERIM/Grib/EI_ecmwf_SSTK_200001.grib JUNK/temp.nc
Warning (cdfDefRgrid) : Writing a netCDF file with data on a gaussian reduced grid.
Warning (cdfDefRgrid) : The reading of this grid is unsupported!

cdo -s -setgrid,t255grid JUNK/temp.nc JUNK/temp.nc.grib :
*cdo setgrid: Open failed on >JUNK/temp.nc<
Unsupported file structure

I think I could to every thing with CDO, using something like :
cdo -s setcode,34.128 /data/Observations/ERA_INTERIM/Grib/EI_ecmwf_SSTK_200001.grib temp1.grib
cdo -s timavg temp1.grib temp2.grib
cdo -s div temp2.grib temp2.grib mask.grib

but I do not know what to do with mask.grib that correspond to variable code 34.128...

Also I would like to know how bad values are treated in the interpolation with CDO.
Is that one bad value in the input field involved in the interpolation operators leads to one bad value in the result ?
In that case I could use my interpolated SST to define the mask for all my interpolated variables ?

Thanks,

Séréna


Replies (1)

RE: masking data - Added by Uwe Schulzweida almost 14 years ago

Hi Séréna,
CDO does not support netCDF files with variables on a gaussian reduced grid. You can convert the GRIB fields on a gaussian reduced grid to a netCDF file with a regular gaussian grid with the CDO option -R:

cdo -R -f nc ifile.grb ofile.nc

The treating of bad values depends on the type of the interpolation. Bilinear interpolation is using the four neighbor values for the interpolation. If one is missing than only the three other are used.
Best wishes,
Uwe

    (1-1/1)