Ignore:
Timestamp:
01/26/24 09:27:27 (5 months ago)
Author:
jgipsl
Message:

Added possibility to declare a restart file as optional which means that libIGCM want stop if the file is not found. Only a warning will be written.

For example, in the following case, if the routing_restart file is not available when starting the model or if it is not produced, libIGCM will not stop. But if the file sechiba_rest is not available, libIGCM will stop as usual.

[RestartFiles]
List=   (sechiba_rest_out.nc, sechiba_rest.nc, sechiba_rest_in.nc) ,\
        (routing_restart.nc, routing_restart.nc, routing_start.nc, OPTIONAL)
  • Read optional argument OPTIONAL on the line where the restart file is declared.
  • Each time when a restart file is not found for coping in or out, if the argument OPTIONAL is set, then just continue. If not set, the file is considered as MANDATORY and libIGCM will exist if it is missing as before.
  • on irene-amd and jean-zay, corrected a bug for the case in config.card DataProject?=DEFAULT


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_irene-amd.ksh

    r1593 r1624  
    223223 
    224224  # Load dfldatadir depending on the project used for submission (default) or set in config.card (optional) 
    225   if [ X${config_UserChoices_DataProject} = X ] || [ X${config_UserChoices_DataProject} = DEFAULT ]; then 
     225  if [ X${config_UserChoices_DataProject} = X ] || [ X${config_UserChoices_DataProject} = XDEFAULT ]; then 
    226226    # Default option: Change the dfldatadir according to the project used for submission 
    227227    # The variable DataProject in section UserChoices in config.card is not set or is set to DEFAULT 
     
    613613  if [ $DRYRUN = 0 ]; then 
    614614    if [ ! -f ${1} ] ; then 
    615       echo "ERROR : IGCM_sys_Put_Rest ${1} DOES NOT EXIST ." 
    616       IGCM_debug_Exit "IGCM_sys_Put_Rest" 
    617     fi 
     615        # The file is missing      
     616        if [ X${3} = X'OPTIONAL' ] ; then 
     617            echo "WARINING : IGCM_sys_Put_Rest ${1} DOES NOT EXIST ." 
     618            IGCM_debug_Print 1 "IGCM_sys_Put_Rest: Optional restart file ${1} is missing, now continue for the next" 
     619        else 
     620            echo "ERROR : IGCM_sys_Put_Rest ${1} DOES NOT EXIST ." 
     621            IGCM_debug_Exit "IGCM_sys_Put_Rest" 
     622        fi 
     623 
     624    else 
     625      # The file exist 
    618626 
    619627    typeset status 
     
    652660 
    653661      \rm ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 
     662    fi 
    654663    fi 
    655664  fi 
Note: See TracChangeset for help on using the changeset viewer.