Ignore:
Timestamp:
02/14/19 15:35:36 (5 years ago)
Author:
jgipsl
Message:

Update config:

  • Before the component ATM was used for DYNAMCIO-LMDZphysics together. Now they have been seperated in 2 components: ICO for the icosahedral part which is here DYNAMCIO. ATM is kept for LMDZ phyiscs. Note that when running without DYNMACIO, the component ICO is not present and the component ATM represents both LMDZ dynamics and physics.
  • lmdz.driver and lmdz.card are copied from LMDZOR_v6.2. Small changes are done to work with or without DYNAMCIO.
  • .def files for LMDZ are copied from LMDZOR_v6.2
Location:
CONFIG/UNIFORM/v7/ICOLMDZOR_v7/GENERAL/DRIVER
Files:
1 edited
1 copied
1 moved

Legend:

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

    r4280 r4281  
    11#!/bin/ksh 
    22#----------------------------------------------------------------- 
    3 function ATM_Initialize 
     3function ICO_Initialize 
    44{ 
    5     IGCM_debug_PushStack "ATM_Initialize" 
     5    IGCM_debug_PushStack "ICO_Initialize" 
    66 
    7     ##- Horizontal resolution read from dynamicolmdz.card 
    8     if [ ! X${dynamicolmdz_UserChoices_RESOL_NBP} = X ] ; then 
    9         RESOL_NBP=${dynamicolmdz_UserChoices_RESOL_NBP} 
     7    ##- Horizontal resolution read from dynamic.card 
     8    if [ ! X${dynamico_UserChoices_RESOL_NBP} = X ] ; then 
     9        RESOL_NBP=${dynamico_UserChoices_RESOL_NBP} 
    1010    else 
    1111        # Set default resolution 
     
    1313    fi 
    1414 
    15     ##- Horizontal resolution read from dynamicolmdz.card 
    16     if [ ! X${dynamicolmdz_UserChoices_RESOL_LLM} = X ] ; then 
    17         RESOL_LLM=${dynamicolmdz_UserChoices_RESOL_LLM} 
     15    ##- Horizontal resolution read from dynamico.card 
     16    if [ ! X${dynamico_UserChoices_RESOL_ATM_Z} = X ] ; then 
     17        RESOL_ATM_Z=${dynamico_UserChoices_RESOL_ATM_Z} 
    1818    else 
    19         # Set default resolution 
    20         RESOL_LLM=79 
     19        # RESOL_ATM_Z is not set in dynamico.card but this is needed 
     20        IGCM_debug_Exit "RESOL_ATM_Z must be set in dynamico.card UserSection" 
     21        IGCM_debug_Verif_Exit 
    2122    fi 
    2223 
    23     ##- LMDZ physics version 
    24     ##  Read LMDZ_Physics option in lmdz.card, if not present take default value NPv6.1.3  
    25     if [ ! X${dynamicolmdz_UserChoices_LMDZ_Physics} = X ] ; then 
    26         LMDZ_Physics=${dynamicolmdz_UserChoices_LMDZ_Physics} 
    27     else 
    28         LMDZ_Physics=NPv6.0.11 
    29     fi 
    30     echo LMDZ physics version : ${LMDZ_Physics} 
    31  
    32  
    33     IGCM_debug_PopStack "ATM_Initialize" 
     24    IGCM_debug_PopStack "ICO_Initialize" 
    3425} 
    3526 
    3627#----------------------------------------------------------------- 
    37 function ATM_Update 
     28function ICO_Update 
    3829{ 
    39     IGCM_debug_PushStack "ATM_Update" 
    40  
    41     ##-- Remise ou non a zero de la date initiale de LMDZ pour le fichier run.def 
    42     if [ ${CumulPeriod} -eq 1 ] ; then 
    43     IGCM_comp_modifyDefFile blocker run.def raz_date  1 
    44     else 
    45     IGCM_comp_modifyDefFile blocker run.def raz_date  0 
    46     fi 
    47  
    48     ##-- Calendar type for LMDZ and create_etat0_limit 
    49     case ${config_UserChoices_CalendarType} in 
    50         leap|gregorian) 
    51         IGCM_comp_modifyDefFile blocker run.def calend  gregorian ;; 
    52         noleap) 
    53         IGCM_comp_modifyDefFile blocker run.def calend  earth_365d ;; 
    54         360d) 
    55         IGCM_comp_modifyDefFile blocker run.def calend  earth_360d ;; 
    56         *) 
    57         IGCM_comp_modifyDefFile blocker run.def calend  earth_360d ;; 
    58     esac 
    59      
    60     IGCM_comp_modifyDefFile blocker run.def dayref    ${InitDay} 
    61     IGCM_comp_modifyDefFile blocker run.def anneeref ${InitYear} 
     30    IGCM_debug_PushStack "ICO_Update" 
    6231 
    6332    IGCM_comp_modifyDefFile blocker run_icosa.def run_length $(( ${PeriodLengthInDays} * 86400 )) 
     
    7039      IGCM_debug_Print 1 "Maximum nubmer of MPI for resolution nbp=${RESOL_NBP} is $(( ${RESOL_NBP} * ${RESOL_NBP} / 10 ))" 
    7140    else 
    72       IGCM_debug_Print 1 "nbp=${RESOL_NBP} is set in dynamicolmdz.card" 
    73       IGCM_debug_Exit "This resolution has not been prepared in dynamicolmdz.driver"  
     41      IGCM_debug_Print 1 "nbp=${RESOL_NBP} is set in dynamico.card" 
     42      IGCM_debug_Exit "This resolution has not been prepared in dynamico.driver"  
    7443      IGCM_debug_Verif_Exit 
    7544    fi 
    7645 
    77     if [ X${dynamicolmdz_UserChoices_Aquaplanet} == Xy ] ; then 
    78       IGCM_comp_modifyDefFile nonblocker earth_const.def solarlong0   1000.0 
    79       IGCM_comp_modifyDefFile nonblocker config.def      R_ecc        0 
    80       IGCM_comp_modifyDefFile nonblocker config.def      read_climoz  -1 
    81       IGCM_comp_modifyDefFile nonblocker run_icosa.def   etat0        held_suarez 
    82     else 
    83       IGCM_comp_modifyDefFile nonblocker earth_const.def solarlong0   -9999.999 
    84       IGCM_comp_modifyDefFile nonblocker config.def      R_ecc        0.016715 
    85       IGCM_comp_modifyDefFile nonblocker config.def      read_climoz  1 
    86 #      IGCM_comp_modifyDefFile nonblocker run_icosa.def   etat0        database 
    87       IGCM_comp_modifyDefFile nonblocker run_icosa.def   etat0        start_file  
    88     fi 
    8946 
    90  
    91  
    92     # Add include of context xml files for LMDZ and DYNAMICO in iodef.xml 
     47    # Add include of context xml files for DYNAMICO in iodef.xml 
    9348    # In iodef.xml add on the next line after "COMPONENT CONTEXT" 
    94     echo '<context id="LMDZ" src="./context_lmdz.xml"/>' > add.tmp 
    9549    echo '<context id="icosagcm" src="./context_dynamico.xml"/>' >> add.tmp 
    9650 
    97     # Add inclusion of file context_input_lmdz.xml if this file exists 
    98     if [ -f context_input_lmdz.xml ] ; then 
    99         echo '<context id="LMDZ" src="./context_input_lmdz.xml"/>' >> add.tmp 
    100     fi 
    10151    # Add inclusion of file context_input_dynamico.xml if this file exists 
    10252    if [ -f context_input_dynamico.xml ] ; then 
     
    10454    fi 
    10555 
    106  
    10756    # Include xml files for output configuration if running with workflow CMIP6 
    10857    if [ X"$( echo ${config_UserChoices_ExpType} | grep CMIP6 )" != "X" ] ; then 
    109       echo '<context id="LMDZ" src="./ping_lmdz.xml"/>' >> add.tmp 
    110       echo '<context id="LMDZ" src="./dr2xml_lmdz.xml"/>' >> add.tmp 
     58      if [ -f ping_dynamico.xml ] ; then 
     59        echo '<context id="icosagcm" src="./ping_dynamico.xml"/>' >> add.tmp 
     60        echo '<context id="icosagcm" src="./dr2xml_dynamico.xml"/>' >> add.tmp 
     61      fi 
    11162    fi 
    11263    cp iodef.xml iodef.xml.tmp 
     
    11667    # Add a Long Name as global attribute in output files if LongName is set in config.card 
    11768    if [ ! "X${config_UserChoices_LongName}" = "X" ] ; then 
    118       listfile=$(ls file_def*lmdz.xml) 
     69      listfile=$(ls file_def*dynamico.xml) 
    11970      echo "<variable id=\"LongName\" type=\"string\">${config_UserChoices_LongName}</variable>" > add.tmp 
    12071      for file in ${listfile} ; do 
     
    12778    fi 
    12879 
    129     # Do modifications for LMDZ output according to settings in dynamicolmdz.card 
    130     if [ ! X${dynamicolmdz_UserChoices_output_histmth_lmdz} = X ]; then  
    131         IGCM_comp_modifyXmlFile nonblocker file_def_histmth_lmdz.xml histmth enabled ${dynamicolmdz_UserChoices_output_histmth_lmdz} 
    132     else 
    133         IGCM_comp_modifyXmlFile nonblocker file_def_histmth_lmdz.xml histmth enabled FALSE 
    134     fi 
    135  
    136     if [ ! X${dynamicolmdz_UserChoices_output_histday_lmdz} = X ]; then  
    137         IGCM_comp_modifyXmlFile nonblocker file_def_histday_lmdz.xml histday enabled ${dynamicolmdz_UserChoices_output_histday_lmdz} 
    138     else 
    139         IGCM_comp_modifyXmlFile nonblocker file_def_histday_lmdz.xml histday enabled FALSE 
    140     fi 
    141  
    142     if [ ! X${dynamicolmdz_UserChoices_output_histhf_lmdz} = X ]; then  
    143         IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf enabled ${dynamicolmdz_UserChoices_output_histhf_lmdz} 
    144     else 
    145         IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf enabled FALSE 
    146     fi 
    147  
    148     if [ ! X${dynamicolmdz_UserChoices_output_histmthNMC_lmdz} = X ]; then  
    149         IGCM_comp_modifyXmlFile nonblocker file_def_histmthNMC_lmdz.xml histmthNMC enabled ${dynamicolmdz_UserChoices_output_histmthNMC_lmdz} 
    150     else 
    151         IGCM_comp_modifyXmlFile nonblocker file_def_histmthNMC_lmdz.xml histmthNMC enabled FALSE 
    152     fi 
    153  
    154     if [ ! X${dynamicolmdz_UserChoices_output_histdayNMC_lmdz} = X ]; then  
    155         IGCM_comp_modifyXmlFile nonblocker file_def_histdayNMC_lmdz.xml histdayNMC enabled ${dynamicolmdz_UserChoices_output_histdayNMC_lmdz} 
    156     else 
    157         IGCM_comp_modifyXmlFile nonblocker file_def_histdayNMC_lmdz.xml histdayNMC enabled FALSE 
    158     fi 
    159  
    160     if [ ! X${dynamicolmdz_UserChoices_output_histhfNMC_lmdz} = X ]; then  
    161         IGCM_comp_modifyXmlFile nonblocker file_def_histhfNMC_lmdz.xml histhfNMC enabled ${dynamicolmdz_UserChoices_output_histhfNMC_lmdz} 
    162     else 
    163         IGCM_comp_modifyXmlFile nonblocker file_def_histhfNMC_lmdz.xml histhfNMC enabled FALSE 
    164     fi 
    165  
    166     if [ ! X${dynamicolmdz_UserChoices_output_histstn_lmdz} = X ]; then  
    167         IGCM_comp_modifyXmlFile nonblocker file_def_histstn_lmdz.xml histstn enabled ${dynamicolmdz_UserChoices_output_histstn_lmdz} 
    168     else 
    169         IGCM_comp_modifyXmlFile nonblocker file_def_histstn_lmdz.xml histstn enabled FALSE 
    170     fi 
    171  
    172     if [ ! X${dynamicolmdz_UserChoices_output_histstrataer_lmdz} = X ]; then  
    173         IGCM_comp_modifyXmlFile nonblocker file_def_histstrataer_lmdz.xml histstrataer enabled ${dynamicolmdz_UserChoices_output_histstrataer_lmdz} 
    174     else 
    175         IGCM_comp_modifyXmlFile nonblocker file_def_histstrataer_lmdz.xml histstrataer enabled FALSE 
    176     fi 
    177  
    178  
    179  
    180     IGCM_debug_PopStack "ATM_Update" 
     80    IGCM_debug_PopStack "ICO_Update" 
    18181} 
    18282 
    18383#----------------------------------- 
    184 function ATM_Finalize 
     84function ICO_Finalize 
    18585{ 
    186     IGCM_debug_PushStack "ATM_Finalize" 
     86    IGCM_debug_PushStack "ICO_Finalize" 
    18787 
    188     IGCM_debug_PopStack "ATM_Finalize" 
     88    IGCM_debug_PopStack "ICO_Finalize" 
    18989} 
    19090 
  • CONFIG/UNIFORM/v7/ICOLMDZOR_v7/GENERAL/DRIVER/lmdz.driver

    r4280 r4281  
    55    IGCM_debug_PushStack "ATM_Initialize" 
    66 
    7     RESOL_ATM=$( echo $RESOL | awk "-Fx" '{print $2}' | awk "-F-" '{print $1}') 
    8  
    9     [ -f ${SUBMIT_DIR}/../.resol ] && eval $(grep RESOL_ATM_3D ${SUBMIT_DIR}/../.resol) || RESOL_ATM_3D=96x95x39 
    10  
    11     RESOL_ATM_Z=$( echo ${RESOL_ATM_3D} | awk "-Fx" '{print $3}' ) 
    12     RESOL_ATM_X=$( echo ${RESOL_ATM_3D} | awk "-Fx" '{print $1}' ) 
    13     RESOL_ATM_Y=$( echo ${RESOL_ATM_3D} | awk "-Fx" '{print $2}' ) 
    14     RESOL_ATM_XY="${RESOL_ATM_X}x${RESOL_ATM_Y}" 
     7 
     8    # Define the resolution only if the composant ICO for DYNAMICO is not set in config.card 
     9    if [ X${config_ListOfComponents_ICO} = X ] ; then 
     10 
     11        [ -f ${SUBMIT_DIR}/../.resol ] && eval $(grep RESOL_ATM_3D ${SUBMIT_DIR}/../.resol) || RESOL_ATM_3D=96x95x39 
     12 
     13        RESOL_ATM_Z=$( echo ${RESOL_ATM_3D} | awk "-Fx" '{print $3}' ) 
     14        RESOL_ATM_X=$( echo ${RESOL_ATM_3D} | awk "-Fx" '{print $1}' ) 
     15        RESOL_ATM_Y=$( echo ${RESOL_ATM_3D} | awk "-Fx" '{print $2}' ) 
     16        RESOL_ATM_XY="${RESOL_ATM_X}x${RESOL_ATM_Y}" 
     17         
     18    else 
     19        RESOL_ATM_Z=${dynamico_UserChoices_RESOL_ATM_Z} 
     20    fi 
    1521 
    1622    ##- LMDZ physics version 
     
    335341 
    336342    ##-- Remise ou non a zero de la date initiale de LMDZ pour le fichier run.def 
     343 
    337344    if [ ${CumulPeriod} -eq 1 ] ; then 
    338345        IGCM_comp_modifyDefFile blocker run.def raz_date  1 
     
    342349 
    343350    ##-- Calendar type for LMDZ and create_etat0_limit 
     351    #    calend is read from both LMDZ dynamics and physics parts of the model 
    344352    case ${config_UserChoices_CalendarType} in 
    345353        leap|gregorian) 
     
    353361    esac 
    354362 
    355     IGCM_comp_modifyDefFile blocker run.def dayref    ${InitDay} 
    356     IGCM_comp_modifyDefFile blocker run.def nday      ${PeriodLengthInDays} 
    357  
    358     # Set anneeref different for gcm and ce0l 
    359     # Test if executable create_etat0_limit is present and lmdz.x is not present 
    360     if [ -f create_etat0_limit* ] || [ -f ce0l* ] && [ ! -f lmdz.x ] ; then 
    361         # for case ce0l : always take current year 
    362         IGCM_comp_modifyDefFile blocker run.def anneeref ${year} 
    363  
    364         # Temporary, set use_filtre_fft=n because we now use dyn3d for ce0l version where fft is not implemented.  
    365         # In more recent versions of LMDZ, this will not be needed.  
    366         IGCM_comp_modifyDefFile force   run.def use_filtre_fft n 
    367     else 
    368         # for case gcm : take first year of simulation 
    369         IGCM_comp_modifyDefFile blocker run.def anneeref ${InitYear} 
     363 
     364    ## -- Modify more calendar related variables. These variables are only read by LMDZ dynamics part.  
     365    #     Set them to dummy if component ICO (DYNAMICO) is set in config.card. 
     366    if [ X${config_ListOfComponents_ICO} = X ] ; then 
     367        # Following variables are read by LMDZ dynamics  
     368        IGCM_comp_modifyDefFile blocker run.def dayref    ${InitDay} 
     369        IGCM_comp_modifyDefFile blocker run.def nday      ${PeriodLengthInDays} 
     370 
     371        # Set anneeref different for gcm and ce0l 
     372        # Test if executable create_etat0_limit is present and lmdz.x is not present 
     373        if [ -f create_etat0_limit* ] || [ -f ce0l* ] && [ ! -f lmdz.x ] ; then 
     374            # for case ce0l : always take current year 
     375            IGCM_comp_modifyDefFile blocker run.def anneeref ${year} 
     376             
     377            # Temporary, set use_filtre_fft=n because we now use dyn3d for ce0l version where fft is not implemented.  
     378            # In more recent versions of LMDZ, this will not be needed.  
     379            IGCM_comp_modifyDefFile force   run.def use_filtre_fft n 
     380        else 
     381            # for case gcm : take first year of simulation 
     382            IGCM_comp_modifyDefFile blocker run.def anneeref ${InitYear} 
     383        fi 
     384         
     385    else 
     386        # ICO is found in config.card which means that DYNMAICO is activated.  
     387        # Set these variables to DUMMY. They will not be read. 
     388        IGCM_comp_modifyDefFile blocker run.def dayref           DUMMY 
     389        IGCM_comp_modifyDefFile blocker run.def nday             DUMMY 
     390        IGCM_comp_modifyDefFile blocker run.def anneeref         DUMMY 
     391        IGCM_comp_modifyDefFile force   run.def use_filtre_fft   DUMMY 
    370392    fi 
    371393 
     
    501523 
    502524 
    503     ## Read ByPass_hgardfou_teta option in lmdz.card --> divide teta* by 2 if [ $ByPass_hgardfou_teta = 1 ] 
    504     ByPass_hgardfou_teta=${lmdz_UserChoices_ByPass_hgardfou_teta} 
    505     if [ X"${ByPass_hgardfou_teta}" = X"y" ] ; then 
    506         awk '{ if ($0 ~ /^teta.*=/) {split($0,a,"=") ; print a[1]"="a[2]/2"."} else print $0}' gcm.def > gcm.def.tmp 
    507         IGCM_sys_Mv gcm.def.tmp gcm.def 
    508         echo 
    509         IGCM_debug_Print 1 "ByPass_hgardfou_teta : ^teta*/2 in gcm.def" 
    510         echo 
    511         cat gcm.def 
    512         ByPass_hgardfou_teta=n 
    513         IGCM_card_WriteOption ${SUBMIT_DIR}/COMP/lmdz.card UserChoices ByPass_hgardfou_teta "${ByPass_hgardfou_teta}" 
    514     fi 
    515  
    516     ## Read ByPass_hgardfou_mats option in lmdz.card --> purmats=y 2 if [ $ByPass_hgardfou_mats = 1 ] 
    517     ByPass_hgardfou_mats=${lmdz_UserChoices_ByPass_hgardfou_mats} 
    518     if [ X"${ByPass_hgardfou_mats}" = X"y" ] ; then 
    519         sed -e "s/^purmats=.*/purmats=y/" gcm.def > gcm.def.tmp 
    520         IGCM_sys_Mv gcm.def.tmp gcm.def 
    521         echo 
    522         IGCM_debug_Print 1 "ByPass_hgardfou_mats : purmats=y in gcm.def" 
    523         echo 
    524         cat gcm.def 
    525         ByPass_hgardfou_mats=n 
    526         IGCM_card_WriteOption ${SUBMIT_DIR}/COMP/lmdz.card UserChoices ByPass_hgardfou_mats "${ByPass_hgardfou_mats}" 
    527     fi 
     525    # Specific ByPass option only used with LMDZ dynamcis (without DYNMAICO) 
     526    if [ X${config_ListOfComponents_ICO} = X ] ; then 
     527 
     528        ## Read ByPass_hgardfou_teta option in lmdz.card --> divide teta* by 2 if [ $ByPass_hgardfou_teta = 1 ] 
     529        ByPass_hgardfou_teta=${lmdz_UserChoices_ByPass_hgardfou_teta} 
     530        if [ X"${ByPass_hgardfou_teta}" = X"y" ] ; then 
     531            awk '{ if ($0 ~ /^teta.*=/) {split($0,a,"=") ; print a[1]"="a[2]/2"."} else print $0}' gcm.def > gcm.def.tmp 
     532            IGCM_sys_Mv gcm.def.tmp gcm.def 
     533            echo 
     534            IGCM_debug_Print 1 "ByPass_hgardfou_teta : ^teta*/2 in gcm.def" 
     535            echo 
     536            cat gcm.def 
     537            ByPass_hgardfou_teta=n 
     538            IGCM_card_WriteOption ${SUBMIT_DIR}/COMP/lmdz.card UserChoices ByPass_hgardfou_teta "${ByPass_hgardfou_teta}" 
     539        fi 
     540         
     541        ## Read ByPass_hgardfou_mats option in lmdz.card --> purmats=y 2 if [ $ByPass_hgardfou_mats = 1 ] 
     542        ByPass_hgardfou_mats=${lmdz_UserChoices_ByPass_hgardfou_mats} 
     543        if [ X"${ByPass_hgardfou_mats}" = X"y" ] ; then 
     544            sed -e "s/^purmats=.*/purmats=y/" gcm.def > gcm.def.tmp 
     545            IGCM_sys_Mv gcm.def.tmp gcm.def 
     546            echo 
     547            IGCM_debug_Print 1 "ByPass_hgardfou_mats : purmats=y in gcm.def" 
     548            echo 
     549            cat gcm.def 
     550            ByPass_hgardfou_mats=n 
     551            IGCM_card_WriteOption ${SUBMIT_DIR}/COMP/lmdz.card UserChoices ByPass_hgardfou_mats "${ByPass_hgardfou_mats}" 
     552        fi 
     553    fi 
     554 
    528555 
    529556    # Add include of LMDZ context in iodef.xml 
  • CONFIG/UNIFORM/v7/ICOLMDZOR_v7/GENERAL/DRIVER/xios.driver

    r4180 r4281  
    1616 
    1717    echo UPDATE IOS !!! 
    18 # Activate server mode 
    19     IGCM_comp_modifyXmlFile force iodef.xml using_server NONE true 
    2018 
    2119    if [ -f namcouple ] ; then 
Note: See TracChangeset for help on using the changeset viewer.