Project

General

Profile

how to set all values less than 0.1 equal to 0

Added by Mara Antonella over 2 years ago

Hi everyone,

I have a .nc file with daily total precipitation and I want to set all the values less than 0.1 mm to 0. Is that possible with CDO?

Thank you in advance.


Replies (1)

RE: how to set all values less than 0.1 equal to 0 - Added by Karin Meier-Fleischer over 2 years ago

Hi Mara,

use the gec operator to generate a mask (https://code.mpimet.mpg.de/projects/cdo/embedded/cdo.pdf#subsection.2.5.2) and multiply it with your data.

cdo -mul sum_greece.nc -gec,0.1 sum_greece.nc outfile.nc

-Karin

    (1-1/1)