Changeset 6059 for TOOLS/AMIP/prepare_amip_original.sh
- Timestamp:
- 02/14/22 14:01:48 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TOOLS/AMIP/prepare_amip_original.sh
r5011 r6059 2 2 set -vx 3 3 4 # Script that prepares the PCMDI-AMIP-1-1- 6files to be read by ce0l in LMDZ.5 # These new files are stored in IGCM/ATM/LIMIT/AMIP.v20 191121/original4 # Script that prepares the PCMDI-AMIP-1-1-7 files to be read by ce0l in LMDZ. 5 # These new files are stored in IGCM/ATM/LIMIT/AMIP.v20220201/original 6 6 # and can be used to produce limit.nc files on model grid. 7 # The input files from input4MIPs should be copied before launching this script. See comments in section 0). 8 # 9 # Use previous revision 5011 of this script for preparing version PCMDI-AMIP-1-1-6 files. 7 10 # Done by J. Ghattas, 2020/03/03 8 11 9 dirold= original/360x180.orig10 dirnew= original/360x180.new12 dirold=`pwd`/original/360x180.orig 13 dirnew=`pwd`/original/360x180.new 11 14 12 15 # 0) Copy original files from ciclad Input4MIPS and save in $dirold 13 #/bdd/input4MIPs/CMIP6/CMIP/PCMDI/PCMDI-AMIP-1-1- 6/ocean/mon/tosbcs/gn/v20191121/tosbcs_input4MIPs_SSTsAndSeaIce_CMIP_PCMDI-AMIP-1-1-6_gn_187001-201812.nc14 #/bdd/input4MIPs/CMIP6/CMIP/PCMDI/PCMDI-AMIP-1-1- 6/seaIce/mon/siconcbcs/gn/v20191121/siconcbcs_input4MIPs_SSTsAndSeaIce_CMIP_PCMDI-AMIP-1-1-6_gn_187001-201812.nc16 #/bdd/input4MIPs/CMIP6/CMIP/PCMDI/PCMDI-AMIP-1-1-7/ocean/mon/tosbcs/gn/v20220201/tosbcs_input4MIPs_SSTsAndSeaIce_CMIP_PCMDI-AMIP-1-1-7_gn_187001-202106.nc 17 #/bdd/input4MIPs/CMIP6/CMIP/PCMDI/PCMDI-AMIP-1-1-7/seaIce/mon/siconcbcs/gn/v20220201/siconcbcs_input4MIPs_SSTsAndSeaIce_CMIP_PCMDI-AMIP-1-1-7_gn_187001-202106.nc 15 18 16 19 # 1) Split files to yearly files 17 20 cd $dirold 18 cdo splityear tosbcs_input4MIPs_SSTsAndSeaIce_CMIP_PCMDI-AMIP-1-1- 6_gn_187001-201812.nc amipbc_sst_360x180_19 cdo splityear siconcbcs_input4MIPs_SSTsAndSeaIce_CMIP_PCMDI-AMIP-1-1- 6_gn_187001-201812.nc amipbc_sic_360x180_21 cdo splityear tosbcs_input4MIPs_SSTsAndSeaIce_CMIP_PCMDI-AMIP-1-1-7_gn_187001-202106.nc amipbc_sst_360x180_ 22 cdo splityear siconcbcs_input4MIPs_SSTsAndSeaIce_CMIP_PCMDI-AMIP-1-1-7_gn_187001-202106.nc amipbc_sic_360x180_ 20 23 21 24 22 # 2) Produce climatologie files 23 ncea amipbc_sst_360x180_1979.nc amipbc_sst_360x180_198* amipbc_sst_360x180_199* amipbc_sst_360x180_200[012345678]* amipbc_sst_360x180_1979_2008_clim.nc 24 ncea amipbc_sic_360x180_1979.nc amipbc_sic_360x180_198* amipbc_sic_360x180_199* amipbc_sic_360x180_200[012345678]* amipbc_sic_360x180_1979_2008_clim.nc 25 26 # 3) Rename variable name for sea-ice concentration into sicbcs 25 # 2) Rename variable name for sea-ice concentration into sicbcs 27 26 # and 4) The time axis is set fixed instead of unlimited 28 27 mkdir -p $dirnew 29 28 30 29 Date_Begin=1870 31 Date_End=20 1830 Date_End=2021 32 31 year=${Date_Begin} 33 32 while [ ${year} -le ${Date_End} ] ; do … … 52 51 done 53 52 54 # Do 3) and 4) also for the climatologie files55 filesic=amipbc_sic_360x180_1979_2008_clim.nc56 filesst=amipbc_sst_360x180_1979_2008_clim.nc57 58 echo "Rename variable sicbcs in file $dirold/$filesic "59 ncrename -v siconcbcs,sicbcs $dirold/${filesic} $dirnew/tmpsic.nc60 61 echo "Copy sst file to new folder $dirold/$filesst "62 cp $dirold/${filesst} $dirnew/tmpsst.nc63 64 echo "Change time axis"65 ncks -4 --no_rec_dmn time $dirnew/tmpsic.nc -o $dirnew/${filesic}66 ncks -4 --no_rec_dmn time $dirnew/tmpsst.nc -o $dirnew/${filesst}67 68 rm -f $dirnew/tmpsic.nc $dirnew/tmpsst.nc69 53 70 54 55 # 3) Produce climatologie files for different periods 56 # 57 # Climatologie files for the years 1979-2008 58 cd $dirnew 59 60 ncea amipbc_sst_360x180_1979.nc amipbc_sst_360x180_198* amipbc_sst_360x180_199* amipbc_sst_360x180_200[012345678]* amipbc_sst_360x180_1979_2008_clim.nc 61 ncea amipbc_sic_360x180_1979.nc amipbc_sic_360x180_198* amipbc_sic_360x180_199* amipbc_sic_360x180_200[012345678]* amipbc_sic_360x180_1979_2008_clim.nc 62 63 64 # Climatologie files for the years 1991-2020 65 ncea amipbc_sst_360x180_199[123456789]* amipbc_sst_360x180_200* amipbc_sst_360x180_201* amipbc_sst_360x180_2020.nc amipbc_sst_360x180_1991_2020_clim.nc 66 ncea amipbc_sic_360x180_199[123456789]* amipbc_sic_360x180_200* amipbc_sic_360x180_201* amipbc_sic_360x180_2020.nc amipbc_sic_360x180_1991_2020_clim.nc 67 68 69 # Climatologie files for the years 1870-1899 70 ncea amipbc_sic_360x180_18* amipbc_sst_360x180_1870_1899_clim.nc 71 ncea amipbc_sic_360x180_18* amipbc_sic_360x180_1870_1899_clim.nc
Note: See TracChangeset
for help on using the changeset viewer.