- Timestamp:
- 02/14/19 15:35:36 (5 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
CONFIG/UNIFORM/v7/ICOLMDZOR_v7/GENERAL/DRIVER/dynamico.driver
r4280 r4281 1 1 #!/bin/ksh 2 2 #----------------------------------------------------------------- 3 function ATM_Initialize3 function ICO_Initialize 4 4 { 5 IGCM_debug_PushStack " ATM_Initialize"5 IGCM_debug_PushStack "ICO_Initialize" 6 6 7 ##- Horizontal resolution read from dynamic olmdz.card8 if [ ! X${dynamico lmdz_UserChoices_RESOL_NBP} = X ] ; then9 RESOL_NBP=${dynamico lmdz_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} 10 10 else 11 11 # Set default resolution … … 13 13 fi 14 14 15 ##- Horizontal resolution read from dynamico lmdz.card16 if [ ! X${dynamico lmdz_UserChoices_RESOL_LLM} = X ] ; then17 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} 18 18 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 21 22 fi 22 23 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" 34 25 } 35 26 36 27 #----------------------------------------------------------------- 37 function ATM_Update28 function ICO_Update 38 29 { 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" 62 31 63 32 IGCM_comp_modifyDefFile blocker run_icosa.def run_length $(( ${PeriodLengthInDays} * 86400 )) … … 70 39 IGCM_debug_Print 1 "Maximum nubmer of MPI for resolution nbp=${RESOL_NBP} is $(( ${RESOL_NBP} * ${RESOL_NBP} / 10 ))" 71 40 else 72 IGCM_debug_Print 1 "nbp=${RESOL_NBP} is set in dynamico lmdz.card"73 IGCM_debug_Exit "This resolution has not been prepared in dynamico lmdz.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" 74 43 IGCM_debug_Verif_Exit 75 44 fi 76 45 77 if [ X${dynamicolmdz_UserChoices_Aquaplanet} == Xy ] ; then78 IGCM_comp_modifyDefFile nonblocker earth_const.def solarlong0 1000.079 IGCM_comp_modifyDefFile nonblocker config.def R_ecc 080 IGCM_comp_modifyDefFile nonblocker config.def read_climoz -181 IGCM_comp_modifyDefFile nonblocker run_icosa.def etat0 held_suarez82 else83 IGCM_comp_modifyDefFile nonblocker earth_const.def solarlong0 -9999.99984 IGCM_comp_modifyDefFile nonblocker config.def R_ecc 0.01671585 IGCM_comp_modifyDefFile nonblocker config.def read_climoz 186 # IGCM_comp_modifyDefFile nonblocker run_icosa.def etat0 database87 IGCM_comp_modifyDefFile nonblocker run_icosa.def etat0 start_file88 fi89 46 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 93 48 # In iodef.xml add on the next line after "COMPONENT CONTEXT" 94 echo '<context id="LMDZ" src="./context_lmdz.xml"/>' > add.tmp95 49 echo '<context id="icosagcm" src="./context_dynamico.xml"/>' >> add.tmp 96 50 97 # Add inclusion of file context_input_lmdz.xml if this file exists98 if [ -f context_input_lmdz.xml ] ; then99 echo '<context id="LMDZ" src="./context_input_lmdz.xml"/>' >> add.tmp100 fi101 51 # Add inclusion of file context_input_dynamico.xml if this file exists 102 52 if [ -f context_input_dynamico.xml ] ; then … … 104 54 fi 105 55 106 107 56 # Include xml files for output configuration if running with workflow CMIP6 108 57 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 111 62 fi 112 63 cp iodef.xml iodef.xml.tmp … … 116 67 # Add a Long Name as global attribute in output files if LongName is set in config.card 117 68 if [ ! "X${config_UserChoices_LongName}" = "X" ] ; then 118 listfile=$(ls file_def* lmdz.xml)69 listfile=$(ls file_def*dynamico.xml) 119 70 echo "<variable id=\"LongName\" type=\"string\">${config_UserChoices_LongName}</variable>" > add.tmp 120 71 for file in ${listfile} ; do … … 127 78 fi 128 79 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" 181 81 } 182 82 183 83 #----------------------------------- 184 function ATM_Finalize84 function ICO_Finalize 185 85 { 186 IGCM_debug_PushStack " ATM_Finalize"86 IGCM_debug_PushStack "ICO_Finalize" 187 87 188 IGCM_debug_PopStack " ATM_Finalize"88 IGCM_debug_PopStack "ICO_Finalize" 189 89 } 190 90
Note: See TracChangeset
for help on using the changeset viewer.