Changeset 6059


Ignore:
Timestamp:
02/14/22 14:01:48 (2 years ago)
Author:
jgipsl
Message:

Updated script after use with version PCMDI-AMIP-1-1-7.
Now moved creation of climato files to the end.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/AMIP/prepare_amip_original.sh

    r5011 r6059  
    22set -vx 
    33 
    4 # Script that prepares the PCMDI-AMIP-1-1-6 files to be read by ce0l in LMDZ.  
    5 # These new files are stored in IGCM/ATM/LIMIT/AMIP.v20191121/original 
     4# 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 
    66# 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. 
    710# Done by J. Ghattas, 2020/03/03 
    811 
    9 dirold=original/360x180.orig 
    10 dirnew=original/360x180.new 
     12dirold=`pwd`/original/360x180.orig 
     13dirnew=`pwd`/original/360x180.new 
    1114 
    1215# 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.nc 
    14 #/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.nc 
     16#/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 
    1518 
    1619# 1) Split files to yearly files 
    1720cd $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_ 
     21cdo splityear tosbcs_input4MIPs_SSTsAndSeaIce_CMIP_PCMDI-AMIP-1-1-7_gn_187001-202106.nc      amipbc_sst_360x180_ 
     22cdo splityear siconcbcs_input4MIPs_SSTsAndSeaIce_CMIP_PCMDI-AMIP-1-1-7_gn_187001-202106.nc   amipbc_sic_360x180_ 
    2023 
    2124 
    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 
    2726#    and 4) The time axis is set fixed instead of unlimited 
    2827mkdir -p $dirnew 
    2928 
    3029Date_Begin=1870 
    31 Date_End=2018 
     30Date_End=2021 
    3231year=${Date_Begin} 
    3332while [ ${year} -le ${Date_End} ] ; do 
     
    5251done 
    5352 
    54 # Do 3) and 4) also for the climatologie files 
    55 filesic=amipbc_sic_360x180_1979_2008_clim.nc 
    56 filesst=amipbc_sst_360x180_1979_2008_clim.nc 
    57  
    58 echo "Rename variable sicbcs in file $dirold/$filesic " 
    59 ncrename -v siconcbcs,sicbcs $dirold/${filesic} $dirnew/tmpsic.nc 
    60  
    61 echo "Copy sst file to new folder $dirold/$filesst " 
    62 cp $dirold/${filesst} $dirnew/tmpsst.nc 
    63  
    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.nc 
    6953 
    7054 
     55# 3) Produce climatologie files for different periods 
     56# 
     57#    Climatologie files for the years 1979-2008 
     58cd $dirnew 
     59 
     60ncea 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 
     61ncea 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 
     65ncea 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 
     66ncea 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 
     70ncea amipbc_sic_360x180_18* amipbc_sst_360x180_1870_1899_clim.nc 
     71ncea amipbc_sic_360x180_18* amipbc_sic_360x180_1870_1899_clim.nc 
Note: See TracChangeset for help on using the changeset viewer.