Ignore:
Timestamp:
04/27/18 11:02:37 (6 years ago)
Author:
mafoipsl
Message:

For IPSLCM6/NEMO : opa9.driver and pisces.driver consolidation for Reproducibility_after_restart=y

Location:
CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/DRIVER
Files:
2 edited

Legend:

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

    r3775 r3785  
    114114 
    115115   ##-- Restart configuration 
    116     if ( [ "${opa9_UserChoices_Reproducibility_after_restart}" = "y" ] ) ; then 
     116    if ( [ "${CumulPeriod}" -eq 1 ] && [ "${opa9_UserChoices_Reproducibility_after_restart}" = "y" ] ) ; then 
    117117      OPA_LRSTAR=.TRUE. 
    118118      OPA_NRSTDT=2 
    119119      #echo "OPA RESTART" 
    120       IGCM_debug_Print 1 'WARNING : dangerous option' 
     120      IGCM_debug_Print 1 'WARNING : dangerous option for NEMO opa9' 
    121121      IGCM_debug_Print 1 'Reproducibility_after_Restart forced ie kt forced to kt red in restart file : ' ${opa9_UserChoices_Reproducibility_after_restart} 
    122122    elif ( [ "${CumulPeriod}" -eq 1 ] && [ "${config_OCE_Restart}" = "n" ] ) ; then 
     
    157157    esac 
    158158 
    159     if ( [ "${opa9_UserChoices_Reproducibility_after_restart}" = "y" ] ) ; then 
     159    if ( [ "${CumulPeriod}" -eq 1 ] && [ "${opa9_UserChoices_Reproducibility_after_restart}" = "y" ] ) ; then 
     160      ##-- choose the right restart file 
     161      NEMO_RESTART_FILE=restartopa.nc 
     162      [ -f restartopa_0000.nc ] && NEMO_RESTART_FILE=restartopa_0000.nc 
    160163      ##-- Getting from restart file the last time step of the run at which we want to re-start 
    161       NEMO_KT_FROM_RESTART=$(ncdump -v kt restartopa_0000.nc|grep 'kt ='|awk '{print $3}' ) 
     164      NEMO_KT_FROM_RESTART=$(ncdump -v kt ${NEMO_RESTART_FILE}|grep 'kt ='|awk '{print $3}' ) 
    162165      ## Force the date in the restart file to be the last day before the begiining of the new run 
    163166      (( yearrst = year - 1 )) 
    164       ncap2 -s "ndastp=${yearrst}1231" restartopa_0000.nc  tmp.nc 
    165       mv tmp.nc restartopa_0000.nc 
     167      IGCM_debug_Print 1 "cmd done to modify NEMO restartfile: "  ncap2 -s "ndastp=${yearrst}1231" ${NEMO_RESTART_FILE}  tmp.nc 
     168      ncap2 -s "ndastp=${yearrst}1231" ${NEMO_RESTART_FILE}  tmp.nc 
     169      mv tmp.nc ${NEMO_RESTART_FILE} 
    166170      (( NEMO_NIT000 = NEMO_KT_FROM_RESTART + 1 )) 
    167171      (( NEMO_NITEND = NEMO_KT_FROM_RESTART + OPA_NITEND - OPA_NIT000 + 1 )) 
     
    169173      IGCM_debug_Print 1 "NEMO_NITEND (from Restart + ... ) : ${NEMO_NITEND}" 
    170174      ##-- Getting from restart file the "new" restart date of run at which we want to re-start 
    171       NEMO_NDASTP_FROM_RESTART=$(ncdump -v ndastp restartopa_0000.nc|grep 'ndastp ='|awk '{print $3}' ) 
     175      NEMO_NDASTP_FROM_RESTART=$(ncdump -v ndastp ${NEMO_RESTART_FILE}|grep 'ndastp ='|awk '{print $3}' ) 
    172176      IGCM_debug_Print 1 "NEMO_NDASTP (from Restart)       : ${NEMO_NDASTP_FROM_RESTART}" 
    173177      ##-- We force one restart file at the end of the trunk 
     
    211215         
    212216  
    213     # vargas/titane/MPP and switch from 1 proc to 5 procs. We need to suppres restartopa the second month, if restartopa_0000 exist 
     217    # for MPP and switch to different number of procs for NEMO.  We need to suppres restartopa the second period, if restartopa_0000 exist 
    214218    # same thing for restart_trc and restart_ice_in 
    215219 
  • CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/DRIVER/pisces.driver

    r3775 r3785  
    4444    ##-- Restart configuration 
    4545    ##-- Restart configuration 
    46     if ( [ "${opa9_UserChoices_Reproducibility_after_restart}" = "y" ] ) ; then 
     46    if ( [ "${CumulPeriod}" -eq 1 ] && [ "${opa9_UserChoices_Reproducibility_after_restart}" = "y" ] ) ; then 
    4747        TOP_LN_RSTR=.TRUE. 
    4848        TOP_NN_RSTR=2 
     49        IGCM_debug_Print 1 'WARNING : dangerous option for NEMO pisces too' 
     50        IGCM_debug_Print 1 'Reproducibility_after_Restart forced : ' ${opa9_UserChoices_Reproducibility_after_restart} 
    4951 
    5052    elif ( [ "${CumulPeriod}" -eq 1 ] && [ "${config_MBG_Restart}" = "n" ] ) ; then 
     
    6163 
    6264        # If we start from IPSLCM5* restart files. 
    63         for file in restart_trc*.nc ; do 
     65            for file in restart_trc*.nc ; do 
     66            IGCM_debug_Print 1 "cmd done to modify IPSLCM5* NEMO pisces restartfile: " ncrename -v TRBDSi,TRBGSi -v TRNDSi,TRNGSi -v TRNBSi,TRNDSi -v TRBBSi,TRBDSi ${file} > /dev/null 2>&1 
    6467            ncrename -v TRBDSi,TRBGSi -v TRNDSi,TRNGSi -v TRNBSi,TRNDSi -v TRBBSi,TRBDSi ${file} > /dev/null 2>&1 
    65         done 
     68            done 
    6669 
    6770    else 
Note: See TracChangeset for help on using the changeset viewer.