Questions tagged [cdo-climate]

Climate Data Operators (CDO) is a collection of command line Operators to manipulate and analyse gridded datasets in the supported data formats of netCDF 3/4, GRIB 1/2, SERVICE, EXTRA and IEG. There are more than 600 operators available. Many functions are generic (spatial/temporal means, variances, regridding, trends, EOF, covariances, correlations) while others are aimed particularly at analyzing climate and weather data (e.g. seasonal statistics).

Climate Data Operators (CDO) is a collection of command line Operators to manipulate and analyse gridded datasets in the supported data formats of GRIB 1/2, netCDF 3/4, SERVICE, EXTRA and IEG. There are more than 600 operators available. While many of these functions are general (spacial and temporal statistics such as averages and variance, regridding, subsetting, concatenating etc), Many functions are particularly aimed analysing climate and numerical weather prediction model data. Full documentation is available at https://code.mpimet.mpg.de/projects/cdo/

325 questions
1
vote
0 answers

For xarray, is there a fast method for grib files?

I am running into an issue. I have multiple hourly grib files for muiltiple years over 180 days each. it takes 3.5 seconds to load a file into xarray. Tested 9 days import dask import glob import cfgrib import numpy as np import xarray as xr import…
1
vote
1 answer

set all steps within a day to missing if any hourly step is missing in a netcdf

I have a netcdf file with an hourly timestep, and with some values missing. What I want to do is, for each gridcell, set all hourly step to missing if any hourly step of that particular day is missing. Preferably in cdo or nco if possible. I came…
ClimateUnboxed
  • 7,106
  • 3
  • 41
  • 86
1
vote
1 answer

Calculating EOF with CDO gives Eigenvalue computation warning jacobi scheme did not converge

I need to get the principal coefficients (daily) of the first EOF of the daily geopotential height field (data = geopot.nc). I use only the cold season (N,D,J,F,M,A). My code is as follows: cdo selmon,11,12,1,2,3,4 geopot.nc geopotw.nc cdo…
Indrute
  • 115
  • 10
1
vote
1 answer

Expand netcdf to the whole globe with xarray

I have a dataset that looks like this: As you can see, it only covers Latitudes between -55.75 and 83.25. I would like to expand that dataset so that it covers the whole globe (-89.75 to 89.75 in my case) and fill it with an arbitrary NA…
LuleSa
  • 75
  • 7
1
vote
1 answer

Delete NetCDF attributes with CDO

How can I use the CDO delete operator to remove variable-specific and/or global attributes of a NetCDF? As far as I understand from the help pages of the operator, I should provide a comma-separated list of attributes, keyed by param, but: $ cdo…
Campa
  • 4,267
  • 3
  • 37
  • 42
1
vote
2 answers

nco cut daily netcdf file from 10AM to 10AM everyday with duplicated 10am entries

I am a very beginner of nco, and I want to split my .nc file (from 1996010110 to 2019123110) as daily file, from 10AM to 10PM. In that case, each split file contains YYYY-MM-DD:10:00 to YYYY-MM-(DD+1):10:00. Note that the end hour of DD day is…
Xu Shan
  • 175
  • 3
  • 11
1
vote
3 answers

how to spatialy aggregate netcdf fields in python, CDO, or NCO?

I want to regrid population data from 0.05 degrees to 0.1 degrees. Because it is population, I should aggregate (sum) population values for resampling data to a coarser resolution. Although I thought that there going to be a simple answer to this…
1
vote
2 answers

How to add variable from nc1 to nc2 file without deleting/removing the variables in nc2?

I have two kinds of variables in two different nc files. The dimension and other things are same, I just have to add one more variable in the existing nc file, How can I do this (using CDO or R or any other) I used the command line (cdo…
1
vote
1 answer

Xarray - how to regrid or sum up area variables for different grid resolutions?

I have a dataset at a given resolution and its variable is an Area measure. When regridding to another resolution, the techniques are usually interpolation (bilinear, conservative, etc.), but this would only work for variables where the value is…
Henrique
  • 135
  • 6
1
vote
1 answer

chaining operators in cdo

I am calculating C factor by using the following equation: C factor =1, coverfraction= 0 C factor =-0.083 xlg(coverfraction) + 0.417, 0 < coverfraction < 78.3%, C factor= 0, …
1
vote
2 answers

is there a way to crop multiple netcdf files using CDO?

I have multiple global climate model (GCM) data files. I successfully cropped one file but it takes time to crop one by one over thousand data files manually. How can I do multiple crops? Thanks
1
vote
1 answer

Daily time steps interpolation between several netcdf layers over time in R or CDO

I have several observations over time of a spatial variable (let's say var_A_1985.nc, var_A_2000.nc and var_A_2010.nc) with only one time layer. Would it be possible to efficiently reconstruct the daily values from 01/01/1985 to 01/01/2010 by…
Nemesi
  • 781
  • 3
  • 13
  • 29
1
vote
1 answer

Creating NetCDF files in python from csv data

I currently have a number of csv files each for different locations. Within each file there are two columns one is datetime and the other is hourly maximum wind gust in knots. I also have a separate csv that contains the coordinates for each of…
1
vote
1 answer

Can i remap and compress a NETCDF at the same time?

I got a huge set of data and i need to remap it to a new size of pixel. But this operation generate a big file that fills my hard drive... i'm using that: cdo remapnn,r7432x13317 petcomp.nc FINAL.nc So, can i compress and make this operation at the…
Bryan Souza
  • 497
  • 2
  • 10
1
vote
1 answer

Best method for resample and reproject large set of data

I got all set of daily data from IMERG (precipitation) from 2005 to 2020. (5947 files). I need to made this: clip the data for my interest area for reduce the size of the total file. done! cdo sellonlatbox Reproject the files to EPSG:31983 (UTM)…
Bryan Souza
  • 497
  • 2
  • 10