Project

General

Profile

Combining copy with sellonlatbox

Added by Ben Weeding over 2 years ago

Hi all, I've got 30 years of meteorological data in 6 hour files, stored (on a Linux server) in directories by year, then by month. Each file contains hourly data (so 6 entries) for a large lat lon grid (~500x500 points). I'm only interested in a small subset of the lat and lons.

Currently, I'm using copy (cdo -z zip_9 -k grid --no_history copy) to make decade long files of all the data, and then sellonlatbox to take the subset of data I'm interested in, before again using copy to combine the 3 decadal files together for my end result.

I'm just wondering if there's a quicker way to do this? I imagine it would be faster to just extract the relevant data from each individual file and put them all together, but I don't know how to do that throughout a directory.

Cheers
Ben


Replies (2)

RE: Combining copy with sellonlatbox - Added by Karin Meier-Fleischer over 2 years ago

Hi ben,

it should be able to do it in one command line. If you want to merge the files and extract a subregion you can do something like

cdo -sellonlatbox,-60,60,30,60 -mergetime year*/mon*/*.nc outfile.nc

-Karin

RE: Combining copy with sellonlatbox - Added by Ben Weeding over 2 years ago

Hi Karin, thanks for the suggestion. I've found copy to be much faster than merge, so I used your format but with copy instead of mergetime!

Cheers
Ben

    (1-2/2)