Ignore:
Timestamp:
07/11/18 10:32:51 (6 years ago)
Author:
acosce
Message:

update configuration IPSLESM to NPv6.1.5

File:
1 edited

Legend:

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

    r3758 r3969  
    6969    fi 
    7070 
    71     if [[ ${opa9_UserChoices_TimeOrigin} -gt ${InitYear} ]] ; then 
    72         echo 
    73         echo 
    74         IGCM_debug_Exit "TimeOrigin=${opa9_UserChoices_TimeOrigin} is greater than initial year=${InitYear}. IT MUST BE LOWER ! Change this value in opa9.card" 
    75         IGCM_debug_Verif_Exit 
    76     fi 
    77  
    78      
    7971    IGCM_debug_PopStack "OCE_Initialize" 
    8072    
     
    126118      OPA_NRSTDT=2 
    127119      #echo "OPA RESTART" 
    128       IGCM_debug_Print 1 'WARNING : dangerous option' 
     120      IGCM_debug_Print 1 'WARNING : dangerous option for NEMO opa9 pisces lim3' 
    129121      IGCM_debug_Print 1 'Reproducibility_after_Restart forced ie kt forced to kt red in restart file : ' ${opa9_UserChoices_Reproducibility_after_restart} 
     122 
    130123    elif ( [ "${CumulPeriod}" -eq 1 ] && [ "${config_OCE_Restart}" = "n" ] ) ; then 
    131124      OPA_LRSTAR=.FALSE. 
     
    166159 
    167160    if ( [ "${opa9_UserChoices_Reproducibility_after_restart}" = "y" ] ) ; then 
    168       NEMO_KT_FROM_RESTART=$(ncdump -v kt restartopa_0000.nc|grep 'kt ='|awk '{print $3}' ) 
     161      ##-- choose the right restart file 
     162      NEMO_RESTART_FILE=restartopa.nc 
     163      [ -f restartopa_0000.nc ] && NEMO_RESTART_FILE=restartopa_0000.nc 
     164      ##-- Getting from restart file the last time step of the run at which we want to re-start 
     165      NEMO_KT_FROM_RESTART=$(ncdump -v kt ${NEMO_RESTART_FILE}|grep 'kt ='|awk '{print $3}' ) 
     166 
     167      if ( [ "${CumulPeriod}" -eq 1 ] ) ; then 
     168        ## Force the date in the restart file to be the last day before the begining of the new run 
     169        dateendprevious=$( IGCM_date_AddDaysToGregorianDate ${DateBegin} -1 ) 
     170        IGCM_debug_Print 1 "Previous Date  ${dateendprevious}" 
     171        IGCM_debug_Print 1 "cmd done to modify NEMO restartfile:   ncap2 -s ndastp=${dateendprevious} ${NEMO_RESTART_FILE}  tmp.nc" 
     172        if [ -f restartopa_0000.nc ] ; then 
     173           typeset -Z4 ncpu=0 
     174           while [ $ncpu -lt ${OCE_PROC_MPI} ] ; do 
     175              ncap2 -s "ndastp=${dateendprevious}" restartopa_${ncpu}.nc  tmp.nc 
     176              mv tmp.nc restartopa_${ncpu}.nc 
     177              (( ncpu = ncpu + 1 )) 
     178           done 
     179        else 
     180           ncap2 -s "ndastp=${dateendprevious}" ${NEMO_RESTART_FILE}  tmp.nc 
     181           mv tmp.nc ${NEMO_RESTART_FILE} 
     182        fi 
     183        ##-- Getting from restart file the "new" restart date of run at which we want to re-start 
     184        NEMO_NDASTP_FROM_RESTART=$(ncdump -v ndastp ${NEMO_RESTART_FILE}|grep 'ndastp ='|awk '{print $3}' ) 
     185        IGCM_debug_Print 1 "NEMO_NDASTP (from Restart) for 1st Period       : ${NEMO_NDASTP_FROM_RESTART}" 
     186 
     187      fi 
     188 
    169189      (( NEMO_NIT000 = NEMO_KT_FROM_RESTART + 1 )) 
    170190      (( NEMO_NITEND = NEMO_KT_FROM_RESTART + OPA_NITEND - OPA_NIT000 + 1 )) 
     
    208228 
    209229 
    210     IGCM_comp_modifyXmlFile force context_nemo.xml ref_year NONE ${opa9_UserChoices_TimeOrigin} 
     230    IGCM_comp_modifyXmlFile force context_nemo.xml ref_year NONE ${InitYear}  
    211231         
    212232  
    213     # vargas/titane/MPP and switch from 1 proc to 5 procs. We need to suppres restartopa the second month, if restartopa_0000 exist 
     233    # for MPP and switch to different number of procs for NEMO.  We need to suppres restartopa the second period, if restartopa_0000 exist 
    214234    # same thing for restart_trc and restart_ice_in 
    215235 
Note: See TracChangeset for help on using the changeset viewer.