-
Notifications
You must be signed in to change notification settings - Fork 0
/
average_he_pism
executable file
·23 lines (20 loc) · 1.11 KB
/
average_he_pism
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
for x in $(seq -40 350) ; do
let i011=$x+2118
let i012=$x+2652
let i013=$x+3079
let h871=$x+2975
let i021=$x+2968
let i091=$x+2971
i011s=$(printf %04d $i011)
i012s=$(printf %04d $i012)
i013s=$(printf %04d $i013)
h871s=$(printf %04d $h871)
i021s=$(printf %04d $i021)
i091s=$(printf %04d $i091)
out=$(printf %04d $x)
echo ncra ../I01/main_fields/main_fields$i011s.nc ../I01/main_fields/main_fields$i012s.nc ../I01/main_fields/main_fields$i013s.nc ../H87/main_fields/main_fields$h871s.nc ../I02/main_fields/main_fields$i021s.nc ../I09/main_fields/main_fields$i091s.nc main_fields$out.nc
done > todo
prun.rb -j 5 todo
ncrcat -O $(ls main_fields-0*.nc|tac ) $(ls main_fields[0-9]*.nc ) main_fields_HE.nc
ncatted -a coordinates,cbar,o,c,"lat lon" -a coordinates,csurf,o,c,"lat lon" -a coordinates,cumul_acab,o,c,"lat lon" -a coordinates,cumul_calving,o,c,"lat lon" -a coordinates,cumul_shelf_basal_flux,o,c,"lat lon" -a coordinates,thk,o,c,"lat lon" -a coordinates,topg,o,c,"lat lon" -a coordinates,usurf,o,c,"lat lon" main_fields_HE.nc