Project

General

Profile

RE: How to create a timeseries from multiple nc data file... ยป code2_cor4.sh

Ralf Mueller, 2021-03-18 10:57

 
#!/bin/bash
tmpdir=./tmp
mkdir -p $tmpdir
for year in $(seq -w 1961 1964) ; do
echo $year
cdo -seltimestep,1/12 pr_Amon_BCC-CSM2-MR_dcppA-hindcast_s${year}.nc $tmpdir/series${year}.nc
done
cd $tmpdir
cdo mergetime '*.nc' series_t1.nc
exit 0
    (1-1/1)