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

Estimating monthly climatology on NetCDF data using R

I am working on NOAA AVHRR daily Sea Surface Temperature (SST) data of 31 years. The data is in NetCDF format with dimensions as 28 (lon) x 40 (lat) x 11686(days). I am supposed to compute monthly climatological mean (e.g. mean of all Januaries of…
Satish_P
  • 65
  • 5
3
votes
2 answers

NCO cropping a netcdf file using dimension values rather than indices

CDO can crop a netcdf file in terms of latitude and longitude as long as they are defined in a standard way, and I know that NCO can cut out a subset of a netcdf file along any dimension if you know the range of indices that you want, as stated in…
ClimateUnboxed
  • 7,106
  • 3
  • 41
  • 86
3
votes
2 answers

Replace values in netCDF file using python

I would like to replace all the -999.0 values in the foll. netCDF file by 0.0. The file is here: https://www.dropbox.com/s/ohh7tntzm2pj1uw/all_SSP3_BaU_NoCC.nc?dl=0 here's my function: def modify_nc_value(path_inp, name_var, val_to_modify,…
user308827
  • 21,227
  • 87
  • 254
  • 417
3
votes
2 answers

Not able to append two netcdf files using nco

I am using netcdf operators to append two NCEP netCDF files together. These files are of different sizes but they represent the same atmospheric variable i.e. geopotential height. One is at 1000 hPa and the other file is at 925 hPa.They have the…
gansub
  • 1,164
  • 3
  • 20
  • 47
3
votes
2 answers

netCDF files in R

I have netCDF file obtained from here with name precip.mon.total.v6.nc. I am using ncdf package in R to open and analyse the file. new <- open.ncdf("precip.mon.total.v6.nc") > new [1] "file precip.mon.total.v6.nc has 4 dimensions:" [1]…
Pankaj
  • 1,296
  • 2
  • 13
  • 23
3
votes
2 answers

netcdf time dimension missing CDO

I downloaded a netcdf file containing 4-5 variables but it has only 2 dimensions (lat and lon). Time is missing and this does not allow me to merge timesteps or do anything useful. Is there any way to fix this hopefully by using CDO? there are 100…
Theo Eurotrip
  • 41
  • 1
  • 3
3
votes
2 answers

How to change longitude range in a NetCDF

My NetCDF file has 4 dimensions (longitude, latitude, time, level pressure) and several variables. I want to replace the longitude data which is [340 342 344 ... 360 0 2 4 ... 18 20] by [-20 -18 -16 ... -2 0 2 4 ... 18 20]. In fact the longitude is…
Douie
  • 201
  • 4
  • 11
3
votes
2 answers

average fields across a set of netcdf files, each with identical dimensions, in R

Suppose we have 10 of these files. This netcdf dataset has a variable called tmp which is a 3-dim array: [lon][lat][time]. Now how do I combine these 10 files to get a single file with the variable tmp whose values are the average of the combined…
gudday
  • 45
  • 1
  • 3
2
votes
1 answer

Duplicating Monthly Data to Bi-monthly in a NetCDF File

I have a monthly .nc file from ISIMIP. Here's the time series: time = "2000-01-01", "2000-02-01", "2000-03-01", "2000-04-01", "2000-05-01", "2000-06-01", "2000-07-01", "2000-08-01", "2000-09-01", "2000-10-01", "2000-11-01", "2000-12-01",…
rocinantes
  • 39
  • 4
2
votes
1 answer

set to all NAs a given region in a lat-lon ncfile

I have the following netcdf file which is a global grid with latitude from -90 to 90 and longitude from 0 to 360 degrees. Let's suppose I would like to set to NAs (or missing values) all the gridpoints (or region) included within latitude -90 to 90…
aaaaa
  • 149
  • 2
  • 18
  • 44
2
votes
0 answers

How to install ncview package for cywgin?

I'm trying to download the ncview package by cygwin from the installer but whenever I type the command ncview it's not identified by the terminal.. I downloaded all the pre-required packages and still no clue why it's not working. Any help will be…
2
votes
1 answer

Number of hot days from daily temperature

I am following this answer to calculate number of hot days in a year (temperature exceeding 35degC) from daily tmax data. I am using tmax from CHELSA from 2000-2016, and I have crop it based on my bounding-box requirement. Here are the steps I have…
user97103
  • 235
  • 1
  • 7
2
votes
2 answers

Monthly sum of of a variable stored at daily timesteps using cdo (Climate Data Operators)

I have a nc file of 40 years for a variable recorded at daily temporal resolution. I would like to sum these over monthly intervals and have tried the following: cdo monsum inputfile.nc outputfile.nc Although this runs with no error, I only get one…
Raed Hamed
  • 327
  • 1
  • 10
2
votes
2 answers

How to multiply variables of a netcdf file with different constants using NCO or CDO?

I have a netCDF file containing different variables (val1, val2, val3). The names of the variables are indicated, in fact, they are completely different from each other. I want to multiply the variables with different constants such as: val1*c1…
Nat
  • 325
  • 2
  • 13
2
votes
1 answer

Problems converting netCDF to CSV file using CDO

This post is very long because I want to explain better the context. My main data source is in netCDF format and I want to convert into CSV file. For a while, I've been using Python to convert. As an example, I use a netCDF data previously modified…
Brian
  • 89
  • 1
  • 10