Changeset 332 for CONFIG/trunk/LMDZ4OR_v2/CREATE/COMP/lmdz.driver
- Timestamp:
- 05/28/08 16:23:53 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CONFIG/trunk/LMDZ4OR_v2/CREATE/COMP/lmdz.driver
r197 r332 1 1 #!/bin/ksh 2 3 # MPI Variables4 ATM_PARA=05 6 2 #----------------------------------------------------------------- 7 3 function ATM_Initialize … … 10 6 11 7 RESOL_ATM=${RESOL} 12 13 ##--Frequency purpose ....14 ##-- Initialisation ....15 OK_instan=n16 ##--17 OK_journe=n18 OK_mensuel=n19 20 case ${config_UserChoices_PeriodLength} in21 1Y|1y|1M|1m) OK_mensuel=y ;;22 5D|5d|1D|1d) OK_journe=y ;;23 esac24 25 for frequency in ${config_ATM_WriteFrequency} ; do26 case ${frequency} in27 5D|5d|1D|1d) OK_journe=y ;;28 esac29 done30 31 ##--Variables used by LMDZ --32 PAT_INST=$( grep 'OK_instan' ${SUBMIT_DIR}/PARAM/physiq.def )33 PAT_JOUR=$( grep 'OK_journe' ${SUBMIT_DIR}/PARAM/physiq.def )34 PAT_MOIS=$( grep 'OK_mensuel' ${SUBMIT_DIR}/PARAM/physiq.def )35 36 PAT_iphysiq=$( grep 'iphysiq' ${SUBMIT_DIR}/PARAM/gcm.def_${RESOL} )37 PAT_iperiod=$( grep 'iperiod' ${SUBMIT_DIR}/PARAM/gcm.def_${RESOL} | tail -1)38 PAT_day_step=$( grep 'day_step' ${SUBMIT_DIR}/PARAM/gcm.def_${RESOL} )39 PAT_ecritphy=$( grep 'ecritphy' ${SUBMIT_DIR}/PARAM/gcm.def_${RESOL} )40 41 ##-- This could be define in lmdz.card, inside section [UserChoices]42 ##-- Otherwise we get the value in *.def43 iperiod=$(grep iperiod ${SUBMIT_DIR}/PARAM/gcm.def_${RESOL} | awk -F= '{print $2}' | tail -1)44 iphysiq=$(grep iphysiq ${SUBMIT_DIR}/PARAM/gcm.def_${RESOL} | awk -F= '{print $2}')45 # day_step : number of steps per day (multiple of iperiod)46 (( day_step = 48 * iphysiq ))47 8 48 9 IGCM_debug_PopStack "ATM_Initialize" … … 54 15 IGCM_debug_PushStack "ATM_Update" 55 16 56 ecritphy=${PeriodLengthInDays}57 58 17 ##-- Remise ou non a zero de la date initiale de LMDZ pour le fichier run.def 59 18 if [ ${CumulPeriod} -eq 1 ] ; then … … 62 21 RAZ_DATE=0 63 22 fi 64 65 ## Mise en forme du fichier physiq.def66 sed -e "s/OK_instan=.*/OK_instan=${OK_instan}/" \67 -e "s/OK_journe=.*/OK_journe=${OK_journe}/" \68 -e "s/OK_mensuel=.*/OK_mensuel=${OK_mensuel}/" \69 physiq.def > physiq.def.tmp70 IGCM_sys_Mv physiq.def.tmp physiq.def71 72 ## Mise en forme du fichier gcm.def73 sed -e "s/${PAT_ecritphy}/ecritphy=${ecritphy}/" \74 -e "s/${PAT_day_step}/day_step=${day_step}/" \75 -e "s/${PAT_iperiod}/iperiod=${iperiod}/" \76 -e "s/${PAT_iphysiq}/iphysiq=${iphysiq}/" \77 gcm.def > gcm.def.tmp78 IGCM_sys_Mv gcm.def.tmp gcm.def79 23 80 24 ## Mise en forme du fichier run.def
Note: See TracChangeset
for help on using the changeset viewer.