Last change
on this file since 5643 was
4308,
checked in by tlurton, 5 years ago
|
Added script for preparation of G6solar solar irradiance files (diminution every decade).
|
-
Property svn:executable set to
*
|
File size:
1.3 KB
|
Line | |
---|
1 | # Th. Lurton, Feb. 2019 |
---|
2 | |
---|
3 | # This script operates on Future TSI netcdf files |
---|
4 | # and aims at decreasing the TSI (offset) |
---|
5 | # over the whole of a decade (as specified by the GeoMIP protocol). |
---|
6 | |
---|
7 | # Work directory |
---|
8 | ### TO BE CUSTOMISED ### |
---|
9 | here=/ccc/work/cont003/gencmip6/lurtont/TSI_G6/ |
---|
10 | |
---|
11 | # Input directory |
---|
12 | repin=/ccc/work/cont003/igcmg/igcmg/IGCM/ATM/SOLAR/CMIP6/v3.1corr/Future/ |
---|
13 | |
---|
14 | ### TO BE CUSTOMISED ### |
---|
15 | # Parameters |
---|
16 | # Absolute-value diminution wanted (W.m-2) |
---|
17 | dimin="24.0" |
---|
18 | # This will appear as a suffix in the names of the reduced-TSI files created |
---|
19 | |
---|
20 | # Period considered |
---|
21 | yr0=2091 |
---|
22 | yr1=2100 |
---|
23 | # These years are included, i.e. the period considered is yr0-01-01 to yr1-12-31 |
---|
24 | |
---|
25 | |
---|
26 | for (( year=${yr0}; year<=${yr1}; year++ )) |
---|
27 | do |
---|
28 | |
---|
29 | fileout=${here}solarforcing_v3.1_daily_6bands_${year}-${dimin}Wperm2.nc |
---|
30 | |
---|
31 | tsireduced=${here}tsireduced_${year}.nc |
---|
32 | ssireduced=${here}ssireduced_${year}.nc |
---|
33 | |
---|
34 | filein=${repin}solarforcing_v3.1_daily_6bands_${year}.nc |
---|
35 | |
---|
36 | cdo subc,${dimin} -selvar,tsi ${filein} ${tsireduced} |
---|
37 | cdo subc,${dimin} -selvar,ssi ${filein} ${ssireduced} |
---|
38 | |
---|
39 | ncrename -d bnds,nbd ${tsireduced} |
---|
40 | ncrename -d bnds,nbd ${ssireduced} |
---|
41 | |
---|
42 | ncks -x -v tsi,ssi ${filein} ${here}temp_${year}.nc |
---|
43 | |
---|
44 | cdo merge ${here}temp_${year}.nc ${tsireduced} ${ssireduced} ${fileout} |
---|
45 | |
---|
46 | rm -f ${here}temp_${year}.nc ${tsireduced} ${ssireduced} |
---|
47 | |
---|
48 | done |
---|
49 | |
---|
Note: See
TracBrowser
for help on using the repository browser.