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
1 answer

using CDO to extract dataset only for a specific region

I want to use 'cdo' to extract data from a precipitation NetCDF dataset using another NetCDF over South America. I have tried multiple procedures, but I always get some error (such as grid size not same, Unsupported generic co-ordinates, etc). The…
Ep1c1aN
  • 683
  • 9
  • 25
1
vote
2 answers

Getting data for a specific location from GRIB file

I want to extract data from a GRIB file, provided from ECMWF, for a specific location using R. For now, I'm able to get data and export it to .csv but the location seems wrong. I'm trying to get it for the south of Ireland (lat/long around…
SiegmundNuyts
  • 67
  • 1
  • 12
1
vote
1 answer

How can I split a netcdf file based on the value of a field?

I have a netcdf file (data.nc) containing an emission dataset with several fields (lon, lat, emissions_category, pollutant). The emission category ranges from 1 to 13. So I want to generate 13 netcdf files (one for each category). How I could do…
Nat
  • 325
  • 2
  • 13
1
vote
0 answers

How can I call a Windows Terminal inside an R script?

I need to call a Windows Terminal inside a R script, I asked a similar question before, but using a Linux Terminal: How to call linux terminal code from R script I am using cdo (Climate Data Operators) in Linux, inside a R code system(paste0("cd…
Forever
  • 385
  • 3
  • 16
1
vote
2 answers

Converting from .dat to netcdf(.nc)

I have a .dat file https://www.dropbox.com/s/8dbjg0i6l7a4sb6/CRUST10-xyz-complete.dat?dl=0 that I need to convert to either .grd or .nc, so that I can visualize the data in GMT(Generic Mapping Tool). I tried to do this using cdo using following…
Shah5105
  • 57
  • 2
  • 8
1
vote
2 answers

using a mask with a single timeslice to mask another variable with multiple timesteps?

I need to mask a variable into a var.nc file using a landsea mask from mask.nc I'm using NCO as follows: ncks -h -A -v mask_var mask.nc var.nc ncap2 -h -s 'where(mask_var!=1) var_to_mask= var_to_mask@_FillValue' IN.nc OUT.nc The problem is the…
Fab
  • 1,145
  • 7
  • 20
  • 40
1
vote
2 answers

Calculate mean over an selected area lon lat with cdo

Im trying to calculate the mean SPI value over a selected area with a specific lon/lat. I made the following area where i want to calculate the mean over. ds_mlw1 = ds.sel(lat=slice(-16.74833, -16.75613), lon=slice(35.27023, 35.27915)) I saw that…
Marijke
  • 39
  • 2
1
vote
2 answers

Significance value of climate data trends using cdo

I'm performing trend analysis on certain parameters like LAI,NDVI etc. I use CDO-trend operator for the same. But CDO doesn't give the significance value. Is there any other operator in CDO or way to get trend of any variable along with the…
1
vote
1 answer

merging multiple netcdf files into one netcdf file

I have three netcdf files with three different variables: PRMSL.nc with variable PRMSL UGRD.nc with variable UGRD VGRD.nc with variable VGRD These files have the same longitudinal and latitudinal coverage and resolution. These files also have the…
jms1980
  • 1,017
  • 1
  • 21
  • 37
1
vote
0 answers

cdo: redefine time axis from fractional year to month

Hi I have a file with the time dimension in fractional years like this: [-5039. -5038.91650391 -5038.83349609 -5038.75 -5038.66650391 -5038.58349609 -5038.5 -5038.41650391 -5038.33349609 -5038.25 -5038.16650391 -5038.08349609] Each…
Leo
  • 113
  • 1
  • 4
  • 13
1
vote
1 answer

ncks spatial hyperslabbing equivalent in CDO

I have a netcdf file and I need to perform a spatial subsetting. Here is the file structure: netcdf input { dimensions: x = 5762 ; y = 3963 ; time_counter = UNLIMITED ; // (36 currently) tbnds = 2 ; variables: …
Fab
  • 1,145
  • 7
  • 20
  • 40
1
vote
2 answers

How can I concatenate using NCO when one of the dimensions is unlimited?

I have lots of files with the following header: dimensions: grp = 100 ; time = UNLIMITED ; // (2184 currently) length = 3 ; scal = 1 ; bands = 2 ; midS1AndTime = 52569 ; midS2AndTime = 52569 ; midT3AndTime = 52569 ; …
maximusdooku
  • 5,242
  • 10
  • 54
  • 94
1
vote
0 answers

netCDF4-python grid coordinates CDO failure

I am using netCDF4-python to create netCDF4 files. To create a dimensional variable: createDimension createVariable To create other variables: createVariable(dset.name, dset.dtype, dims) It works well with panoply or ncdump, but when examined with…
Jay
  • 11
  • 1
1
vote
1 answer

Extracting grid cells of a netcdf file based values from another nc file with R

I want to extract the grid cells from a MERRA2 netcdf file which are flagged as sea only with R: However parts of the land areas are within my selection due to the curved nature of the lower boundary of the land area. I want to select the area of…
Dee
  • 55
  • 4
1
vote
3 answers

How to write null values in a netcdf file?

Does _FillValue or missing_value still occupy storage space? If there is a 2-dimensional array with some null values, How can I write it to netcdf file for saving storage space?
Li Ziming
  • 385
  • 2
  • 5
  • 17