Changeset 3908


Ignore:
Timestamp:
06/09/18 11:30:08 (6 years ago)
Author:
cetlod
Message:

Generalization of Reproducibiliy_After_Restart option for monthly and daily runs

File:
1 edited

Legend:

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

    r3835 r3908  
    167167      if ( [ "${CumulPeriod}" -eq 1 ] ) ; then 
    168168        ## Force the date in the restart file to be the last day before the begining of the new run 
    169         (( yearrst = year - 1 )) 
    170         IGCM_debug_Print 1 "cmd done to modify NEMO restartfile:   ncap2 -s ndastp=${yearrst}1231 ${NEMO_RESTART_FILE}  tmp.nc" 
    171         ## Take care : 1231 is forced here. Still to be done for monthly run or  
    172         ## make nrstdt=1 working for all NEMO component. Not done for sea ice yet. 
     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" 
    173172        if [ -f restartopa_0000.nc ] ; then 
    174173           typeset -Z4 ncpu=0 
    175174           while [ $ncpu -lt ${OCE_PROC_MPI} ] ; do 
    176               ncap2 -s "ndastp=${yearrst}1231" restartopa_${ncpu}.nc  tmp.nc 
     175              ncap2 -s "ndastp=${dateendprevious}" restartopa_${ncpu}.nc  tmp.nc 
    177176              mv tmp.nc restartopa_${ncpu}.nc 
    178177              (( ncpu = ncpu + 1 )) 
    179178           done 
    180179        else 
    181            ncap2 -s "ndastp=${yearrst}1231" ${NEMO_RESTART_FILE}  tmp.nc 
     180           ncap2 -s "ndastp=${dateendprevious}" ${NEMO_RESTART_FILE}  tmp.nc 
    182181           mv tmp.nc ${NEMO_RESTART_FILE} 
    183182        fi 
Note: See TracChangeset for help on using the changeset viewer.