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

How to take a subset from a netCDF file using latitude/longitude boundaries in R

I have a netCDF file that I wish to extract a subset from defined by latitude/longitude boundaries (i.e. a lat/long defined box), using the ‘ncdf’ package in R. A summary of my netCDF file is below. It has two dimensions (latitude and longitude)…
Emily
  • 859
  • 5
  • 14
  • 31
14
votes
3 answers

Is there a way to crop a NETCDF file?

Imagine that you have a file example.nc, that has wind data defined in 90N, 90S, 180E, 180W region. Is there anyway I could in linux, with a simple nc-type command (without extracting the data in matlab/python to rewrite), crop this file to include…
jhc
  • 1,739
  • 3
  • 21
  • 46
12
votes
7 answers

netcdf4 extract for subset of lat lon

I would like to extract a spatial subset of a rather large netcdf file. From Loop through netcdf files and run calculations - Python or R from pylab import * import netCDF4 f =…
user308827
  • 21,227
  • 87
  • 254
  • 417
9
votes
2 answers

time and geographical subset of netcdf raster stack or raster brick using R

For the following netcdf file with daily global sea surface temperatures for 2016, I'm trying to (i) subset temporally, (ii) subset geographically, (iii) then take long-term means for each pixel and create a basic plot. Link to file:…
Peter Houk
  • 107
  • 1
  • 2
  • 6
9
votes
4 answers

Converting NetCDF to GRIB2

I know there is software like wgrib2 that will convert files in grib and grib2 format to NetCDF files, but I need to go the other way: from NetCDF to grib2, because the local weather offices here can only consume gridded data in grib2 format. It…
Rich Signell
  • 14,842
  • 4
  • 49
  • 77
8
votes
2 answers

NCO: Extract a variable from NetCDF file using NCO ncks

I am trying to extract a variable from a multi-variable netcdf file, by entering the command: ncks -v ta temp1.nc out.nc However then I look at the out.nc header, all the variables are still there. The headers of both temp1.nc and out.nc are…
F. Brazil
  • 199
  • 1
  • 1
  • 10
8
votes
3 answers

Convert grib to netcdf file

Is there a way to convert a grib file into a NetCDF format on Windows? I use a software named tkdegrib but it catches one argument by one argument whereas I want all my grib's arguments in the same file. Unfortunately, I can't use Linux.
piecess
  • 187
  • 4
  • 11
7
votes
2 answers

Efficient way to extract data from NETCDF files

I have a number of coordinates (roughly 20000) for which I need to extract data from a number of NetCDF files each comes roughly with 30000 timesteps (future climate scenarios). Using the solution here is not efficient and the reason is the time…
Seji
  • 371
  • 1
  • 10
7
votes
2 answers

Possible bug in GDAL?

Given this file: http://mtarchive.geol.iastate.edu/2019/02/18/mrms/ncep/GaugeCorr_QPE_01H/GaugeCorr_QPE_01H_00.00_20190218-150000.grib2.gz … I get different output depending on the software I use. wgrib2 2019021815.grib2 -csv wgrib2.csv and cdo…
Rick Hitchcock
  • 35,202
  • 5
  • 48
  • 79
7
votes
2 answers

How to calculate number of missing values summed over time dimension in a netcdf file in bash

I have a netcdf file with data as a function of lon,lat and time. I would like to calculate the total number of missing entries in each grid cell summed over the time dimension, preferably with CDO or NCO so I do not need to invoke R, python etc. I…
ClimateUnboxed
  • 7,106
  • 3
  • 41
  • 86
7
votes
2 answers

is it possible to run CDO within a R script?

I am working with netcdf files, and there are some analysis that I've been doing with CDO and then, with R. I would like to know if there would be possible to "call" the CDO directly from R, in the same script. I am not sure how (I have been trying…
user3231352
  • 799
  • 1
  • 9
  • 26
6
votes
1 answer

How to reduce the resolution (Regrid) of netCDF using bi-linear interpolation in R?

I have netCDF files downloaded from here. They are at 0.5*0.5 resolution. I want to re-grid these files at a coarser resolution of 1*1. I found some links. First link talks about re-grid in R, but without using bi-linear interpolation. The second…
Pankaj
  • 1,296
  • 2
  • 13
  • 23
6
votes
4 answers

How to convert a rotated NetCDF back to a normal lat/lon grid?

I have a NetCDF file with rotated coordinates. I need to convert it to normal lat/lon coordinates (-180 to 180 for lon and -90 to 90 for lat). library(ncdf4) nc_open('dat.nf') For the dimensions, it shows: [1] " 5 variables (excluding…
user1617676
  • 361
  • 1
  • 3
  • 12
5
votes
1 answer

Converting generic grid type to a lonlat gridtype using cdo

I am currently trying to use one NetCDF file (open-source data which can be downloaded from https://doi.pangaea.de/10.1594/PANGAEA.828650) to extract specific latitudes from this dataset…
Ellie Nelson
  • 67
  • 1
  • 7
5
votes
3 answers

Monthly sum of wet days from daily data using Climate Data Operators (CDO)

I have climate data with a daily temporal resolution and would like a count of days that have precipitation (e.g., greater than 1mm/day) by month and by year. I've tried eca_pd,1 and eca_rr1, but these commands return wet-day totals for all…
derelict
  • 3,657
  • 3
  • 24
  • 29
1
2 3
21 22