add mask file to time series data
Added by Merja Tölle almost 2 years ago
Hi,
I have a mask file (FR_LAND1.nc), which I apply with cdo add to a time series file (test.nc), which contains 16 land cover fractions over 85 time steps. Normally, the mask file is applied to all time steps to each parameter, but here the output contains only one time step. It reads:
cdo add: Filling up stream2 >FR_LAND1.nc< by copying the first variable.
cdo add: Processed 4721750 values from 2 variables over 3 timesteps [0.26s 66MB].
How can I apply the mask file with the cdo add command to all parameters over all time steps?
Cheers, Merja
FR_LAND1.nc (3.18 MB) FR_LAND1.nc | |||
test.nc (86.9 MB) test.nc |
Replies (4)
RE: add mask file to time series data - Added by Estanislao Gavilan almost 2 years ago
Hi Merja,
you need to be a bit more specific, What command do you use to mask all the time steps?
Kind regards,
Estanislao
RE: add mask file to time series data - Added by Merja Tölle almost 2 years ago
Hi,
I want to apply a mask file to a time series file. Normally, the mask file is applied to all time steps of each parameter. I get an error
after using the following command:
cdo add test.nc FR_LAND1.nc test1.nc
In test1.nc all time steps except the first are removed.
Previously it worked. Now, I get this error, but I do not know why. Could you please help?
Best, Merja
RE: add mask file to time series data - Added by Karin Meier-Fleischer almost 2 years ago
Hi Merja,
I'm not able to reproduce the problem with CDO 2.0.5 and 2.1.1. All time steps are taken and the calculation is done over the 5 time steps. Which CDO version are you using?
If you want to use FR_LAND, which contains zeros and missing values as mask you should keep the missing values and change the zeros to ones:
cdo -div test.nc -addc,1 FR_LAND1.nc outfile.nc cdo(1) addc: Process started cdo div: Filling up stream2 >(pipe1.4)< by copying the first variable. cdo(1) addc: Processed 277750 values from 1 variable over 1 timestep cdo div: Processed 22497750 values from 2 variables over 6 timesteps [0.47s 35MB]
cdo sinfon outfile.nc File format : NetCDF2 -1 : Institut Source T Steptype Levels Num Points Num Dtype : Parameter name 1 : unknown Land v instant 16 1 277750 1 F32 : landCoverFrac Grid coordinates : 1 : curvilinear : points=277750 (505x550) lon : -59.43533 to 85.55104 degrees_east lat : 12.70589 to 79.075 degrees_north mapping : rotated_latitude_longitude rlon : -32.115 to 23.325 by 0.11 degrees rlat : -32.065 to 28.325 by 0.11 degrees Vertical coordinates : 1 : generic : levels=16 lctype : 1 to 16 by 1 Time coordinate : time : 5 steps RefTime = 1950-01-01 12:00:00 Units = days Calendar = proleptic_gregorian YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss 2016-01-01 12:00:00 2017-01-01 12:00:00 2018-01-01 12:00:00 2019-01-01 12:00:00 2020-01-01 12:00:00
RE: add mask file to time series data - Added by Merja Tölle almost 2 years ago
I found it. It is a misstake in the CDO version cdo/2.0.4-gcc-11.2.0.
With CDO version cdo/2.0.6-gcc-11.2.0 it works fine.
Best, Merja