Ignore:
Timestamp:
03/23/18 15:32:55 (6 years ago)
Author:
acosce
Message:

remove these configuration not use anymore

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CONFIG/UNIFORM/v6/IPSLCM6CHT/GENERAL/DRIVER/opa9.driver

    r2456 r3688  
    99    RESOL_OCE_ICE=$( echo ${RESOL} | awk "-Fx" '{print $1}' ) 
    1010    case ${RESOL_OCE_ICE} in 
    11         ( *LIM2* ) 
    12         SEAICE_MODEL=LIM2  
    13         LIM_VERSION=2 
    14         ;; 
    15  
    16         ( *LIM3* ) 
    17         SEAICE_MODEL=LIM3 
    18         LIM_VERSION=3 
    19         ;; 
    20         ( *CICE*) SEAICE_MODEL=CICE ;; 
    21         ( *     ) SEAICE_MODEL=UNKNOWN ;; 
     11        ( *LIM2* ) SEAICE_MODEL=LIM2 ;  LIM_VERSION=2 ;; 
     12        ( *LIM3* ) SEAICE_MODEL=LIM3 ;  LIM_VERSION=3 ;; 
     13        ( *CICE* ) SEAICE_MODEL=CICE                  ;; 
     14        ( *      ) SEAICE_MODEL=UNKNOWN               ;; 
    2215    esac 
    2316    RESOL_OCE=$( echo ${RESOL_OCE_ICE} | sed "s/${SEAICE_MODEL}//" ) 
     
    3023 
    3124    # Local function to find namelists parameters 
    32     supergrep () { 
    33         grep "^ *$1 *=" $2 | sed -e "s% *\!.*%%" 
    34     } 
    35  
     25    #supergrep () { grep "^ *$1 *=" $2 | sed -e "s% *\!.*%%" ; } 
     26    supergrep () { grep "^ *$1 *=" $2 | sed -e "s% *\!.*%%" -e "s%^ *$1 *=%%" ; } 
    3627    ##--Variables used by OPA -- 
    37  
    38     # cn_exp    experience name 
    39     # nn_it000  number of the first time step 
    40     # nn_itend  number of the last time step 
    41     # nn_date0  initial calendar date yymmdd (used if  nn_rstctl=1) 
    42     # nn_leapy  Leap year calendar (1) or not (0), or 360 days calendar (30) 
    43     # nn_stock  frequency of creation of a restart file (modulo referenced to 1) 
    44     # nn_write  frequency of write in the output file   (modulo referenced to nn_it000) 
    45     # ln_rstart start from rest (F) or from a restart file (T) 
    46     # nn_rstctl restart control = 0 nn_it000 is not compared to the restart file value 
    47     #                           = 1 use nn_date0 in namelist_cfg (not the value in the restart file) 
    48     #                           = 2 calendar parameters read in the restart file 
    49     # nn_msh    =1 create a mesh file (coordinates, scale factors, masks) 
    50     # rn_rdt    time step in seconds for the dynamics (and tracer if nacc=0)   ==> 5760 (coming from namelist) 
    51     # nn_prg    time-step frequency of gap print in model output 
    52     # nn_fwri   frequency of zonal means and transport output 
    53  
    5428    NAMELIST_OPA_CFG=${SUBMIT_DIR}/PARAM/namelist_${RESOL_OCE}_cfg 
    55     NAMELIST_OPA_REF=${SUBMIT_DIR}/PARAM/namelist_${RESOL_OCE}_ref 
    56     IGCM_debug_Print 1 "namelist_ref : ${NAMELIST_OPA_REF}" 
    57     if [ ! -r ${NAMELIST_OPA_REF} ] ; then 
    58         echo "${NAMELIST_OPA_REF} non trouve" 
    59     fi 
    6029    IGCM_debug_Print 1 "namelist_cfg : ${NAMELIST_OPA_CFG}" 
    6130    if [ ! -r ${NAMELIST_OPA_CFG} ] ; then 
    62         echo "${NAMELIST_OPA_CFG} non trouve" 
    63     fi 
    64  
    65     PAT_CEXPER=$(   supergrep cn_exp      ${NAMELIST_OPA_CFG} ) 
    66     PAT_NIT000=$(   supergrep nn_it000    ${NAMELIST_OPA_CFG} ) 
    67     PAT_NITEND=$(   supergrep nn_itend    ${NAMELIST_OPA_CFG} ) 
    68     PAT_NDATE0=$(   supergrep nn_date0    ${NAMELIST_OPA_CFG} ) 
    69     PAT_NLEAPY=$(   supergrep nn_leapy    ${NAMELIST_OPA_CFG} ) 
    70     PAT_NSTOCK=$(   supergrep nn_stock    ${NAMELIST_OPA_CFG} ) 
    71     PAT_NWRITE=$(   supergrep nn_write    ${NAMELIST_OPA_CFG} ) 
    72     PAT_RESTAR=$(   supergrep ln_rstart   ${NAMELIST_OPA_CFG} ) 
    73     PAT_NRSTAR=$(   supergrep nn_rstctl   ${NAMELIST_OPA_CFG} ) 
    74     PAT_NMSH=$(     supergrep nn_msh      ${NAMELIST_OPA_CFG} ) 
    75     PAT_NN_WRITE=$( supergrep nn_write    ${NAMELIST_OPA_CFG} ) 
    76     PAT_NN_FWRI=$(  supergrep nn_fwri     ${NAMELIST_OPA_CFG} ) 
    77     PAT_ICE_EMBD=$( supergrep nn_ice_embd ${NAMELIST_OPA_CFG} ) 
    78     PAT_ICEFLX=$(   supergrep cn_iceflx   ${NAMELIST_OPA_CFG} ) 
    79     PAT_JPNI=$(     supergrep jpni        ${NAMELIST_OPA_CFG} ) 
    80     PAT_JPNJ=$(     supergrep jpnj        ${NAMELIST_OPA_CFG} ) 
    81     PAT_JPNIJ=$(    supergrep jpnij       ${NAMELIST_OPA_CFG} ) 
    82     PAT_NN_FSBC=$(  supergrep nn_fsbc     ${NAMELIST_OPA_CFG} )  
    83  
    84     ORCA_RDT=$(       supergrep rn_rdt        ${NAMELIST_OPA_CFG} | sed 's/ *rn_rdt *=//'  | sed 's/\. *//' ) 
    85     ORCA_NN_FSBC=$(   supergrep nn_fsbc       ${NAMELIST_OPA_CFG} | sed 's/ *nn_fsbc *=//' | sed 's/\. *//' ) 
    86     (( ORCA_NPDT_JOUR  = 86400 / ORCA_RDT     )) 
    87     #(( ORCA_NPDT_SBC   = ORCA_NPDT_JOUR / ORCA_NN_FSBC )) 
    88     (( ORCA_RDT_SBC =  ORCA_RDT * ORCA_NN_FSBC )) 
     31        IGCM_debug_Exit "${NAMELIST_OPA_CFG} not found" 
     32        IGCM_debug_Verif_Exit 
     33    fi 
     34    OPA_RDT=$(       supergrep rn_rdt        ${NAMELIST_OPA_CFG} ) 
     35    OPA_NN_FSBC=$(   supergrep nn_fsbc       ${NAMELIST_OPA_CFG} ) 
     36    # 
     37    # OPA_RDT=$(       supergrep rn_rdt        namelist_cfg ) 
     38    # OPA_NN_FSBC=$(   supergrep nn_fsbc       namelist_cfg ) 
     39    (( OPA_NPDT_DAY   =  86400 / OPA_RDT        )) 
     40    (( OPA_NPDT_YEAR  =  OPA_NPDT_DAY * 365     )) 
     41    (( OPA_RDT_SBC    =  OPA_RDT * OPA_NN_FSBC )) 
    8942  
    90  
    9143    # Period Length In Days between DateBegin and first day of calendar 0001 01 01 
    9244    # /!\ Needed by OPA namelist to compute file names /!\ 
    9345    (( DaysSinceJC = $( IGCM_date_DaysSinceJC ${DateBegin} ) + 1 )) 
    9446 
    95     IGCM_debug_Print 1 "PAT_CEXPER   $PAT_CEXPER " 
    96     IGCM_debug_Print 1 "PAT_NIT000   $PAT_NIT000" 
    97     IGCM_debug_Print 1 "PAT_NITEND   $PAT_NITEND" 
    98     IGCM_debug_Print 1 "PAT_NDATE0   $PAT_NDATE0" 
    99     IGCM_debug_Print 1 "PAT_NLEAPY   $PAT_NLEAPY" 
    100     IGCM_debug_Print 1 "PAT_NSTOCK   $PAT_NSTOCK" 
    101     IGCM_debug_Print 1 "PAT_NWRITE   $PAT_NWRITE" 
    102     IGCM_debug_Print 1 "PAT_RESTAR   $PAT_RESTAR" 
    103     IGCM_debug_Print 1 "PAT_NRSTAR   $PAT_NRSTAR" 
    104     IGCM_debug_Print 1 "PAT_NMSH     $PAT_NMSH" 
    105     IGCM_debug_Print 1 "PAT_NN_WRITE $PAT_NN_WRITE" 
    106     IGCM_debug_Print 1 "PAT_NN_FWRI  $PAT_NN_FWRI" 
    107     IGCM_debug_Print 1 "PAT_ICE_EMBD $PAT_ICE_EMBD" 
    108     IGCM_debug_Print 1 "PAT_ICEFLX   $PAT_ICEFLX" 
    109     IGCM_debug_Print 1 "PAT_JPNI     $PAT_JPNI" 
    110     IGCM_debug_Print 1 "PAT_JPNJ     $PAT_JPNJ" 
    111     IGCM_debug_Print 1 "PAT_JPNIJ    $PAT_JPNIJ" 
    112     IGCM_debug_Print 1 "PAT_NN_FSBC  $PAT_NN_FSBC" 
    11347    IGCM_debug_Print 1 " " 
    114     IGCM_debug_Print 1 "ORCA_RDT        $ORCA_RDT" 
    115     IGCM_debug_Print 1 "ORCA_NN_FSBC    $ORCA_NN_FSBC" 
    116     IGCM_debug_Print 1 "ORCA_RDT_SBC    $ORCA_RDT_SBC" 
    117     IGCM_debug_Print 1 "ORCA_NPDT_JOUR  $ORCA_NPDT_JOUR" 
    118     IGCM_debug_Print 1 "DaysSinceJC     $DaysSinceJC" 
     48    IGCM_debug_Print 1 "OPA_RDT        ${OPA_RDT}" 
     49    IGCM_debug_Print 1 "OPA_NN_FSBC    ${OPA_NN_FSBC}" 
     50    IGCM_debug_Print 1 "OPA_RDT_SBC    ${OPA_RDT_SBC}" 
     51    IGCM_debug_Print 1 "OPA_NPDT_DAY   ${OPA_NPDT_DAY}" 
     52    IGCM_debug_Print 1 "OPA_NPDT_YEAR  ${OPA_NPDT_YEAR}" 
     53    IGCM_debug_Print 1 "DaysSinceJC    ${DaysSinceJC}" 
     54 
     55    ## Check that nn_fsbc is correct compare to coupling frequency 
     56    FreqCoupling=${oasis_UserChoices_FreqCoupling:-86400} 
     57     
     58    ## This informations are used for diaptr, trends and diagap files 
     59    ## only the first frequency is used for this files 
     60     
     61    IGCM_debug_Print 1 "FreqCoupling    ${FreqCoupling}" 
     62    IGCM_debug_Print 1 "OPA_NN_FSBC    ${OPA_NN_FSBC}" 
     63    IGCM_debug_Print 1 "OPA_RDT        ${OPA_RDT}" 
     64    IGCM_debug_Print 1 "OPA_RDT_SBC    ${OPA_RDT_SBC}" 
     65     
     66    if [[ ${OPA_RDT_SBC} -gt ${FreqCoupling} ]] ; then 
     67        IGCM_debug_Exit "OPA_RDT_SBC=${OPA_RDT_SBC} is greater than FreqCoupling=${FreqCoupling}" 
     68        IGCM_debug_Verif_Exit 
     69    fi 
    11970     
    12071    IGCM_debug_PopStack "OCE_Initialize" 
     
    12677{ 
    12778    IGCM_debug_PushStack "OCE_Update" 
    128  
    129     ## Check that nn_fsbc is correct compare to coupling frequency 
    130  
    131     FreqCoupling=${oasis_UserChoices_FreqCoupling:-86400} 
    132  
    133     ## This informations are used for diaptr, trends and diagap files 
    134     ## only the first frequency is used for this files 
    135     
    136     IGCM_debug_Print 1 "FreqCoupling    $FreqCoupling" 
    137     IGCM_debug_Print 1 "ORCA_NN_FSBC    $ORCA_NN_FSBC" 
    138     IGCM_debug_Print 1 "ORCA_RDT        $ORCA_RDT" 
    139     IGCM_debug_Print 1 "ORCA_RDT_SBC    $ORCA_RDT_SBC" 
    140  
    141     if [[ ${ORCA_RDT_SBC} -gt ${FreqCoupling} ]] ; then 
    142         IGCM_debug_Exit "ORCA_RDT_SBC=${ORCA_RDT_SBC} is greater than FreqCoupling=${FreqCoupling}" 
    143         IGCM_debug_Verif_Exit 
    144     fi 
    145      
    146     ##--Write Frequency Purpose .... 
    147     frequency=$( echo ${config_OCE_WriteFrequency} | awk "-F " '{print $1}' ) 
    148     factor=$( echo ${frequency} | sed -e "s/[yYmMdD]//" ) 
    149     case ${frequency} in 
    150         1Y|1y) 
    151             (( ORCA_NWRITE = ORCA_NPDT_JOUR * factor * $( IGCM_date_DaysInYear  ${year} ) ))          ; 
    152             PREFIX_NWRITE=${config_UserChoices_JobName}_${factor}y ; 
    153             R_OUT_OCE_NWRITE=${R_OUT_OCE_O_Y} ; 
    154             WF1=${factor}Y ;; 
    155         1M|1m) 
    156             (( ORCA_NWRITE = ORCA_NPDT_JOUR * factor * $( IGCM_date_DaysInMonth ${year} ${month} ) )) ; 
    157             PREFIX_NWRITE=${config_UserChoices_JobName}_${factor}m ; 
    158             R_OUT_OCE_NWRITE=${R_OUT_OCE_O_M} ; 
    159             WF1=${factor}M ;; 
    160         *D|*d) 
    161             (( ORCA_NWRITE = ORCA_NPDT_JOUR * factor  ))  ; 
    162             PREFIX_NWRITE=${config_UserChoices_JobName}_${factor}d ; 
    163             R_OUT_OCE_NWRITE=${R_OUT_OCE_O_D} ; 
    164             WF1=${factor}D ;; 
    165         *) 
    166             (( ORCA_NWRITE = 0 ))                                                            ;; 
    167     esac 
    168  
     79   
    16980    ##--Write Frequency for iomput 
    170     ## Differents frequencies are allowed for grid_[TUVW] and icemod files 
     81    ## Differents frequencies are allowed for OCE files 
    17182 
    17283    V1D_ENABLE=".FALSE." 
     84    V5D_ENABLE=".FALSE." 
    17385    V1M_ENABLE=".FALSE." 
    17486    V1Y_ENABLE=".FALSE." 
     
    17688    for frequency in ${config_OCE_WriteFrequency} ; do 
    17789        case ${frequency} in 
    178             1D|1d) V1D_ENABLE=".TRUE." ;; 
    179         esac 
    180         case ${frequency} in 
    181             1M|1m) V1M_ENABLE=".TRUE." ;; 
    182         esac 
    183         case ${frequency} in 
    184             *[yY]) V1Y_ENABLE=".TRUE." ;; 
     90            ( 1D|1d ) V1D_ENABLE=".TRUE." ;; 
     91            ( 5D|5d ) V5D_ENABLE=".TRUE." ;; 
     92            ( 1M|1m ) V1M_ENABLE=".TRUE." ;; 
     93            ( *[yY] ) V1Y_ENABLE=".TRUE." ;; 
    18594        esac 
    18695    done 
    187  
    188  
    189     ##-- Output level : 3 for more 1D variables 
    190     eval opa9_OUTPUT_LEVEL=\${opa9_UserChoices_OUTPUT_LEVEL} > /dev/null 2>&1 
    191     OUTPUT_LEVEL=${opa9_OUTPUT_LEVEL} 
    192  
    19396 
    19497    # Period Length In Days between DateBegin and first day of calendar 0001 01 01 
     
    197100 
    198101    ##-- Number of time steps updated : the first, the last and the number of time steps 
    199     (( ORCA_NIT000 = ( PeriodDaysSinceJC - DaysSinceJC ) * ORCA_NPDT_JOUR + 1 )) 
    200     (( ORCA_NPDT   = PeriodLengthInDays * ORCA_NPDT_JOUR )) 
    201     (( ORCA_NITEND = ORCA_NIT000 + ORCA_NPDT - 1)) 
     102    (( OPA_NIT000 = ( PeriodDaysSinceJC - DaysSinceJC ) * OPA_NPDT_DAY + 1 )) 
     103    (( OPA_NPDT   = PeriodLengthInDays * OPA_NPDT_DAY )) 
     104    (( OPA_NITEND = OPA_NIT000 + OPA_NPDT - 1)) 
    202105 
    203106    ##-- We force one restart file at the end of the trunk 
    204     ORCA_NSTOCK="${ORCA_NITEND}" 
    205  
    206     ##-- Restart configuration 
    207     if ( [ "${CumulPeriod}" -eq 1 ] && [ "${config_OCE_Restart}" = "n" ] ) ; then 
    208         ORCA_LRSTAR=.FALSE. 
    209         ORCA_NRSTDT=0 
    210         # Put ORCA_NMSH=0 when OPA running in parallel mode 
    211         ORCA_NMSH=1 
    212         #echo "NO OPA RESTART" 
     107    OPA_NSTOCK="${OPA_NITEND}" 
     108 
     109 
     110    ##-- Additionnal Restart Option to force reproducibility ; force kt to kt red in restart file 
     111    ## ${opa9_UserChoices_Reproducibility_after_restart} 
     112 
     113    IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/COMP/opa9.card UserChoices Reproducibility_after_restart 
     114 
     115   ##-- Restart configuration 
     116    if ( [ "${opa9_UserChoices_Reproducibility_after_restart}" = "y" ] ) ; then 
     117      OPA_LRSTAR=.TRUE. 
     118      OPA_NRSTDT=2 
     119      #echo "OPA RESTART" 
     120      IGCM_debug_Print 1 'WARNING : dangerous option' 
     121      IGCM_debug_Print 1 'Reproducibility_after_Restart forced ie kt forced to kt red in restart file : ' ${opa9_UserChoices_Reproducibility_after_restart} 
     122    elif ( [ "${CumulPeriod}" -eq 1 ] && [ "${config_OCE_Restart}" = "n" ] ) ; then 
     123      OPA_LRSTAR=.FALSE. 
     124      OPA_NRSTDT=0 
     125      #echo "NO OPA RESTART" 
    213126    elif ( [ "${CumulPeriod}" -eq 1 ] && [ "${config_OCE_Restart}" = "y" ] ) ; then 
    214         ORCA_LRSTAR=.TRUE. 
    215         ORCA_NRSTDT=0 
    216         ORCA_NMSH=1 
    217         #echo "OPA RESTART" 
     127      OPA_LRSTAR=.TRUE. 
     128      OPA_NRSTDT=0 
     129      #echo "OPA RESTART" 
    218130    else 
    219         ORCA_LRSTAR=.TRUE. 
    220         ORCA_NRSTDT=2 
    221         ORCA_NMSH=0 
    222         #echo "OPA RESTART" 
    223     fi 
    224  
    225     ##-- Meshmask option 
     131      OPA_LRSTAR=.TRUE. 
     132      OPA_NRSTDT=2 
     133      #echo "OPA RESTART" 
     134    fi 
     135 
     136    if ( [ "${CumulPeriod}" -eq 1 ] && [ "${opa9_UserChoices_Restart_TS_only}" = "y" ] ) ; then 
     137      OPA_LRSTAR_TS=.TRUE. 
     138    else 
     139      OPA_LRSTAR_TS=.FALSE. 
     140    fi 
     141 
     142    ##-- Meshmask option. Forced only once. 
    226143    IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/COMP/opa9.card UserChoices mesh_mask 
    227144 
     145    OPA_NMSH=0 
    228146    if [ "${opa9_UserChoices_mesh_mask}" = "y" ]; then 
    229         ORCA_NMSH=1 
     147        OPA_NMSH=1 
    230148        IGCM_card_WriteOption ${SUBMIT_DIR}/COMP/opa9.card UserChoices mesh_mask "n" 
    231149    fi 
     
    233151    # nleapy configuration 
    234152    case ${config_UserChoices_CalendarType} in 
    235         leap|gregorian) 
    236             ORCA_NLEAPY=1;; 
    237         noleap) 
    238             ORCA_NLEAPY=0;; 
    239         360d) 
    240             ORCA_NLEAPY=30;; 
    241         *) 
    242             ORCA_NLEAPY=30 
     153        ( leap|gregorian) OPA_NLEAPY=1  ;; 
     154        ( noleap        ) OPA_NLEAPY=0  ;; 
     155        ( 360d          ) OPA_NLEAPY=30 ;; 
     156        ( *             ) OPA_NLEAPY=30 ;; 
    243157    esac 
    244158 
     159    if ( [ "${opa9_UserChoices_Reproducibility_after_restart}" = "y" ] ) ; then 
     160      NEMO_KT_FROM_RESTART=$(ncdump -v kt restartopa_0000.nc|grep 'kt ='|awk '{print $3}' ) 
     161      (( NEMO_NIT000 = NEMO_KT_FROM_RESTART + 1 )) 
     162      (( NEMO_NITEND = NEMO_KT_FROM_RESTART + OPA_NITEND - OPA_NIT000 + 1 )) 
     163      IGCM_debug_Print 1 "NEMO_NIT000 (from Restart)        : ${NEMO_NIT000}" 
     164      IGCM_debug_Print 1 "NEMO_NITEND (from Restart + ... ) : ${NEMO_NITEND}" 
     165      ##-- We force one restart file at the end of the trunk 
     166      OPA_NSTOCK="${NEMO_NITEND}" 
     167      OPA_NIT000="${NEMO_NIT000}" 
     168      OPA_NITEND="${NEMO_NITEND}" 
     169    fi 
     170 
    245171    typeset -r PRECIS=8 
    246     NEMO_END=$( echo $( awk "BEGIN { printf \"%0${PRECIS}d\",${ORCA_NITEND} }" ) )  
    247  
    248  
    249     case ${SEAICE_MODEL} in 
    250         ( LIM2 )  
    251         NN_ICE_EMBD=0 
    252         ICEFLX=none 
    253         ;; 
    254         ( LIM3 )  
    255         NN_ICE_EMBD=2 
    256         ICEFLX=${opa9_UserChoices_iceflx:-linear} 
    257         ;; 
    258     esac 
    259  
    260     IGCM_debug_Print 1 "NUM_PROC_OCE : " ${NUM_PROC_OCE} 
    261  
    262     sed -e "s/${PAT_CEXPER}/       cn_exp=\"${config_UserChoices_JobName}\"/"   \ 
    263         -e "s/${PAT_NIT000}/       nn_it000=${ORCA_NIT000}/"                    \ 
    264         -e "s/${PAT_NITEND}/       nn_itend=${ORCA_NITEND}/"                    \ 
    265         -e "s/${PAT_NDATE0}/       nn_date0=${PeriodDateBegin}/"                \ 
    266         -e "s%${PAT_NLEAPY}%       nn_leapy=${ORCA_NLEAPY}%"                    \ 
    267         -e "s/${PAT_NSTOCK}/       nn_stock=${ORCA_NSTOCK}/"                    \ 
    268         -e "s/${PAT_NWRITE}/       nn_write=${ORCA_NWRITE}/"                    \ 
    269         -e "s/${PAT_RESTAR}/       ln_rstart=${ORCA_LRSTAR}/"                   \ 
    270         -e "s/${PAT_NRSTAR}/       nn_rstctl=${ORCA_NRSTDT}/"                   \ 
    271         -e "s/${PAT_NMSH}/         nn_msh=${ORCA_NMSH}/"                        \ 
    272         -e "s/${PAT_NN_WRITE}/     nn_prg=${ORCA_NWRITE}/"                      \ 
    273         -e "s/${PAT_NN_FWRI}/      nn_fwri=${ORCA_NWRITE}/"                     \ 
    274         -e "s/${PAT_NN_FSBC}/      nn_fsbc=${ORCA_NN_FSBC}/"                    \ 
    275         -e "s/${PAT_ICE_EMBD}/     nn_ice_embd=${NN_ICE_EMBD}/"                 \ 
    276         -e "s/${PAT_ICEFLX}/       cn_iceflx=\'${ICEFLX}'/"                     \ 
    277         -e "s/${PAT_JPNI}/         jpni=1/"                                     \ 
    278         -e "s/${PAT_JPNJ}/         jpnj=${NUM_PROC_OCE}/"                       \ 
    279         -e "s/${PAT_JPNIJ}/        jpnij=${NUM_PROC_OCE}/"                      \ 
    280         namelist_cfg > namelist_cfg.tmp 
    281  
    282     IGCM_sys_Mv namelist_cfg.tmp namelist_cfg 
    283  
    284     IGCM_debug_Print 1 'Variables automatically updated in ORCA namelist_cfg' 
    285     grep AUTO namelist_cfg 
    286  
    287     # update iodef.xml 
    288  
    289     IGCM_debug_Print 1 'Informations into iodef.xml : V1D_ENABLE V1M_ENABLE V1Y_ENABLE OUTPUT_LEVEL' 
    290     IGCM_debug_Print 1 ${V1D_ENABLE} ${V1M_ENABLE} ${V1Y_ENABLE} ${OUTPUT_LEVEL} 
    291  
    292     sed -e "s/_1D_ENABLE_/${V1D_ENABLE}/" \ 
    293         -e "s/_1M_ENABLE_/${V1M_ENABLE}/" \ 
    294         -e "s/_1Y_ENABLE_/${V1Y_ENABLE}/" \ 
    295         -e "s/_OUTPUT_LEVEL_/${OUTPUT_LEVEL}/" \ 
    296         context_nemo.xml > context_nemo.xml.tmp 
    297  
    298     IGCM_sys_Mv context_nemo.xml.tmp context_nemo.xml 
    299  
     172    NEMO_END=$( echo $( awk "BEGIN { printf \"%0${PRECIS}d\",${OPA_NITEND} }" ) )  
     173 
     174    IGCM_comp_modifyNamelist blocker    namelist_cfg cn_exp       ${config_UserChoices_JobName} 
     175    IGCM_comp_modifyNamelist blocker    namelist_cfg nn_it000     ${OPA_NIT000} 
     176    IGCM_comp_modifyNamelist blocker    namelist_cfg nn_itend     ${OPA_NITEND} 
     177    IGCM_comp_modifyNamelist blocker    namelist_cfg ln_rstart    ${OPA_LRSTAR} 
     178    IGCM_comp_modifyNamelist blocker    namelist_cfg ln_rstart_ts ${OPA_LRSTAR_TS} 
     179    IGCM_comp_modifyNamelist blocker    namelist_cfg nn_stock     ${OPA_NSTOCK} 
     180    IGCM_comp_modifyNamelist blocker    namelist_cfg nn_rstctl    ${OPA_NRSTDT} 
     181    IGCM_comp_modifyNamelist blocker    namelist_cfg nn_date0     ${PeriodDateBegin} 
     182    IGCM_comp_modifyNamelist nonblocker namelist_cfg nn_msh       ${OPA_NMSH} 
     183    IGCM_comp_modifyNamelist nonblocker namelist_cfg nn_rnf_depth_file  ${OPA_NMSH} 
     184    IGCM_comp_modifyNamelist blocker    namelist_cfg nn_leapy     ${OPA_NLEAPY} 
     185     
     186    # Update iodef.xml 
     187 
     188    if [ X"$( echo ${config_UserChoices_ExpType} | grep CMIP6 )" != "X" ] ; then        
     189        V1D_ENABLE=".FALSE." 
     190        V5D_ENABLE=".FALSE." 
     191        V1M_ENABLE=".FALSE." 
     192        V1Y_ENABLE=".FALSE." 
     193    fi 
     194 
     195    IGCM_debug_Print 1 'Informations into iodef.xml : V1D_ENABLE V5D_ENABLE V1M_ENABLE V1Y_ENABLE ' 
     196    IGCM_debug_Print 1 ${V1D_ENABLE}  ${V5D_ENABLE} ${V1M_ENABLE} ${V1Y_ENABLE} 
     197 
     198    IGCM_comp_modifyXmlFile nonblocker file_def_nemo-opa.xml 1d_opa enabled ${V1D_ENABLE} 
     199    IGCM_comp_modifyXmlFile nonblocker file_def_nemo-opa.xml 5d_opa enabled ${V5D_ENABLE} 
     200    IGCM_comp_modifyXmlFile nonblocker file_def_nemo-opa.xml 1m_opa enabled ${V1M_ENABLE} 
     201    IGCM_comp_modifyXmlFile nonblocker file_def_nemo-opa.xml 1y_opa enabled ${V1Y_ENABLE} 
     202 
     203    IGCM_comp_modifyXmlFile force context_nemo.xml ref_year NONE ${opa9_UserChoices_TimeOrigin} 
     204         
     205  
    300206    # vargas/titane/MPP and switch from 1 proc to 5 procs. We need to suppres restartopa the second month, if restartopa_0000 exist 
    301207    # same thing for restart_trc and restart_ice_in 
     
    309215    #  <context id="nemo" src="./context_nemo.xml"/> 
    310216    echo '<context id="nemo" src="./context_nemo.xml"/>' > add.tmp 
     217    if [ X"$( echo ${config_UserChoices_ExpType} | grep CMIP6 )" != "X" ] ; then 
     218        echo '<context id="nemo" src="./ping_nemo.xml"/>' >> add.tmp 
     219        echo '<context id="nemo" src="./dr2xml_opa9.xml"/>' >> add.tmp 
     220    fi 
    311221    cp iodef.xml iodef.xml.tmp 
    312222    sed -e "/COMPONENT CONTEXT/r add.tmp" \ 
     
    314224    rm iodef.xml.tmp add.tmp 
    315225 
     226    #Long Name as global attribute (if LongName is not empty) 
     227    if [ ! "X${config_UserChoices_LongName}" = "X" ] ; then 
     228        listfile=$(ls file_def_nemo*.xml) 
     229        echo "<variable id=\"LongName\" type=\"string\">${config_UserChoices_LongName}</variable>" > add.tmp 
     230        for file in ${listfile} 
     231        do 
     232            cp ${file} ${file}.tmp 
     233            sed -e "/<file id/r add.tmp" \ 
     234                ${file}.tmp > ${file} 
     235            rm ${file}.tmp  
     236        done  
     237        rm add.tmp 
     238    fi 
    316239 
    317240    IGCM_debug_PopStack "OCE_Update" 
     
    323246    IGCM_debug_PushStack "OCE_Finalize" 
    324247 
    325     if [ -f date.file ] ; then 
    326         # Prefix use in opa9.card AND in lim2.card : 
    327         DATE_OPA=$( cat date.file | \ 
    328             sed "s/\ ${config_UserChoices_JobName}_[0-9]*[a-z]_\([0-9]*_[0-9]*\)_\ */\1/g" ) 
    329         MainPrefix=${config_UserChoices_JobName}_1d_${DATE_OPA} 
    330         SecondPrefix=${config_UserChoices_JobName}_1m_${DATE_OPA} 
    331     fi 
    332  
    333248    IGCM_debug_Print 1 FINALIZE OCE !!! 
    334249 
Note: See TracChangeset for help on using the changeset viewer.