Ignore:
Timestamp:
02/27/09 11:19:52 (15 years ago)
Author:
mafoipsl
Message:

MAF : adapt namelist and nemo driver to nemo_v3_1, upgrade nemo.driver

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CONFIG/IPSLCM/IPSLCM5/trunk/EXP00/COMP/nemo.driver

    r533 r568  
    88    RESOL_OCE=$( echo $RESOL | awk "-Fx" '{print $1}' ) 
    99 
    10     if [ -z "${opa_UserChoices_OPA_NPDT_JOURS}" ] ; then 
    11         ORCA_NPDT_JOUR=15 
    12     else 
    13         ORCA_NPDT_JOUR=${opa_UserChoices_OPA_NPDT_JOURS} 
    14     fi 
     10    ORCA_NPDT_JOUR=${nemo_UserChoices_OPA_NPDT_JOURS:=15} 
    1511 
    1612# Local function to find namelists parameters 
     
    2218 
    2319    # cexper experience name for vairmer format 
     20    # ln_rstart boolean term for restart (true or false) 
     21    # nrstdt control of the time step (0, 1 or 2) 
    2422    # nit000 number of the first time step 
    2523    # nitend number of the last time step 
    26     # nbisex Leap year calendar (0/1) (30 for 360d) 
     24    # ndate0 initial calendar date aammjj 
     25    # nleapy Leap year calendar (1) or not (0), or 360 days calendar (30) 
     26    # nstock frequency of restart file 
    2727    # nwrite frequency of OUTPUT file 
     28    # nmsh  =1 create a mesh file (coordinates, scale factors, masks) 
    2829    # nwrihf frequency of HF OUTPUT file 
    29     # lrstar boolean term for restart (true or false) 
    30     # nstock frequency of restart file 
    31     # nrstdt control of the time step (0, 1 or 2) 
    32     # ndate0 initial calendar date aammjj 
    33     # nmsh  =1 create a mesh file (coordinates, scale factors, masks) 
     30    # rdt time step in seconds (coming from namelist) 
    3431 
    3532            PAT_CEXPER=$( supergrep cexper    ${SUBMIT_DIR}/PARAM/namelist_${RESOL_OCE} ) 
     
    4138            PAT_NRSTAR=$( supergrep nrstdt    ${SUBMIT_DIR}/PARAM/namelist_${RESOL_OCE} ) 
    4239            PAT_NDATE0=$( supergrep ndate0    ${SUBMIT_DIR}/PARAM/namelist_${RESOL_OCE} ) 
     40            PAT_NLEAPY=$( supergrep nleapy    ${SUBMIT_DIR}/PARAM/namelist ) 
    4341            PAT_NMSH=$(   supergrep nmsh      ${SUBMIT_DIR}/PARAM/namelist_${RESOL_OCE} ) 
    4442         
    45             ORCA_NSTOCK=$( echo $PAT_NSTOCK | sed "s/[a-z,A-Z,=]//g" ) 
    4643            ORCA_RDT=$( supergrep rdt  ${SUBMIT_DIR}/PARAM/namelist_${RESOL_OCE} | sed 's/ *rdt *=//' | sed 's/\. *//' ) 
    47  
    48     ##--Transformation namelist fortran 77 --> fortran 90 
    49     #   ?       ? Is it really necessary ?       ? 
    50     #sed -e /:/d -e s/" \&END"/"\/"/ -e s/" \&"/"\&"/ ${SUBMIT_DIR}/PARAM/namelist_${RESOL_OCE} > ${SUBMIT_DIR}/PARAM/namelist 
    5144 
    5245    # Period Length In Days between DateBegin and first day of calendar 0001 01 01 
     
    126119    (( ORCA_NITEND = ORCA_NIT000 + ORCA_NPDT - 1)) 
    127120 
    128     if [ "${ORCA_NSTOCK}" -gt "${ORCA_NPDT}" ] 
    129         then 
    130         ORCA_NSTOCK="${ORCA_NPDT}" 
    131     fi 
     121    ORCA_NSTOCK="${ORCA_NPDT}" 
    132122 
    133123    ##-- verification du nb de pas de temps par jour 
     
    137127    if [ ${NB_SEC_JOUR_MODEL} -ne ${NB_SEC_JOUR} ] 
    138128        then 
    139         echo " VERIFIER ORCA_NPDT_JOUR dans le job ${JOB} " 
     129        echo " VERIFIER ORCA_NPDT_JOUR dans nemo.card " 
    140130        exit 
    141131    fi 
     
    147137        ORCA_NRSTDT=0 
    148138        ORCA_NMSH=1 
    149         # ??? a garder ??? 
    150         # cat <<EOF > EMPave_old.dat 
    151         # Old global EMP coeff =   1.000000000 
    152         # EOF 
    153139 
    154140        #echo "PAS DE RESTART OPA" 
     
    163149 
    164150        ORCA_LRSTAR=.TRUE. 
    165         ORCA_NRSTDT=1 
     151        ORCA_NRSTDT=2 
    166152        ORCA_NMSH=0 
    167153 
    168154        #echo "RESTART OPA" 
    169155    fi 
    170         typeset -r PRECIS=8 
    171         NEMO_END=$( echo $( awk "BEGIN { printf \"%0${PRECIS}d\",${ORCA_NITEND} }" ) )  
     156 
     157 
     158    # nleapy configuration 
     159    case ${config_UserChoices_CalendarType} in 
     160         leap) 
     161         ORCA_NLEAPY=1;; 
     162         noleap) 
     163         ORCA_NLEAPY=0;; 
     164         360d) 
     165         ORCA_NLEAPY=30;; 
     166         *) 
     167         ORCA_NLEAPY=30 
     168    esac 
     169 
     170 
     171    typeset -r PRECIS=8 
     172    NEMO_END=$( echo $( awk "BEGIN { printf \"%0${PRECIS}d\",${ORCA_NITEND} }" ) )  
     173 
    172174 
    173175    sed -e "s/${PAT_CEXPER}/       cexper=\"${config_UserChoices_JobName}\"/" \ 
    174         -e "s/${PAT_NIT000}/       nit000=${ORCA_NIT000}/" \ 
    175         -e "s/${PAT_NITEND}/       nitend=${ORCA_NITEND}/" \ 
    176         -e "s/${PAT_NWRITE}/       nwrite=${ORCA_NWRITE}/" \ 
    177         -e "s/${PAT_RESTAR}/       ln_rstart=${ORCA_LRSTAR}/" \ 
    178         -e "s/${PAT_NPRG}/         nprg=${ORCA_NWRITE}/" \ 
    179         -e "s/${PAT_NSTOCK}/       nstock=${ORCA_NSTOCK}/" \ 
    180         -e "s/${PAT_NRSTAR}/       nrstdt=${ORCA_NRSTDT}/" \ 
    181         -e "s/${PAT_NDATE0}/       ndate0=${PeriodDateBegin}/" \ 
    182         -e "s/${PAT_NMSH}/         nmsh=${ORCA_NMSH}/" \ 
     176        -e "s/${PAT_NIT000}/       nit000=${ORCA_NIT000}/"                    \ 
     177        -e "s/${PAT_NITEND}/       nitend=${ORCA_NITEND}/"                    \ 
     178        -e "s/${PAT_NWRITE}/       nwrite=${ORCA_NWRITE}/"                    \ 
     179        -e "s/${PAT_RESTAR}/       ln_rstart=${ORCA_LRSTAR}/"                 \ 
     180        -e "s/${PAT_NPRG}/         nprg=${ORCA_NWRITE}/"                      \ 
     181        -e "s/${PAT_NSTOCK}/       nstock=${ORCA_NSTOCK}/"                    \ 
     182        -e "s/${PAT_NRSTAR}/       nrstdt=${ORCA_NRSTDT}/"                    \ 
     183        -e "s/${PAT_NDATE0}/       ndate0=${PeriodDateBegin}/"                \ 
     184        -e "s%${PAT_NLEAPY}%       nleapy=${ORCA_NLEAPY}%"                    \ 
     185        -e "s/${PAT_NMSH}/         nmsh=${ORCA_NMSH}/"                        \ 
    183186        namelist > namelist.tmp 
    184187 
    185188    IGCM_sys_Mv namelist.tmp namelist 
     189 
     190    echo 'Variables automatically updated in namelist' 
     191    grep AUTO namelist 
    186192 
    187193    IGCM_debug_PopStack "OCE_Update" 
     
    197203        DATE_OPA=$( cat date.file | \ 
    198204            sed "s/\ ${config_UserChoices_JobName}_[0-9]*[a-z]_\([0-9]*_[0-9]*\)_\ */\1/g" ) 
    199 ###DATE_OPA=$( $DATE_OPABF | cut -c1-30 ) 
    200205        MainPrefix=${config_UserChoices_JobName}_1d_${DATE_OPA} 
    201206        SecondPrefix=${config_UserChoices_JobName}_5d_${DATE_OPA} 
Note: See TracChangeset for help on using the changeset viewer.