ESGF related notes

Extracting a region from a variable

Requirements:

data available on disk (possibly split along the time axis), e.g. on the ciclad server

nco installed (ncks, ncrcat)

tcsh shell, in order to use foreach

$ cd /prodigfs/esgf/mirror/CMIP5/output1/IPSL/IPSL-CM5A-LR/past1000/mon/atmos/Amon/r1i1p1/v20120804/pr/
$ ls -lh pr_*.nc
85M Aug 2 2012 pr_Amon_IPSL-CM5A-LR_past1000_r1i1p1_085001-104912.nc
85M Aug 2 2012 pr_Amon_IPSL-CM5A-LR_past1000_r1i1p1_105001-124912.nc
85M Aug 2 2012 pr_Amon_IPSL-CM5A-LR_past1000_r1i1p1_125001-144912.nc
85M Aug 2 2012 pr_Amon_IPSL-CM5A-LR_past1000_r1i1p1_145001-164912.nc
85M Aug 2 2012 pr_Amon_IPSL-CM5A-LR_past1000_r1i1p1_165001-184912.nc
446K Aug 2 2012 pr_Amon_IPSL-CM5A-LR_past1000_r1i1p1_185001-185012.nc
$ mkdir /data/jypmce/Scratch/EasterIsland
$ foreach f ( pr_*.nc )
foreach? echo $f
foreach? ncks -dlat,-35.,-20. -dlon,242.,258. $f /data/jypmce/Scratch/EasterIsland/$f:r-Z02.nc
foreach? end
pr_Amon_IPSL-CM5A-LR_past1000_r1i1p1_085001-104912.nc
pr_Amon_IPSL-CM5A-LR_past1000_r1i1p1_105001-124912.nc
pr_Amon_IPSL-CM5A-LR_past1000_r1i1p1_125001-144912.nc
pr_Amon_IPSL-CM5A-LR_past1000_r1i1p1_145001-164912.nc
pr_Amon_IPSL-CM5A-LR_past1000_r1i1p1_165001-184912.nc
pr_Amon_IPSL-CM5A-LR_past1000_r1i1p1_185001-185012.nc
$ cd /data/jypmce/Scratch/EasterIsland
$ ls -lh pr_*Z02.nc
328K Sep 9 11:25 pr_Amon_IPSL-CM5A-LR_past1000_r1i1p1_085001-104912-Z02.nc
328K Sep 9 11:25 pr_Amon_IPSL-CM5A-LR_past1000_r1i1p1_105001-124912-Z02.nc
328K Sep 9 11:25 pr_Amon_IPSL-CM5A-LR_past1000_r1i1p1_125001-144912-Z02.nc
328K Sep 9 11:25 pr_Amon_IPSL-CM5A-LR_past1000_r1i1p1_145001-164912-Z02.nc
328K Sep 9 11:25 pr_Amon_IPSL-CM5A-LR_past1000_r1i1p1_165001-184912-Z02.nc
11K Sep 9 11:25 pr_Amon_IPSL-CM5A-LR_past1000_r1i1p1_185001-185012-Z02.nc
$ ncrcat pr_*Z02.nc pr_Amon_IPSL-CM5A-LR_past1000_r1i1p1_085001-184912-Z02.nc
$ ll -h pr_Amon_IPSL-CM5A-LR_past1000_r1i1p1_085001-184912-Z02.nc
1.6M Sep 9 11:46 pr_Amon_IPSL-CM5A-LR_past1000_r1i1p1_085001-184912-Z02.nc
$ ncdump -vlat,lon pr_Amon_IPSL-CM5A-LR_past1000_r1i1p1_085001-184912-Z02.nc
netcdf pr_Amon_IPSL-CM5A-LR_past1000_r1i1p1_085001-184912-Z02 {
dimensions:
lat = 7 ;
bnds = 2 ;
lon = 4 ;
time = UNLIMITED ; // (12012 currently)
[...]
data:
lat = -33.1578941345215, -31.2631587982178, -29.3684215545654,
-27.4736843109131, -25.5789470672607, -23.6842098236084, -21.7894744873047 ;
lon = 243.75, 247.5, 251.25, 255 ;
}

[ PMIP3 Wiki Home ] - [ Help! ] - [ Wiki syntax ]