Changeset 765


Ignore:
Timestamp:
10/28/09 17:52:22 (13 years ago)
Author:
sdipsl
Message:
  • Some evolution for orchidee.driver and orchidee.def
  • Very likely that many more will come
Location:
CONFIG/LMDZOR/branches/LMDZ4OR_v3/LMDZOR
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • CONFIG/LMDZOR/branches/LMDZ4OR_v3/LMDZOR/COMP/lmdz.driver

    r756 r765  
    1 # $Id$ 
    2 # 
    31#!/bin/ksh 
    42#----------------------------------------------------------------- 
     
    119    [ -f ${SUBMIT_DIR}/../.resol ] && eval $(grep RESOL_ATM_3D ${SUBMIT_DIR}/../.resol) || RESOL_ATM_3D=96x95x19 
    1210 
    13     RESOL_ATM_Z=$( echo $RESOL_ATM_3D | awk "-Fx" '{print $3}' ) 
     11    RESOL_ATM_Z=$( echo ${RESOL_ATM_3D} | awk "-Fx" '{print $3}' ) 
     12 
     13    ##-- Calendar type for LMDZ 
     14    case ${config_UserChoices_CalendarType} in 
     15        leap|gregorian) 
     16            CalendarTypeForLmdz=earth_366d;; 
     17        noleap) 
     18            CalendarTypeForLmdz=earth_365d;; 
     19        360d) 
     20            CalendarTypeForLmdz=earth_360d;; 
     21        *) 
     22            CalendarTypeForLmdz=earth_360d 
     23    esac 
    1424 
    1525    ##- Create_etat0_limit version 
     
    4656 
    4757    ##--Variables used by LMDZ in physiq.def -- 
    48     PAT_INST=$(      grep -v ^# ${SUBMIT_DIR}/PARAM/physiq.def_L${RESOL_ATM_Z}  | grep 'OK_instan='  ) 
    49     PAT_JOUR=$(      grep -v ^# ${SUBMIT_DIR}/PARAM/physiq.def_L${RESOL_ATM_Z}  | grep 'OK_journe='  ) 
    50     PAT_MOIS=$(      grep -v ^# ${SUBMIT_DIR}/PARAM/physiq.def_L${RESOL_ATM_Z}  | grep 'OK_mensuel=' ) 
    51     PAT_HFRE=$(      grep -v ^# ${SUBMIT_DIR}/PARAM/physiq.def_L${RESOL_ATM_Z}  | grep 'ok_hf='      ) 
    52     PAT_ecrit_mth=$( grep -v ^# ${SUBMIT_DIR}/PARAM/physiq.def_L${RESOL_ATM_Z}  | grep 'ecrit_mth='  ) 
     58    PAT_INST=$(        grep -v ^# ${SUBMIT_DIR}/PARAM/physiq.def_L${RESOL_ATM_Z}  | grep 'OK_instan='   ) 
     59    PAT_JOUR=$(        grep -v ^# ${SUBMIT_DIR}/PARAM/physiq.def_L${RESOL_ATM_Z}  | grep 'OK_journe='   ) 
     60    PAT_MOIS=$(        grep -v ^# ${SUBMIT_DIR}/PARAM/physiq.def_L${RESOL_ATM_Z}  | grep 'OK_mensuel='  ) 
     61    PAT_HFRE=$(        grep -v ^# ${SUBMIT_DIR}/PARAM/physiq.def_L${RESOL_ATM_Z}  | grep 'ok_hf='       ) 
     62    PAT_ecrit_mth=$(   grep -v ^# ${SUBMIT_DIR}/PARAM/physiq.def_L${RESOL_ATM_Z}  | grep 'ecrit_mth='   ) 
     63    PAT_ecrit_ISCCP=$( grep -v ^# ${SUBMIT_DIR}/PARAM/physiq.def_L${RESOL_ATM_Z}  | grep 'ecrit_ISCCP=' ) 
    5364    ##--Variables used by LMDZ in gcm.def -- 
    5465    PAT_iphysiq=$(   grep -v ^# ${SUBMIT_DIR}/PARAM/gcm.def_${RESOL_ATM_3D} | grep iphysiq  ) 
     
    8293    case ${config_UserChoices_PeriodLength} in 
    8394        *Y|*y)  
    84                ecrit_mth=30.  
     95               LMDZ_ecrit_mth=30.  
     96               LMDZ_ecrit_ISCCP=30. 
     97               LMDZ_periodav=30. 
    8598               if [ "${config_UserChoices_CalendarType}" != "360d" ] ; then 
    8699                  echo Change calendartype in config.card. PeriodLength=1Y allowed only for CalendarType=360d  
     
    89102               ;; 
    90103        *) 
    91                ecrit_mth=${PeriodLengthInDays}. 
     104               LMDZ_ecrit_mth=${PeriodLengthInDays}. 
     105               LMDZ_ecrit_ISCCP=${PeriodLengthInDays}. 
     106               LMDZ_periodav=${PeriodLengthInDays}. 
    92107               ;; 
    93108    esac 
     
    109124 
    110125    ## Mise en forme du fichier physiq.def 
    111     sed -e "s/${PAT_INST}/OK_instan=${OK_instan}/"      \ 
    112         -e "s/${PAT_JOUR}/OK_journe=${OK_journe}/"      \ 
    113         -e "s/${PAT_MOIS}/OK_mensuel=${OK_mensuel}/"    \ 
    114         -e "s/${PAT_HFRE}/ok_hf=${ok_hf}/"              \ 
    115         -e "s/${PAT_ecrit_mth}/ecrit_mth=${ecrit_mth}/" \ 
     126    sed -e "s/${PAT_INST}/OK_instan=${OK_instan}/"                 \ 
     127        -e "s/${PAT_JOUR}/OK_journe=${OK_journe}/"                 \ 
     128        -e "s/${PAT_MOIS}/OK_mensuel=${OK_mensuel}/"               \ 
     129        -e "s/${PAT_HFRE}/ok_hf=${ok_hf}/"                         \ 
     130        -e "s/${PAT_ecrit_mth}/ecrit_mth=${LMDZ_ecrit_mth}/"       \ 
     131        -e "s/${PAT_ecrit_ISCCP}/ecrit_ISCCP=${LMDZ_ecrit_ISCCP}/" \ 
    116132        physiq.def > physiq.def.tmp 
    117133    IGCM_sys_Mv physiq.def.tmp physiq.def 
     
    127143    sed -e "s/_dayref_/${InitDay}/"                    \ 
    128144        -e "s/_anneeref_/${InitYear}/"                 \ 
     145        -e "s/_calend_/${CalendarTypeForLmdz}/"        \ 
    129146        -e "s/_nday_/${PeriodLengthInDays}/"           \ 
    130147        -e "s/_raz_date_/${RAZ_DATE}/"                 \ 
     148        -e "s/_periodav_/${LMDZ_periodav}/"            \ 
    131149        -e "s/_adjust_/${LMDZ_adjust}/"                \ 
    132150        run.def > run.def.tmp 
  • CONFIG/LMDZOR/branches/LMDZ4OR_v3/LMDZOR/COMP/orchidee.driver

    r382 r765  
    1 # $Id$ 
    2 # 
    31#!/bin/ksh 
    42 
    5 #D- Driver du script pour ORCHIDEE_OL (off-line) 
     3#D- Driver du script pour ORCHIDEE 
     4 
     5function ORCHIDEE_sed 
     6{ 
     7    IGCM_debug_PushStack "ORCHIDEE_sed" 
     8     
     9    sed -e "s/^${1}\ *=.*/${1}= ${2}/" \ 
     10        orchidee.def > orchidee.def.tmp 
     11    RET=$? 
     12    echo "ORCHIDEE_sed : ${1} ${2}" 
     13    \mv orchidee.def.tmp orchidee.def 
     14     
     15    IGCM_debug_PopStack "ORCHIDEE_sed" 
     16    return $RET 
     17} 
    618 
    719#----------------------------------------------------------------- 
     
    1022    IGCM_debug_PushStack "SRF_Initialize" 
    1123 
    12     RESOL_SRF=${RESOL} 
     24    RESOL_SRF=ALL 
    1325 
    1426    IGCM_debug_PopStack "SRF_Initialize" 
     
    2032    IGCM_debug_PushStack "SRF_Update" 
    2133 
     34    typeset SECHIBA_WRITE_STEP 
     35 
    2236    case ${config_SRF_WriteFrequency} in 
    23         1Y|1y)  
    24             (( STOMATE_WRITE_STEP = PeriodLengthInDays )) 
    25             (( SECHIBA_WRITE_STEP = PeriodLengthInDays * 86400 )) ;; 
    26         1M|1m)  
    27             if [ ${config_UserChoices_PeriodLength} = 1Y ] ; then 
    28                 (( STOMATE_WRITE_STEP = PeriodLengthInDays / 12 )) 
    29                 (( SECHIBA_WRITE_STEP = PeriodLengthInDays * 86400 / 12  )) 
    30             else 
    31                 (( STOMATE_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) )) 
     37        *Y|*y)  
     38            WriteInYears=$( echo ${1} | awk -F '[yY]' "{print ${config_SRF_WriteFrequency}}" ) 
     39            PeriodLengthInYears=$( echo ${1} | awk -F '[yY]' "{print ${config_UserChoices_PeriodLength}}" ) 
     40            (( SECHIBA_WRITE_STEP = PeriodLengthInDays * WriteInYears / PeriodLengthInYears * 86400 )) ;; 
     41        *M|*m)  
     42            WriteInMonths=$( echo ${1} | awk -F '[mM]' "{print ${config_SRF_WriteFrequency}}" ) 
     43            case ${config_UserChoices_PeriodLength} in 
     44            *Y|*y) 
     45                PeriodLengthInYears=$( echo ${1} | awk -F '[yY]' "{print ${config_UserChoices_PeriodLength}}" ) 
     46                (( SECHIBA_WRITE_STEP = PeriodLengthInDays * 86400 / PeriodLengthInYears / 12  )) 
     47                ;; 
     48            *M|*m) 
     49                PeriodLengthInMonths=$( echo ${1} | awk -F '[mM]' "{print ${config_UserChoices_PeriodLength}}" ) 
     50                (( SECHIBA_WRITE_STEP = PeriodLengthInDays * WriteInMonths  * 86400 / PeriodLengthInMonths  )) 
     51                ;; 
     52            *) 
    3253                (( SECHIBA_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) * 86400 )) 
    33             fi ;; 
     54                ;; 
     55            esac 
     56            ;; 
    3457        5D|5d)  
    35             (( STOMATE_WRITE_STEP = 5 )) 
    3658            (( SECHIBA_WRITE_STEP = 5 * 86400 )) ;; 
    3759        1D|1d)  
    38             (( STOMATE_WRITE_STEP = 1 )) 
    3960            (( SECHIBA_WRITE_STEP = 86400 )) ;; 
     61        *s) 
     62            WriteInSeconds=$( echo ${1} | awk -F '[s]' "{print ${config_SRF_WriteFrequency}}" ) 
     63            (( SECHIBA_WRITE_STEP = WriteInSeconds )) ;; 
    4064        *)  
    4165            IGCM_debug_Exit "SRF_Update " ${config_SRF_WriteFrequency} " invalid WriteFrequency : choose in 1Y, 1M, 5D, 1D."  
     
    4367    esac 
    4468 
     69    ORCHIDEE_sed WRITE_STEP ${SECHIBA_WRITE_STEP} 
     70 
     71##    if [ ${year} -eq 1950 ] ; then 
     72#       ORCHIDEE_sed SECHIBA_HISTFILE2 y 
     73#       ORCHIDEE_sed SECHIBA_HISTLEVEL2 10 
     74#       ORCHIDEE_sed WRITE_STEP2 86400.0 
     75##    fi 
    4576 
    4677    if ( [ ${CumulPeriod} -eq 1 ] && [ "${config_SRF_Restart}" = "n" ] ) ; then 
    47         sed -e "s/_start_sech_/default/" \ 
    48             -e "s/_write_step_/${SECHIBA_WRITE_STEP}/" \ 
    49             orchidee.def > orchidee.def.tmp 
    50 ## For STOMATE 
    51 #           -e "s/STOMATE_HIST_DT= 10./STOMATE_HIST_DT = ${STOMATE_WRITE_STEP}/" \ 
     78        ORCHIDEE_sed SECHIBA_reset_time y 
     79    else 
     80        ORCHIDEE_sed SECHIBA_restart_in start_sech.nc.nc 
     81        ORCHIDEE_sed SECHIBA_reset_time y 
     82    fi 
    5283 
    53 ## For ORCHIDEE_WATCHOUT_FILE :  
    54 #            -e "s/ORCHIDEE_WATCHOUT= n/ORCHIDEE_WATCHOUT= y/" \ 
    55 #            -e "s/DT_WATCHOUT= 1800/DT_WATCHOUT= 3600/" \ 
    56     else 
    57         sed -e "s/_start_sech_/start_sech.nc/" \ 
    58             -e "s/_write_step_/${SECHIBA_WRITE_STEP}/" \ 
    59             orchidee.def > orchidee.def.tmp 
    60 ## For STOMATE 
    61 #            -e "s/STOMATE_RESTART_FILEIN= NONE/STOMATE_RESTART_FILEIN = stomate_rest_in.nc/" \ 
    62 #            -e "s/STOMATE_HIST_DT= 10./STOMATE_HIST_DT = ${STOMATE_WRITE_STEP}/" \ 
    63  
    64 ## For ORCHIDEE_WATCHOUT_FILE :  
    65 #            -e "s/ORCHIDEE_WATCHOUT= n/ORCHIDEE_WATCHOUT= y/" \ 
    66 #            -e "s/DT_WATCHOUT= 1800/DT_WATCHOUT= 3600/" \ 
    67     fi 
    68     IGCM_sys_Mv orchidee.def.tmp orchidee.def 
     84    #IGCM_sys_Cp ${RUN_DIR}/orchidee.def ${RUN_DIR}/run.def 
     85    #IGCM_sys_Put_Out ${RUN_DIR}/run.def ${R_SAVE}/${PREFIX}_run.def 
    6986 
    7087    IGCM_debug_PopStack "SRF_Update" 
     
    7693    IGCM_debug_PushStack "SRF_Finalize" 
    7794 
    78 # For STOMATE : 
    79 #     if [ $( IGCM_date_DaysBetweenGregorianDate ${PeriodDateEnd} ${year}1230 ) -ge 0 ] ; then 
    80 #       IGCM_sys_Put_Out stomate_Cforcing.nc ${R_OUT_SRF_O_M}/${PREFIX}_stomate_Cforcing.nc 
    81 #       IGCM_sys_Put_Out stomate_forcing.nc  ${R_OUT_SRF_O_M}/${PREFIX}_stomate_forcing.nc 
    82 #     fi 
     95    #IGCM_sys_Put_Out ${RUN_DIR}/used_run.def ${R_SAVE}/${PREFIX}_used_run.def 
    8396 
    8497    echo FINALIZE SRF !!! 
  • CONFIG/LMDZOR/branches/LMDZ4OR_v3/LMDZOR/PARAM/orchidee.def

    r326 r765  
    88# STOMATE_OK_DGVM is not set 
    99# STOMATE_WATCHOUT is not set 
    10 SECHIBA_restart_in=_start_sech_ 
     10SECHIBA_restart_in=default 
    1111SECHIBA_rest_out=sechiba_rest.nc 
    1212SECHIBA_reset_time=y 
    13 # SECHIBA_reset_time is not set 
     13# 
    1414OUTPUT_FILE=sechiba_out.nc 
    15 WRITE_STEP=_write_step_ 
    16 SECHIBA_HISTLEVEL=6 
     15WRITE_STEP=2592000 
     16SECHIBA_HISTLEVEL=5 
     17# 
     18SECHIBA_HISTFILE2 = FALSE 
     19SECHIBA_OUTPUT_FILE2 = sechiba_out_2.nc 
     20WRITE_STEP2 = 86400.0 
     21SECHIBA_HISTLEVEL2 = 1 
     22# 
    1723STOMATE_OUTPUT_FILE=stomate_history.nc 
    1824STOMATE_HIST_DT=10. 
     
    2329# IMPOSE_VEG is not set 
    2430VEGETATION_FILE=carteveg5km.nc 
     31# VEGETATION_FILE=pft_new.nc 
    2532DIFFUCO_LEAFCI=233. 
    2633CONDVEG_SNOWA=default 
     
    3138HYDROL_SNOW=0.0 
    3239HYDROL_SNOWAGE=0.0 
     40HYDROL_SNOWICE=0.0 
     41HYDROL_SNOWICEAGE=0.0 
     42HYDROL_HDRY=1.0 
    3343HYDROL_HUMR=1.0 
    3444HYDROL_BQSB=default 
     
    4959RVEG_PFT = .5, .5, .5, .5, .5, .5, .5, .5, .5, .5, .5, .5, .5 
    5060CDRAG_FROM_GCM = .TRUE. 
     61#LAND_USE=y 
     62#VEGET_YEAR=0 
     63#VEGET_UPDATE=1Y 
  • CONFIG/LMDZOR/branches/LMDZ4OR_v3/LMDZOR/PARAM/run.def

    r684 r765  
    55INCLUDEDEF=orchidee.def 
    66## Type de calendrier utilise 
    7 ## valeur possible: earth_360d (defaut), earth_365d, earth_366d  
    8 calend=earth_360d 
     7## valeur possible: earth_360d (defaut), earth_365d, earth_366d 
     8calend=_calend_ 
    99## Jour de l'etat initial ( = 350  si 20 Decembre ,par expl. ,comme ici ) 
    1010dayref=_dayref_ 
     
    2222ok_dynzon=n 
    2323## periode de stockage fichier dynzon (en jour) 
    24 periodav=30. 
     24periodav=_periodav_ 
    2525## activation du calcul d equilibrage de charge 
    2626adjust=_adjust_ 
Note: See TracChangeset for help on using the changeset viewer.