Ignore:
Timestamp:
02/10/20 15:10:20 (4 years ago)
Author:
jgipsl
Message:

Homogenization of v6.2 and v7. Main difference in compilation:

  • option -optmode has been removed. Instead use one of following: -prod, -dev or -debug
  • the name of the executable now contains the optimization mode used while compiling. In config.card, if compiling with -dev or -debug, OptMode? in the beginning of config.card must be changed accordingly.
Location:
CONFIG/UNIFORM/v7/ICOLMDZOR_v7/GENERAL/DRIVER
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CONFIG/UNIFORM/v7/ICOLMDZOR_v7/GENERAL/DRIVER/lmdz.driver

    r4604 r4921  
    99    if [ X${config_ListOfComponents_ICO} = X ] ; then 
    1010 
    11         [ -f ${SUBMIT_DIR}/../.resol ] && eval $(grep RESOL_ATM_3D ${SUBMIT_DIR}/../.resol) || RESOL_ATM_3D=96x95x39 
    12  
     11        # Read the resolution from the variables ResolAtm set in config.card UserChoices section or from .resol file 
     12        if [ X$ResolAtm != X ] ; then 
     13            # ResolAtm is set in config.card 
     14            RESOL_ATM_3D=${ResolAtm} 
     15        elif [ -f ${SUBMIT_DIR}/../.resol ] ; then 
     16            # ResolAtm was not set in config.card, try to read .resol file 
     17            eval $(grep RESOL_ATM_3D ${SUBMIT_DIR}/../.resol) || RESOL_ATM_3D=96x95x39 
     18        else 
     19            IGCM_debug_Exit "ResolAtm is not set in config.card and the .resol file does not exist." 
     20            IGCM_debug_Verif_Exit 
     21        fi 
     22         
    1323        RESOL_ATM_Z=$( echo ${RESOL_ATM_3D} | awk "-Fx" '{print $3}' ) 
    1424        RESOL_ATM_X=$( echo ${RESOL_ATM_3D} | awk "-Fx" '{print $1}' ) 
    1525        RESOL_ATM_Y=$( echo ${RESOL_ATM_3D} | awk "-Fx" '{print $2}' ) 
    1626        RESOL_ATM_XY="${RESOL_ATM_X}x${RESOL_ATM_Y}" 
    17          
     27        RESOL_ATM=LMD${RESOL_ATM_X}${RESOL_ATM_Y} 
     28 
     29        IGCM_debug_Print 1 "The atomsopheric resolution is ${RESOL_ATM_3D} "  
    1830    else 
    1931        RESOL_ATM_Z=${dynamico_UserChoices_RESOL_ATM_Z} 
     
    190202 
    191203 
    192     ## Modifiy  
     204    ## Activate diagnostic output files and set output_level for each file 
    193205 
    194206    # histmth 
     
    372384        echo "Activate coupling to INCA, set type_trac=inca in run.def" 
    373385        IGCM_comp_modifyDefFile blocker run.def type_trac inca 
     386        IGCM_comp_modifyDefFile blocker run.def iflag_phytrac 1 
    374387    elif [ X${config_ListOfComponents_CHM} = Xreprobus ] ; then 
    375388        echo "Activate coupling to REPROBUS, set type_trac=repr in run.def" 
    376389        IGCM_comp_modifyDefFile blocker run.def type_trac repr 
    377390        IGCM_comp_modifyDefFile blocker run.def config_inca none 
     391        IGCM_comp_modifyDefFile blocker run.def iflag_phytrac 1 
     392    elif [ X${config_UserChoices_ConfigType} = XESMCO2 ] ; then  
     393        echo "ESM config, set type_trac=co2i in run.def" 
     394        IGCM_comp_modifyDefFile blocker run.def type_trac co2i 
     395        IGCM_comp_modifyDefFile blocker run.def config_inca none 
     396        IGCM_comp_modifyDefFile blocker run.def iflag_phytrac 1   
     397    elif [ X${lmdz_UserChoices_LMDZ_strataero} = Xy ] ; then 
     398        echo "No coupling to chemistry model but it is a LMDZ STRATAER configuration, set type_trac=coag in run.def" 
     399        IGCM_comp_modifyDefFile blocker run.def type_trac coag 
     400        IGCM_comp_modifyDefFile blocker run.def config_inca none 
     401        IGCM_comp_modifyDefFile blocker run.def iflag_phytrac 1   
    378402    else 
    379403        echo "No coupling to chemistry model, set type_trac=lmdz in run.def" 
    380404        IGCM_comp_modifyDefFile blocker run.def type_trac lmdz 
    381405        IGCM_comp_modifyDefFile blocker run.def config_inca none 
    382     fi 
    383  
    384  
    385     # run.def : Activate the call to phytrac  
    386     if [ ! X${lmdz_UserChoices_iflag_phytrac} = X ]; then  
    387         IGCM_comp_modifyDefFile nonblocker run.def iflag_phytrac ${lmdz_UserChoices_iflag_phytrac} 
    388     else 
    389         IGCM_comp_modifyDefFile nonblocker run.def iflag_phytrac 0 
     406        IGCM_comp_modifyDefFile blocker run.def iflag_phytrac 0 
     407    fi 
     408 
     409    # run.def : Activate the new calving  
     410    if [ ! X${lmdz_UserChoices_cpl_old_calving} = X ]; then  
     411        IGCM_comp_modifyDefFile nonblocker run.def cpl_old_calving ${lmdz_UserChoices_cpl_old_calving} 
     412    else 
     413        IGCM_comp_modifyDefFile nonblocker run.def cpl_old_calving y 
    390414    fi  
    391415 
     
    395419    else 
    396420        IGCM_comp_modifyDefFile nonblocker physiq.def ok_bug_cv_trac  n 
     421    fi  
     422 
     423    # config.def : Activate aerosol strato  
     424    if [ ! X${lmdz_UserChoices_flag_aerosol_strat} = X ]; then  
     425        IGCM_comp_modifyDefFile nonblocker config.def flag_aerosol_strat ${lmdz_UserChoices_flag_aerosol_strat} 
     426    else 
     427        IGCM_comp_modifyDefFile nonblocker config.def flag_aerosol_strat DEFAULT 
    397428    fi  
    398429 
     
    462493        IGCM_comp_modifyDefFile nonblocker config.def pmagic DEFAULT 
    463494    fi  
     495 
     496    if [ X${config_UserChoices_ConfigType} = XESMCO2 ] ; then 
     497        # Set carbon cycle parameters according to parmeters in lmdz.card  
     498        IGCM_comp_modifyDefFile blocker config.def level_coupling_esm 2  
     499        IGCM_comp_modifyDefFile blocker config.def carbon_cycle_cpl ${lmdz_UserChoices_carbon_cycle_cpl}  
     500        IGCM_comp_modifyDefFile blocker config.def carbon_cycle_tr ${lmdz_UserChoices_carbon_cycle_tr} 
     501        IGCM_comp_modifyDefFile blocker config.def carbon_cycle_rad ${lmdz_UserChoices_carbon_cycle_rad} 
     502    else 
     503        # Take default value set in config.def 
     504        IGCM_comp_modifyDefFile nonblocker config.def level_coupling_esm DEFAULT 
     505        IGCM_comp_modifyDefFile nonblocker config.def carbon_cycle_cpl DEFAULT  
     506        IGCM_comp_modifyDefFile nonblocker config.def carbon_cycle_tr DEFAULT 
     507        IGCM_comp_modifyDefFile nonblocker config.def carbon_cycle_rad DEFAULT 
     508    fi 
     509 
     510    # config.def : Modify parameter ok_volcan if ok_volcan=y or LMDZ_strataero=y in lmdz.card 
     511    # Note: ok_volcan is a flag allowing a double-call with/without natural forcing (instead of with/without anthro forcing). 
     512    if [ ! X${lmdz_UserChoices_ok_volcan} = X ] || [ X${lmdz_UserChoices_LMDZ_strataero} = Xy ] ; then 
     513        IGCM_comp_modifyDefFile nonblocker config.def ok_volcan ${lmdz_UserChoices_ok_volcan} 
     514    else 
     515        # Take default value set in config.def 
     516        IGCM_comp_modifyDefFile nonblocker config.def ok_volcan DEFAULT 
     517    fi 
     518 
    464519 
    465520    # physiq.def : Modify parameter tau_gl if it is set in lmdz.card 
     
    552607 
    553608 
    554     # Set interpolated output grid depending on resoultion 
    555     if [ ${RESOL_NBP} == 40  ] ; then 
    556        valuei=144 
    557        valuej=143 
    558     elif [ ${RESOL_NBP} == 80  ] ; then 
    559        valuei=360 
    560        valuej=180 
    561     elif [ ${RESOL_NBP} == 160  ] ; then 
    562        valuei=720 
    563        valuej=360 
    564     else 
    565       IGCM_debug_Exit "RESOL_NBP=${RESOL_NBP} is not yet implemented in drivers" 
    566       IGCM_debug_Verif_Exit 
    567     fi 
    568  
    569     IGCM_debug_Print 1 "Modify output grid parameters for current resolution in context_lmdz.xml" 
    570     cp context_lmdz.xml context_lmdz.xml.init 
    571     sed -e "s/ni_glo.*=.*\"144\"/ni_glo=\"${valuei}\"/" \ 
    572         -e "s/nj_glo.*=.*\"143\"/nj_glo=\"${valuej}\"/" \ 
    573         context_lmdz.xml.init > context_lmdz.xml 
     609    # Set interpolated output grid depending on resoultion, only if ICO component is set in config.card 
     610    if [ ! "X${config_ListOfComponents_ICO}" = "X" ] ; then    
     611        if [ ${RESOL_NBP} == 40  ] ; then 
     612            valuei=144 
     613            valuej=143 
     614        elif [ ${RESOL_NBP} == 80  ] ; then 
     615            valuei=360 
     616            valuej=180 
     617        elif [ ${RESOL_NBP} == 160  ] ; then 
     618            valuei=720 
     619            valuej=360 
     620        else 
     621            IGCM_debug_Exit "RESOL_NBP=${RESOL_NBP} is not yet implemented in drivers" 
     622            IGCM_debug_Verif_Exit 
     623        fi 
     624 
     625        IGCM_debug_Print 1 "Modify output grid parameters for current resolution in context_lmdz.xml" 
     626        cp context_lmdz.xml context_lmdz.xml.init 
     627        sed -e "s/ni_glo.*=.*\"144\"/ni_glo=\"${valuei}\"/" \ 
     628            -e "s/nj_glo.*=.*\"143\"/nj_glo=\"${valuej}\"/" \ 
     629            context_lmdz.xml.init > context_lmdz.xml 
     630    fi 
    574631 
    575632 
     
    582639    IGCM_debug_PushStack "ATM_Finalize" 
    583640 
     641    IGCM_debug_Print 1 "FINALIZE ATM !" 
     642 
    584643    IGCM_debug_PopStack "ATM_Finalize" 
    585644} 
  • CONFIG/UNIFORM/v7/ICOLMDZOR_v7/GENERAL/DRIVER/orchidee.driver

    r4379 r4921  
    182182 
    183183 
    184  
    185     # Set interpolated output grid depending on resoultion 
    186     if [ ${RESOL_NBP} == 40  ] ; then 
    187        valuei=144 
    188        valuej=143 
    189     elif [ ${RESOL_NBP} == 80  ] ; then 
    190        valuei=360 
    191        valuej=180 
    192     elif [ ${RESOL_NBP} == 160  ] ; then 
    193        valuei=720 
    194        valuej=360 
    195     else 
    196       IGCM_debug_Exit "RESOL_NBP=${RESOL_NBP} is not yet implemented in drivers" 
    197       IGCM_debug_Verif_Exit 
    198     fi 
    199  
    200     IGCM_debug_Print 1 "Modify output grid parameters for current resolution in context_orchidee.xml" 
    201     cp context_orchidee.xml context_orchidee.xml.init 
    202     sed -e "s/ni_glo.*=.*\"144\"/ni_glo=\"${valuei}\"/" \ 
    203         -e "s/nj_glo.*=.*\"143\"/nj_glo=\"${valuej}\"/" \ 
    204         context_orchidee.xml.init > context_orchidee.xml 
    205  
     184    # Set interpolated output grid depending on resoultion, only if ICO component is set in config.card 
     185    if [ ! "X${config_ListOfComponents_ICO}" = "X" ] ; then    
     186        if [ ${RESOL_NBP} == 40  ] ; then 
     187            valuei=144 
     188            valuej=143 
     189        elif [ ${RESOL_NBP} == 80  ] ; then 
     190            valuei=360 
     191            valuej=180 
     192        elif [ ${RESOL_NBP} == 160  ] ; then 
     193            valuei=720 
     194            valuej=360 
     195        else 
     196            IGCM_debug_Exit "RESOL_NBP=${RESOL_NBP} is not yet implemented in drivers" 
     197            IGCM_debug_Verif_Exit 
     198        fi 
     199         
     200        IGCM_debug_Print 1 "Modify output grid parameters for current resolution in context_orchidee.xml" 
     201        cp context_orchidee.xml context_orchidee.xml.init 
     202        sed -e "s/ni_glo.*=.*\"144\"/ni_glo=\"${valuei}\"/" \ 
     203            -e "s/nj_glo.*=.*\"143\"/nj_glo=\"${valuej}\"/" \ 
     204            context_orchidee.xml.init > context_orchidee.xml 
     205         
     206    fi 
     207     
    206208    IGCM_debug_PopStack "SRF_Update" 
    207209} 
Note: See TracChangeset for help on using the changeset viewer.