Changeset 1482 for trunk


Ignore:
Timestamp:
04/15/19 09:59:53 (5 years ago)
Author:
jgipsl
Message:

Add check if the EnvFile? exists if it is set in config.card. Else the default file will be sourced in the same way as if EnvFile? is not set in config.card.

File:
1 edited

Legend:

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

    r1479 r1482  
    10811081  # Source the file EnvFile containing all module load needed to run the model. 
    10821082  # Use default a default file on the shared account or use an optional file specified in config.card. 
    1083   if [ X${config_UserChoices_EnvFile} = X ] || [ X${config_UserChoices_EnvFile} = DEFAULT ] ; then 
     1083  if [ ! X${config_UserChoices_EnvFile} = X ] && [ -f ${config_UserChoices_EnvFile} ] ; then 
     1084      # EnvFile is set in config.card and the file exists 
     1085      IGCM_debug_Print 1 "EnvFile set in config.card will be used" 
     1086      EnvFile=${config_UserChoices_EnvFile} 
     1087  else 
    10841088      IGCM_debug_Print 1 "IGCM_sys_active_variables : Default modules will be used" 
    10851089      module purge > /dev/null 2>&1  
     
    10911095          IGCM_debug_Exit "This compiler version is not yet supported : ${compilerVersion}" 
    10921096      fi 
    1093   else 
    1094       # EnvFile is set in config.card 
    1095       IGCM_debug_Print 1 "EnvFile set in config.card will be used" 
    1096       EnvFile=${config_UserChoices_EnvFile} 
    10971097  fi 
    10981098  IGCM_debug_Print 1 "IGCM_sys_active_variables : Following EnvFile will be used :"  
Note: See TracChangeset for help on using the changeset viewer.