I want to set all values below a constant c to c itself in a netcdf file: file.nc
A solution using climate data operators (CDO) would be
cdo mul -gec,$c file.nc file.nc t1.nc
cdo add -mulc,$c -ltc,$c file.nc t1.nc output.nc
rm -f t1.nc
But is there a neater/shorter way to do this?