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
4
votes
2 answers

Truncating netCDF

I have a netCDF file of monthly surface air temperature from 1850-2005. How can I truncate the file in unix so that the new file has a time dimension from 1855 - 2005? And vice versa, truncating the file so that it is instead for 1850-2000?
Ali
  • 43
  • 3
4
votes
3 answers

Converting GrADS (.grd) to NetCDF (.nc)?

I have files which contains atmospheric data in 6 hrs intervals (4 files per day) in .grd format. I also have the concerned descriptor files (yyyymmddhh.ctl) . I can plot the data using using GrADS. But I need to convert these files into NetCDF…
4
votes
5 answers

Combine multiple NetCDF files into timeseries multidimensional array python

I am using data from multiple netcdf files (in a folder on my computer). Each file holds data for the entire USA, for a time period of 5 years. Locations are referenced based on the index of an x and y coordinate. I am trying to create a time series…
LCook
  • 97
  • 1
  • 1
  • 7
4
votes
2 answers

Manipulate variables in netcdf files and write them again

I have several netcdf files. each nc file has several variables. I am only interested in two variables "Soil_Moisture" and "Soil_Moisture_Dqx". I would like to filter "Soil_Moisture" based on "Soil_Moisture_Dqx". I want to replace values in…
Jonsson Sali
  • 73
  • 1
  • 10
3
votes
1 answer

Extract point with precise coordinate with on a NetCDF file with Python

For my project I want to extract data from a netCDF file, my file represent the Ocean Surface Temperature in function of latitude/longitude. I want to select on point with precise coordinate and then do a mean for each months for several…
Berenice
  • 43
  • 5
3
votes
1 answer

R stars error: dims do not match the length of object when evaluating proxy

I am working on a large dataset from a global climate model that can't fit into RStudio's memory, hence I've chosen to analyze it by loading it as a stars proxy object and evaluating it chunk by chunk. Taking spatial chunks over the full time period…
3
votes
3 answers

how can I select only specific .nc files from long list to work with cdo?

How can I merge only specific .nc files to work with cdo? from a long list of files that look like this: var_1-2.nc var_3-4.nc var_5-6.nc . . var_99-100.nc I would like to to a cdo mergetime only to the last e.g 10 files Anyone could help me with…
3
votes
1 answer

NetCDF spatially merging to global data

Currently I use global precipitation (ppt) and potential evapotranspiration (pet) data to calculate SPEI. As I have limited hardware resources, I divided global ppt and ppt data into 32 parts, each file covering 45x45deg and contains 756 data -…
user97103
  • 235
  • 1
  • 7
3
votes
2 answers

Netcdf averages time varable when averaging multiple .nc files

I have averaged a bunch of hourly netCDF files (for one year) to create one large netCDF file that contains an average daily value. The time variable represents hours since 2005-1-1 00:00:00 and looks like this: time = 11.5, 35.5, 59.5, 83.5, 107.5,…
elyssac
  • 51
  • 3
3
votes
1 answer

Change time axis units from "years since" to "days since" in netcdf file

I have a netcdf file that someone passed me that uses "years since DATE" as the time units: double time(time) ; time:standard_name = "time" ; time:long_name = "time" ; time:calendar = "proleptic_gregorian" ; time:axis = "T" ; …
ClimateUnboxed
  • 7,106
  • 3
  • 41
  • 86
3
votes
3 answers

Modifying variable attribute of netcdf file

I'm trying to modify the calendar type of a time variable in a netcdf file to change from GREGORIAN to gregorian as I think it is causing problems when I try to access the time variables within a later analysis. double Time(Time) ; …
Hayden
  • 107
  • 8
3
votes
3 answers

Calculating ERA5 Daily Total Precipitation using CDO

Essentially, this is a repost of this question: https://confluence.ecmwf.int/pages/viewpage.action?pageId=149341027 I have downloaded ERA5 from the CDS. The input file has 24 hourly steps (0, 1, 2, 3, 4,..,23) for each calendar day starting from Jan…
Moritz Schwarz
  • 2,019
  • 2
  • 15
  • 33
3
votes
1 answer

CDO/NCO - Replicate dataset over a dimension

I have several variables defined as follows: dimensions: t = UNLIMITED ; // (1 currently) y = 3963 ; x = 5762 ; myz = 1 ; z = 98 ; variables: float e1u(t, y, x, myz) ; float e1v(t, y, x, myz)…
Fab
  • 1,145
  • 7
  • 20
  • 40
3
votes
3 answers

Converting longitude in NetCDF from 0:360 to -180:180 using nco

I have two NetCDF files, each for a different period of years, that I want to concatenate. They appear to have identical structures, with time as the unlimited dimension, except that for one, longitude is on the scale of 0:360 and for the other on…
zoek
  • 141
  • 1
  • 7
3
votes
1 answer

How should I use CDO selyear? I get an output file four times larger

CDO seems to work fine for me, until I met this. I have a netcdf of daily data from year 2101 to 2228, and I want to obtain a file with only years from 2101 to 2227, so I run: cdo selyear,2101/2227 in.nc out.nc But the output file is more than four…
Pauli
  • 170
  • 3
  • 9
1 2
3
21 22