Project

General

Profile

[netCDF Daily Mean Temperature] How to assign zero to all values for a specific time period

Added by Filipe Adao over 2 years ago

I want to generate a yearsum netCDF file for a period of 50 years but ignoring data between October and January.

I came up with the idea of assigning 0 to all values of the undesired period and then calculate the yearsum. Is there a way to do this using cdo?


Replies (4)

RE: [netCDF Daily Mean Temperature] How to assign zero to all values for a specific time period - Added by Filipe Adao over 2 years ago

I found an alternate way to do this by using the selmonth function.

RE: [netCDF Daily Mean Temperature] How to assign zero to all values for a specific time period - Added by Filipe Adao over 2 years ago

Hello Ralf,

I ended up doing something different with my data in terms of time division, but regarding my previous answer, it would be something like:

cdo selmon 3,4,5,6,7,8,9 inputfile outputfile

This creates a file with only those months.

RE: [netCDF Daily Mean Temperature] How to assign zero to all values for a specific time period - Added by Ralf Mueller over 2 years ago

ah ok - this looks indeed straight forward. these selections become a bit tricky if you want some period that exceeds December (like from October to January). But you obviously didn't need that.

thx for sharing!
ralf

    (1-4/4)