Changeset 1554


Ignore:
Timestamp:
09/05/22 16:20:13 (20 months ago)
Author:
ssenesi
Message:

Handle C-ESM-EP atlas in post-processing

Location:
branches/libIGCM_CESMEP
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/libIGCM_CESMEP/AA_create_se

    r1525 r1554  
    719719fi 
    720720 
     721# Execute C-ESM-EP driver (which launches jobs) 
     722set -x 
     723if [ $PostCesmep = SE ] ; then 
     724    ${SUBMIT_DIR}/cesmep_lite/libIGCM_post.sh $DateBegin $PeriodDateEnd 
     725fi 
     726 
    721727# Clean RUN_DIR_PATH (necessary for cesium and titane only) 
    722728IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH} 
  • branches/libIGCM_CESMEP/AA_create_ts

    r1549 r1554  
    820820IGCM_debug_Verif_Exit 
    821821# -------------------------------------------------------------------- 
    822 #D- Submit MONITORING 
     822#D- Submit MONITORING and C-ESM-EP 
    823823# -------------------------------------------------------------------- 
    824824if ( [ X${TsTask} = X2D ] || [ X${TsTask} = X3D ] || [ X${TsTask} = X ] ) ; then 
     
    827827    Script_Post_Output=monitoring.${PeriodDateEnd} 
    828828    IGCM_sys_QsubPost monitoring 
     829    if [ $PostCesmep = TS ] ; then 
     830        ${SUBMIT_DIR}/cesmep_lite/libIGCM_post.sh $DateBegin $PeriodDateEnd 
     831    fi 
    829832  fi 
    830833fi 
  • branches/libIGCM_CESMEP/AA_pack_output

    r1525 r1554  
    330330done 
    331331 
     332# Execute C-ESM-EP driver (which launches jobs) 
     333if [ $PostCesmep = Pack ] ; then 
     334    ${SUBMIT_DIR}/cesmep_lite/libIGCM_post.sh $DateBegin $PeriodDateEnd 
     335fi 
     336 
    332337# Flush post-processing submission 
    333338if [ -f ${R_BUFR}/FlushPost_${DateEnd}.ksh ] ; then 
  • branches/libIGCM_CESMEP/ins_job

    r1547 r1554  
    653653   
    654654fi 
     655# 
     656# Install a light copy of C-ESM-EP in SUBMIT_DIR/Cesmep and create a 
     657# C-ESM-EP launch script there. 
     658# 
     659[ ${new_struct} == yes ] && prefix="$JobName/"   
     660IGCM_card_DefineVariableFromOption ${prefix}config.card Post Cesmep 
     661 
     662# Compute mail adress - inspired by libIGCM_post.ksh - should be turned in a function  
     663if [ ! -z ${config_UserChoices_MailName} ] ; then 
     664    MailAdress=${config_UserChoices_MailName} 
     665elif [ -f ~/.forward ] ; then 
     666    MailAdress=$( cat ~/.forward ) 
     667else 
     668    MailAdress=${USER} 
     669fi 
     670 
     671# 
     672if [ ${config_Post_Cesmep} != FALSE ]; then 
     673    if [ X"${SYSTEM}" == "Xirene" ] ; then 
     674       IGCM_card_DefineVariableFromOption ${prefix}config.card Post CesmepCode 
     675       IGCM_card_DefineVariableFromOption ${prefix}config.card Post CesmepComparison 
     676       IGCM_card_DefineVariableFromOption ${prefix}config.card UserChoices DateBegin 
     677       # Need R_SAVE  
     678       IGCM_config_CommonConfiguration ${prefix}config.card 
     679       ${config_Post_CesmepCode}/libIGCM_install.sh $(pwd)/${prefix} \ 
     680                   ${config_Post_CesmepComparison} $JobName ${R_SAVE} ${ProjectID} \ 
     681                   ${MailAdress} ${config_UserChoices_DateBegin} ${config_Post_Cesmep}  
     682   else 
     683       echo "\nERROR Cannot yet handle CESMEP on this computer system" 
     684       echo "=> Variable Cesmep in config.card's section Post must be set to FALSE" 
     685       exit 5 
     686   fi 
     687fi 
    655688#- 
    656689[[ ${x_v} = 'verbose' ]] && print - ""; 
  • branches/libIGCM_CESMEP/libIGCM_config/libIGCM_config.ksh

    r1546 r1554  
    179179  if ( [ X${config_Post_MetricsPCMDI} = X${NULL_STR} ] || [ X${config_Post_MetricsPCMDI} = X ] ) ; then 
    180180    config_Post_MetricsPCMDI=FALSE 
     181  fi 
     182 
     183  #==================================================== 
     184  # Cesmep : apply default value FALSE if not defined, and if TRUE 
     185  # set it based on an adhoc algorithm 
     186  if ( [ X${config_Post_Cesmep} = XNONE ] || [ X${config_Post_Cesmep} = X ] ) ; then 
     187    config_Post_Cesmep=FALSE 
     188  elif [ X${config_Post_Cesmep} = XTRUE ]; then  
     189    if ([ ! X${config_Post_SeasonalFrequency} = XNONE ] && [ ! X${config_Post_SeasonalFrequency} = X ] ) ; then 
     190      config_Post_Cesmep="SE" 
     191    elif ([ ! X${config_Post_TimeSeriesFrequency} = XNONE ] && [ ! X${config_Post_TimeSeriesFrequency} = X ] ) ; then 
     192      config_Post_Cesmep="TS" 
     193    elif ([ ! X${config_Post_PackFrequency} = XNONE ] && [ ! X${config_Post_PackFrequency} = X ] ) ; then 
     194      config_Post_Cesmep="Pack" 
     195    else 
     196      # This covers case SpaceName=TEST with no SE nor TS (nor Pack) 
     197      config_Post_Cesmep="AtEnd" 
     198    fi 
     199    # 
     200  else 
     201      # Check that user-provided value make sense 
     202      if ([ X${config_Post_Cesmep} = XSE ]) ; then 
     203          if ([ X${config_Post_SeasonalFrequency} = XNONE ] || [ X${config_Post_SeasonalFrequency} = X ] ) ; then 
     204              IGCM_debug_Exit "Cannot use SE for Cesmep : SE post-processing is not active" 
     205          fi 
     206      elif ([ X${config_Post_Cesmep} = XTS ]) ; then 
     207          if ([ X${config_Post_TimeSeriesFrequency} = XNONE ] || [ X${config_Post_TimeSeriesFrequency} = X ] ) ; then 
     208              IGCM_debug_Exit "Cannot use TS for Cesmep : TS post-processing is not active" 
     209          fi 
     210      elif ([ X${config_Post_Cesmep} = XPack ]) ; then 
     211          if ([ X${config_Post_PackFrequency} = XNONE ] || [ X${config_Post_PackFrequency} = X ] ) ; then 
     212              IGCM_debug_Exit "Cannot use Packed output for Cesmep : Pack post-processing is not active" 
     213          fi 
     214      elif ([ X${config_Post_Cesmep} != XAtend ]) ; then 
     215          IGCM_debug_Exit "config.card Post section value for Cesmep is invalid (use SE, TS, Pack, AtEnd or TRUE) : ${config_Post_Cesmep}" 
     216      fi 
     217  fi 
     218  if ( [ X${config_Post_CesmepComparison} = XNONE ] || [ X${config_Post_CesmepComparison} = X ] ) ; then 
     219      config_Post_CesmepComparison=standard_comparison 
     220  fi 
     221  if ( [ X${config_Post_CesmepCode} = XNONE ] || [ X${config_Post_CesmepCode} = X ] ) ; then 
     222      config_Post_CesmepCode=/ccc/work/cont003/gen0826/senesis/cesmep 
    181223  fi 
    182224 
  • branches/libIGCM_CESMEP/libIGCM_post/libIGCM_post.ksh

    r1396 r1554  
    2929  TimeSeriesFrequency=false 
    3030  SeasonalFrequency=false 
     31  CesmepAtEnd=false 
    3132  unset list_post 
    3233  # 
     
    108109    fi 
    109110  fi 
     111 
     112  if ( [ ${SimulationLengthInDays} -ge ${ExperienceLengthInDays} ] && [ X${config_Post_Cesmep} = XAtEnd ] ) ; then 
     113      CesmepAtEnd=true 
     114  fi 
     115   
     116   
    110117  IGCM_debug_PopStack "IGCM_post_Configure" 
    111118} 
     
    197204            echo "export RESOL_SBG=${RESOL_SBG}                            " >> ${FunctionPath} 
    198205            echo "export listVarEnv=${listVarEnv}                          " >> ${FunctionPath} 
     206            echo "export PostCesmep=${config_Post_Cesmep}                  " >> ${FunctionPath} 
    199207            echo "export Script_Post_Output=${Script_Post_Output}          " >> ${FunctionPath} 
    200208#           if [ X${MASTER} = Xtitane ] ; then 
     
    234242                    export RESOL_SRF=${RESOL_SRF} 
    235243                    export RESOL_SBG=${RESOL_SBG} 
     244                    export PostCesmep=${config_Post_Cesmep} 
    236245                    export listVarEnv=${listVarEnv} 
    237246                    export Script_Post_Output=${Script_Post_Output} 
     
    315324              echo "export RESOL_SBG=${RESOL_SBG}                            " >> ${FunctionPath} 
    316325              echo "export listVarEnv=${listVarEnv}                          " >> ${FunctionPath} 
     326              echo "export PostCesmep=${config_Post_Cesmep}                  " >> ${FunctionPath} 
    317327              echo "export Script_Post_Output=${Script_Post_Output}          " >> ${FunctionPath} 
    318328#             if [ X${MASTER} = Xtitane ] ; then 
     
    353363                        export RESOL_SBG=${RESOL_SBG} 
    354364                        export listVarEnv=${listVarEnv} 
     365                        export PostCesmep=${config_Post_Cesmep} 
    355366                        export Script_Post_Output=${Script_Post_Output} 
    356367                        . ${libIGCM_POST}/libIGCM_debug/libIGCM_debug.ksh 
     
    415426      echo "export RESOL_SBG=${RESOL_SBG}                            " >> ${FunctionPath} 
    416427      echo "export listVarEnv=${listVarEnv}                          " >> ${FunctionPath} 
     428      echo "export PostCesmep=${config_Post_Cesmep}                  " >> ${FunctionPath} 
    417429      echo "export Script_Post_Output=${Script_Post_Output}          " >> ${FunctionPath} 
    418430#     if [ X${MASTER} = Xtitane ] ; then 
     
    448460            export RESOL_SBG=${RESOL_SBG} 
    449461            export listVarEnv=${listVarEnv} 
     462            export PostCesmep=${config_Post_Cesmep} 
    450463            export Script_Post_Output=${Script_Post_Output} 
    451464            . ${libIGCM_POST}/libIGCM_debug/libIGCM_debug.ksh 
     
    499512    export StandAlone=false 
    500513    export listVarEnv=${listVarEnv} 
     514    export PostCesmep=${config_Post_Cesmep} 
    501515    export Script_Post_Output=${Script_Post_Output} 
    502516    . ${libIGCM_POST}/libIGCM_debug/libIGCM_debug.ksh 
     
    529543      export StandAlone=false 
    530544      export listVarEnv=${listVarEnv} 
     545      export PostCesmep=${config_Post_Cesmep} 
    531546      export Script_Post_Output=${Script_Post_Output} 
    532547      . ${libIGCM_POST}/libIGCM_debug/libIGCM_debug.ksh 
     
    560575      echo "export StandAlone=false                        " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 
    561576      echo "export listVarEnv=${listVarEnv}                " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 
     577      echo "export PostCesmep=${config_Post_Cesmep}        " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 
    562578      echo "export Script_Post_Output=${Script_Post_Output}" >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 
    563579      echo "export script=${script}                        " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 
     
    590606        export StandAlone=false 
    591607        export listVarEnv=${listVarEnv} 
     608        export PostCesmep=${config_Post_Cesmep} 
    592609        export Script_Post_Output=${Script_Post_Output} 
    593610        . ${libIGCM_POST}/libIGCM_debug/libIGCM_debug.ksh 
     
    645662      export RESOL_SBG=${RESOL_SBG} 
    646663      export listVarEnv=${listVarEnv} 
     664      export PostCesmep=${config_Post_Cesmep} 
    647665      export Script_Post_Output=${Script_Post_Output} 
    648666      . ${libIGCM_POST}/libIGCM_debug/libIGCM_debug.ksh 
     
    655673EOF 
    656674  fi 
     675 
     676  #========== CESMEP POST-PROCESSING at job end  ========# 
     677 
     678  IGCM_debug_Print 1 "Possibly launching C-ESM-EP run script" 
     679  if [ ${CesmepAtEnd} = true ] ; then 
     680      # 
     681      IGCM_debug_Print 1 "Launching C-ESM-EP run script" 
     682      ${SUBMIT_DIR}/cesmep_lite/libIGCM_post.sh $DateBegin $PeriodDateEnd 
     683  fi 
     684 
     685   
    657686  IGCM_debug_PopStack "IGCM_post_Submit" 
    658687} 
     
    790819  # - from libIGCM (config_UserChoices_PeriodLength frequency * CumulPeriod) and 
    791820  # - post-processing compatible frequency (*Y, *M, *D, *y, *m, *d) 
    792   # --> turn on post-processing submission when their modulo is zero 
     821  # --> turn on post-processing submission when their modulo is zero by  
     822  # setting env variable post_freq 
    793823  # Input parameter are the name of the variable, not the frequency value itself 
    794824  # example 
Note: See TracChangeset for help on using the changeset viewer.