Project

General

Profile

Multiplying constant value for a specific time step

Added by S BR over 3 years ago

Hi,
I have temperature data for 12 time steps from January to December. I want to multiply a constant value (e.g. 2.0) for a specific time step 9 (e.g. September) but keeping other data in the time series as it is.
Please suggest how to do this?

SB


Replies (2)

RE: Multiplying constant value for a specific time step - Added by Guilherme Martins over 3 years ago

Try,

cdo select,month=1/8 input.nc tmp01.nc
cdo -mulc,2 -select,month=9 input.nc tmp02.nc
cdo select,month=10/12 input.nc tmp03.nc
cdo mergetime tmp01.nc tmp02.nc tmp03.nc out.nc
    (1-2/2)