Ignore:
Timestamp:
10/09/17 11:57:12 (7 years ago)
Author:
cetlod
Message:

Update NEMO card & driver

File:
1 edited

Legend:

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

    r3306 r3408  
    4040 
    4141 
     42    V1D_ENABLE=".FALSE." 
     43    V5D_ENABLE=".FALSE." 
     44    V1M_ENABLE=".FALSE." 
     45    V1Y_ENABLE=".FALSE." 
     46 
     47    for frequency in ${config_OCE_WriteFrequency} ; do 
     48        case ${frequency} in 
     49            ( 1D|1d ) V1D_ENABLE=".TRUE." ;; 
     50            ( 5D|5d ) V5D_ENABLE=".TRUE." ;; 
     51            ( 1M|1m ) V1M_ENABLE=".TRUE." ;; 
     52            ( *[yY] ) V1Y_ENABLE=".TRUE." ;; 
     53        esac 
     54    done 
     55 
    4256    if [ "${EXPTYPE}" = "ia"   ] ; then 
    4357       NbFileInter=${#opa9_UserChoices_ListForcing[*]} 
    44        if [ ${year} -ge ${opa9_UserChoices_YearForcingInit} ] ; then  
    45           year_forcing=${year} 
     58       (( LengthForcing=${opa9_UserChoices_YearForcingEnd} - ${opa9_UserChoices_YearForcingInit} + 1 )) 
     59       (( DiffForcing=abs(${opa9_UserChoices_YearForcingEnd} - ${year} ))) 
     60       (( ModuloForcing=${DiffForcing} % ${LengthForcing} )) 
     61      if [ ${ModuloForcing} -eq 0 ] ; then 
     62          (( year_forcing=${opa9_UserChoices_YearForcingEnd} )) 
    4663       else 
    47           (( LengthForcing=${opa9_UserChoices_YearForcingEnd} - ${opa9_UserChoices_YearForcingInit} + 1 )) 
    48           (( DiffForcing=${opa9_UserChoices_YearForcingEnd} - ${year} )) 
    49           (( ModuloForcing=${DiffForcing} % ${LengthForcing} )) 
    50           (( year_forcing=${opa9_UserChoices_YearForcingEnd} - ${ModuloForcing} )) 
     64          if [ ${year} -ge ${opa9_UserChoices_YearForcingInit} ] && [ ${year} -le ${opa9_UserChoices_YearForcingEnd} ] ; then 
     65             year_forcing=${year} 
     66          elif [ ${year} -lt ${opa9_UserChoices_YearForcingInit} ] ; then 
     67             (( year_forcing=${opa9_UserChoices_YearForcingEnd} - ${ModuloForcing} )) 
     68          else 
     69             (( year_forcing=${opa9_UserChoices_YearForcingInit} + ${ModuloForcing} - 1 )) 
     70          fi 
    5171       fi 
    5272       (( year_forcing_m1 = ${year_forcing} - 1)) 
     
    5575        while [ $i -lt ${NbFileInter} ] ; do 
    5676           eval file=${opa9_UserChoices_ListForcing[$i]} 
    57            IGCM_sys_Get ${opa9_UserChoices_R_FORCING}/${file}_${year_forcing_m1}.nc  ${file}_y${year_m1}.nc  
    58            IGCM_sys_Get ${opa9_UserChoices_R_FORCING}/${file}_${year_forcing}.nc     ${file}_y${year}.nc  
    59            IGCM_sys_Get ${opa9_UserChoices_R_FORCING}/${file}_${year_forcing_p1}.nc  ${file}_y${year_p1}.nc  
     77           IGCM_sys_Get ${opa9_UserChoices_R_FORCING}/${file}_${year_forcing_m1}.nc  ${file}_y${year_m1}.nc 
     78           IGCM_sys_Get ${opa9_UserChoices_R_FORCING}/${file}_${year_forcing}.nc     ${file}_y${year}.nc 
     79           IGCM_sys_Get ${opa9_UserChoices_R_FORCING}/${file}_${year_forcing_p1}.nc  ${file}_y${year_p1}.nc 
    6080           (( i = i + 1 )) 
    6181        done 
    6282    fi 
    6383 
    64     NbFreq=$( echo ${config_OCE_WriteFrequency} | wc -w ) 
    65     ##--Write Frequency Purpose .... 
    66     typeset -Z1 i=1 
    67     while [ $i -le ${NbFreq} ]; do 
    68         frequency=$( echo ${config_OCE_WriteFrequency} | awk -v var="$i" "-F " '{print $var}' ) 
    69         factor=$( echo ${frequency} | sed -e "s/[yYmMdDhH]//" ) 
    70  
    71         case ${frequency} in 
    72             *Y|*y) 
    73                 eval PREFIX_WF${i}=${config_UserChoices_JobName}_${factor}y_${DatesPeriod} ; 
    74                 eval R_OUT_OCE_WF${i}=${R_OUT_OCE_O_Y} ; 
    75                 eval WF${i}=${factor}Y ;; 
    76             *M|*m) 
    77                 eval PREFIX_WF${i}=${config_UserChoices_JobName}_${factor}m_${DatesPeriod} ; 
    78                 eval R_OUT_OCE_WF${i}=${R_OUT_OCE_O_M} ; 
    79                 eval WF${i}=${factor}M ;; 
    80             *D|*d) 
    81                 eval PREFIX_WF${i}=${config_UserChoices_JobName}_${factor}d_${DatesPeriod} ; 
    82                 eval R_OUT_OCE_WF${i}=${R_OUT_OCE_O_D} ; 
    83                 eval WF${i}=${factor}D ;; 
    84             *H|*h) 
    85                 eval PREFIX_WF${i}=${config_UserChoices_JobName}_${factor}h_${DatesPeriod} ; 
    86                 eval R_OUT_OCE_WF${i}=${R_OUT_OCE_O_H} ; 
    87                 eval WF${i}=${factor}H ;; 
    88             *) 
    89         esac 
    90         let i=$i+1 
    91  
    92     done 
    9384    # Period Length In Days between DateBegin and first day of calendar 0001 01 01 
    9485    # Needed by OPA namelist to compute correct file names  
     
    158149   IGCM_comp_modifyNamelist blocker    namelist_cfg nn_leapy  ${OPA_NLEAPY}   
    159150 
     151   IGCM_debug_Print 1 'Informations into iodef.xml : V1D_ENABLE V5D_ENABLE V1M_ENABLE V1Y_ENABLE ' 
     152   IGCM_debug_Print 1 ${V1D_ENABLE}  ${V5D_ENABLE} ${V1M_ENABLE} ${V1Y_ENABLE} 
     153 
     154   IGCM_comp_modifyXmlFile nonblocker file_def_nemo-opa.xml 1d enabled ${V1D_ENABLE} 
     155   IGCM_comp_modifyXmlFile nonblocker file_def_nemo-opa.xml 5d enabled ${V5D_ENABLE} 
     156   IGCM_comp_modifyXmlFile nonblocker file_def_nemo-opa.xml 1m enabled ${V1M_ENABLE} 
     157   IGCM_comp_modifyXmlFile nonblocker file_def_nemo-opa.xml 1y enabled ${V1Y_ENABLE} 
     158         
     159   IGCM_comp_modifyXmlFile nonblocker file_def_nemo-lim.xml 1d enabled ${V1D_ENABLE} 
     160   IGCM_comp_modifyXmlFile nonblocker file_def_nemo-lim.xml 1m enabled ${V1M_ENABLE} 
     161   IGCM_comp_modifyXmlFile nonblocker file_def_nemo-lim.xml 1y enabled ${V1Y_ENABLE} 
     162 
    160163# update domain_def.xml file  
    161164   case ${RESOL_OCE} in  
Note: See TracChangeset for help on using the changeset viewer.