Changeset 3061 for CONFIG/UNIFORM/v6/LMDZORINCA_v6/GENERAL/DRIVER
- Timestamp:
- 12/15/16 10:58:34 (8 years ago)
- Location:
- CONFIG/UNIFORM/v6/LMDZORINCA_v6/GENERAL/DRIVER
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
CONFIG/UNIFORM/v6/LMDZORINCA_v6/GENERAL/DRIVER/inca.driver
r2833 r3061 111 111 fi 112 112 113 #inca.def : choose calcul interactif des diagnostiques flux chimique ou non 114 if [ ! X${inca_UserChoices_calcul_flux} = X ]; then 115 IGCM_comp_modifyDefFile nonblocker inca.def calcul_flux ${inca_UserChoices_calcul_flux} 116 else 117 IGCM_comp_modifyDefFile nonblocker inca.def calcul_flux n 118 fi 119 113 120 #inca.def : choose output library 114 121 if [ X${inca_UserChoices_XIOS} = Xy ] ; then … … 144 151 fi 145 152 146 # Long Name as global attribute(if LongName is not empty)153 # Add LongName as global attribute in XIOS output files (if LongName is not empty) 147 154 if [ ! "X${config_UserChoices_LongName}" = "X" ] ; then 148 155 listfile=$(ls file_def*inca.xml) -
CONFIG/UNIFORM/v6/LMDZORINCA_v6/GENERAL/DRIVER/lmdz.driver
r2954 r3061 277 277 278 278 279 ## gcm.def parameters :280 # Modification of variable iphysiq depending on the physics281 if [ X${LMDZ_Physics} = X"AP" ] ; then282 if [ ${RESOL_ATM_3D} = 96x95x39 ]; then283 value=10284 elif [ ${RESOL_ATM_3D} = 144x142x39 ]; then285 value=15286 else287 IGCM_debug_Print 1 "LMDZ_Physics=${LMDZ_Physics} has not been tested for the current resolution RESOL_ATM_3D=${RESOL_ATM_3D}. "288 IGCM_debug_Print 1 "iphysiq must be defined for the current combination of resolution and phyiscs package"289 IGCM_debug_Exit "You need to add a special case in lmdz.driver to handle the above combination."290 fi291 elif [ X${LMDZ_Physics} = X"NPv3.1" ] ; then292 if [ ${RESOL_ATM_3D} = 96x95x39 ] ; then293 value=5294 elif [ ${RESOL_ATM_3D} = 144x142x39 ] ; then295 value=5296 else297 IGCM_debug_Print 1 "LMDZ_Physics=${LMDZ_Physics} has not been tested for the current resolution RESOL_ATM_3D=${RESOL_ATM_3D}. "298 IGCM_debug_Print 1 "iphysiq must be defined for the current combination of resolution and phyiscs package"299 IGCM_debug_Exit "You need to add a special case in lmdz.driver to handle the above combination."300 fi301 elif [ X${LMDZ_Physics} = X"NPv3.2" ] ; then302 if [ ${RESOL_ATM_3D} = 96x95x39 ] ; then303 value=5304 elif [ ${RESOL_ATM_3D} = 144x142x39 ] ; then305 value=5306 elif [ ${RESOL_ATM_3D} = 128x118x39 ] ; then307 value=15308 else309 IGCM_debug_Print 1 "LMDZ_Physics=${LMDZ_Physics} has not been tested for the current resolution RESOL_ATM_3D=${RESOL_ATM_3D}. "310 IGCM_debug_Print 1 "iphysiq must be defined for the current combination of resolution and phyiscs package"311 IGCM_debug_Exit "You need to add a special case in lmdz.driver to handle the above combination."312 fi313 else314 # Take default value set in gcm.def315 value=DEFAULT316 fi317 IGCM_comp_modifyDefFile nonblocker gcm.def iphysiq $value318 319 279 320 280 ## run.def parameters -
CONFIG/UNIFORM/v6/LMDZORINCA_v6/GENERAL/DRIVER/orchidee.driver
r2907 r3061 1 1 #!/bin/ksh 2 # D- Driver du script pourORCHIDEE2 ## Driver for the component SRF corresponding to the sechiba part of ORCHIDEE 3 3 #----------------------------------------------------------------- 4 4 function SRF_Initialize … … 63 63 ## 2. Mangement of output and modifications of related xml files 64 64 65 # Set default values for sechiba1_enabled, sechiba1_freq and sechiba2_enabled. 65 # Set default values for sechiba1_enabled and sechiba1_freq. 66 # These variables are used only to modify file_def_orchidee.xml 66 67 sechiba1_enabled=.FALSE. 67 68 sechiba2_enabled=.FALSE. 68 69 sechiba1_freq=0s 70 sechiba2_freq=0s 69 71 70 # Get WriteFrenquecies from config.card for SECHIBA 71 # Note that it is only possible to have one HF and one other option. 72 # If more options are set in config.card only the latest will be used. 72 73 # Get WriteFrenquecy for SRF (SECHIBA) from config.card 74 # 1 or 2 frequencies can be set in WriteFrenquecy for SRF 75 # The first frequency will always be used for the sechiba_history file and the 76 # second frequency will be used for the sechiba_out_2.nc file. 77 # The files are activated only if its corresponding frequency is set in WriteFrequency 78 ifreq=0 73 79 for frequency in ${config_SRF_WriteFrequency} ; do 74 80 case ${frequency} in … … 76 82 NbYears=$( echo ${frequency} | awk -F '[yY]' '{print $1}' ) 77 83 NbDaysYear=$( IGCM_date_DaysInYear ${year} ) 78 sechiba1_enabled=.TRUE.79 sechiba1_freq=${NbYears}y ;;84 file_enabled=.TRUE. 85 file_freq=${NbYears}y ;; 80 86 *M|*m) 81 87 NbMonths=$( echo ${frequency} | awk -F '[mM]' '{print $1}' ) 82 sechiba1_enabled=.TRUE.83 sechiba1_freq=${NbMonths}mo ;;88 file_enabled=.TRUE. 89 file_freq=${NbMonths}mo ;; 84 90 *D|*d) 85 91 NbDays=$( echo ${frequency} | awk -F '[dD]' '{print $1}' ) 86 sechiba1_enabled=.TRUE.87 sechiba1_freq=${NbDays}d ;;92 file_enabled=.TRUE. 93 file_freq=${NbDays}d ;; 88 94 *s) 89 95 WriteInSeconds=$( echo ${frequency} | awk -F '[s]' '{print $1}' ) 90 sechiba1_enabled=.TRUE.91 sechiba1_freq=${WriteInSeconds}s ;;96 file_enabled=.TRUE. 97 file_freq=${WriteInSeconds}s ;; 92 98 HF|hf) 93 sechiba2_enabled=.TRUE. ;; 99 file_enabled=.TRUE. 100 file_freq=10800s ;; 94 101 *) 95 IGCM_debug_Exit "SRF WriteFrequency=${frequency} is invalid. Choose between xY, xM, xD, xs and HF for Sechiba." ;; 102 IGCM_debug_Exit "SRF_Update " ${frequency} " invalid WriteFrequency : choose in xY, xM, xD, xs and HF" 103 IGCM_debug_Verif_Exit ;; 104 esac 105 106 (( ifreq = ifreq + 1 )) 107 case ${ifreq} in 108 1) 109 sechiba1_enabled=${file_enabled} 110 sechiba1_freq=${file_freq} ;; 111 2) 112 sechiba2_enabled=${file_enabled} 113 sechiba2_freq=${file_freq} ;; 114 *) 115 IGCM_debug_Exit "SRF_Update: It is not possible to set more than 2 output files for sechiba from config.card" 116 IGCM_debug_Exit "You must correct WriteFrequancy in SRF secion in config.card." 117 IGCM_debug_Exit "Adapt file_def_orchidee.xml directly if you want more output files" 118 IGCM_debug_Verif_Exit ;; 96 119 esac 97 120 done 98 121 99 # Do the modifications in file_def_orchidee.xml 122 123 # Modify file_def_orchidee.xml file 100 124 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba1 enabled ${sechiba1_enabled} 101 125 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba1 output_freq ${sechiba1_freq} 102 126 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba2 enabled ${sechiba2_enabled} 127 IGCM_comp_modifyXmlFile nonblocker file_def_orchidee.xml sechiba2 output_freq ${sechiba2_freq} 128 103 129 104 130 # Add include of orchidee context in iodef.xml … … 110 136 rm iodef.xml.tmp add.tmp 111 137 112 #Long Name as global attribute (if LongName is not empty) 113 if [ ! "X${config_UserChoices_LongName}" = "X" ] ; then 114 listfile=$(ls file_def*orchidee.xml) 115 echo "<variable id=\"LongName\" type=\"string\">${config_UserChoices_LongName}</variable>" > add.tmp 116 for file in ${listfile} 117 do 118 cp ${file} ${file}.tmp 119 sed -e "/<file id/r add.tmp" \ 120 ${file}.tmp > ${file} 121 rm ${file}.tmp 122 done 123 rm add.tmp 124 fi 138 # Add LongName as global attribute in XIOS output files (if LongName is not empty) 139 if [ ! "X${config_UserChoices_LongName}" = "X" ] ; then 140 listfile=$(ls file_def*orchidee.xml) 141 echo "<variable id=\"LongName\" type=\"string\">${config_UserChoices_LongName}</variable>" > add.tmp 142 for file in ${listfile} 143 do 144 cp ${file} ${file}.tmp 145 sed -e "/<file id/r add.tmp" \ 146 ${file}.tmp > ${file} 147 rm ${file}.tmp 148 done 149 rm add.tmp 150 fi 151 125 152 126 153 IGCM_debug_PopStack "SRF_Update"
Note: See TracChangeset
for help on using the changeset viewer.