Changeset 1486 for trunk/libIGCM


Ignore:
Timestamp:
06/17/19 17:50:03 (5 years ago)
Author:
jgipsl
Message:
  • Added eval on ExeNameIn? after it has been controled that it is not equal "". This is done to enable variables in the executable name. For example gcm_${ResolAtm?}.nc
  • Initialized variables ResolAtm?, ResolOce?, OptMode? which can be used in the Executable section in config.card if they are set in the UserChoices? section in the same config.card.
Location:
trunk/libIGCM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh

    r1467 r1486  
    10061006    eval ExeNameIn=\${config_Executable_${comp}[0]} 
    10071007    eval ExeNameOut=\${config_Executable_${comp}[1]} 
    1008  
    1009     # If missing executable and DRYRUN is set to 0 or 1  then stop! 
    1010     if [ ${DRYRUN} -le 1 ] && [ X${ExeNameIn} != X\"\" ] &&  [ ! -f ${R_EXE}/${ExeNameIn} ] ; then 
    1011       IGCM_debug_Exit "IGCM_comp_GetInputBinaryFiles missing executable ${ExeNameIn}" 
     1008    # Test if missing executable and DRYRUN is set to 0 or 1, then stop! 
     1009    if [ ${DRYRUN} -le 1 ] && [ X${ExeNameIn} != X\"\" ] ; then 
     1010        # The executable is set in config.card and is different from "" 
     1011        # Use eval to expand ExeNameIn if variables are used in the name  
     1012        eval ExeNameIn=${ExeNameIn} 
     1013        if [ ! -f ${R_EXE}/${ExeNameIn} ] ; then 
     1014            IGCM_debug_Exit "IGCM_comp_GetInputBinaryFiles missing executable ${ExeNameIn}" 
     1015        fi 
    10121016    fi 
    10131017 
     
    10691073    # Copy executable for this component 
    10701074    eval ExeNameIn=\${config_Executable_${comp}[0]} 
     1075    eval ExeNameIn=${ExeNameIn} 
    10711076    eval ExeNameOut=\${config_Executable_${comp}[1]} 
    10721077 
  • trunk/libIGCM/libIGCM_config/libIGCM_config.ksh

    r1431 r1486  
    3838    IGCM_debug_Print 3 "${option} : ${auxprint}" 
    3939  done 
     40 
     41  # Set variables with shorter names on some variables which   
     42  # are used in the executable name in config.card 
     43  ResolAtm=${config_UserChoices_ResolAtm} 
     44  ResolOce=${config_UserChoices_ResolOce} 
     45  OptMode=${config_UserChoices_OptMode} 
    4046 
    4147  #================================== 
     
    653659 
    654660      # Keep the first executable found and the first CompName 
    655       ExeNameFirst=${ExeNameIn} 
     661      eval ExeNameFirst=${ExeNameIn} 
    656662      CompNameFirst=${comp} 
    657663 
     
    11101116        (( ExeSize=0 )) 
    11111117      else 
     1118        eval ExeNameIn=${ExeNameIn} 
    11121119        LS_bin=${R_EXE}/${ExeNameIn} 
    11131120        IGCM_sys_FileSize ${LS_bin} ExeSize 
Note: See TracChangeset for help on using the changeset viewer.