New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 3764 – NEMO

Changeset 3764


Ignore:
Timestamp:
2013-01-23T15:33:04+01:00 (12 years ago)
Author:
smasson
Message:

dev_MERGE_2012: report bugfixes done in the trunk from r3555 to r3763 into dev_MERGE_2012

Location:
branches/2012/dev_MERGE_2012
Files:
1 added
1 deleted
61 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_MERGE_2012/DOC/TexFiles/Biblio/Biblio.bib

    r3680 r3764  
    14121412} 
    14131413 
    1414 @ARTICLE{Hunke2008, 
     1414@TECHREPORT{Hunke2008, 
    14151415  author = {E.C. Hunke and W.H. Lipscomb}, 
    14161416  title = {CICE: the Los Alamos sea ice model documentation and software user's manual,  
    14171417        Version 4.0}, 
     1418  institution = { Los Alamos National Laboratory, N.M.}, 
    14181419  publisher = {LA-CC-06-012, Los Alamos National Laboratory, N.M.}, 
    14191420  year = {2008} 
  • branches/2012/dev_MERGE_2012/DOC/TexFiles/Chapters/Chap_CFG.tex

    r3294 r3764  
    3131 
    3232% ================================================================ 
    33 % 1D model functionality 
     33% 1D model configuration 
    3434% ================================================================ 
    3535\section{Water column model: 1D model (C1D) (\key{c1d})} 
     
    4848 
    4949The methodology is based on the use of the zoom functionality over the smallest possible  
    50 domain : a 3 x 3 domain centred on the grid point of interest (see \S\ref{MISC_zoom}),  
     50domain : a 3x3 domain centred on the grid point of interest (see \S\ref{MISC_zoom}),  
    5151with some extra routines. There is no need to define a new mesh, bathymetry,  
    5252initial state or forcing, since the 1D model will use those of the configuration it is a zoom of.  
    53 The chosen grid point is set in par\_oce.F90 module by setting the \jp{jpizoom} and \jp{jpjzoom}  
     53The chosen grid point is set in \mdl{par\_oce} module by setting the \jp{jpizoom} and \jp{jpjzoom}  
    5454parameters to the indices of the location of the chosen grid point. 
    5555 
    56 The 1D model has some specifies. First, all the horizontal derivatives are assumed to be zero.  
    57 Therefore a simplified \rou{step} routine is used (\rou{step\_c1d}) in which both lateral tendancy  
    58 terms and lateral physics are not called, and the vertical velocity is zero (so far, no attempt at 
    59 introducing a Ekman pumping velocity has been made). 
    60 Second, the two components of the velocity are moved on a $T$-point.  
    61 This requires a specific treatment of the Coriolis term (see \rou{dyncor\_c1d}) and of the  
    62 dynamic time stepping (\rou{dynnxt\_c1d}). 
    63 All the relevant modules can be found in the NEMOGCM/NEMO/OPA\_SRC/C1D directory of  
     56The 1D model has some specifies. First, all the horizontal derivatives are assumed to be zero, and 
     57second, the two components of the velocity are moved on a $T$-point.  
     58Therefore, defining \key{c1d} changes five main things in the code behaviour:  
     59\begin{description} 
     60\item[(1)] the lateral boundary condition routine (\rou{lbc\_lnk}) set the value of the central column  
     61of the 3x3 domain is imposed over the whole domain ;  
     62\item[(3)] a call to \rou{lbc\_lnk} is systematically done when reading input data ($i.e.$ in \mdl{iom}) ;  
     63\item[(3)] a simplified \rou{stp} routine is used (\rou{stp\_c1d}, see \mdl{step\_c1d} module) in which  
     64both lateral tendancy terms and lateral physics are not called ;  
     65\item[(4)] the vertical velocity is zero (so far, no attempt at introducing a Ekman pumping velocity  
     66has been made) ;  
     67\item[(5)] a simplified treatment of the Coriolis term is performed as $U$- and $V$-points are the same  
     68(see \mdl{dyncor\_c1d}). 
     69\end{description} 
     70All the relevant \textit{\_c1d} modules can be found in the NEMOGCM/NEMO/OPA\_SRC/C1D directory of  
    6471the \NEMO distribution. 
    6572 
     
    206213% ------------------------------------------------------------------------------------------------------------- 
    207214\section{GYRE family: double gyre basin (\key{gyre})} 
    208 \label{MISC_config_gyre} 
     215\label{CFG_gyre} 
    209216 
    210217The GYRE configuration \citep{Levy_al_OM10} have been built to simulated  
  • branches/2012/dev_MERGE_2012/DOC/TexFiles/Chapters/Chap_DIA.tex

    r3680 r3764  
    10181018In addition, a series of diagnostics has been added in the \mdl{diaar5}.  
    10191019They corresponds to outputs that are required for AR5 simulations  
    1020 (see Section \ref{MISC_steric} below for one of them).  
     1020(see Section \ref{DIA_steric} below for one of them).  
    10211021Activating those outputs requires to define the \key{diaar5} CPP key. 
    10221022\\ 
  • branches/2012/dev_MERGE_2012/DOC/TexFiles/Chapters/Chap_DOM.tex

    r3680 r3764  
    499499Hybridation of the three main coordinates are available: $s-z$ or $s-zps$ coordinate  
    500500(Fig.~\ref{Fig_z_zps_s_sps}d and \ref{Fig_z_zps_s_sps}e). When using the variable  
    501 volume option \key{vvl}) ($i.e.$ non-linear free surface), the coordinate follow the  
     501volume option \key{vvl} ($i.e.$ non-linear free surface), the coordinate follow the  
    502502time-variation of the free surface so that the transformation is time dependent:  
    503503$z(i,j,k,t)$ (Fig.~\ref{Fig_z_zps_s_sps}f). This option can be used with full step  
  • branches/2012/dev_MERGE_2012/DOC/TexFiles/Chapters/Chap_DYN.tex

    r3294 r3764  
    127127This is of paramount importance. Replacing $T$ by the number $1$ in the tracer equation and summing 
    128128over the water column must lead to the sea surface height equation otherwise tracer content 
    129 will not be conserved \ref{Griffies_al_MWR01, LeclairMadec2009}. 
     129will not be conserved \citep{Griffies_al_MWR01, Leclair_Madec_OM09}. 
    130130 
    131131The vertical velocity is computed by an upward integration of the horizontal  
     
    189189the relative vorticity term and horizontal kinetic energy for the planetary vorticity  
    190190term (MIX scheme) ; or conserving both the potential enstrophy of horizontally non-divergent  
    191 flow and horizontal kinetic energy (EEN scheme) (see  Appendix~\ref{Apdx_C_vor_zad}). In the  
     191flow and horizontal kinetic energy (EEN scheme) (see  Appendix~\ref{Apdx_C_vorEEN}). In the  
    192192case of ENS, ENE or MIX schemes the land sea mask may be slightly modified to ensure the  
    193193consistency of vorticity term with analytical equations (\textit{ln\_dynvor\_con}=true). 
     
    331331This EEN scheme in fact combines the conservation properties of the ENS and ENE schemes.  
    332332It conserves both total energy and potential enstrophy in the limit of horizontally  
    333 nondivergent flow ($i.e.$ $\chi$=$0$) (see  Appendix~\ref{Apdx_C_vor_zad}).  
     333nondivergent flow ($i.e.$ $\chi$=$0$) (see  Appendix~\ref{Apdx_C_vorEEN}).  
    334334Applied to a realistic ocean configuration, it has been shown that it leads to a significant  
    335335reduction of the noise in the vertical velocity field \citep{Le_Sommer_al_OM09}.  
     
    938938is the \textit{before} velocity in time, except for the pure vertical component  
    939939that appears when a tensor of rotation is used. This latter term is solved  
    940 implicitly together with the vertical diffusion term (see \S\ref{DOM_nxt})  
     940implicitly together with the vertical diffusion term (see \S\ref{STP})  
    941941 
    942942At the lateral boundaries either free slip, no slip or partial slip boundary  
     
    10661066scheme (\np{ln\_zdfexp}=true) using a time splitting technique  
    10671067(\np{nn\_zdfexp} $>$ 1) or $(b)$ a backward (or implicit) time differencing scheme  
    1068 (\np{ln\_zdfexp}=false) (see \S\ref{DOM_nxt}). Note that namelist variables  
     1068(\np{ln\_zdfexp}=false) (see \S\ref{STP}). Note that namelist variables  
    10691069\np{ln\_zdfexp} and \np{nn\_zdfexp} apply to both tracers and dynamics.  
    10701070 
  • branches/2012/dev_MERGE_2012/DOC/TexFiles/Chapters/Chap_TRA.tex

    r3308 r3764  
    264264transport) rather than TVD. The TVD scheme is implemented in the \mdl{traadv\_tvd} module. 
    265265 
    266 For stability reasons (see \S\ref{DOM_nxt}), 
     266For stability reasons (see \S\ref{STP}), 
    267267$\tau _u^{cen2}$ is evaluated  in (\ref{Eq_tra_adv_tvd}) using the \textit{now} tracer while $\tau _u^{ups}$  
    268268is evaluated using the \textit{before} tracer. In other words, the advective part of  
     
    337337\np{ln\_traadv\_ubs}=true. 
    338338 
    339 For stability reasons  (see \S\ref{DOM_nxt}), 
     339For stability reasons  (see \S\ref{STP}), 
    340340the first term  in \eqref{Eq_tra_adv_ubs} (which corresponds to a second order centred scheme)  
    341341is evaluated using the \textit{now} tracer (centred in time) while the  
     
    451451except for the pure vertical component that appears when a rotation tensor  
    452452is used. This latter term is solved implicitly together with the  
    453 vertical diffusion term (see \S\ref{DOM_nxt}). 
     453vertical diffusion term (see \S\ref{STP}). 
    454454 
    455455% ------------------------------------------------------------------------------------------------------------- 
  • branches/2012/dev_MERGE_2012/DOC/TexFiles/Chapters/Chap_ZDF.tex

    r3294 r3764  
    120120\end{equation} 
    121121 
    122 is computed from the wind stress vector $|\tau|$ and the reference dendity $ \rho_o$. 
     122is computed from the wind stress vector $|\tau|$ and the reference density $ \rho_o$. 
    123123The final $h_{e}$ is further constrained by the adjustable bounds \np{rn\_mldmin} and \np{rn\_mldmax}. 
    124124Once $h_{e}$ is computed, the vertical eddy coefficients within $h_{e}$ are set to  
     
    11881188\includegraphics[width=0.90\textwidth]{./TexFiles/Figures/Fig_ZDF_M2_K1_tmx.pdf} 
    11891189\caption{  \label{Fig_ZDF_M2_K1_tmx}  
    1190 (a) M2 and (b) K2 internal wave drag energy from \citet{Carrere_Lyard_GRL03} ($W/m^2$). } 
     1190(a) M2 and (b) K1 internal wave drag energy from \citet{Carrere_Lyard_GRL03} ($W/m^2$). } 
    11911191\end{center}   \end{figure} 
    11921192%>>>>>>>>>>>>>>>>>>>>>>>>>>>>  
     
    12051205 
    12061206When \np{ln\_tmx\_itf}=true, the two key parameters $q$ and $F(z)$ are adjusted following  
    1207 the parameterisation developed by \ref{Koch-Larrouy_al_GRL07}: 
     1207the parameterisation developed by \citet{Koch-Larrouy_al_GRL07}: 
    12081208 
    12091209First, the Indonesian archipelago is a complex geographic region  
     
    12191219Second, the vertical structure function, $F(z)$, is no more associated 
    12201220with a bottom intensification of the mixing, but with a maximum of  
    1221 energy available within the thermocline. \ref{Koch-Larrouy_al_GRL07}  
     1221energy available within the thermocline. \citet{Koch-Larrouy_al_GRL07}  
    12221222have suggested that the vertical distribution of the energy dissipation  
    12231223proportional to $N^2$ below the core of the thermocline and to $N$ above.  
     
    12361236and vertical distributions of the mixing are adequately prescribed  
    12371237\citep{Koch-Larrouy_al_GRL07, Koch-Larrouy_al_OD08a, Koch-Larrouy_al_OD08b}. 
    1238 Note also that such a parameterisation has a sugnificant impact on the behaviour  
     1238Note also that such a parameterisation has a significant impact on the behaviour  
    12391239of global coupled GCMs \citep{Koch-Larrouy_al_CD10}. 
    12401240 
  • branches/2012/dev_MERGE_2012/DOC/TexFiles/Namelist/namasm

    r3294 r3764  
    33!----------------------------------------------------------------------- 
    44    ln_bkgwri = .false.    !  Logical switch for writing out background state  
    5     ln_trjwri = .false.    !  Logical switch for writing out state trajectory 
    65    ln_trainc = .false.    !  Logical switch for applying tracer increments 
    76    ln_dyninc = .false.    !  Logical switch for applying velocity increments 
     
    1413    nitiaufin = 15         !  Timestep of end of IAU interval in [0,nitend-nit000-1] 
    1514    niaufn    = 0          !  Type of IAU weighting function 
    16     nittrjfrq = 0          !  Frequency of trajectory output for 4D-VAR 
    1715    ln_salfix = .false.    !  Logical switch for ensuring that the sa > salfixmin 
    1816    salfixmin = -9999      !  Minimum salinity after applying the increments 
  • branches/2012/dev_MERGE_2012/DOC/TexFiles/Namelist/namdyn_vor

    r3294 r3764  
    22&namdyn_vor    !   option of physics/algorithm (not control by CPP keys) 
    33!----------------------------------------------------------------------- 
    4    ln_dynvor_ene = .false. !  enstrophy conserving scheme   
    5    ln_dynvor_ens = .false. !  energy conserving scheme     
     4   ln_dynvor_ene = .false. !  energy    conserving scheme   
     5   ln_dynvor_ens = .false. !  enstrophy conserving scheme     
    66   ln_dynvor_mix = .false. !  mixed scheme                
    77   ln_dynvor_een = .true.  !  energy & enstrophy scheme   
  • branches/2012/dev_MERGE_2012/NEMOGCM/CONFIG/AMM12/EXP00/namelist

    r3697 r3764  
    33!! namelists    2 - Domain           (namzgr, namzgr_sco, namdom, namtsd) 
    44!!              3 - Surface boundary (namsbc, namsbc_ana, namsbc_flx, namsbc_clio, namsbc_core 
    5 !!                                    namsbc_cpl, namtra_qsr, namsbc_rnf,  
     5!!                                    namsbc_cpl, namtra_qsr, namsbc_rnf, 
    66!!                                    namsbc_apr, namsbc_ssr, namsbc_alb) 
    77!!              4 - lateral boundary (namlbc, namcla, namobc, namagrif, nambdy, nambdy_tide) 
     
    2525!----------------------------------------------------------------------- 
    2626   nn_no       =       0   !  job number (no more used...) 
    27    cn_exp      =  "AMM12"  !  experience name  
     27   cn_exp      =  "AMM12"  !  experience name 
    2828   nn_it000    =       1   !  first time step 
    2929   nn_itend    =    2880   !  last  time step (std 1 day = 288) 
     
    5252!!   namzgr_sco   s-coordinate or hybrid z-s-coordinate 
    5353!!   namdom       space and time domain (bathymetry, mesh, timestep) 
    54 !!   namtsd       data: temperature & salinity                          
     54!!   namtsd       data: temperature & salinity 
    5555!!====================================================================== 
    5656! 
     
    107107/ 
    108108!----------------------------------------------------------------------- 
    109 &namtsd    !   data : Temperature  & Salinity                            
     109&namtsd    !   data : Temperature  & Salinity 
    110110!----------------------------------------------------------------------- 
    111111!          ! file name ! frequency (hours)    ! variable ! time interp. ! clim  !'yearly' or ! weights  ! rotation ! 
     
    142142   ln_ana      = .false    !  analytical formulation (T => fill namsbc_ana ) 
    143143   ln_flx      = .true.    !  flux formulation       (T => fill namsbc_flx ) 
    144    ln_blk_clio = .false.   !  CLIO bulk formulation                     (T => fill namsbc_clio)  
    145    ln_blk_core = .false.   !  CORE bulk formulation                     (T => fill namsbc_core)  
     144   ln_blk_clio = .false.   !  CLIO bulk formulation                     (T => fill namsbc_clio) 
     145   ln_blk_core = .false.   !  CORE bulk formulation                     (T => fill namsbc_core) 
    146146   ln_blk_mfs  = .false.   !  MFS bulk formulation                      (T => fill namsbc_mfs ) 
    147147   ln_cpl      = .false.   !  Coupled formulation                       (T => fill namsbc_cpl ) 
     
    156156   ln_rnf      = .true.    !  runoffs                                   (T => fill namsbc_rnf) 
    157157   ln_ssr      = .false.   !  Sea Surface Restoring on T and/or S       (T => fill namsbc_ssr) 
    158    nn_fwb      = 0         !  FreshWater Budget: =0 unchecked  
    159                            !     =1 global mean of e-p-r set to zero at each time step  
     158   nn_fwb      = 0         !  FreshWater Budget: =0 unchecked 
     159                           !     =1 global mean of e-p-r set to zero at each time step 
    160160                           !     =2 annual global mean of e-p-r set to zero 
    161161                           !     =3 global emp set to zero and spread out over erp area 
     
    185185   sn_emp      = 'amm12_flx'      ,          3        ,  'sowafldo'  ,  .true.      , .false. , 'daily'   ,  ''      ,  '' 
    186186   cn_dir      = './fluxes/'        !  root directory for the location of the flux files 
    187 /       
     187/ 
    188188!----------------------------------------------------------------------- 
    189189&namsbc_clio   !   namsbc_clio  CLIO bulk formulae 
     
    242242!                    !                       ! categories !  reference  !    orientation       ! grids  ! 
    243243! send 
    244 sn_snd_temp   =       'weighted oce and ice' ,    'no'    ,     ''      ,         ''           ,   ''     
    245 sn_snd_alb    =       'weighted ice'         ,    'no'    ,     ''      ,         ''           ,   ''     
    246 sn_snd_thick  =       'none'                 ,    'no'   ,     ''      ,         ''           ,   ''     
    247 sn_snd_crt    =       'none'                 ,    'no'    , 'spherical' , 'eastward-northward' ,  'T'        
    248 sn_snd_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''           ,   ''         
     244sn_snd_temp   =       'weighted oce and ice' ,    'no'    ,     ''      ,         ''           ,   '' 
     245sn_snd_alb    =       'weighted ice'         ,    'no'    ,     ''      ,         ''           ,   '' 
     246sn_snd_thick  =       'none'                 ,    'no'   ,     ''      ,         ''           ,   '' 
     247sn_snd_crt    =       'none'                 ,    'no'    , 'spherical' , 'eastward-northward' ,  'T' 
     248sn_snd_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''           ,   '' 
    249249! receive 
    250 sn_rcv_w10m   =       'none'                 ,    'no'    ,     ''      ,         ''          ,   ''     
    251 sn_rcv_taumod =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
    252 sn_rcv_tau    =       'oce only'             ,    'no'    , 'cartesian' , 'eastward-northward',  'U,V'    
    253 sn_rcv_dqnsdt =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
    254 sn_rcv_qsr    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''     
    255 sn_rcv_qns    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''     
    256 sn_rcv_emp    =       'conservative'         ,    'no'    ,     ''      ,         ''          ,   ''     
    257 sn_rcv_rnf    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
    258 sn_rcv_cal    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
    259 sn_rcv_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     250sn_rcv_w10m   =       'none'                 ,    'no'    ,     ''      ,         ''          ,   '' 
     251sn_rcv_taumod =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   '' 
     252sn_rcv_tau    =       'oce only'             ,    'no'    , 'cartesian' , 'eastward-northward',  'U,V' 
     253sn_rcv_dqnsdt =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   '' 
     254sn_rcv_qsr    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   '' 
     255sn_rcv_qns    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   '' 
     256sn_rcv_emp    =       'conservative'         ,    'no'    ,     ''      ,         ''          ,   '' 
     257sn_rcv_rnf    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   '' 
     258sn_rcv_cal    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   '' 
     259sn_rcv_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   '' 
    260260/ 
    261261!----------------------------------------------------------------------- 
     
    323323   ln_sssr_bnd =   .true.  !  flag to bound erp term (associated with nn_sssr=2) 
    324324   rn_sssr_bnd =   4.e0    !  ABS(Max/Min) value of the damping erp term [mm/day] 
    325 /       
     325/ 
    326326!----------------------------------------------------------------------- 
    327327&namsbc_alb    !   albedo parameters 
    328328!----------------------------------------------------------------------- 
    329    rn_cloud    =    0.06   !  cloud correction to snow and ice albedo  
     329   rn_cloud    =    0.06   !  cloud correction to snow and ice albedo 
    330330   rn_albice   =    0.53   !  albedo of melting ice in the arctic and antarctic 
    331331   rn_alphd    =    0.80   !  coefficients for linear interpolation used to 
    332    rn_alphc    =    0.65   !  compute albedo between two extremes values  
     332   rn_alphc    =    0.65   !  compute albedo between two extremes values 
    333333   rn_alphdi   =    0.72   !  (Pyane, 1972) 
    334334/ 
     
    370370!!   namcla        cross land advection 
    371371!!   namobc        open boundaries parameters                           ("key_obc") 
    372 !!   namagrif      agrif nested grid ( read by child model only )       ("key_agrif")  
     372!!   namagrif      agrif nested grid ( read by child model only )       ("key_agrif") 
    373373!!   nambdy        Unstructured open boundaries                         ("key_bdy") 
    374374!!   namtide       Tidal forcing at open boundaries                     ("key_bdy_tides") 
     
    392392   ln_obc_clim = .false.   !  climatological obc data files (T) or not (F) 
    393393   ln_vol_cst  = .true.    !  impose the total volume conservation (T) or not (F) 
    394    ln_obc_fla  = .false.   !  Flather open boundary condition  
     394   ln_obc_fla  = .false.   !  Flather open boundary condition 
    395395   nn_obcdta   =    1      !  = 0 the obc data are equal to the initial state 
    396396                           !  = 1 the obc data are read in 'obc.dta' files 
     
    439439&nambdy        !  unstructured open boundaries                          ("key_bdy") 
    440440!----------------------------------------------------------------------- 
    441     nb_bdy = 1                            !  number of open boundary sets        
     441    nb_bdy = 1                            !  number of open boundary sets 
    442442    ln_coords_file = .true.               !  =T : read bdy coordinates from file 
    443443    cn_coords_file = 'coordinates.bdy.nc' !  bdy coordinates files 
     
    475475/ 
    476476!----------------------------------------------------------------------- 
    477 &nambdy_tide     ! tidal forcing at open boundaries               
     477&nambdy_tide     ! tidal forcing at open boundaries 
    478478!----------------------------------------------------------------------- 
    479479   filtide      = 'bdydta/amm12_bdytide_'         !  file name root of tidal forcing files 
     
    483483!!====================================================================== 
    484484!!   nambfr        bottom friction 
    485 !!   nambbc        bottom temperature boundary condition                
     485!!   nambbc        bottom temperature boundary condition 
    486486!!   nambbl        bottom boundary layer scheme                         ("key_trabbl") 
    487487!!====================================================================== 
     
    505505!----------------------------------------------------------------------- 
    506506   ln_trabbc   = .false.   !  Apply a geothermal heating at the ocean bottom 
    507    nn_geoflx   =    2      !  geothermal heat flux: = 0 no flux  
     507   nn_geoflx   =    2      !  geothermal heat flux: = 0 no flux 
    508508                           !     = 1 constant flux 
    509                            !     = 2 variable flux (read in geothermal_heating.nc in mW/m2)  
     509                           !     = 2 variable flux (read in geothermal_heating.nc in mW/m2) 
    510510   rn_geoflx_cst = 86.4e-3 !  Constant value of geothermal heat flux [W/m2] 
    511511/ 
     
    525525!!   namtra_adv    advection scheme 
    526526!!   namtra_ldf    lateral diffusion scheme 
    527 !!   namtra_dmp    T & S newtonian damping                         
     527!!   namtra_dmp    T & S newtonian damping 
    528528!!====================================================================== 
    529529! 
     
    539539/ 
    540540!----------------------------------------------------------------------- 
    541 &namtra_adv    !   advection scheme for tracer  
    542 !----------------------------------------------------------------------- 
    543    ln_traadv_cen2   =  .false.  !  2nd order centered scheme    
    544    ln_traadv_tvd    =  .true.   !  TVD scheme                 
    545    ln_traadv_muscl  =  .false.  !  MUSCL scheme              
    546    ln_traadv_muscl2 =  .false.  !  MUSCL2 scheme + cen2 at boundaries   
    547    ln_traadv_ubs    =  .false.  !  UBS scheme                  
    548    ln_traadv_qck    =  .false.  !  QUICKEST scheme                  
     541&namtra_adv    !   advection scheme for tracer 
     542!----------------------------------------------------------------------- 
     543   ln_traadv_cen2   =  .false.  !  2nd order centered scheme 
     544   ln_traadv_tvd    =  .true.   !  TVD scheme 
     545   ln_traadv_muscl  =  .false.  !  MUSCL scheme 
     546   ln_traadv_muscl2 =  .false.  !  MUSCL2 scheme + cen2 at boundaries 
     547   ln_traadv_ubs    =  .false.  !  UBS scheme 
     548   ln_traadv_qck    =  .false.  !  QUICKEST scheme 
    549549   ln_traadv_msc_ups=  .false.  !  use upstream scheme within muscl 
    550550/ 
     
    574574/ 
    575575!----------------------------------------------------------------------- 
    576 &namtra_dmp    !   tracer: T & S newtonian damping                   
     576&namtra_dmp    !   tracer: T & S newtonian damping 
    577577!----------------------------------------------------------------------- 
    578578   ln_tradmp   =  .false.  !  add a damping termn (T) or not (F) 
     
    602602&namdyn_adv    !   formulation of the momentum advection 
    603603!----------------------------------------------------------------------- 
    604    ln_dynadv_vec = .true.  !  vector form (T) or flux form (F)   
     604   ln_dynadv_vec = .true.  !  vector form (T) or flux form (F) 
    605605   ln_dynadv_cen2= .false. !  flux form - 2nd order centered scheme 
    606    ln_dynadv_ubs = .false. !  flux form - 3rd order UBS      scheme  
    607 /   
     606   ln_dynadv_ubs = .false. !  flux form - 3rd order UBS      scheme 
     607/ 
    608608!----------------------------------------------------------------------- 
    609609&namdyn_vor    !   option of physics/algorithm (not control by CPP keys) 
    610610!----------------------------------------------------------------------- 
    611    ln_dynvor_ene = .false. !  enstrophy conserving scheme   
    612    ln_dynvor_ens = .false. !  energy conserving scheme     
    613    ln_dynvor_mix = .false. !  mixed scheme                
    614    ln_dynvor_een = .true.  !  energy & enstrophy scheme   
     611   ln_dynvor_ene = .false. !  energy    conserving scheme   
     612   ln_dynvor_ens = .false. !  enstrophy conserving scheme     
     613   ln_dynvor_mix = .false. !  mixed scheme 
     614   ln_dynvor_een = .true.  !  energy & enstrophy scheme 
    615615/ 
    616616!----------------------------------------------------------------------- 
    617617&namdyn_hpg    !   Hydrostatic pressure gradient option 
    618618!----------------------------------------------------------------------- 
    619    ln_hpg_zco  = .false.   !  z-coordinate - full steps                    
     619   ln_hpg_zco  = .false.   !  z-coordinate - full steps 
    620620   ln_hpg_zps  = .false.   !  z-coordinate - partial steps (interpolation) 
    621621   ln_hpg_sco  = .false.    !  s-coordinate (standard jacobian formulation) 
     
    635635&namdyn_ldf    !   lateral diffusion on momentum 
    636636!----------------------------------------------------------------------- 
    637    !                       !  Type of the operator :  
    638    ln_dynldf_lap    =  .true.   !  laplacian operator          
     637   !                       !  Type of the operator : 
     638   ln_dynldf_lap    =  .true.   !  laplacian operator 
    639639   ln_dynldf_bilap  =  .true.   !  bilaplacian operator 
    640640                           !  Direction of action  : 
    641    ln_dynldf_level  =  .false.  !  iso-level                
     641   ln_dynldf_level  =  .false.  !  iso-level 
    642642   ln_dynldf_hor    =  .true.   !  horizontal (geopotential)            (require "key_ldfslp" in s-coord.) 
    643643   ln_dynldf_iso    =  .false.  !  iso-neutral                          (require "key_ldfslp") 
    644                            !  Coefficient  
     644                           !  Coefficient 
    645645   rn_ahm_0_lap     = 60.0      !  horizontal laplacian eddy viscosity   [m2/s] 
    646646   rn_ahmb_0        =  0.0      !  background eddy viscosity for ldf_iso [m2/s] 
     
    718718&namzdf_kpp    !   K-Profile Parameterization dependent vertical mixing  ("key_zdfkpp", and optionally: 
    719719!------------------------------------------------------------------------ "key_kppcustom" or "key_kpplktb") 
    720    ln_kpprimix = .true.    !  shear instability mixing  
     720   ln_kpprimix = .true.    !  shear instability mixing 
    721721   rn_difmiw   =  1.0e-04  !  constant internal wave viscosity [m2/s] 
    722722   rn_difsiw   =  0.1e-04  !  constant internal wave diffusivity [m2/s] 
    723723   rn_riinfty  =  0.8      !  local Richardson Number limit for shear instability 
    724724   rn_difri    =  0.0050   !  maximum shear mixing at Rig = 0    [m2/s] 
    725    rn_bvsqcon  = -0.01e-07 !  Brunt-Vaisala squared for maximum convection [1/s2]  
    726    rn_difcon   =  1.       !  maximum mixing in interior convection [m2/s]  
     725   rn_bvsqcon  = -0.01e-07 !  Brunt-Vaisala squared for maximum convection [1/s2] 
     726   rn_difcon   =  1.       !  maximum mixing in interior convection [m2/s] 
    727727   nn_avb      =  0        !  horizontal averaged (=1) or not (=0) on avt and amv 
    728728   nn_ave      =  1        !  constant (=0) or profile (=1) background on avt 
     
    758758   rn_n2min    = 1.e-8     !  threshold of the Brunt-Vaisala frequency (s-1) 
    759759   rn_tfe      = 0.333     !  tidal dissipation efficiency 
    760    rn_me       = 0.2       !  mixing efficiency  
     760   rn_me       = 0.2       !  mixing efficiency 
    761761   ln_tmx_itf  = .FALSE.   !  ITF specific parameterisation 
    762762   rn_tfe_itf  = 1.        !  ITF tidal dissipation efficiency 
     
    768768!!   nammpp            Massively Parallel Processing                    ("key_mpp_mpi) 
    769769!!   namctl            Control prints & Benchmark 
    770 !!   namsol            elliptic solver / island / free surface  
    771 !!====================================================================== 
    772 ! 
    773 !----------------------------------------------------------------------- 
    774 &namsol        !   elliptic solver / island / free surface  
     770!!   namsol            elliptic solver / island / free surface 
     771!!====================================================================== 
     772! 
     773!----------------------------------------------------------------------- 
     774&namsol        !   elliptic solver / island / free surface 
    775775!----------------------------------------------------------------------- 
    776776   nn_solv     =      1    !  elliptic solver: =1 preconditioned conjugate gradient (pcg) 
     
    818818!!   namflo       float parameters                                      ("key_float") 
    819819!!   namptr       Poleward Transport Diagnostics 
    820 !!   namhsb       Heat and salt budgets  
     820!!   namhsb       Heat and salt budgets 
    821821!!====================================================================== 
    822822! 
     
    856856   jpnnewflo     = 0          !  number of floats for the restart 
    857857   ln_rstflo     = .false.    !  float restart (T) or not (F) 
    858    nn_writefl    =      75    !  frequency of writing in float output file  
    859    nn_stockfl    =    5475    !  frequency of creation of the float restart file  
     858   nn_writefl    =      75    !  frequency of writing in float output file 
     859   nn_stockfl    =    5475    !  frequency of creation of the float restart file 
    860860   ln_argo       = .false.    !  Argo type floats (stay at the surface each 10 days) 
    861861   ln_flork4     = .false.    !  trajectories computed with a 4th order Runge-Kutta (T) 
     
    869869   ln_diaptr  = .false.    !  Poleward heat and salt transport (T) or not (F) 
    870870   ln_diaznl  = .false.    !  Add zonal means and meridional stream functions 
    871    ln_subbas  = .false.    !  Atlantic/Pacific/Indian basins computation (T) or not  
     871   ln_subbas  = .false.    !  Atlantic/Pacific/Indian basins computation (T) or not 
    872872                           !  (orca configuration only, need input basins mask file named "subbasins.nc" 
    873873   ln_ptrcomp = .false.    !  Add decomposition : overturning 
     
    876876/ 
    877877!----------------------------------------------------------------------- 
    878 &namhsb       !  Heat and salt budgets  
     878&namhsb       !  Heat and salt budgets 
    879879!----------------------------------------------------------------------- 
    880880   ln_diahsb  = .false.    !  check the heat and salt budgets (T) or not (F) 
     
    908908&namobs       !  observation usage switch                               ('key_diaobs') 
    909909!----------------------------------------------------------------------- 
    910    ln_t3d     = .false.    ! Logical switch for T profile observations          
    911    ln_s3d     = .false.    ! Logical switch for S profile observations           
    912    ln_ena     = .false.    ! Logical switch for ENACT insitu data set            
    913    !                       !     ln_cor                  Logical switch for Coriolis insitu data set        
    914    ln_profb   = .false.    ! Logical switch for feedback insitu data set      
    915    ln_sla     = .false.    ! Logical switch for SLA observations                
    916  
    917    ln_sladt   = .false.    ! Logical switch for AVISO SLA data               
    918  
    919    ln_slafb   = .false.    ! Logical switch for feedback SLA data             
    920                            !     ln_ssh                  Logical switch for SSH observations               
     910   ln_t3d     = .false.    ! Logical switch for T profile observations 
     911   ln_s3d     = .false.    ! Logical switch for S profile observations 
     912   ln_ena     = .false.    ! Logical switch for ENACT insitu data set 
     913   !                       !     ln_cor                  Logical switch for Coriolis insitu data set 
     914   ln_profb   = .false.    ! Logical switch for feedback insitu data set 
     915   ln_sla     = .false.    ! Logical switch for SLA observations 
     916 
     917   ln_sladt   = .false.    ! Logical switch for AVISO SLA data 
     918 
     919   ln_slafb   = .false.    ! Logical switch for feedback SLA data 
     920                           !     ln_ssh                  Logical switch for SSH observations 
    921921 
    922922   ln_sst     = .true.     ! Logical switch for SST observations 
     
    924924   ln_ghrsst  = .false.    !     ln_ghrsst               Logical switch for GHRSST observations       
    925925 
    926    ln_sstfb   = .false.    ! Logical switch for feedback SST data           
    927                            !     ln_sss                  Logical switch for SSS observations               
    928                            !     ln_seaice               Logical switch for Sea Ice observations         
    929                            !     ln_vel3d                Logical switch for velocity observations          
    930                            !     ln_velavcur             Logical switch for velocity daily av. cur.     
    931                            !     ln_velhrcur             Logical switch for velocity high freq. cur.    
    932                            !     ln_velavadcp            Logical switch for velocity daily av. ADCP   
     926   ln_sstfb   = .false.    ! Logical switch for feedback SST data 
     927                           !     ln_sss                  Logical switch for SSS observations 
     928                           !     ln_seaice               Logical switch for Sea Ice observations 
     929                           !     ln_vel3d                Logical switch for velocity observations 
     930                           !     ln_velavcur             Logical switch for velocity daily av. cur. 
     931                           !     ln_velhrcur             Logical switch for velocity high freq. cur. 
     932                           !     ln_velavadcp            Logical switch for velocity daily av. ADCP 
    933933                           !     ln_velhradcp            Logical switch for velocity high freq. ADCP 
    934                            !     ln_velfb                Logical switch for feedback velocity data        
    935                            !     ln_grid_global          Global distribtion of observations          
    936                            !     ln_grid_search_lookup   Logical switch for obs grid search w/lookup table   
    937                            !     grid_search_file        Grid search lookup file header  
    938                            !     enactfiles              ENACT input observation file names  
    939                            !     coriofiles              Coriolis input observation file name   
    940    !                       ! profbfiles: Profile feedback input observation file name  
     934                           !     ln_velfb                Logical switch for feedback velocity data 
     935                           !     ln_grid_global          Global distribtion of observations 
     936                           !     ln_grid_search_lookup   Logical switch for obs grid search w/lookup table 
     937                           !     grid_search_file        Grid search lookup file header 
     938                           !     enactfiles              ENACT input observation file names 
     939                           !     coriofiles              Coriolis input observation file name 
     940   !                       ! profbfiles: Profile feedback input observation file name 
    941941   profbfiles = 'profiles_01.nc' 
    942                            !     ln_profb_enatim         Enact feedback input time setting switch     
     942                           !     ln_profb_enatim         Enact feedback input time setting switch 
    943943                           !     slafilesact             Active SLA input observation file name 
    944                            !     slafilespas             Passive SLA input observation file name  
    945    !                       ! slafbfiles: Feedback SLA input observation file name  
     944                           !     slafilespas             Passive SLA input observation file name 
     945   !                       ! slafbfiles: Feedback SLA input observation file name 
    946946   slafbfiles = 'sla_01.nc' 
    947                            !     sstfiles                GHRSST input observation file name        
    948    !                       ! sstfbfiles: Feedback SST input observation file name  
     947                           !     sstfiles                GHRSST input observation file name 
     948   !                       ! sstfbfiles: Feedback SST input observation file name 
    949949   sstfbfiles = 'sst_01.nc' 'sst_02.nc' 'sst_03.nc' 'sst_04.nc' 'sst_05.nc' 
    950                            !     seaicefiles             Sea Ice input observation file name  
    951                            !     velavcurfiles           Vel. cur. daily av. input file name   
    952                            !     velhvcurfiles           Vel. cur. high freq. input file name   
    953                            !     velavadcpfiles          Vel. ADCP daily av. input file name     
    954                            !     velhvadcpfiles          Vel. ADCP high freq. input file name  
    955                            !     velfbfiles              Vel. feedback input observation file name  
    956                            !     dobsini                 Initial date in window YYYYMMDD.HHMMSS        
    957                            !     dobsend                 Final date in window YYYYMMDD.HHMMSS          
    958                            !     n1dint                  Type of vertical interpolation method         
    959                            !     n2dint                  Type of horizontal interpolation method        
    960                            !     ln_nea                  Rejection of observations near land switch     
    961    nmsshc     = 0          ! MSSH correction scheme                          
    962                            !     mdtcorr                 MDT  correction                                
    963                            !     mdtcutoff               MDT cutoff for computed correction           
    964    ln_altbias = .false.    ! Logical switch for alt bias                 
    965    ln_ignmis  = .true.     ! Logical switch for ignoring missing files    
    966                            !     endailyavtypes   ENACT daily average types                     
     950                           !     seaicefiles             Sea Ice input observation file name 
     951                           !     velavcurfiles           Vel. cur. daily av. input file name 
     952                           !     velhvcurfiles           Vel. cur. high freq. input file name 
     953                           !     velavadcpfiles          Vel. ADCP daily av. input file name 
     954                           !     velhvadcpfiles          Vel. ADCP high freq. input file name 
     955                           !     velfbfiles              Vel. feedback input observation file name 
     956                           !     dobsini                 Initial date in window YYYYMMDD.HHMMSS 
     957                           !     dobsend                 Final date in window YYYYMMDD.HHMMSS 
     958                           !     n1dint                  Type of vertical interpolation method 
     959                           !     n2dint                  Type of horizontal interpolation method 
     960                           !     ln_nea                  Rejection of observations near land switch 
     961   nmsshc     = 0          ! MSSH correction scheme 
     962                           !     mdtcorr                 MDT  correction 
     963                           !     mdtcutoff               MDT cutoff for computed correction 
     964   ln_altbias = .false.    ! Logical switch for alt bias 
     965   ln_ignmis  = .true.     ! Logical switch for ignoring missing files 
     966                           !     endailyavtypes   ENACT daily average types 
    967967   ln_grid_global = .true. 
    968968   ln_grid_search_lookup = .false. 
    969 /  
     969/ 
    970970!----------------------------------------------------------------------- 
    971971&nam_asminc   !   assimilation increments                               ('key_asminc') 
    972972!----------------------------------------------------------------------- 
    973     ln_bkgwri = .false.    !  Logical switch for writing out background state  
    974     ln_trjwri = .false.    !  Logical switch for writing out state trajectory 
     973    ln_bkgwri = .false.    !  Logical switch for writing out background state 
    975974    ln_trainc = .false.    !  Logical switch for applying tracer increments 
    976975    ln_dyninc = .false.    !  Logical switch for applying velocity increments 
    977     ln_sshinc = .false.    !  Logical switch for applying SSH increments  
     976    ln_sshinc = .false.    !  Logical switch for applying SSH increments 
    978977    ln_asmdin = .false.    !  Logical switch for Direct Initialization (DI) 
    979978    ln_asmiau = .false.    !  Logical switch for Incremental Analysis Updating (IAU) 
     
    983982    nitiaufin = 15         !  Timestep of end of IAU interval in [0,nitend-nit000-1] 
    984983    niaufn    = 0          !  Type of IAU weighting function 
    985     nittrjfrq = 0          !  Frequency of trajectory output for 4D-VAR 
    986984    ln_salfix = .false.    !  Logical switch for ensuring that the sa > salfixmin 
    987985    salfixmin = -9999      !  Minimum salinity after applying the increments 
  • branches/2012/dev_MERGE_2012/NEMOGCM/CONFIG/GYRE/EXP00/namelist

    r3680 r3764  
    33!! namelists    2 - Domain           (namzgr, namzgr_sco, namdom, namtsd) 
    44!!              3 - Surface boundary (namsbc, namsbc_ana, namsbc_flx, namsbc_clio, namsbc_core 
    5 !!                                    namsbc_cpl, namtra_qsr, namsbc_rnf,  
     5!!                                    namsbc_cpl, namtra_qsr, namsbc_rnf, 
    66!!                                    namsbc_apr, namsbc_ssr, namsbc_alb) 
    77!!              4 - lateral boundary (namlbc, namcla, namobc, namagrif, nambdy, nambdy_tide) 
     
    2525!----------------------------------------------------------------------- 
    2626   nn_no       =       0   !  job number (no more used...) 
    27    cn_exp      =  "GYRE"   !  experience name  
     27   cn_exp      =  "GYRE"   !  experience name 
    2828   nn_it000    =       1   !  first time step 
    2929   nn_itend    =    4320   !  last  time step 
     
    5252!!   namzgr_sco   s-coordinate or hybrid z-s-coordinate 
    5353!!   namdom       space and time domain (bathymetry, mesh, timestep) 
    54 !!   namtsd       data: temperature & salinity          
     54!!   namtsd       data: temperature & salinity 
    5555!!====================================================================== 
    5656! 
     
    107107/ 
    108108!----------------------------------------------------------------------- 
    109 &namtsd    !   data : Temperature  & Salinity                            
     109&namtsd    !   data : Temperature  & Salinity 
    110110!----------------------------------------------------------------------- 
    111111!          ! file name ! frequency (hours)    ! variable ! time interp. ! clim  !'yearly' or ! weights  ! rotation ! 
     
    138138&namsbc        !   Surface Boundary Condition (surface module) 
    139139!----------------------------------------------------------------------- 
    140    nn_fsbc     = 1         !  frequency of surface boundary condition computation  
     140   nn_fsbc     = 1         !  frequency of surface boundary condition computation 
    141141                           !     (also = the frequency of sea-ice model call) 
    142    ln_ana      = .true.    !  analytical formulation                    (T => fill namsbc_ana )  
     142   ln_ana      = .true.    !  analytical formulation                    (T => fill namsbc_ana ) 
    143143   ln_flx      = .false.   !  flux formulation                          (T => fill namsbc_flx ) 
    144    ln_blk_clio = .false.   !  CLIO bulk formulation                     (T => fill namsbc_clio)  
    145    ln_blk_core = .false.   !  CORE bulk formulation                     (T => fill namsbc_core)  
     144   ln_blk_clio = .false.   !  CLIO bulk formulation                     (T => fill namsbc_clio) 
     145   ln_blk_core = .false.   !  CORE bulk formulation                     (T => fill namsbc_core) 
    146146   ln_blk_mfs  = .false.   !  MFS bulk formulation                      (T => fill namsbc_mfs ) 
    147147   ln_cpl      = .false.   !  Coupled formulation                       (T => fill namsbc_cpl ) 
     
    156156   ln_rnf      = .false.   !  runoffs                                   (T => fill namsbc_rnf) 
    157157   ln_ssr      = .false.   !  Sea Surface Restoring on T and/or S       (T => fill namsbc_ssr) 
    158    nn_fwb      = 0         !  FreshWater Budget: =0 unchecked  
    159                            !     =1 global mean of e-p-r set to zero at each time step  
     158   nn_fwb      = 0         !  FreshWater Budget: =0 unchecked 
     159                           !     =1 global mean of e-p-r set to zero at each time step 
    160160                           !     =2 annual global mean of e-p-r set to zero 
    161161                           !     =3 global emp set to zero and spread out over erp area 
     
    186186 
    187187   cn_dir      = './'      !  root directory for the location of the flux files 
    188 /       
     188/ 
    189189!----------------------------------------------------------------------- 
    190190&namsbc_clio   !   namsbc_clio  CLIO bulk formulae 
     
    243243!                    !                       ! categories !  reference  !    orientation       ! grids  ! 
    244244! send 
    245 sn_snd_temp   =       'weighted oce and ice' ,    'no'    ,     ''      ,         ''           ,   ''     
    246 sn_snd_alb    =       'weighted ice'         ,    'no'    ,     ''      ,         ''           ,   ''     
    247 sn_snd_thick  =       'none'                 ,    'no'   ,     ''      ,         ''           ,   ''     
    248 sn_snd_crt    =       'none'                 ,    'no'    , 'spherical' , 'eastward-northward' ,  'T'        
    249 sn_snd_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''           ,   ''         
     245sn_snd_temp   =       'weighted oce and ice' ,    'no'    ,     ''      ,         ''           ,   '' 
     246sn_snd_alb    =       'weighted ice'         ,    'no'    ,     ''      ,         ''           ,   '' 
     247sn_snd_thick  =       'none'                 ,    'no'   ,     ''      ,         ''           ,   '' 
     248sn_snd_crt    =       'none'                 ,    'no'    , 'spherical' , 'eastward-northward' ,  'T' 
     249sn_snd_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''           ,   '' 
    250250! receive 
    251 sn_rcv_w10m   =       'none'                 ,    'no'    ,     ''      ,         ''          ,   ''     
    252 sn_rcv_taumod =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
    253 sn_rcv_tau    =       'oce only'             ,    'no'    , 'cartesian' , 'eastward-northward',  'U,V'    
    254 sn_rcv_dqnsdt =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
    255 sn_rcv_qsr    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''     
    256 sn_rcv_qns    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''     
    257 sn_rcv_emp    =       'conservative'         ,    'no'    ,     ''      ,         ''          ,   ''     
    258 sn_rcv_rnf    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
    259 sn_rcv_cal    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
    260 sn_rcv_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     251sn_rcv_w10m   =       'none'                 ,    'no'    ,     ''      ,         ''          ,   '' 
     252sn_rcv_taumod =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   '' 
     253sn_rcv_tau    =       'oce only'             ,    'no'    , 'cartesian' , 'eastward-northward',  'U,V' 
     254sn_rcv_dqnsdt =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   '' 
     255sn_rcv_qsr    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   '' 
     256sn_rcv_qns    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   '' 
     257sn_rcv_emp    =       'conservative'         ,    'no'    ,     ''      ,         ''          ,   '' 
     258sn_rcv_rnf    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   '' 
     259sn_rcv_cal    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   '' 
     260sn_rcv_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   '' 
    261261/ 
    262262!----------------------------------------------------------------------- 
     
    266266!              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! 
    267267   sn_chl      ='chlorophyll',        -1         , 'CHLA'    ,   .true.     , .true. , 'yearly'  , ''       , '' 
    268   
     268 
    269269   cn_dir      = './'      !  root directory for the location of the runoff files 
    270270   ln_traqsr   = .true.    !  Light penetration (T) or not (F) 
     
    315315   sn_sst      = 'sst_data'  ,        24         ,  'sst'    ,    .false.   , .false., 'yearly'  , ''       , '' 
    316316   sn_sss      = 'sss_data'  ,        -1         ,  'sss'    ,    .true.    , .true. , 'yearly'  , ''       , '' 
    317      
     317 
    318318   cn_dir      = './'      !  root directory for the location of the runoff files 
    319319   nn_sstr     =     0     !  add a retroaction term in the surface heat       flux (=1) or not (=0) 
     
    324324   ln_sssr_bnd =   .false. !  flag to bound erp term (associated with nn_sssr=2) 
    325325   rn_sssr_bnd =   4.e0    !  ABS(Max/Min) value of the damping erp term [mm/day] 
    326 /       
     326/ 
    327327!----------------------------------------------------------------------- 
    328328&namsbc_alb    !   albedo parameters 
    329329!----------------------------------------------------------------------- 
    330    rn_cloud    =    0.06   !  cloud correction to snow and ice albedo  
     330   rn_cloud    =    0.06   !  cloud correction to snow and ice albedo 
    331331   rn_albice   =    0.53   !  albedo of melting ice in the arctic and antarctic 
    332332   rn_alphd    =    0.80   !  coefficients for linear interpolation used to 
    333    rn_alphc    =    0.65   !  compute albedo between two extremes values  
     333   rn_alphc    =    0.65   !  compute albedo between two extremes values 
    334334   rn_alphdi   =    0.72   !  (Pyane, 1972) 
    335335/ 
     
    375375!!   namcla        cross land advection 
    376376!!   namobc        open boundaries parameters                           ("key_obc") 
    377 !!   namagrif      agrif nested grid ( read by child model only )       ("key_agrif")  
     377!!   namagrif      agrif nested grid ( read by child model only )       ("key_agrif") 
    378378!!   nambdy        Unstructured open boundaries                         ("key_bdy") 
    379379!!   namtide       Tidal forcing at open boundaries                     ("key_bdy_tides") 
     
    397397   ln_obc_clim = .false.   !  climatological obc data files (T) or not (F) 
    398398   ln_vol_cst  = .true.    !  impose the total volume conservation (T) or not (F) 
    399    ln_obc_fla  = .false.   !  Flather open boundary condition  
     399   ln_obc_fla  = .false.   !  Flather open boundary condition 
    400400   nn_obcdta   =    1      !  = 0 the obc data are equal to the initial state 
    401401                           !  = 1 the obc data are read in 'obc.dta' files 
     
    446446&nambdy        !  unstructured open boundaries                          ("key_bdy") 
    447447!----------------------------------------------------------------------- 
    448     nb_bdy = 1                            !  number of open boundary sets        
     448    nb_bdy = 1                            !  number of open boundary sets 
    449449    ln_coords_file = .true.               !  =T : read bdy coordinates from file 
    450450    cn_coords_file = 'coordinates.bdy.nc' !  bdy coordinates files 
     
    482482/ 
    483483!----------------------------------------------------------------------- 
    484 &nambdy_tide     ! tidal forcing at open boundaries               
     484&nambdy_tide     ! tidal forcing at open boundaries 
    485485!----------------------------------------------------------------------- 
    486486   filtide      = 'bdydta/amm12_bdytide_'         !  file name root of tidal forcing files 
     
    521521!!====================================================================== 
    522522!!   nambfr        bottom friction 
    523 !!   nambbc        bottom temperature boundary condition                
     523!!   nambbc        bottom temperature boundary condition 
    524524!!   nambbl        bottom boundary layer scheme                         ("key_trabbl") 
    525525!!====================================================================== 
     
    541541!----------------------------------------------------------------------- 
    542542   ln_trabbc   = .false.   !  Apply a geothermal heating at the ocean bottom 
    543    nn_geoflx   =    0      !  geothermal heat flux: = 0 no flux  
     543   nn_geoflx   =    0      !  geothermal heat flux: = 0 no flux 
    544544                           !     = 1 constant flux 
    545                            !     = 2 variable flux (read in geothermal_heating.nc in mW/m2)  
     545                           !     = 2 variable flux (read in geothermal_heating.nc in mW/m2) 
    546546   rn_geoflx_cst = 86.4e-3 !  Constant value of geothermal heat flux [W/m2] 
    547547/ 
     
    561561!!   namtra_adv    advection scheme 
    562562!!   namtra_ldf    lateral diffusion scheme 
    563 !!   namtra_dmp    T & S newtonian damping                         
     563!!   namtra_dmp    T & S newtonian damping 
    564564!!====================================================================== 
    565565! 
     
    575575/ 
    576576!----------------------------------------------------------------------- 
    577 &namtra_adv    !   advection scheme for tracer  
    578 !----------------------------------------------------------------------- 
    579    ln_traadv_cen2   =  .false.  !  2nd order centered scheme    
    580    ln_traadv_tvd    =  .true.   !  TVD scheme                 
    581    ln_traadv_muscl  =  .false.  !  MUSCL scheme              
    582    ln_traadv_muscl2 =  .false.  !  MUSCL2 scheme + cen2 at boundaries   
    583    ln_traadv_ubs    =  .false.  !  UBS scheme                  
    584    ln_traadv_qck    =  .false.  !  QUICKEST scheme                  
     577&namtra_adv    !   advection scheme for tracer 
     578!----------------------------------------------------------------------- 
     579   ln_traadv_cen2   =  .false.  !  2nd order centered scheme 
     580   ln_traadv_tvd    =  .true.   !  TVD scheme 
     581   ln_traadv_muscl  =  .false.  !  MUSCL scheme 
     582   ln_traadv_muscl2 =  .false.  !  MUSCL2 scheme + cen2 at boundaries 
     583   ln_traadv_ubs    =  .false.  !  UBS scheme 
     584   ln_traadv_qck    =  .false.  !  QUICKEST scheme 
    585585   ln_traadv_msc_ups=  .false.  !  use upstream scheme within muscl  
    586586/ 
     
    610610/ 
    611611!----------------------------------------------------------------------- 
    612 &namtra_dmp    !   tracer: T & S newtonian damping                       
     612&namtra_dmp    !   tracer: T & S newtonian damping 
    613613!----------------------------------------------------------------------- 
    614614   ln_tradmp   =  .false.  !  add a damping termn (T) or not (F) 
     
    638638&namdyn_adv    !   formulation of the momentum advection 
    639639!----------------------------------------------------------------------- 
    640    ln_dynadv_vec = .true.  !  vector form (T) or flux form (F)   
     640   ln_dynadv_vec = .true.  !  vector form (T) or flux form (F) 
    641641   ln_dynadv_cen2= .false. !  flux form - 2nd order centered scheme 
    642    ln_dynadv_ubs = .false. !  flux form - 3rd order UBS      scheme  
    643 /   
     642   ln_dynadv_ubs = .false. !  flux form - 3rd order UBS      scheme 
     643/ 
    644644!----------------------------------------------------------------------- 
    645645&namdyn_vor    !   option of physics/algorithm (not control by CPP keys) 
    646646!----------------------------------------------------------------------- 
    647    ln_dynvor_ene = .true.  !  enstrophy conserving scheme   
    648    ln_dynvor_ens = .false. !  energy conserving scheme     
    649    ln_dynvor_mix = .false. !  mixed scheme                
    650    ln_dynvor_een = .false. !  energy & enstrophy scheme   
     647   ln_dynvor_ene = .true.  !  energy    conserving scheme   
     648   ln_dynvor_ens = .false. !  enstrophy conserving scheme     
     649   ln_dynvor_mix = .false. !  mixed scheme 
     650   ln_dynvor_een = .false. !  energy & enstrophy scheme 
    651651/ 
    652652!----------------------------------------------------------------------- 
    653653&namdyn_hpg    !   Hydrostatic pressure gradient option 
    654654!----------------------------------------------------------------------- 
    655    ln_hpg_zco  = .true.    !  z-coordinate - full steps                    
     655   ln_hpg_zco  = .true.    !  z-coordinate - full steps 
    656656   ln_hpg_zps  = .false.   !  z-coordinate - partial steps (interpolation) 
    657657   ln_hpg_sco  = .false.   !  s-coordinate (standard jacobian formulation) 
     
    671671&namdyn_ldf    !   lateral diffusion on momentum 
    672672!----------------------------------------------------------------------- 
    673    !                       !  Type of the operator :  
    674    ln_dynldf_lap    =  .true.   !  laplacian operator          
    675    ln_dynldf_bilap  =  .false.  !  bilaplacian operator     
    676    !                       !  Direction of action  :  
    677    ln_dynldf_level  =  .false.  !  iso-level                
     673   !                       !  Type of the operator : 
     674   ln_dynldf_lap    =  .true.   !  laplacian operator 
     675   ln_dynldf_bilap  =  .false.  !  bilaplacian operator 
     676   !                       !  Direction of action  : 
     677   ln_dynldf_level  =  .false.  !  iso-level 
    678678   ln_dynldf_hor    =  .true.   !  horizontal (geopotential)            (require "key_ldfslp" in s-coord.) 
    679679   ln_dynldf_iso    =  .false.  !  iso-neutral                          (require "key_ldfslp") 
     
    754754&namzdf_kpp    !   K-Profile Parameterization dependent vertical mixing  ("key_zdfkpp", and optionally: 
    755755!------------------------------------------------------------------------ "key_kppcustom" or "key_kpplktb") 
    756    ln_kpprimix = .true.    !  shear instability mixing  
     756   ln_kpprimix = .true.    !  shear instability mixing 
    757757   rn_difmiw   =  1.0e-04  !  constant internal wave viscosity [m2/s] 
    758758   rn_difsiw   =  0.1e-04  !  constant internal wave diffusivity [m2/s] 
    759759   rn_riinfty  =  0.8      !  local Richardson Number limit for shear instability 
    760760   rn_difri    =  0.0050   !  maximum shear mixing at Rig = 0    [m2/s] 
    761    rn_bvsqcon  = -0.01e-07 !  Brunt-Vaisala squared for maximum convection [1/s2]  
    762    rn_difcon   =  1.       !  maximum mixing in interior convection [m2/s]  
     761   rn_bvsqcon  = -0.01e-07 !  Brunt-Vaisala squared for maximum convection [1/s2] 
     762   rn_difcon   =  1.       !  maximum mixing in interior convection [m2/s] 
    763763   nn_avb      =  0        !  horizontal averaged (=1) or not (=0) on avt and amv 
    764764   nn_ave      =  1        !  constant (=0) or profile (=1) background on avt 
     
    794794   rn_n2min    = 1.e-8     !  threshold of the Brunt-Vaisala frequency (s-1) 
    795795   rn_tfe      = 0.333     !  tidal dissipation efficiency 
    796    rn_me       = 0.2       !  mixing efficiency  
     796   rn_me       = 0.2       !  mixing efficiency 
    797797   ln_tmx_itf  = .false.   !  ITF specific parameterisation 
    798798   rn_tfe_itf  = 1.        !  ITF tidal dissipation efficiency 
     
    804804!!   nammpp            Massively Parallel Processing                    ("key_mpp_mpi) 
    805805!!   namctl            Control prints & Benchmark 
    806 !!   namsol            elliptic solver / island / free surface  
    807 !!====================================================================== 
    808 ! 
    809 !----------------------------------------------------------------------- 
    810 &namsol        !   elliptic solver / island / free surface  
     806!!   namsol            elliptic solver / island / free surface 
     807!!====================================================================== 
     808! 
     809!----------------------------------------------------------------------- 
     810&namsol        !   elliptic solver / island / free surface 
    811811!----------------------------------------------------------------------- 
    812812   nn_solv     =      2    !  elliptic solver: =1 preconditioned conjugate gradient (pcg) 
     
    827827   nn_buffer   =   0       !  size in bytes of exported buffer ('B' case), 0 no exportation 
    828828   ln_nnogather=  .false.  !  activate code to avoid mpi_allgather use at the northfold 
    829    jpni        =   0       !  jpni   number of processors following i (set automatically if < 1)      
    830    jpnj        =   0       !  jpnj   number of processors following j (set automatically if < 1)      
    831    jpnij       =   0       !  jpnij  number of local domains (set automatically if < 1)               
     829   jpni        =   0       !  jpni   number of processors following i (set automatically if < 1) 
     830   jpnj        =   0       !  jpnj   number of processors following j (set automatically if < 1) 
     831   jpnij       =   0       !  jpnij  number of local domains (set automatically if < 1) 
    832832/ 
    833833!----------------------------------------------------------------------- 
     
    854854!!   namflo       float parameters                                      ("key_float") 
    855855!!   namptr       Poleward Transport Diagnostics 
    856 !!   namhsb       Heat and salt budgets  
     856!!   namhsb       Heat and salt budgets 
    857857!!====================================================================== 
    858858! 
     
    899899   ln_diaptr  = .false.    !  Poleward heat and salt transport (T) or not (F) 
    900900   ln_diaznl  = .true.     !  Add zonal means and meridional stream functions 
    901    ln_subbas  = .true.     !  Atlantic/Pacific/Indian basins computation (T) or not  
     901   ln_subbas  = .true.     !  Atlantic/Pacific/Indian basins computation (T) or not 
    902902                           !  (orca configuration only, need input basins mask file named "subbasins.nc" 
    903903   ln_ptrcomp = .true.     !  Add decomposition : overturning 
     
    906906/ 
    907907!----------------------------------------------------------------------- 
    908 &namhsb       !  Heat and salt budgets  
     908&namhsb       !  Heat and salt budgets 
    909909!----------------------------------------------------------------------- 
    910910   ln_diahsb  = .false.    !  check the heat and salt budgets (T) or not (F) 
     
    918918                           !     -1 : debug all section 
    919919                           !  0 < n : debug section number n 
    920 /  
     920/ 
    921921 
    922922!!====================================================================== 
     
    930930&namobs       !  observation usage switch                               ('key_diaobs') 
    931931!----------------------------------------------------------------------- 
    932    ln_t3d     = .false.    ! Logical switch for T profile observations          
    933    ln_s3d     = .false.    ! Logical switch for S profile observations           
    934    ln_ena     = .false.    ! Logical switch for ENACT insitu data set            
    935    !                       !     ln_cor                  Logical switch for Coriolis insitu data set        
    936    ln_profb   = .false.    ! Logical switch for feedback insitu data set      
    937    ln_sla     = .false.    ! Logical switch for SLA observations                
    938  
    939    ln_sladt   = .false.    ! Logical switch for AVISO SLA data               
    940  
    941    ln_slafb   = .false.    ! Logical switch for feedback SLA data             
    942                            !     ln_ssh                  Logical switch for SSH observations               
     932   ln_t3d     = .false.    ! Logical switch for T profile observations 
     933   ln_s3d     = .false.    ! Logical switch for S profile observations 
     934   ln_ena     = .false.    ! Logical switch for ENACT insitu data set 
     935   !                       !     ln_cor                  Logical switch for Coriolis insitu data set 
     936   ln_profb   = .false.    ! Logical switch for feedback insitu data set 
     937   ln_sla     = .false.    ! Logical switch for SLA observations 
     938 
     939   ln_sladt   = .false.    ! Logical switch for AVISO SLA data 
     940 
     941   ln_slafb   = .false.    ! Logical switch for feedback SLA data 
     942                           !     ln_ssh                  Logical switch for SSH observations 
    943943 
    944944   ln_sst     = .true.     ! Logical switch for SST observations               
     
    946946   ln_ghrsst  = .false.    !     ln_ghrsst               Logical switch for GHRSST observations           
    947947 
    948    ln_sstfb   = .false.    ! Logical switch for feedback SST data           
    949                            !     ln_sss                  Logical switch for SSS observations               
    950                            !     ln_seaice               Logical switch for Sea Ice observations         
    951                            !     ln_vel3d                Logical switch for velocity observations          
    952                            !     ln_velavcur             Logical switch for velocity daily av. cur.     
    953                            !     ln_velhrcur             Logical switch for velocity high freq. cur.    
    954                            !     ln_velavadcp            Logical switch for velocity daily av. ADCP   
     948   ln_sstfb   = .false.    ! Logical switch for feedback SST data 
     949                           !     ln_sss                  Logical switch for SSS observations 
     950                           !     ln_seaice               Logical switch for Sea Ice observations 
     951                           !     ln_vel3d                Logical switch for velocity observations 
     952                           !     ln_velavcur             Logical switch for velocity daily av. cur. 
     953                           !     ln_velhrcur             Logical switch for velocity high freq. cur. 
     954                           !     ln_velavadcp            Logical switch for velocity daily av. ADCP 
    955955                           !     ln_velhradcp            Logical switch for velocity high freq. ADCP 
    956                            !     ln_velfb                Logical switch for feedback velocity data        
    957                            !     ln_grid_global          Global distribtion of observations          
    958                            !     ln_grid_search_lookup   Logical switch for obs grid search w/lookup table   
    959                            !     grid_search_file        Grid search lookup file header  
    960                            !     enactfiles              ENACT input observation file names  
    961                            !     coriofiles              Coriolis input observation file name   
    962    !                       ! profbfiles: Profile feedback input observation file name  
     956                           !     ln_velfb                Logical switch for feedback velocity data 
     957                           !     ln_grid_global          Global distribtion of observations 
     958                           !     ln_grid_search_lookup   Logical switch for obs grid search w/lookup table 
     959                           !     grid_search_file        Grid search lookup file header 
     960                           !     enactfiles              ENACT input observation file names 
     961                           !     coriofiles              Coriolis input observation file name 
     962   !                       ! profbfiles: Profile feedback input observation file name 
    963963   profbfiles = 'profiles_01.nc' 
    964                            !     ln_profb_enatim         Enact feedback input time setting switch     
     964                           !     ln_profb_enatim         Enact feedback input time setting switch 
    965965                           !     slafilesact             Active SLA input observation file name 
    966                            !     slafilespas             Passive SLA input observation file name  
    967    !                       ! slafbfiles: Feedback SLA input observation file name  
     966                           !     slafilespas             Passive SLA input observation file name 
     967   !                       ! slafbfiles: Feedback SLA input observation file name 
    968968   slafbfiles = 'sla_01.nc' 
    969                            !     sstfiles                GHRSST input observation file name        
    970    !                       ! sstfbfiles: Feedback SST input observation file name  
     969                           !     sstfiles                GHRSST input observation file name 
     970   !                       ! sstfbfiles: Feedback SST input observation file name 
    971971   sstfbfiles = 'sst_01.nc' 'sst_02.nc' 'sst_03.nc' 'sst_04.nc' 'sst_05.nc' 
    972                            !     seaicefiles             Sea Ice input observation file name  
    973                            !     velavcurfiles           Vel. cur. daily av. input file name   
    974                            !     velhvcurfiles           Vel. cur. high freq. input file name   
    975                            !     velavadcpfiles          Vel. ADCP daily av. input file name     
    976                            !     velhvadcpfiles          Vel. ADCP high freq. input file name  
    977                            !     velfbfiles              Vel. feedback input observation file name  
    978                            !     dobsini                 Initial date in window YYYYMMDD.HHMMSS        
    979                            !     dobsend                 Final date in window YYYYMMDD.HHMMSS          
    980                            !     n1dint                  Type of vertical interpolation method         
    981                            !     n2dint                  Type of horizontal interpolation method        
    982                            !     ln_nea                  Rejection of observations near land switch     
    983    nmsshc     = 0          ! MSSH correction scheme                          
    984                            !     mdtcorr                 MDT  correction                                
    985                            !     mdtcutoff               MDT cutoff for computed correction           
    986    ln_altbias = .false.    ! Logical switch for alt bias                 
    987    ln_ignmis  = .true.     ! Logical switch for ignoring missing files    
    988                            !     endailyavtypes   ENACT daily average types                     
     972                           !     seaicefiles             Sea Ice input observation file name 
     973                           !     velavcurfiles           Vel. cur. daily av. input file name 
     974                           !     velhvcurfiles           Vel. cur. high freq. input file name 
     975                           !     velavadcpfiles          Vel. ADCP daily av. input file name 
     976                           !     velhvadcpfiles          Vel. ADCP high freq. input file name 
     977                           !     velfbfiles              Vel. feedback input observation file name 
     978                           !     dobsini                 Initial date in window YYYYMMDD.HHMMSS 
     979                           !     dobsend                 Final date in window YYYYMMDD.HHMMSS 
     980                           !     n1dint                  Type of vertical interpolation method 
     981                           !     n2dint                  Type of horizontal interpolation method 
     982                           !     ln_nea                  Rejection of observations near land switch 
     983   nmsshc     = 0          ! MSSH correction scheme 
     984                           !     mdtcorr                 MDT  correction 
     985                           !     mdtcutoff               MDT cutoff for computed correction 
     986   ln_altbias = .false.    ! Logical switch for alt bias 
     987   ln_ignmis  = .true.     ! Logical switch for ignoring missing files 
     988                           !     endailyavtypes   ENACT daily average types 
    989989   ln_grid_global = .true. 
    990990   ln_grid_search_lookup = .false. 
    991 /  
     991/ 
    992992!----------------------------------------------------------------------- 
    993993&nam_asminc   !   assimilation increments                               ('key_asminc') 
    994994!----------------------------------------------------------------------- 
    995     ln_bkgwri = .false.    !  Logical switch for writing out background state  
    996     ln_trjwri = .false.    !  Logical switch for writing out state trajectory 
     995    ln_bkgwri = .false.    !  Logical switch for writing out background state 
    997996    ln_trainc = .false.    !  Logical switch for applying tracer increments 
    998997    ln_dyninc = .false.    !  Logical switch for applying velocity increments 
    999     ln_sshinc = .false.    !  Logical switch for applying SSH increments  
     998    ln_sshinc = .false.    !  Logical switch for applying SSH increments 
    1000999    ln_asmdin = .false.    !  Logical switch for Direct Initialization (DI) 
    10011000    ln_asmiau = .false.    !  Logical switch for Incremental Analysis Updating (IAU) 
     
    10051004    nitiaufin = 15         !  Timestep of end of IAU interval in [0,nitend-nit000-1] 
    10061005    niaufn    = 0          !  Type of IAU weighting function 
    1007     nittrjfrq = 0          !  Frequency of trajectory output for 4D-VAR 
    10081006    ln_salfix = .false.    !  Logical switch for ensuring that the sa > salfixmin 
    10091007    salfixmin = -9999      !  Minimum salinity after applying the increments 
  • branches/2012/dev_MERGE_2012/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist

    r3744 r3764  
    935935!----------------------------------------------------------------------- 
    936936    ln_bkgwri = .false.    !  Logical switch for writing out background state  
    937     ln_trjwri = .false.    !  Logical switch for writing out state trajectory 
    938937    ln_trainc = .false.    !  Logical switch for applying tracer increments 
    939938    ln_dyninc = .false.    !  Logical switch for applying velocity increments 
     
    946945    nitiaufin = 15         !  Timestep of end of IAU interval in [0,nitend-nit000-1] 
    947946    niaufn    = 0          !  Type of IAU weighting function 
    948     nittrjfrq = 0          !  Frequency of trajectory output for 4D-VAR 
    949947    ln_salfix = .false.    !  Logical switch for ensuring that the sa > salfixmin 
    950948    salfixmin = -9999      !  Minimum salinity after applying the increments 
  • branches/2012/dev_MERGE_2012/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist

    r3680 r3764  
    592592&namdyn_vor    !   option of physics/algorithm (not control by CPP keys) 
    593593!----------------------------------------------------------------------- 
    594    ln_dynvor_ene = .false. !  enstrophy conserving scheme   
    595    ln_dynvor_ens = .false. !  energy conserving scheme     
     594   ln_dynvor_ene = .false. !  energy    conserving scheme   
     595   ln_dynvor_ens = .false. !  enstrophy conserving scheme     
    596596   ln_dynvor_mix = .false. !  mixed scheme                
    597597   ln_dynvor_een = .true.  !  energy & enstrophy scheme   
     
    930930!----------------------------------------------------------------------- 
    931931    ln_bkgwri = .false.    !  Logical switch for writing out background state  
    932     ln_trjwri = .false.    !  Logical switch for writing out state trajectory 
    933932    ln_trainc = .false.    !  Logical switch for applying tracer increments 
    934933    ln_dyninc = .false.    !  Logical switch for applying velocity increments 
     
    941940    nitiaufin = 15         !  Timestep of end of IAU interval in [0,nitend-nit000-1] 
    942941    niaufn    = 0          !  Type of IAU weighting function 
    943     nittrjfrq = 0          !  Frequency of trajectory output for 4D-VAR 
    944942    ln_salfix = .false.    !  Logical switch for ensuring that the sa > salfixmin 
    945943    salfixmin = -9999      !  Minimum salinity after applying the increments 
  • branches/2012/dev_MERGE_2012/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist

    r3680 r3764  
    33!! namelists    2 - Domain           (namzgr, namzgr_sco, namdom, namtsd) 
    44!!              3 - Surface boundary (namsbc, namsbc_ana, namsbc_flx, namsbc_clio, namsbc_core 
    5 !!                                    namsbc_cpl, namtra_qsr, namsbc_rnf,  
     5!!                                    namsbc_cpl, namtra_qsr, namsbc_rnf, 
    66!!                                    namsbc_apr, namsbc_ssr, namsbc_alb) 
    77!!              4 - lateral boundary (namlbc, namcla, namobc, namagrif, nambdy, nambdy_tide) 
     
    2525!----------------------------------------------------------------------- 
    2626   nn_no       =       0   !  job number (no more used...) 
    27    cn_exp      =  "ORCA2"  !  experience name  
     27   cn_exp      =  "ORCA2"  !  experience name 
    2828   nn_it000    =       1   !  first time step 
    2929   nn_itend    =    5475   !  last  time step (std 5475) 
     
    5252!!   namzgr_sco   s-coordinate or hybrid z-s-coordinate 
    5353!!   namdom       space and time domain (bathymetry, mesh, timestep) 
    54 !!   namtsd       data: temperature & salinity                          
     54!!   namtsd       data: temperature & salinity 
    5555!!====================================================================== 
    5656! 
     
    107107/ 
    108108!----------------------------------------------------------------------- 
    109 &namtsd    !   data : Temperature  & Salinity                            
     109&namtsd    !   data : Temperature  & Salinity 
    110110!----------------------------------------------------------------------- 
    111111!          ! file name ! frequency (hours)    ! variable ! time interp. ! clim  !'yearly' or ! weights  ! rotation ! 
     
    138138&namsbc        !   Surface Boundary Condition (surface module) 
    139139!----------------------------------------------------------------------- 
    140    nn_fsbc     = 5         !  frequency of surface boundary condition computation  
     140   nn_fsbc     = 5         !  frequency of surface boundary condition computation 
    141141                           !     (also = the frequency of sea-ice model call) 
    142    ln_ana      = .false.   !  analytical formulation                    (T => fill namsbc_ana )  
     142   ln_ana      = .false.   !  analytical formulation                    (T => fill namsbc_ana ) 
    143143   ln_flx      = .false.   !  flux formulation                          (T => fill namsbc_flx ) 
    144    ln_blk_clio = .false.   !  CLIO bulk formulation                     (T => fill namsbc_clio)  
    145    ln_blk_core = .true.    !  CORE bulk formulation                     (T => fill namsbc_core)  
     144   ln_blk_clio = .false.   !  CLIO bulk formulation                     (T => fill namsbc_clio) 
     145   ln_blk_core = .true.    !  CORE bulk formulation                     (T => fill namsbc_core) 
    146146   ln_blk_mfs  = .false.   !  MFS bulk formulation                      (T => fill namsbc_mfs ) 
    147147   ln_cpl      = .false.   !  Coupled formulation                       (T => fill namsbc_cpl ) 
     
    156156   ln_rnf      = .true.    !  runoffs                                   (T => fill namsbc_rnf) 
    157157   ln_ssr      = .true.    !  Sea Surface Restoring on T and/or S       (T => fill namsbc_ssr) 
    158    nn_fwb      = 3         !  FreshWater Budget: =0 unchecked  
    159                            !     =1 global mean of e-p-r set to zero at each time step  
     158   nn_fwb      = 3         !  FreshWater Budget: =0 unchecked 
     159                           !     =1 global mean of e-p-r set to zero at each time step 
    160160                           !     =2 annual global mean of e-p-r set to zero 
    161161                           !     =3 global emp set to zero and spread out over erp area 
     
    186186 
    187187   cn_dir      = './'      !  root directory for the location of the flux files 
    188 /       
     188/ 
    189189!----------------------------------------------------------------------- 
    190190&namsbc_clio   !   namsbc_clio  CLIO bulk formulae 
     
    243243!                    !                       ! categories !  reference  !    orientation       ! grids  ! 
    244244! send 
    245 sn_snd_temp   =       'weighted oce and ice' ,    'no'    ,     ''      ,         ''           ,   ''     
    246 sn_snd_alb    =       'weighted ice'         ,    'no'    ,     ''      ,         ''           ,   ''     
    247 sn_snd_thick  =       'none'                 ,    'no'   ,     ''      ,         ''           ,   ''     
    248 sn_snd_crt    =       'none'                 ,    'no'    , 'spherical' , 'eastward-northward' ,  'T'        
    249 sn_snd_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''           ,   ''         
     245sn_snd_temp   =       'weighted oce and ice' ,    'no'    ,     ''      ,         ''           ,   '' 
     246sn_snd_alb    =       'weighted ice'         ,    'no'    ,     ''      ,         ''           ,   '' 
     247sn_snd_thick  =       'none'                 ,    'no'   ,     ''      ,         ''           ,   '' 
     248sn_snd_crt    =       'none'                 ,    'no'    , 'spherical' , 'eastward-northward' ,  'T' 
     249sn_snd_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''           ,   '' 
    250250! receive 
    251 sn_rcv_w10m   =       'none'                 ,    'no'    ,     ''      ,         ''          ,   ''     
    252 sn_rcv_taumod =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
    253 sn_rcv_tau    =       'oce only'             ,    'no'    , 'cartesian' , 'eastward-northward',  'U,V'    
    254 sn_rcv_dqnsdt =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
    255 sn_rcv_qsr    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''     
    256 sn_rcv_qns    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''     
    257 sn_rcv_emp    =       'conservative'         ,    'no'    ,     ''      ,         ''          ,   ''     
    258 sn_rcv_rnf    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
    259 sn_rcv_cal    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
    260 sn_rcv_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     251sn_rcv_w10m   =       'none'                 ,    'no'    ,     ''      ,         ''          ,   '' 
     252sn_rcv_taumod =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   '' 
     253sn_rcv_tau    =       'oce only'             ,    'no'    , 'cartesian' , 'eastward-northward',  'U,V' 
     254sn_rcv_dqnsdt =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   '' 
     255sn_rcv_qsr    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   '' 
     256sn_rcv_qns    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   '' 
     257sn_rcv_emp    =       'conservative'         ,    'no'    ,     ''      ,         ''          ,   '' 
     258sn_rcv_rnf    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   '' 
     259sn_rcv_cal    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   '' 
     260sn_rcv_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   '' 
    261261/ 
    262262!----------------------------------------------------------------------- 
     
    318318   cn_dir      = './'      !  root directory for the location of the runoff files 
    319319   nn_sstr     =     0     !  add a retroaction term in the surface heat       flux (=1) or not (=0) 
    320    nn_sssr     =     2     !  add a damping     term in the surface freshwater flux (=2)  
     320   nn_sssr     =     2     !  add a damping     term in the surface freshwater flux (=2) 
    321321                           !  or to SSS only (=1) or no damping term (=0) 
    322322   rn_dqdt     =   -40.    !  magnitude of the retroaction on temperature   [W/m2/K] 
     
    324324   ln_sssr_bnd =   .true.  !  flag to bound erp term (associated with nn_sssr=2) 
    325325   rn_sssr_bnd =   4.e0    !  ABS(Max/Min) value of the damping erp term [mm/day] 
    326 /       
     326/ 
    327327!----------------------------------------------------------------------- 
    328328&namsbc_alb    !   albedo parameters 
    329329!----------------------------------------------------------------------- 
    330    rn_cloud    =    0.06   !  cloud correction to snow and ice albedo  
     330   rn_cloud    =    0.06   !  cloud correction to snow and ice albedo 
    331331   rn_albice   =    0.53   !  albedo of melting ice in the arctic and antarctic 
    332332   rn_alphd    =    0.80   !  coefficients for linear interpolation used to 
    333    rn_alphc    =    0.65   !  compute albedo between two extremes values  
     333   rn_alphc    =    0.65   !  compute albedo between two extremes values 
    334334   rn_alphdi   =    0.72   !  (Pyane, 1972) 
    335335/ 
     
    375375!!   namcla        cross land advection 
    376376!!   namobc        open boundaries parameters                           ("key_obc") 
    377 !!   namagrif      agrif nested grid ( read by child model only )       ("key_agrif")  
     377!!   namagrif      agrif nested grid ( read by child model only )       ("key_agrif") 
    378378!!   nambdy        Unstructured open boundaries                         ("key_bdy") 
    379379!!   namtide       Tidal forcing at open boundaries                     ("key_bdy_tides") 
     
    397397   ln_obc_clim = .false.   !  climatological obc data files (T) or not (F) 
    398398   ln_vol_cst  = .true.    !  impose the total volume conservation (T) or not (F) 
    399    ln_obc_fla  = .false.   !  Flather open boundary condition  
     399   ln_obc_fla  = .false.   !  Flather open boundary condition 
    400400   nn_obcdta   =    1      !  = 0 the obc data are equal to the initial state 
    401401                           !  = 1 the obc data are read in 'obc.dta' files 
     
    441441&nambdy        !  unstructured open boundaries                          ("key_bdy") 
    442442!----------------------------------------------------------------------- 
    443     nb_bdy = 1                            !  number of open boundary sets        
     443    nb_bdy = 1                            !  number of open boundary sets 
    444444    ln_coords_file = .true.               !  =T : read bdy coordinates from file 
    445445    cn_coords_file = 'coordinates.bdy.nc' !  bdy coordinates files 
     
    477477/ 
    478478!----------------------------------------------------------------------- 
    479 &nambdy_tide     ! tidal forcing at open boundaries               
     479&nambdy_tide     ! tidal forcing at open boundaries 
    480480!----------------------------------------------------------------------- 
    481481   filtide      = 'bdydta/amm12_bdytide_'         !  file name root of tidal forcing files 
     
    516516!!====================================================================== 
    517517!!   nambfr        bottom friction 
    518 !!   nambbc        bottom temperature boundary condition                
     518!!   nambbc        bottom temperature boundary condition 
    519519!!   nambbl        bottom boundary layer scheme                         ("key_trabbl") 
    520520!!====================================================================== 
     
    536536!----------------------------------------------------------------------- 
    537537   ln_trabbc   = .true.    !  Apply a geothermal heating at the ocean bottom 
    538    nn_geoflx   =    2      !  geothermal heat flux: = 0 no flux  
     538   nn_geoflx   =    2      !  geothermal heat flux: = 0 no flux 
    539539                           !     = 1 constant flux 
    540                            !     = 2 variable flux (read in geothermal_heating.nc in mW/m2)  
     540                           !     = 2 variable flux (read in geothermal_heating.nc in mW/m2) 
    541541   rn_geoflx_cst = 86.4e-3 !  Constant value of geothermal heat flux [W/m2] 
    542542/ 
     
    556556!!   namtra_adv    advection scheme 
    557557!!   namtra_ldf    lateral diffusion scheme 
    558 !!   namtra_dmp    T & S newtonian damping                         
     558!!   namtra_dmp    T & S newtonian damping 
    559559!!====================================================================== 
    560560! 
     
    570570/ 
    571571!----------------------------------------------------------------------- 
    572 &namtra_adv    !   advection scheme for tracer  
    573 !----------------------------------------------------------------------- 
    574    ln_traadv_cen2   =  .false.  !  2nd order centered scheme    
    575    ln_traadv_tvd    =  .true.   !  TVD scheme                 
    576    ln_traadv_muscl  =  .false.  !  MUSCL scheme              
    577    ln_traadv_muscl2 =  .false.  !  MUSCL2 scheme + cen2 at boundaries   
    578    ln_traadv_ubs    =  .false.  !  UBS scheme                  
    579    ln_traadv_qck    =  .false.  !  QUICKEST scheme                  
     572&namtra_adv    !   advection scheme for tracer 
     573!----------------------------------------------------------------------- 
     574   ln_traadv_cen2   =  .false.  !  2nd order centered scheme 
     575   ln_traadv_tvd    =  .true.   !  TVD scheme 
     576   ln_traadv_muscl  =  .false.  !  MUSCL scheme 
     577   ln_traadv_muscl2 =  .false.  !  MUSCL2 scheme + cen2 at boundaries 
     578   ln_traadv_ubs    =  .false.  !  UBS scheme 
     579   ln_traadv_qck    =  .false.  !  QUICKEST scheme 
    580580   ln_traadv_msc_ups=  .false.  !  use upstream scheme within muscl 
    581581/ 
     
    605605/ 
    606606!----------------------------------------------------------------------- 
    607 &namtra_dmp    !   tracer: T & S newtonian damping                   
     607&namtra_dmp    !   tracer: T & S newtonian damping 
    608608!----------------------------------------------------------------------- 
    609609   ln_tradmp   =  .true.   !  add a damping termn (T) or not (F) 
     
    633633&namdyn_adv    !   formulation of the momentum advection 
    634634!----------------------------------------------------------------------- 
    635    ln_dynadv_vec = .true.  !  vector form (T) or flux form (F)   
     635   ln_dynadv_vec = .true.  !  vector form (T) or flux form (F) 
    636636   ln_dynadv_cen2= .false. !  flux form - 2nd order centered scheme 
    637    ln_dynadv_ubs = .false. !  flux form - 3rd order UBS      scheme  
    638 /   
     637   ln_dynadv_ubs = .false. !  flux form - 3rd order UBS      scheme 
     638/ 
    639639!----------------------------------------------------------------------- 
    640640&namdyn_vor    !   option of physics/algorithm (not control by CPP keys) 
    641641!----------------------------------------------------------------------- 
    642    ln_dynvor_ene = .false. !  enstrophy conserving scheme   
    643    ln_dynvor_ens = .false. !  energy conserving scheme     
    644    ln_dynvor_mix = .false. !  mixed scheme                
    645    ln_dynvor_een = .true.  !  energy & enstrophy scheme   
     642   ln_dynvor_ene = .false. !  enstrophy conserving scheme 
     643   ln_dynvor_ens = .false. !  energy conserving scheme 
     644   ln_dynvor_mix = .false. !  mixed scheme 
     645   ln_dynvor_een = .true.  !  energy & enstrophy scheme 
    646646/ 
    647647!----------------------------------------------------------------------- 
    648648&namdyn_hpg    !   Hydrostatic pressure gradient option 
    649649!----------------------------------------------------------------------- 
    650    ln_hpg_zco  = .false.   !  z-coordinate - full steps                    
     650   ln_hpg_zco  = .false.   !  z-coordinate - full steps 
    651651   ln_hpg_zps  = .true.    !  z-coordinate - partial steps (interpolation) 
    652652   ln_hpg_sco  = .false.   !  s-coordinate (standard jacobian formulation) 
     
    666666&namdyn_ldf    !   lateral diffusion on momentum 
    667667!----------------------------------------------------------------------- 
    668    !                       !  Type of the operator :  
    669    ln_dynldf_lap    =  .true.   !  laplacian operator          
    670    ln_dynldf_bilap  =  .false.  !  bilaplacian operator     
    671    !                       !  Direction of action  :  
    672    ln_dynldf_level  =  .false.  !  iso-level                
     668   !                       !  Type of the operator : 
     669   ln_dynldf_lap    =  .true.   !  laplacian operator 
     670   ln_dynldf_bilap  =  .false.  !  bilaplacian operator 
     671   !                       !  Direction of action  : 
     672   ln_dynldf_level  =  .false.  !  iso-level 
    673673   ln_dynldf_hor    =  .true.   !  horizontal (geopotential)            (require "key_ldfslp" in s-coord.) 
    674674   ln_dynldf_iso    =  .false.  !  iso-neutral                          (require "key_ldfslp") 
     
    676676   rn_ahm_0_lap     = 40000.    !  horizontal laplacian eddy viscosity   [m2/s] 
    677677   rn_ahmb_0        =     0.    !  background eddy viscosity for ldf_iso [m2/s] 
    678    rn_ahm_0_blp     =     0.    !  horizontal bilaplacian eddy viscosity [m4/s]  
     678   rn_ahm_0_blp     =     0.    !  horizontal bilaplacian eddy viscosity [m4/s] 
    679679/ 
    680680 
     
    749749&namzdf_kpp    !   K-Profile Parameterization dependent vertical mixing  ("key_zdfkpp", and optionally: 
    750750!------------------------------------------------------------------------ "key_kppcustom" or "key_kpplktb") 
    751    ln_kpprimix = .true.    !  shear instability mixing  
     751   ln_kpprimix = .true.    !  shear instability mixing 
    752752   rn_difmiw   =  1.0e-04  !  constant internal wave viscosity [m2/s] 
    753753   rn_difsiw   =  0.1e-04  !  constant internal wave diffusivity [m2/s] 
    754754   rn_riinfty  =  0.8      !  local Richardson Number limit for shear instability 
    755755   rn_difri    =  0.0050   !  maximum shear mixing at Rig = 0    [m2/s] 
    756    rn_bvsqcon  = -0.01e-07 !  Brunt-Vaisala squared for maximum convection [1/s2]  
    757    rn_difcon   =  1.       !  maximum mixing in interior convection [m2/s]  
     756   rn_bvsqcon  = -0.01e-07 !  Brunt-Vaisala squared for maximum convection [1/s2] 
     757   rn_difcon   =  1.       !  maximum mixing in interior convection [m2/s] 
    758758   nn_avb      =  0        !  horizontal averaged (=1) or not (=0) on avt and amv 
    759759   nn_ave      =  1        !  constant (=0) or profile (=1) background on avt 
     
    789789   rn_n2min    = 1.e-8     !  threshold of the Brunt-Vaisala frequency (s-1) 
    790790   rn_tfe      = 0.333     !  tidal dissipation efficiency 
    791    rn_me       = 0.2       !  mixing efficiency  
     791   rn_me       = 0.2       !  mixing efficiency 
    792792   ln_tmx_itf  = .true.    !  ITF specific parameterisation 
    793793   rn_tfe_itf  = 1.        !  ITF tidal dissipation efficiency 
     
    799799!!   nammpp            Massively Parallel Processing                    ("key_mpp_mpi) 
    800800!!   namctl            Control prints & Benchmark 
    801 !!   namsol            elliptic solver / island / free surface  
    802 !!====================================================================== 
    803 ! 
    804 !----------------------------------------------------------------------- 
    805 &namsol        !   elliptic solver / island / free surface  
     801!!   namsol            elliptic solver / island / free surface 
     802!!====================================================================== 
     803! 
     804!----------------------------------------------------------------------- 
     805&namsol        !   elliptic solver / island / free surface 
    806806!----------------------------------------------------------------------- 
    807807   nn_solv     =      1    !  elliptic solver: =1 preconditioned conjugate gradient (pcg) 
     
    849849!!   namflo       float parameters                                      ("key_float") 
    850850!!   namptr       Poleward Transport Diagnostics 
    851 !!   namhsb       Heat and salt budgets  
     851!!   namhsb       Heat and salt budgets 
    852852!!====================================================================== 
    853853! 
     
    881881   jpnnewflo     = 0          !  number of floats for the restart 
    882882   ln_rstflo     = .false.    !  float restart (T) or not (F) 
    883    nn_writefl    =      75    !  frequency of writing in float output file  
    884    nn_stockfl    =    5475    !  frequency of creation of the float restart file  
     883   nn_writefl    =      75    !  frequency of writing in float output file 
     884   nn_stockfl    =    5475    !  frequency of creation of the float restart file 
    885885   ln_argo       = .false.    !  Argo type floats (stay at the surface each 10 days) 
    886886   ln_flork4     = .false.    !  trajectories computed with a 4th order Runge-Kutta (T) 
     
    894894   ln_diaptr  = .false.    !  Poleward heat and salt transport (T) or not (F) 
    895895   ln_diaznl  = .true.     !  Add zonal means and meridional stream functions 
    896    ln_subbas  = .true.     !  Atlantic/Pacific/Indian basins computation (T) or not  
     896   ln_subbas  = .true.     !  Atlantic/Pacific/Indian basins computation (T) or not 
    897897                           !  (orca configuration only, need input basins mask file named "subbasins.nc" 
    898898   ln_ptrcomp = .true.     !  Add decomposition : overturning 
     
    901901/ 
    902902!----------------------------------------------------------------------- 
    903 &namhsb       !  Heat and salt budgets  
     903&namhsb       !  Heat and salt budgets 
    904904!----------------------------------------------------------------------- 
    905905   ln_diahsb  = .false.    !  check the heat and salt budgets (T) or not (F) 
     
    934934&namobs       !  observation usage switch                               ('key_diaobs') 
    935935!----------------------------------------------------------------------- 
    936    ln_t3d     = .false.    ! Logical switch for T profile observations          
    937    ln_s3d     = .false.    ! Logical switch for S profile observations           
    938    ln_ena     = .false.    ! Logical switch for ENACT insitu data set            
    939    !                       !     ln_cor                  Logical switch for Coriolis insitu data set        
    940    ln_profb   = .false.    ! Logical switch for feedback insitu data set      
    941    ln_sla     = .false.    ! Logical switch for SLA observations                
    942  
    943    ln_sladt   = .false.    ! Logical switch for AVISO SLA data               
    944  
    945    ln_slafb   = .false.    ! Logical switch for feedback SLA data             
    946                            !     ln_ssh                  Logical switch for SSH observations               
     936   ln_t3d     = .false.    ! Logical switch for T profile observations 
     937   ln_s3d     = .false.    ! Logical switch for S profile observations 
     938   ln_ena     = .false.    ! Logical switch for ENACT insitu data set 
     939   !                       !     ln_cor                  Logical switch for Coriolis insitu data set 
     940   ln_profb   = .false.    ! Logical switch for feedback insitu data set 
     941   ln_sla     = .false.    ! Logical switch for SLA observations 
     942 
     943   ln_sladt   = .false.    ! Logical switch for AVISO SLA data 
     944 
     945   ln_slafb   = .false.    ! Logical switch for feedback SLA data 
     946                           !     ln_ssh                  Logical switch for SSH observations 
    947947 
    948948   ln_sst     = .true.     ! Logical switch for SST observations 
     
    950950   ln_ghrsst  = .false.    !     ln_ghrsst               Logical switch for GHRSST observations       
    951951 
    952    ln_sstfb   = .false.    ! Logical switch for feedback SST data           
    953                            !     ln_sss                  Logical switch for SSS observations               
    954                            !     ln_seaice               Logical switch for Sea Ice observations         
    955                            !     ln_vel3d                Logical switch for velocity observations          
    956                            !     ln_velavcur             Logical switch for velocity daily av. cur.     
    957                            !     ln_velhrcur             Logical switch for velocity high freq. cur.    
    958                            !     ln_velavadcp            Logical switch for velocity daily av. ADCP   
     952   ln_sstfb   = .false.    ! Logical switch for feedback SST data 
     953                           !     ln_sss                  Logical switch for SSS observations 
     954                           !     ln_seaice               Logical switch for Sea Ice observations 
     955                           !     ln_vel3d                Logical switch for velocity observations 
     956                           !     ln_velavcur             Logical switch for velocity daily av. cur. 
     957                           !     ln_velhrcur             Logical switch for velocity high freq. cur. 
     958                           !     ln_velavadcp            Logical switch for velocity daily av. ADCP 
    959959                           !     ln_velhradcp            Logical switch for velocity high freq. ADCP 
    960                            !     ln_velfb                Logical switch for feedback velocity data        
    961                            !     ln_grid_global          Global distribtion of observations          
    962                            !     ln_grid_search_lookup   Logical switch for obs grid search w/lookup table   
    963                            !     grid_search_file        Grid search lookup file header  
    964                            !     enactfiles              ENACT input observation file names  
    965                            !     coriofiles              Coriolis input observation file name   
    966    !                       ! profbfiles: Profile feedback input observation file name  
     960                           !     ln_velfb                Logical switch for feedback velocity data 
     961                           !     ln_grid_global          Global distribtion of observations 
     962                           !     ln_grid_search_lookup   Logical switch for obs grid search w/lookup table 
     963                           !     grid_search_file        Grid search lookup file header 
     964                           !     enactfiles              ENACT input observation file names 
     965                           !     coriofiles              Coriolis input observation file name 
     966   !                       ! profbfiles: Profile feedback input observation file name 
    967967   profbfiles = 'profiles_01.nc' 
    968                            !     ln_profb_enatim         Enact feedback input time setting switch     
     968                           !     ln_profb_enatim         Enact feedback input time setting switch 
    969969                           !     slafilesact             Active SLA input observation file name 
    970                            !     slafilespas             Passive SLA input observation file name  
    971    !                       ! slafbfiles: Feedback SLA input observation file name  
     970                           !     slafilespas             Passive SLA input observation file name 
     971   !                       ! slafbfiles: Feedback SLA input observation file name 
    972972   slafbfiles = 'sla_01.nc' 
    973                            !     sstfiles                GHRSST input observation file name        
    974    !                       ! sstfbfiles: Feedback SST input observation file name  
     973                           !     sstfiles                GHRSST input observation file name 
     974   !                       ! sstfbfiles: Feedback SST input observation file name 
    975975   sstfbfiles = 'sst_01.nc' 'sst_02.nc' 'sst_03.nc' 'sst_04.nc' 'sst_05.nc' 
    976                            !     seaicefiles             Sea Ice input observation file name  
    977                            !     velavcurfiles           Vel. cur. daily av. input file name   
    978                            !     velhvcurfiles           Vel. cur. high freq. input file name   
    979                            !     velavadcpfiles          Vel. ADCP daily av. input file name     
    980                            !     velhvadcpfiles          Vel. ADCP high freq. input file name  
    981                            !     velfbfiles              Vel. feedback input observation file name  
    982                            !     dobsini                 Initial date in window YYYYMMDD.HHMMSS        
    983                            !     dobsend                 Final date in window YYYYMMDD.HHMMSS          
    984                            !     n1dint                  Type of vertical interpolation method         
    985                            !     n2dint                  Type of horizontal interpolation method        
    986                            !     ln_nea                  Rejection of observations near land switch     
    987    nmsshc     = 0          ! MSSH correction scheme                          
    988                            !     mdtcorr                 MDT  correction                                
    989                            !     mdtcutoff               MDT cutoff for computed correction           
    990    ln_altbias = .false.    ! Logical switch for alt bias                 
    991    ln_ignmis  = .true.     ! Logical switch for ignoring missing files    
    992                            !     endailyavtypes   ENACT daily average types                     
     976                           !     seaicefiles             Sea Ice input observation file name 
     977                           !     velavcurfiles           Vel. cur. daily av. input file name 
     978                           !     velhvcurfiles           Vel. cur. high freq. input file name 
     979                           !     velavadcpfiles          Vel. ADCP daily av. input file name 
     980                           !     velhvadcpfiles          Vel. ADCP high freq. input file name 
     981                           !     velfbfiles              Vel. feedback input observation file name 
     982                           !     dobsini                 Initial date in window YYYYMMDD.HHMMSS 
     983                           !     dobsend                 Final date in window YYYYMMDD.HHMMSS 
     984                           !     n1dint                  Type of vertical interpolation method 
     985                           !     n2dint                  Type of horizontal interpolation method 
     986                           !     ln_nea                  Rejection of observations near land switch 
     987   nmsshc     = 0          ! MSSH correction scheme 
     988                           !     mdtcorr                 MDT  correction 
     989                           !     mdtcutoff               MDT cutoff for computed correction 
     990   ln_altbias = .false.    ! Logical switch for alt bias 
     991   ln_ignmis  = .true.     ! Logical switch for ignoring missing files 
     992                           !     endailyavtypes   ENACT daily average types 
    993993   ln_grid_global = .true. 
    994994   ln_grid_search_lookup = .false. 
    995 /  
     995/ 
    996996!----------------------------------------------------------------------- 
    997997&nam_asminc   !   assimilation increments                               ('key_asminc') 
    998998!----------------------------------------------------------------------- 
    999     ln_bkgwri = .false.    !  Logical switch for writing out background state  
    1000     ln_trjwri = .false.    !  Logical switch for writing out state trajectory 
     999    ln_bkgwri = .false.    !  Logical switch for writing out background state 
    10011000    ln_trainc = .false.    !  Logical switch for applying tracer increments 
    10021001    ln_dyninc = .false.    !  Logical switch for applying velocity increments 
    1003     ln_sshinc = .false.    !  Logical switch for applying SSH increments  
     1002    ln_sshinc = .false.    !  Logical switch for applying SSH increments 
    10041003    ln_asmdin = .false.    !  Logical switch for Direct Initialization (DI) 
    10051004    ln_asmiau = .false.    !  Logical switch for Incremental Analysis Updating (IAU) 
     
    10091008    nitiaufin = 15         !  Timestep of end of IAU interval in [0,nitend-nit000-1] 
    10101009    niaufn    = 0          !  Type of IAU weighting function 
    1011     nittrjfrq = 0          !  Frequency of trajectory output for 4D-VAR 
    10121010    ln_salfix = .false.    !  Logical switch for ensuring that the sa > salfixmin 
    10131011    salfixmin = -9999      !  Minimum salinity after applying the increments 
  • branches/2012/dev_MERGE_2012/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/1_namelist

    r3567 r3764  
    882882!----------------------------------------------------------------------- 
    883883    ln_bkgwri = .false.    !  Logical switch for writing out background state  
    884     ln_trjwri = .false.    !  Logical switch for writing out state trajectory 
    885884    ln_trainc = .false.    !  Logical switch for applying tracer increments 
    886885    ln_dyninc = .false.    !  Logical switch for applying velocity increments 
     
    893892    nitiaufin = 15         !  Timestep of end of IAU interval in [0,nitend-nit000-1] 
    894893    niaufn    = 0          !  Type of IAU weighting function 
    895     nittrjfrq = 0          !  Frequency of trajectory output for 4D-VAR 
    896894    ln_salfix = .false.    !  Logical switch for ensuring that the sa > salfixmin 
    897895    salfixmin = -9999      !  Minimum salinity after applying the increments 
  • branches/2012/dev_MERGE_2012/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/namelist

    r3657 r3764  
    945945!----------------------------------------------------------------------- 
    946946    ln_bkgwri = .false.    !  Logical switch for writing out background state  
    947     ln_trjwri = .false.    !  Logical switch for writing out state trajectory 
    948947    ln_trainc = .false.    !  Logical switch for applying tracer increments 
    949948    ln_dyninc = .false.    !  Logical switch for applying velocity increments 
     
    956955    nitiaufin = 15         !  Timestep of end of IAU interval in [0,nitend-nit000-1] 
    957956    niaufn    = 0          !  Type of IAU weighting function 
    958     nittrjfrq = 0          !  Frequency of trajectory output for 4D-VAR 
    959957    ln_salfix = .false.    !  Logical switch for ensuring that the sa > salfixmin 
    960958    salfixmin = -9999      !  Minimum salinity after applying the increments 
  • branches/2012/dev_MERGE_2012/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist

    r3688 r3764  
    616616&namdyn_vor    !   option of physics/algorithm (not control by CPP keys) 
    617617!----------------------------------------------------------------------- 
    618    ln_dynvor_ene = .false. !  enstrophy conserving scheme   
    619    ln_dynvor_ens = .false. !  energy conserving scheme     
     618   ln_dynvor_ene = .false. !  energy    conserving scheme   
     619   ln_dynvor_ens = .false. !  enstrophy conserving scheme     
    620620   ln_dynvor_mix = .false. !  mixed scheme                
    621621   ln_dynvor_een = .true.  !  energy & enstrophy scheme   
     
    990990!----------------------------------------------------------------------- 
    991991    ln_bkgwri = .false.    !  Logical switch for writing out background state  
    992     ln_trjwri = .false.    !  Logical switch for writing out state trajectory 
    993992    ln_trainc = .false.    !  Logical switch for applying tracer increments 
    994993    ln_dyninc = .false.    !  Logical switch for applying velocity increments 
     
    10011000    nitiaufin = 15         !  Timestep of end of IAU interval in [0,nitend-nit000-1] 
    10021001    niaufn    = 0          !  Type of IAU weighting function 
    1003     nittrjfrq = 0          !  Frequency of trajectory output for 4D-VAR 
    10041002    ln_salfix = .false.    !  Logical switch for ensuring that the sa > salfixmin 
    10051003    salfixmin = -9999      !  Minimum salinity after applying the increments 
  • branches/2012/dev_MERGE_2012/NEMOGCM/CONFIG/ORCA2_SAS_LIM/EXP00/1_namelist

    r3331 r3764  
    895895!----------------------------------------------------------------------- 
    896896    ln_bkgwri = .false.    !  Logical switch for writing out background state  
    897     ln_trjwri = .false.    !  Logical switch for writing out state trajectory 
    898897    ln_trainc = .false.    !  Logical switch for applying tracer increments 
    899898    ln_dyninc = .false.    !  Logical switch for applying velocity increments 
     
    906905    nitiaufin = 15         !  Timestep of end of IAU interval in [0,nitend-nit000-1] 
    907906    niaufn    = 0          !  Type of IAU weighting function 
    908     nittrjfrq = 0          !  Frequency of trajectory output for 4D-VAR 
    909907    ln_salfix = .false.    !  Logical switch for ensuring that the sa > salfixmin 
    910908    salfixmin = -9999      !  Minimum salinity after applying the increments 
  • branches/2012/dev_MERGE_2012/NEMOGCM/CONFIG/ORCA2_SAS_LIM/EXP00/namelist

    r3614 r3764  
    994994!----------------------------------------------------------------------- 
    995995    ln_bkgwri = .false.    !  Logical switch for writing out background state  
    996     ln_trjwri = .false.    !  Logical switch for writing out state trajectory 
    997996    ln_trainc = .false.    !  Logical switch for applying tracer increments 
    998997    ln_dyninc = .false.    !  Logical switch for applying velocity increments 
     
    10051004    nitiaufin = 15         !  Timestep of end of IAU interval in [0,nitend-nit000-1] 
    10061005    niaufn    = 0          !  Type of IAU weighting function 
    1007     nittrjfrq = 0          !  Frequency of trajectory output for 4D-VAR 
    10081006    ln_salfix = .false.    !  Logical switch for ensuring that the sa > salfixmin 
    10091007    salfixmin = -9999      !  Minimum salinity after applying the increments 
  • branches/2012/dev_MERGE_2012/NEMOGCM/CONFIG/makenemo

    r3742 r3764  
    22#set -x 
    33set -o posix 
    4 #set -u  
     4#set -u 
    55#set -e 
    66#+ 
     
    2929# 
    3030# - to choose MYCONFIG 
    31 # - to choose compiler options   
     31# - to choose compiler options 
    3232# - to create the CONFIG/MYCONFIG/WORK directory 
    3333# - to compile this configuration 
     
    3838# 
    3939# - NEW_CONF    : configuration to be created 
    40 # - REF_CONF    : reference configuration to build the new one  
    41 # - CMP_NAM     : compiler name  
    42 # - NBR_PRC     : number of processes used to compile   
     40# - REF_CONF    : reference configuration to build the new one 
     41# - CMP_NAM     : compiler name 
     42# - NBR_PRC     : number of processes used to compile 
    4343# - NEM_SUBDIR  : NEMO subdirectory used (specified) 
    4444# 
    4545#  Locally defined : 
    4646# 
    47 # - TAB         : NEMO subdirectory used (read)   
     47# - TAB         : NEMO subdirectory used (read) 
    4848# - MAIN_DIR    : self explaining 
    49 # - CONFIG_DIR  :   "    "    "    
    50 # - MODELES_DIR :   "    "    "  
    51 # - TOOLS_DIR   :   "    "    "  
     49# - CONFIG_DIR  :   "    "    " 
     50# - MODELES_DIR :   "    "    " 
     51# - TOOLS_DIR   :   "    "    " 
    5252# - NEMO_DIR    :   "    "    " 
    5353# 
     
    134134   echo "makenemo -n MY_CONFIG -d \"OPA_SRC LIM_SRC_2\""; 
    135135   echo ""; 
    136    echo "Available configurations :"; cat ${CONFIG_DIR}/cfg.txt;  
     136   echo "Available configurations :"; cat ${CONFIG_DIR}/cfg.txt; 
    137137   echo ""; 
    138138   echo "Example to remove bad configuration "; 
     
    190190       ;; 
    191191   *) 
    192        echo " \"$1\" BAD OPTION"  
     192       echo " \"$1\" BAD OPTION" 
    193193       exit 
    194194       ;; 
    195     
     195 
    196196    esac 
    197197    shift 
     
    216216#- Check if the tool or the compiler exist or list it 
    217217if [ "${NEW_CONF}" == help ] ; then 
    218     echo "Available configurations :"  
     218    echo "Available configurations :" 
    219219    cat ${CONFIG_DIR}/cfg.txt 
    220220    exit 
     
    228228#- Choose a default configuration if needed --- 
    229229#- ORCA2_LIM or last one used --- 
    230 . ${COMPIL_DIR}/Fcheck_config.sh cfg.txt ${NEW_CONF} || exit  
     230. ${COMPIL_DIR}/Fcheck_config.sh cfg.txt ${NEW_CONF} || exit 
    231231 
    232232 
     
    235235   echo "You are  installing a new configuration" 
    236236   ind=0 
    237    . ${COMPIL_DIR}/Fread_dir.sh OPA_SRC    YES  
    238    . ${COMPIL_DIR}/Fread_dir.sh LIM_SRC_2   YES  
    239    . ${COMPIL_DIR}/Fread_dir.sh LIM_SRC_3   NO   
    240    . ${COMPIL_DIR}/Fread_dir.sh TOP_SRC    NO   
    241    . ${COMPIL_DIR}/Fread_dir.sh NST_SRC    YES  
    242    . ${COMPIL_DIR}/Fread_dir.sh OFF_SRC    NO   
     237   . ${COMPIL_DIR}/Fread_dir.sh OPA_SRC    YES 
     238   . ${COMPIL_DIR}/Fread_dir.sh LIM_SRC_2   YES 
     239   . ${COMPIL_DIR}/Fread_dir.sh LIM_SRC_3   NO 
     240   . ${COMPIL_DIR}/Fread_dir.sh TOP_SRC    NO 
     241   . ${COMPIL_DIR}/Fread_dir.sh NST_SRC    YES 
     242   . ${COMPIL_DIR}/Fread_dir.sh OFF_SRC    NO 
    243243   REF_CONF=ORCA2_LIM 
    244244    elif [ ${#NEM_SUBDIR} -gt 0 ] && [ ${#REF_CONF} -eq 0 ]; then 
     
    248248    elif [ ${#NEM_SUBDIR} -eq 0 ] && [ ${#REF_CONF} -gt 0 ]; then 
    249249   echo "You are  installing a new configuration based on ${REF_CONF}" 
    250    . ${COMPIL_DIR}/Fcopy_dir.sh ${REF_CONF}   
     250   . ${COMPIL_DIR}/Fcopy_dir.sh ${REF_CONF} 
    251251    fi 
    252252    NEW_CONF=${x_n} 
     
    272272#- We add or remove keys 
    273273if [ ${#list_add_key} -ne 0 ] ; then 
    274     . ${COMPIL_DIR}/Fadd_keys.sh ${NEW_CONF} add_key ${list_add_key}  
     274    . ${COMPIL_DIR}/Fadd_keys.sh ${NEW_CONF} add_key ${list_add_key} 
    275275fi 
    276276 
  • branches/2012/dev_MERGE_2012/NEMOGCM/EXTERNAL/fcm/lib/Fcm/CfgLine.pm

    r2281 r3764  
    205205 
    206206    for my $i (0 .. $#fields) { 
    207       next if lc ($fields[$i]) eq lc ($all_fields[$i]); 
     207      next if lc ($fields[$i]) eq lc ($all_fields[$i] || ''); 
    208208      $return = 0; 
    209209      last; 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/LIM_SRC_2/dom_ice_2.F90

    r2715 r3764  
    3232   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)         ::   tms    , tmu      !: temperature and velocity points masks 
    3333   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:)     ::   wght              !: weight of the 4 neighbours to compute averages 
     34   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)         ::   tmv               !: y-velocity mask used for evp rheology  
    3435 
    35  
    36 # if defined key_lim2_vp 
    3736   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:)     ::   akappa , bkappa   !: first and third group of metric coefficients 
    3837   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:,:,:) ::   alambd            !: second group of metric coefficients 
    39 # else 
    40    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)         ::   tmv    , tmf      !: y-velocity and F-points masks 
     38   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)         ::   tmf               !: F-points masks 
    4139   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)         ::   tmi               !: ice mask: =1 if ice thick > 0 
    42 # endif 
    4340   !!---------------------------------------------------------------------- 
    4441   CONTAINS 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/LIM_SRC_2/limtrp_2.F90

    r3680 r3764  
    3131   USE agrif_lim2_interp ! nesting 
    3232# endif 
     33   USE lib_fortran     ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
    3334 
    3435   IMPLICIT NONE 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/LIM_SRC_2/limwri_2.F90

    r3625 r3764  
    105105      !! 
    106106      INTEGER  ::   ji, jj, jf                      ! dummy loop indices 
    107       CHARACTER(len = 40)  ::   clhstnam, clop 
     107      CHARACTER(len = 80)  ::   clhstnam, clop 
    108108      REAL(wp) ::   zsto, zjulian, zout,   &  ! temporary scalars 
    109109         &          zindh, zinda, zindb, ztmu 
     
    161161            zcmo(ji,jj,5)  = sist  (ji,jj) 
    162162            zcmo(ji,jj,6)  = fbif  (ji,jj) 
     163           IF (lk_lim2_vp) THEN 
    163164            zcmo(ji,jj,7)  = zindb * (  u_ice(ji,jj  ) * tmu(ji,jj  ) + u_ice(ji+1,jj  ) * tmu(ji+1,jj  )   & 
    164165                                      + u_ice(ji,jj+1) * tmu(ji,jj+1) + u_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) & 
     
    168169                                      + v_ice(ji,jj+1) * tmu(ji,jj+1) + v_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) & 
    169170                                  / ztmu 
     171           ELSE 
     172 
     173            zcmo(ji,jj,7)  = zindb * (  u_ice(ji,jj  ) * tmu(ji,jj)                       & 
     174             &                        + u_ice(ji-1,jj) * tmu(ji-1,jj) )                   & 
     175             &                    / 2.0 
     176            zcmo(ji,jj,8)  = zindb * (  v_ice(ji,jj  ) * tmv(ji,jj)                       & 
     177             &                        + v_ice(ji,jj-1) * tmv(ji,jj-1) )                   & 
     178             &                    / 2.0 
     179 
     180           ENDIF 
    170181            zcmo(ji,jj,9)  = sst_m(ji,jj) 
    171182            zcmo(ji,jj,10) = sss_m(ji,jj) 
     
    187198      niter = niter + 1 
    188199      DO jf = 1 , noumef 
    189          DO jj = 1 , jpj 
    190             DO ji = 1 , jpi 
    191                zfield(ji,jj) = zcmo(ji,jj,jf) * cmulti(jf) + cadd(jf) 
    192             END DO 
    193          END DO 
    194           
    195          IF( jf == 7  .OR. jf == 8  .OR. jf == 15 .OR. jf == 16 ) THEN 
     200         zfield(:,:) = zcmo(:,:,jf) * cmulti(jf) + cadd(jf) * tmask(:,:,1) 
     201         SELECT CASE ( jf ) 
     202         CASE ( 7, 8, 15, 16, 20, 21 )  ! velocity or stress fields (vectors) 
    196203            CALL lbc_lnk( zfield, 'T', -1. ) 
    197          ELSE  
     204         CASE DEFAULT                   ! scalar fields 
    198205            CALL lbc_lnk( zfield, 'T',  1. ) 
    199          ENDIF 
    200           
     206         END SELECT 
     207 
    201208         IF( nc(jf) == 1 )   CALL histwrite( nice, nam(jf), niter, zfield, ndim, ndex51 ) 
    202           
     209 
    203210      END DO 
    204        
     211 
    205212      IF( ( nn_fsbc * niter ) >= nitend )   CALL histclo( nice )  
    206213 
     
    209216   END SUBROUTINE lim_wri_2 
    210217      
    211 # endif 
     218#endif      
    212219 
    213220   SUBROUTINE lim_wri_init_2 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/LIM_SRC_2/limwri_dimg_2.h90

    r3625 r3764  
    2020    INTEGER , SAVE ::   nmoyice   !: counter for averaging 
    2121    INTEGER , SAVE ::   nwf       !: number of fields to write on disk 
    22     INTEGER , SAVE, DIMENSION(:), ALLOCATABLE  :: nsubindex   !: subindex to be saved 
     22    INTEGER, SAVE,DIMENSION (:), ALLOCATABLE  :: nsubindex   !: subindex to be saved 
    2323    INTEGER , SAVE ::   nice, nhorid, ndim, niter, ndepid 
    2424    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE :: rcmoy 
     
    3030    REAL(wp), DIMENSION(1) ::   zdept 
    3131    REAL(wp) ::   zsto, zsec, zjulian,zout 
    32     REAL(wp) ::   zindh,zinda,zindb, ztmu 
    33     REAL(wp), DIMENSION(jpi,jpj,jpnoumax) ::   zcmo   !ARPDBGWORK 
    34     REAL(wp), DIMENSION(jpi,jpj)          ::   zfield 
     32    REAL(wp) ::   zindh, zinda, zindb, ztmu 
     33    REAL(wp), POINTER, DIMENSION(:,:)     ::   zfield 
    3534 
    3635#if ! defined key_diainstant 
     
    4544       IF( lk_mpp      )   CALL mpp_sum ( ialloc  ) 
    4645       IF( ialloc /= 0 )   CALL ctl_warn('lim_wri_2 (limwri_dimg_2.h90) : failed to allocate arrays') 
    47        rcmoy(:,:,:) = 0._wp 
    4846    ENDIF 
    4947 
    50     IF( kt == nit000 ) THEN  
     48    CALL wrk_alloc( jpi, jpj, zfield ) 
     49 
     50    IF ( kt == nit000 ) THEN  
    5151       ! 
    5252       CALL lim_wri_init_2  
     
    5555       ii  = 0 
    5656 
    57        IF(lwp ) THEN 
     57       IF (lwp ) THEN 
    5858          WRITE(numout,*) 'lim_wri_2 : Write ice outputs in dimg' 
    5959          WRITE(numout,*) '~~~~~~~~' 
     
    7979       END DO 
    8080 
     81       rcmoy(:,:,:) = 0.0_wp 
    8182       zsto     = rdt_ice 
    8283       zout     = nwrite * rdt_ice / nn_fsbc 
     
    8990 
    9091#if ! defined key_diainstant  
    91     !-- calculs des valeurs instantanees 
     92    !-- Compute mean values 
    9293 
    9394    zcmo(:,:, 1:jpnoumax ) = 0.e0  
    9495    DO jj = 2 , jpjm1 
    95        DO ji = 2 , jpim1   ! NO vector opt. 
     96       DO ji = 2 , jpim1 
    9697          zindh  = MAX( zzero , SIGN( zone , hicif(ji,jj) * (1.0 - frld(ji,jj) ) - 0.10 ) ) 
    9798          zinda  = MAX( zzero , SIGN( zone , ( 1.0 - frld(ji,jj) ) - 0.10 ) ) 
    9899          zindb  = zindh * zinda 
    99           ztmu   = MAX( 0.5 * zone , ( tmu(ji,jj) + tmu(ji+1,jj) + tmu(ji,jj+1) + tmu(ji+1,jj+1) ) )  
    100100          zcmo(ji,jj,1)  = hsnif (ji,jj) 
    101101          zcmo(ji,jj,2)  = hicif (ji,jj) 
     
    104104          zcmo(ji,jj,5)  = sist  (ji,jj) 
    105105          zcmo(ji,jj,6)  = fbif  (ji,jj) 
    106           zcmo(ji,jj,7)  = zindb * (  u_ice(ji,jj  ) * tmu(ji,jj  ) + u_ice(ji+1,jj  ) * tmu(ji+1,jj  )   & 
     106          IF (lk_lim2_vp) THEN 
     107            ztmu   = MAX( 0.5 * zone , ( tmu(ji,jj) + tmu(ji+1,jj) + tmu(ji,jj+1) + tmu(ji+1,jj+1) ) )  
     108            zcmo(ji,jj,7)  = zindb * (  u_ice(ji,jj  ) * tmu(ji,jj  ) + u_ice(ji+1,jj  ) * tmu(ji+1,jj  )   & 
    107109             &                      + u_ice(ji,jj+1) * tmu(ji,jj+1) + u_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) & 
    108110               / ztmu  
    109111 
    110           zcmo(ji,jj,8)  = zindb * (  v_ice(ji,jj  ) * tmu(ji,jj  ) + v_ice(ji+1,jj  ) * tmu(ji+1,jj  )   & 
     112            zcmo(ji,jj,8)  = zindb * (  v_ice(ji,jj  ) * tmu(ji,jj  ) + v_ice(ji+1,jj  ) * tmu(ji+1,jj  )   & 
    111113             &                      + v_ice(ji,jj+1) * tmu(ji,jj+1) + v_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) & 
    112114               / ztmu 
     115           ELSE 
     116            zcmo(ji,jj,7)  = zindb * (  u_ice(ji,jj  ) * tmu(ji,jj) + u_ice(ji-1,jj) * tmu(ji-1,jj) )/ 2.0 
     117            zcmo(ji,jj,8)  = zindb * (  v_ice(ji,jj  ) * tmv(ji,jj) + v_ice(ji,jj-1) * tmv(ji,jj-1) )/ 2.0 
     118           ENDIF 
     119 
    113120          zcmo(ji,jj,9)  = sst_m(ji,jj) 
    114121          zcmo(ji,jj,10) = sss_m(ji,jj) 
     
    136143          !  case of instantaneaous output rcmoy(:,:, 1:jpnoumax ) = 0.e0 
    137144          DO jj = 2 , jpjm1 
    138              DO ji = 2 , jpim1   ! NO vector opt. 
     145             DO ji = 2 , jpim1 
    139146                zindh  = MAX( zzero , SIGN( zone , hicif(ji,jj) * (1.0 - frld(ji,jj) ) - 0.10 ) ) 
    140147                zinda  = MAX( zzero , SIGN( zone , ( 1.0 - frld(ji,jj) ) - 0.10 ) ) 
    141148                zindb  = zindh * zinda 
    142                 ztmu   = MAX( 0.5 * zone , ( tmu(ji,jj) + tmu(ji+1,jj) + tmu(ji,jj+1) + tmu(ji+1,jj+1) ) ) 
    143149                rcmoy(ji,jj,1)  = hsnif (ji,jj) 
    144150                rcmoy(ji,jj,2)  = hicif (ji,jj) 
     
    147153                rcmoy(ji,jj,5)  = sist  (ji,jj) 
    148154                rcmoy(ji,jj,6)  = fbif  (ji,jj) 
    149                 rcmoy(ji,jj,7)  = zindb * (  u_ice(ji,jj  ) * tmu(ji,jj  ) + u_ice(ji+1,jj  ) * tmu(ji+1,jj  )   & 
    150                    &                       + u_ice(ji,jj+1) * tmu(ji,jj+1) + u_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) & 
    151                      / ztmu 
    152  
    153                 rcmoy(ji,jj,8)  = zindb * (  v_ice(ji,jj  ) * tmu(ji,jj  ) + v_ice(ji+1,jj  ) * tmu(ji+1,jj  )   & 
    154                    &                       + v_ice(ji,jj+1) * tmu(ji,jj+1) + v_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) & 
    155                      / ztmu 
     155                IF (lk_lim2_vp) THEN 
     156                   ztmu   = MAX( 0.5 * zone , ( tmu(ji,jj) + tmu(ji+1,jj) + tmu(ji,jj+1) + tmu(ji+1,jj+1) ) ) 
     157                   rcmoy(ji,jj,7)  = zindb * (  u_ice(ji,jj  ) * tmu(ji,jj  ) + u_ice(ji+1,jj  ) * tmu(ji+1,jj  )   & 
     158                      &                      + u_ice(ji,jj+1) * tmu(ji,jj+1) + u_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) & 
     159                        / ztmu 
     160 
     161                   rcmoy(ji,jj,8)  = zindb * (  v_ice(ji,jj  ) * tmu(ji,jj  ) + v_ice(ji+1,jj  ) * tmu(ji+1,jj  )   & 
     162                      &                      + v_ice(ji,jj+1) * tmu(ji,jj+1) + v_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) & 
     163                       / ztmu 
     164                ELSE 
     165                   rcmoy(ji,jj,7)  = zindb * (  u_ice(ji,jj  ) * tmu(ji,jj) + u_ice(ji-1,jj) * tmu(ji-1,jj) )/ 2.0 
     166                   rcmoy(ji,jj,8)  = zindb * (  v_ice(ji,jj  ) * tmv(ji,jj) + v_ice(ji,jj-1) * tmv(ji,jj-1) )/ 2.0 
     167                ENDIF 
    156168                rcmoy(ji,jj,9)  = sst_m(ji,jj) 
    157169                rcmoy(ji,jj,10) = sss_m(ji,jj) 
     
    176188             zfield(:,:) = (rcmoy(:,:,jf) * cmulti(jf) + cadd(jf)) * tmask(:,:,1) 
    177189 
    178              IF ( jf == 7  .OR. jf == 8  .OR. jf == 15 .OR. jf == 16 ) THEN  
     190             SELECT CASE (jf)  
     191             CASE ( 7, 8, 15, 16 ) ! velocity or stress fields (vectors) 
    179192                CALL lbc_lnk( zfield, 'T', -1. ) 
    180              ELSE  
     193             CASE DEFAULT          ! scalar fields 
    181194                CALL lbc_lnk( zfield, 'T',  1. ) 
    182              ENDIF 
     195             END SELECT 
    183196             rcmoy(:,:,jf) = zfield(:,:) 
    184197          END DO 
     
    200213          nmoyice = 0  
    201214       END IF     !  MOD(kt+nn_fsbc-1-nit000+1, nwrite == 0 ) ! 
     215       CALL wrk_dealloc( jpi,jpj, zfield ) 
    202216 
    203217     END SUBROUTINE lim_wri_2 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/LIM_SRC_3/limadv.F90

    r3625 r3764  
    2424   USE wrk_nemo       ! work arrays 
    2525   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)   
     26   USE lib_fortran      ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
    2627 
    2728   IMPLICIT NONE 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90

    r3625 r3764  
    2929   USE prtctl         ! Print control 
    3030   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)   
     31   USE lib_fortran      ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
    3132 
    3233   IMPLICIT NONE 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/LIM_SRC_3/limitd_th.F90

    r3625 r3764  
    3434   USE wrk_nemo       ! work arrays 
    3535   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)   
     36   USE lib_fortran      ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
    3637 
    3738   IMPLICIT NONE 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/LIM_SRC_3/limwri_dimg.h90

    r3625 r3764  
    1515   !!------------------------------------------------------------------- 
    1616   USE  diawri, ONLY : dia_wri_dimg 
     17   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
     18 
    1719   REAL(wp),DIMENSION(1) ::   zdept 
    1820 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/OFF_SRC/nemogcm.F90

    r3750 r3764  
    4545   USE prtctl          ! Print control                    (prt_ctl_init routine) 
    4646   USE timing          ! Timing 
     47   USE lib_fortran     ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
    4748 
    4849   IMPLICIT NONE 
     
    342343         &                                               'Compile with key_iomput enabled' ) 
    343344      ! 
     345      IF( 1_wp /= SIGN(1._wp,-0._wp)  )   CALL ctl_stop( 'nemo_ctl: The intrinsec SIGN function follows ',  & 
     346         &                                               'f2003 standard. '                              ,  & 
     347         &                                               'Compile with key_nosignedzero enabled' ) 
     348      ! 
    344349   END SUBROUTINE nemo_ctl 
    345350 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90

    r3294 r3764  
    1010   !!   NEMO     3.3  ! 2010-05  (D. Lea)  Update to work with NEMO v3.2 
    1111   !!             -   ! 2010-05  (D. Lea)  add calc_month_len routine based on day_init  
     12   !!            3.4  ! 2012-10  (A. Weaver and K. Mogensen) Fix for direct initialization 
    1213   !!---------------------------------------------------------------------- 
    1314 
     
    2021   !!   dyn_asm_inc  : Apply the dynamic (u and v) increments 
    2122   !!   ssh_asm_inc  : Apply the SSH increment 
     23   !!   seaice_asm_inc  : Apply the seaice increment 
    2224   !!---------------------------------------------------------------------- 
    2325   USE wrk_nemo         ! Memory Allocation 
     
    2527   USE dom_oce          ! Ocean space and time domain 
    2628   USE oce              ! Dynamics and active tracers defined in memory 
    27    USE divcur           ! Horizontal divergence and relative vorticity 
    2829   USE ldfdyn_oce       ! ocean dynamics: lateral physics 
    2930   USE eosbn2           ! Equation of state - in situ and potential density 
     
    3334   USE c1d              ! 1D initialization 
    3435   USE in_out_manager   ! I/O manager 
    35    USE lib_mpp           ! MPP library 
     36   USE lib_mpp          ! MPP library 
     37#if defined key_lim3 
     38   USE ice              ! LIM3 
     39#endif 
     40#if defined key_lim2 
     41   USE ice_2            ! LIM2 
     42#endif 
     43   USE sbc_oce          ! Surface boundary condition variables. 
     44   USE domvvl 
    3645 
    3746   IMPLICIT NONE 
     
    4352   PUBLIC   dyn_asm_inc    !: Apply the dynamic (u and v) increments 
    4453   PUBLIC   ssh_asm_inc    !: Apply the SSH increment 
     54   PUBLIC   seaice_asm_inc !: Apply the seaice increment 
    4555 
    4656#if defined key_asminc 
     
    5060#endif 
    5161   LOGICAL, PUBLIC :: ln_bkgwri = .FALSE. !: No output of the background state fields 
    52    LOGICAL, PUBLIC :: ln_trjwri = .FALSE. !: No output of the state trajectory fields 
    5362   LOGICAL, PUBLIC :: ln_asmiau = .FALSE. !: No applying forcing with an assimilation increment 
    5463   LOGICAL, PUBLIC :: ln_asmdin = .FALSE. !: No direct initialization 
     
    5665   LOGICAL, PUBLIC :: ln_dyninc = .FALSE. !: No dynamics (u and v) assimilation increments 
    5766   LOGICAL, PUBLIC :: ln_sshinc = .FALSE. !: No sea surface height assimilation increment 
     67   LOGICAL, PUBLIC :: ln_seaiceinc = .FALSE. !: No sea ice concentration increment 
    5868   LOGICAL, PUBLIC :: ln_salfix = .FALSE. !: Apply minimum salinity check 
     69   LOGICAL, PUBLIC :: ln_temnofreeze = .FALSE. !: Don't allow the temperature to drop below freezing 
    5970   INTEGER, PUBLIC :: nn_divdmp = 0       !: Apply divergence damping filter nn_divdmp times 
    6071 
     
    7889 
    7990   REAL(wp), DIMENSION(:,:), ALLOCATABLE ::   ssh_bkg, ssh_bkginc   ! Background sea surface height and its increment 
     91   REAL(wp), DIMENSION(:,:), ALLOCATABLE ::   seaice_bkginc         ! Increment to the background sea ice conc 
    8092 
    8193   !! * Substitutions 
     
    125137      REAL(wp), POINTER, DIMENSION(:,:) :: hdiv 
    126138      !! 
    127       NAMELIST/nam_asminc/ ln_bkgwri, ln_trjwri,                           & 
     139      NAMELIST/nam_asminc/ ln_bkgwri,                                      & 
    128140         &                 ln_trainc, ln_dyninc, ln_sshinc,                & 
    129141         &                 ln_asmdin, ln_asmiau,                           & 
    130142         &                 nitbkg, nitdin, nitiaustr, nitiaufin, niaufn,   & 
    131          &                 nittrjfrq, ln_salfix, salfixmin,                & 
     143         &                 ln_salfix, salfixmin,                & 
    132144         &                 nn_divdmp 
    133145      !!---------------------------------------------------------------------- 
     
    139151      ! Set default values 
    140152      ln_bkgwri = .FALSE. 
    141       ln_trjwri = .FALSE. 
    142153      ln_trainc = .FALSE. 
    143154      ln_dyninc = .FALSE. 
    144155      ln_sshinc = .FALSE. 
     156      ln_seaiceinc = .FALSE. 
    145157      ln_asmdin = .FALSE. 
    146158      ln_asmiau = .TRUE. 
    147159      ln_salfix = .FALSE. 
     160      ln_temnofreeze = .FALSE. 
    148161      salfixmin = -9999 
    149162      nitbkg    = 0 
     
    152165      nitiaufin = 150      ! = 10 days with ORCA2 
    153166      niaufn    = 0 
    154       nittrjfrq = 1 
    155167 
    156168      REWIND ( numnam ) 
     
    164176         WRITE(numout,*) '   Namelist namasm : set assimilation increment parameters' 
    165177         WRITE(numout,*) '      Logical switch for writing out background state          ln_bkgwri = ', ln_bkgwri 
    166          WRITE(numout,*) '      Logical switch for writing out state trajectory          ln_trjwri = ', ln_trjwri 
    167178         WRITE(numout,*) '      Logical switch for applying tracer increments            ln_trainc = ', ln_trainc 
    168179         WRITE(numout,*) '      Logical switch for applying velocity increments          ln_dyninc = ', ln_dyninc 
    169180         WRITE(numout,*) '      Logical switch for applying SSH increments               ln_sshinc = ', ln_sshinc 
    170181         WRITE(numout,*) '      Logical switch for Direct Initialization (DI)            ln_asmdin = ', ln_asmdin 
     182         WRITE(numout,*) '      Logical switch for applying sea ice increments        ln_seaiceinc = ', ln_seaiceinc 
    171183         WRITE(numout,*) '      Logical switch for Incremental Analysis Updating (IAU)   ln_asmiau = ', ln_asmiau 
    172184         WRITE(numout,*) '      Timestep of background in [0,nitend-nit000-1]            nitbkg    = ', nitbkg 
     
    175187         WRITE(numout,*) '      Timestep of end of IAU interval in [0,nitend-nit000-1]   nitiaufin = ', nitiaufin 
    176188         WRITE(numout,*) '      Type of IAU weighting function                           niaufn    = ', niaufn 
    177          WRITE(numout,*) '      Frequency of trajectory output for 4D-VAR                nittrjfrq = ', nittrjfrq 
    178189         WRITE(numout,*) '      Logical switch for ensuring that the sa > salfixmin      ln_salfix = ', ln_salfix 
    179190         WRITE(numout,*) '      Minimum salinity after applying the increments           salfixmin = ', salfixmin 
     
    213224         WRITE(numout,*) '       nitiaustr_r = ', nitiaustr_r 
    214225         WRITE(numout,*) '       nitiaufin_r = ', nitiaufin_r 
    215          WRITE(numout,*) '       nittrjfrq   = ', nittrjfrq 
    216226         WRITE(numout,*) 
    217227         WRITE(numout,*) '   Dates referenced to current cycle:' 
     
    235245 
    236246      IF (      ( ( .NOT. ln_asmdin ).AND.( .NOT. ln_asmiau ) ) & 
    237            .AND.( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ) ) ) & 
    238          & CALL ctl_stop( ' One or more of ln_trainc, ln_dyninc and ln_sshinc is set to .true.', & 
     247           .AND.( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ) .OR. ( ln_seaiceinc) )) & 
     248         & CALL ctl_stop( ' One or more of ln_trainc, ln_dyninc, ln_sshinc and ln_seaiceinc is set to .true.', & 
    239249         &                ' but ln_asmdin and ln_asmiau are both set to .false. :', & 
    240250         &                ' Inconsistent options') 
     
    248258         &                ' Type IAU weighting function is invalid') 
    249259 
    250       IF ( ( .NOT. ln_trainc ).AND.( .NOT. ln_dyninc ).AND.( .NOT. ln_sshinc ) & 
     260      IF ( ( .NOT. ln_trainc ).AND.( .NOT. ln_dyninc ).AND.( .NOT. ln_sshinc ).AND.( .NOT. ln_seaiceinc ) & 
    251261         &                     )  & 
    252          & CALL ctl_warn( ' ln_trainc, ln_dyninc and ln_sshinc are set to .false. :', & 
     262         & CALL ctl_warn( ' ln_trainc, ln_dyninc, ln_sshinc and ln_seaiceinc are set to .false. :', & 
    253263         &                ' The assimilation increments are not applied') 
    254264 
     
    353363      ALLOCATE( v_bkginc(jpi,jpj,jpk) ) 
    354364      ALLOCATE( ssh_bkginc(jpi,jpj)   ) 
     365      ALLOCATE( seaice_bkginc(jpi,jpj)) 
    355366#if defined key_asminc 
    356367      ALLOCATE( ssh_iau(jpi,jpj)      ) 
     
    361372      v_bkginc(:,:,:) = 0.0 
    362373      ssh_bkginc(:,:) = 0.0 
     374      seaice_bkginc(:,:) = 0.0 
    363375#if defined key_asminc 
    364376      ssh_iau(:,:)    = 0.0 
    365377#endif 
    366       IF ( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ) ) THEN 
     378      IF ( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ).OR.( ln_seaiceinc ) ) THEN 
    367379 
    368380         !-------------------------------------------------------------------- 
     
    429441         ENDIF 
    430442 
     443         IF ( ln_seaiceinc ) THEN 
     444            CALL iom_get( inum, jpdom_autoglo, 'bckinseaice', seaice_bkginc, 1 ) 
     445            ! Apply the masks 
     446            seaice_bkginc(:,:) = seaice_bkginc(:,:) * tmask(:,:,1) 
     447            ! Set missing increments to 0.0 rather than 1e+20 
     448            ! to allow for differences in masks 
     449            WHERE( ABS( seaice_bkginc(:,:) ) > 1.0e+10 ) seaice_bkginc(:,:) = 0.0 
     450         ENDIF 
     451 
    431452         CALL iom_close( inum ) 
    432453  
     
    437458      !----------------------------------------------------------------------- 
    438459 
    439  
    440460      IF ( ln_dyninc .AND. nn_divdmp > 0 ) THEN 
    441461 
    442       CALL wrk_alloc(jpi,jpj,hdiv)  
    443  
    444        DO  jt = 1, nn_divdmp 
    445  
    446            DO jk = 1, jpkm1 
    447  
    448                   hdiv(:,:) = 0._wp 
    449  
    450             DO jj = 2, jpjm1 
    451                DO ji = fs_2, fs_jpim1   ! vector opt. 
    452                   hdiv(ji,jj) =   & 
    453                      (  e2u(ji  ,jj)*fse3u(ji  ,jj,jk) * u_bkginc(ji  ,jj,jk)       & 
    454                       - e2u(ji-1,jj)*fse3u(ji-1,jj,jk) * u_bkginc(ji-1,jj,jk)       & 
    455                       + e1v(ji,jj  )*fse3v(ji,jj  ,jk) * v_bkginc(ji,jj  ,jk)       & 
    456                       - e1v(ji,jj-1)*fse3v(ji,jj-1,jk) * v_bkginc(ji,jj-1,jk)  )    & 
    457                       / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) ) 
     462         CALL wrk_alloc(jpi,jpj,hdiv)  
     463 
     464         DO  jt = 1, nn_divdmp 
     465 
     466            DO jk = 1, jpkm1 
     467 
     468               hdiv(:,:) = 0._wp 
     469 
     470               DO jj = 2, jpjm1 
     471                  DO ji = fs_2, fs_jpim1   ! vector opt. 
     472                     hdiv(ji,jj) =   & 
     473                        (  e2u(ji  ,jj  ) * fse3u(ji  ,jj  ,jk) * u_bkginc(ji  ,jj  ,jk)     & 
     474                         - e2u(ji-1,jj  ) * fse3u(ji-1,jj  ,jk) * u_bkginc(ji-1,jj  ,jk)     & 
     475                         + e1v(ji  ,jj  ) * fse3v(ji  ,jj  ,jk) * v_bkginc(ji  ,jj  ,jk)     & 
     476                         - e1v(ji  ,jj-1) * fse3v(ji  ,jj-1,jk) * v_bkginc(ji  ,jj-1,jk)  )  & 
     477                         / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) ) 
     478                  END DO 
    458479               END DO 
     480 
     481               CALL lbc_lnk( hdiv, 'T', 1. )   ! lateral boundary cond. (no sign change) 
     482 
     483               DO jj = 2, jpjm1 
     484                  DO ji = fs_2, fs_jpim1   ! vector opt. 
     485                     u_bkginc(ji,jj,jk) = u_bkginc(ji,jj,jk) + 0.2_wp * ( e1t(ji+1,jj)*e2t(ji+1,jj) * hdiv(ji+1,jj)   & 
     486                                                                        - e1t(ji  ,jj)*e2t(ji  ,jj) * hdiv(ji  ,jj) ) & 
     487                                                                      / e1u(ji,jj) * umask(ji,jj,jk)  
     488                     v_bkginc(ji,jj,jk) = v_bkginc(ji,jj,jk) + 0.2_wp * ( e1t(ji,jj+1)*e2t(ji,jj+1) * hdiv(ji,jj+1)   & 
     489                                                                        - e1t(ji,jj  )*e2t(ji,jj  ) * hdiv(ji,jj  ) ) & 
     490                                                                      / e2v(ji,jj) * vmask(ji,jj,jk)  
     491                  END DO 
     492               END DO 
     493 
    459494            END DO 
    460495 
    461             CALL lbc_lnk( hdiv, 'T', 1. )   ! lateral boundary cond. (no sign change) 
    462  
    463             DO jj = 2, jpjm1 
    464                DO ji = fs_2, fs_jpim1   ! vector opt. 
    465                   u_bkginc(ji,jj,jk) = u_bkginc(ji,jj,jk) + 0.2 * ( e1t(ji+1,jj)*e2t(ji+1,jj) * hdiv(ji+1,jj)   & 
    466                                                                   - e1t(ji  ,jj)*e2t(ji  ,jj) * hdiv(ji  ,jj) ) & 
    467                                                                 / e1u(ji,jj) * umask(ji,jj,jk)  
    468                   v_bkginc(ji,jj,jk) = v_bkginc(ji,jj,jk) + 0.2 * ( e1t(ji,jj+1)*e2t(ji,jj+1) * hdiv(ji,jj+1)   & 
    469                                                                   - e1t(ji,jj  )*e2t(ji,jj  ) * hdiv(ji,jj  ) ) & 
    470                                                                 / e2v(ji,jj) * vmask(ji,jj,jk)  
    471                END DO 
    472             END DO 
    473  
    474            END DO 
    475  
    476        END DO 
    477  
    478        CALL wrk_dealloc(jpi,jpj,hdiv)  
     496         END DO 
     497 
     498         CALL wrk_dealloc(jpi,jpj,hdiv)  
    479499 
    480500      ENDIF 
     
    506526         CALL iom_open( c_asmdin, inum ) 
    507527 
    508          CALL iom_get( inum, 'zdate', zdate_bkg )  
     528         CALL iom_get( inum, 'rdastp', zdate_bkg )  
    509529         
    510530         IF(lwp) THEN 
     
    662682      INTEGER :: it 
    663683      REAL(wp) :: zincwgt  ! IAU weight for current time step 
    664       !!---------------------------------------------------------------------- 
     684      REAL (wp), DIMENSION(jpi,jpj,jpk) :: fzptnz ! 3d freezing point values 
     685      !!---------------------------------------------------------------------- 
     686 
     687      ! freezing point calculation taken from oc_fz_pt (but calculated for all depths)  
     688      ! used to prevent the applied increments taking the temperature below the local freezing point  
     689 
     690#if defined key_cice  
     691        fzptnz(:,:,:) = -1.8_wp 
     692#else  
     693        DO jk = 1, jpk 
     694           DO jj = 1, jpj 
     695              DO ji = 1, jpk 
     696                 fzptnz (ji,jj,jk) = ( -0.0575_wp + 1.710523e-3_wp * SQRT( tsn(ji,jj,jk,jp_sal) )                   &  
     697                                                  - 2.154996e-4_wp *       tsn(ji,jj,jk,jp_sal)   ) * tsn(ji,jj,jk,jp_sal)  &  
     698                                                  - 7.53e-4_wp * fsdepw(ji,jj,jk)       ! (pressure in dbar)  
     699              END DO 
     700           END DO 
     701        END DO 
     702#endif  
    665703 
    666704      IF ( ln_asmiau ) THEN 
     
    684722            ! Update the tracer tendencies 
    685723            DO jk = 1, jpkm1 
    686                tsa(:,:,jk,jp_tem) = tsa(:,:,jk,jp_tem) + t_bkginc(:,:,jk) * zincwgt   
    687                tsa(:,:,jk,jp_sal) = tsa(:,:,jk,jp_sal) + s_bkginc(:,:,jk) * zincwgt 
     724               IF (ln_temnofreeze) THEN 
     725                  ! Do not apply negative increments if the temperature will fall below freezing 
     726                  WHERE(t_bkginc(:,:,jk) > 0.0_wp .OR. & 
     727                     &   tsn(:,:,jk,jp_tem) + tsa(:,:,jk,jp_tem) + t_bkginc(:,:,jk) * wgtiau(it) > fzptnz(:,:,jk) )  
     728                     tsa(:,:,jk,jp_tem) = tsa(:,:,jk,jp_tem) + t_bkginc(:,:,jk) * zincwgt   
     729                  END WHERE 
     730               ELSE 
     731                  tsa(:,:,jk,jp_tem) = tsa(:,:,jk,jp_tem) + t_bkginc(:,:,jk) * zincwgt   
     732               ENDIF 
     733               IF (ln_salfix) THEN 
     734                  ! Do not apply negative increments if the salinity will fall below a specified 
     735                  ! minimum value salfixmin 
     736                  WHERE(s_bkginc(:,:,jk) > 0.0_wp .OR. & 
     737                     &   tsn(:,:,jk,jp_sal) + tsa(:,:,jk,jp_sal) + s_bkginc(:,:,jk) * wgtiau(it) > salfixmin )  
     738                     tsa(:,:,jk,jp_sal) = tsa(:,:,jk,jp_sal) + s_bkginc(:,:,jk) * zincwgt 
     739                  END WHERE 
     740               ELSE 
     741                  tsa(:,:,jk,jp_sal) = tsa(:,:,jk,jp_sal) + s_bkginc(:,:,jk) * zincwgt 
     742               ENDIF 
    688743            END DO 
    689  
    690             ! Salinity fix 
    691             IF (ln_salfix) THEN 
    692                DO jk = 1, jpkm1 
    693                   DO jj = 1, jpj 
    694                      DO ji= 1, jpi 
    695                         tsa(ji,jj,jk,jp_sal) = MAX( tsa(ji,jj,jk,jp_sal), salfixmin ) 
    696                      END DO 
    697                   END DO 
    698                END DO 
    699             ENDIF 
    700744 
    701745         ENDIF 
     
    718762 
    719763            ! Initialize the now fields with the background + increment 
    720             tsn(:,:,:,jp_tem) = t_bkg(:,:,:) + t_bkginc(:,:,:)    
    721             tsn(:,:,:,jp_sal) = s_bkg(:,:,:) + s_bkginc(:,:,:)    
    722  
    723             ! Optional salinity fix 
     764            IF (ln_temnofreeze) THEN 
     765               ! Do not apply negative increments if the temperature will fall below freezing 
     766               WHERE(t_bkginc(:,:,:) > 0.0_wp .OR. & 
     767                  &   tsn(:,:,:,jp_tem) + t_bkginc(:,:,:) > fzptnz(:,:,:) )  
     768                  tsn(:,:,:,jp_tem) = t_bkg(:,:,:) + t_bkginc(:,:,:)    
     769               END WHERE 
     770            ELSE 
     771               tsn(:,:,:,jp_tem) = t_bkg(:,:,:) + t_bkginc(:,:,:)    
     772            ENDIF 
    724773            IF (ln_salfix) THEN 
    725                DO jk = 1, jpkm1 
    726                   DO jj = 1, jpj 
    727                      DO ji= 1, jpi 
    728                         tsn(ji,jj,jk,jp_sal) = MAX( tsn(ji,jj,jk,jp_sal), salfixmin ) 
    729                      END DO 
    730                   END DO 
    731                END DO 
     774               ! Do not apply negative increments if the salinity will fall below a specified 
     775               ! minimum value salfixmin 
     776               WHERE(s_bkginc(:,:,:) > 0.0_wp .OR. & 
     777                  &   tsn(:,:,:,jp_sal) + s_bkginc(:,:,:) > salfixmin )  
     778                  tsn(:,:,:,jp_sal) = s_bkg(:,:,:) + s_bkginc(:,:,:)    
     779               END WHERE 
     780            ELSE 
     781               tsn(:,:,:,jp_sal) = s_bkg(:,:,:) + s_bkginc(:,:,:)    
    732782            ENDIF 
    733783 
    734             tsb(:,:,:,:) = tsn(:,:,:,:)                        ! Update before fields 
     784            tsb(:,:,:,:) = tsn(:,:,:,:)               ! Update before fields 
    735785 
    736786            CALL eos( tsb, rhd, rhop )                ! Before potential and in situ densities 
    737787          
    738788            IF( ln_zps .AND. .NOT. lk_c1d ) & 
    739                &  CALL zps_hde( nit000, jpts, tsb,   &  ! Partial steps: before horizontal derivative 
    740                &                gtsu, gtsv, rhd,        &  ! of T, S, rd at the bottom ocean level 
     789               &  CALL zps_hde( nit000, jpts, tsb, &  ! Partial steps: before horizontal derivative 
     790               &                gtsu, gtsv, rhd,   &  ! of T, S, rd at the bottom ocean level 
    741791               &                gru , grv ) 
     792 
     793#if defined key_zdfkpp 
     794            CALL eos( tsn, rhd )                      ! Compute rhd 
     795#endif 
    742796 
    743797            DEALLOCATE( t_bkginc ) 
     
    748802         !   
    749803      ENDIF 
     804      ! Perhaps the following call should be in step 
     805      IF   ( ln_seaiceinc  )   CALL seaice_asm_inc ( kt )   ! apply sea ice concentration increment 
    750806      ! 
    751807   END SUBROUTINE tra_asm_inc 
     
    817873            vb(:,:,:) = vn(:,:,:) 
    818874  
    819             CALL div_cur( kt )            ! Compute divergence and curl for now fields 
    820  
    821             rotb (:,:,:) = rotn (:,:,:)   ! Update before fields 
    822             hdivb(:,:,:) = hdivn(:,:,:) 
    823  
    824875            DEALLOCATE( u_bkg    ) 
    825876            DEALLOCATE( v_bkg    ) 
     
    846897      ! 
    847898      INTEGER :: it 
     899      INTEGER :: jk 
    848900      REAL(wp) :: zincwgt  ! IAU weight for current time step 
    849901      !!---------------------------------------------------------------------- 
     
    891943            sshn(:,:) = ssh_bkg(:,:) + ssh_bkginc(:,:)   
    892944 
    893             sshb(:,:) = sshn(:,:)         ! Update before fields 
     945            ! Update before fields 
     946            sshb(:,:) = sshn(:,:)          
     947 
     948            IF( lk_vvl ) THEN 
     949               DO jk = 1, jpk 
     950                  fse3t_b(:,:,jk) = fse3t_n(:,:,jk) 
     951               END DO 
     952            ENDIF 
    894953 
    895954            DEALLOCATE( ssh_bkg    ) 
     
    902961   END SUBROUTINE ssh_asm_inc 
    903962 
     963   SUBROUTINE seaice_asm_inc( kt, kindic ) 
     964      !!---------------------------------------------------------------------- 
     965      !!                    ***  ROUTINE seaice_asm_inc  *** 
     966      !!           
     967      !! ** Purpose : Apply the sea ice assimilation increment. 
     968      !! 
     969      !! ** Method  : Direct initialization or Incremental Analysis Updating. 
     970      !! 
     971      !! ** Action  :  
     972      !! 
     973      !! History : 
     974      !!        !  07-2011  (D. Lea)  Initial version based on ssh_asm_inc 
     975      !!---------------------------------------------------------------------- 
     976 
     977      IMPLICIT NONE 
     978 
     979      !! * Arguments 
     980      INTEGER, INTENT(IN) :: kt   ! Current time step 
     981      INTEGER, OPTIONAL, INTENT(IN) :: kindic ! flag for disabling the deallocation 
     982 
     983      !! * Local declarations 
     984      INTEGER :: it 
     985      REAL(wp) :: zincwgt  ! IAU weight for current time step 
     986 
     987#if defined key_lim3 || defined key_lim2 
     988      REAL(wp), DIMENSION(jpi,jpj) :: zofrld, zohicif, zseaicendg, zhicifinc  ! LIM 
     989      REAL(wp) :: zhicifmin=0.5_wp      ! ice minimum depth in metres 
     990 
     991#endif 
     992 
     993 
     994      IF ( ln_asmiau ) THEN 
     995 
     996         !-------------------------------------------------------------------- 
     997         ! Incremental Analysis Updating 
     998         !-------------------------------------------------------------------- 
     999 
     1000         IF ( ( kt >= nitiaustr_r ).AND.( kt <= nitiaufin_r ) ) THEN 
     1001 
     1002            it = kt - nit000 + 1 
     1003            zincwgt = wgtiau(it)      ! IAU weight for the current time step  
     1004            ! note this is not a tendency so should not be divided by rdt (as with the tracer and other increments) 
     1005 
     1006            IF(lwp) THEN 
     1007               WRITE(numout,*)  
     1008               WRITE(numout,*) 'seaice_asm_inc : sea ice conc IAU at time step = ', & 
     1009                  &  kt,' with IAU weight = ', wgtiau(it) 
     1010               WRITE(numout,*) '~~~~~~~~~~~~' 
     1011            ENDIF 
     1012 
     1013#if defined key_lim3 || defined key_lim2 
     1014 
     1015            zofrld(:,:)=frld(:,:) 
     1016            zohicif(:,:)=hicif(:,:) 
     1017 
     1018            frld = MIN( MAX( frld(:,:) - seaice_bkginc(:,:) * zincwgt, 0.0_wp), 1.0_wp) 
     1019            pfrld = MIN( MAX( pfrld(:,:) - seaice_bkginc(:,:) * zincwgt, 0.0_wp), 1.0_wp) 
     1020            fr_i(:,:) = 1.0_wp - frld(:,:)        ! adjust ice fraction 
     1021 
     1022            zseaicendg(:,:)=zofrld(:,:) - frld(:,:)         ! find out actual sea ice nudge applied 
     1023 
     1024            ! Nudge sea ice depth to bring it up to a required minimum depth 
     1025 
     1026            WHERE( zseaicendg(:,:) > 0.0_wp .AND. hicif(:,:) < zhicifmin )  
     1027               zhicifinc(:,:) = (zhicifmin - hicif(:,:)) * zincwgt     
     1028            ELSEWHERE 
     1029               zhicifinc(:,:) = 0.0_wp 
     1030            END WHERE 
     1031 
     1032! nudge ice depth 
     1033            hicif(:,:)=hicif(:,:) + zhicifinc(:,:) 
     1034            phicif(:,:)=phicif(:,:) + zhicifinc(:,:)        
     1035 
     1036! seaice salinity balancing (to add) 
     1037 
     1038#endif 
     1039 
     1040#if defined key_cice 
     1041 
     1042! Pass ice increment tendency into CICE 
     1043            ndaice_da(:,:) = seaice_bkginc(:,:) * zincwgt / rdt 
     1044 
     1045#endif 
     1046 
     1047            IF ( kt == nitiaufin_r ) THEN 
     1048               DEALLOCATE( seaice_bkginc ) 
     1049            ENDIF 
     1050 
     1051         ELSE 
     1052 
     1053#if defined key_cice 
     1054 
     1055! Zero ice increment tendency into CICE 
     1056            ndaice_da(:,:) = 0.0_wp 
     1057 
     1058#endif 
     1059 
     1060         ENDIF 
     1061 
     1062      ELSEIF ( ln_asmdin ) THEN 
     1063 
     1064         !-------------------------------------------------------------------- 
     1065         ! Direct Initialization 
     1066         !-------------------------------------------------------------------- 
     1067 
     1068         IF ( kt == nitdin_r ) THEN 
     1069 
     1070            neuler = 0                    ! Force Euler forward step 
     1071 
     1072#if defined key_lim3 || defined key_lim2 
     1073 
     1074            zofrld(:,:)=frld(:,:) 
     1075            zohicif(:,:)=hicif(:,:) 
     1076  
     1077            ! Initialize the now fields the background + increment 
     1078 
     1079            frld(:,:) = MIN( MAX( frld(:,:) - seaice_bkginc(:,:), 0.0_wp), 1.0_wp) 
     1080            pfrld(:,:) = frld(:,:)  
     1081            fr_i(:,:) = 1.0_wp - frld(:,:)        ! adjust ice fraction 
     1082 
     1083            zseaicendg(:,:)=zofrld(:,:) - frld(:,:)         ! find out actual sea ice nudge applied 
     1084 
     1085            ! Nudge sea ice depth to bring it up to a required minimum depth 
     1086 
     1087            WHERE( zseaicendg(:,:) > 0.0_wp .AND. hicif(:,:) < zhicifmin )  
     1088               zhicifinc(:,:) = (zhicifmin - hicif(:,:)) * zincwgt     
     1089            ELSEWHERE 
     1090               zhicifinc(:,:) = 0.0_wp 
     1091            END WHERE 
     1092 
     1093! nudge ice depth 
     1094            hicif(:,:)=hicif(:,:) + zhicifinc(:,:) 
     1095            phicif(:,:)=phicif(:,:)        
     1096 
     1097! seaice salinity balancing (to add) 
     1098   
     1099#endif 
     1100  
     1101#if defined key_cice 
     1102 
     1103! Pass ice increment tendency into CICE - is this correct? 
     1104           ndaice_da(:,:) = seaice_bkginc(:,:) / rdt 
     1105 
     1106#endif 
     1107           IF ( .NOT. PRESENT(kindic) ) THEN 
     1108              DEALLOCATE( seaice_bkginc ) 
     1109           END IF 
     1110 
     1111         ELSE 
     1112 
     1113#if defined key_cice 
     1114 
     1115! Zero ice increment tendency into CICE  
     1116            ndaice_da(:,:) = 0.0_wp 
     1117 
     1118#endif 
     1119          
     1120         ENDIF 
     1121 
     1122!#if defined key_lim3 || defined key_lim2 || defined key_cice 
     1123! 
     1124!            IF (ln_seaicebal ) THEN        
     1125!             !! balancing salinity increments 
     1126!             !! simple case from limflx.F90 (doesn't include a mass flux) 
     1127!             !! assumption is that as ice concentration is reduced or increased 
     1128!             !! the snow and ice depths remain constant 
     1129!             !! note that snow is being created where ice concentration is being increased 
     1130!             !! - could be more sophisticated and 
     1131!             !! not do this (but would need to alter h_snow) 
     1132! 
     1133!             usave(:,:,:)=sb(:,:,:)   ! use array as a temporary store 
     1134! 
     1135!             DO jj = 1, jpj 
     1136!               DO ji = 1, jpi  
     1137!           ! calculate change in ice and snow mass per unit area 
     1138!           ! positive values imply adding salt to the ocean (results from ice formation) 
     1139!           ! fwf : ice formation and melting 
     1140! 
     1141!                 zfons = ( -nfresh_da(ji,jj)*soce + nfsalt_da(ji,jj) )*rdt 
     1142! 
     1143!           ! change salinity down to mixed layer depth 
     1144!                 mld=hmld_kara(ji,jj) 
     1145! 
     1146!           ! prevent small mld 
     1147!           ! less than 10m can cause salinity instability  
     1148!                 IF (mld < 10) mld=10 
     1149! 
     1150!           ! set to bottom of a level  
     1151!                 DO jk = jpk-1, 2, -1 
     1152!                   IF ((mld > gdepw(ji,jj,jk)) .and. (mld < gdepw(ji,jj,jk+1))) THEN  
     1153!                     mld=gdepw(ji,jj,jk+1) 
     1154!                     jkmax=jk 
     1155!                   ENDIF 
     1156!                 ENDDO 
     1157! 
     1158!            ! avoid applying salinity balancing in shallow water or on land 
     1159!            !  
     1160! 
     1161!            ! dsal_ocn (psu kg m^-2) / (kg m^-3 * m) 
     1162! 
     1163!                 dsal_ocn=0.0_wp 
     1164!                 sal_thresh=5.0_wp        ! minimum salinity threshold for salinity balancing 
     1165! 
     1166!                 if (tmask(ji,jj,1) > 0 .AND. tmask(ji,jj,jkmax) > 0 ) & 
     1167!                              dsal_ocn = zfons / (rhop(ji,jj,1) * mld) 
     1168! 
     1169!           ! put increments in for levels in the mixed layer 
     1170!           ! but prevent salinity below a threshold value  
     1171! 
     1172!                   DO jk = 1, jkmax               
     1173! 
     1174!                     IF (dsal_ocn > 0.0_wp .or. sb(ji,jj,jk)+dsal_ocn > sal_thresh) THEN  
     1175!                           sb(ji,jj,jk) = sb(ji,jj,jk) + dsal_ocn 
     1176!                           sn(ji,jj,jk) = sn(ji,jj,jk) + dsal_ocn 
     1177!                     ENDIF 
     1178! 
     1179!                   ENDDO 
     1180! 
     1181!      !            !  salt exchanges at the ice/ocean interface 
     1182!      !            zpmess         = zfons / rdt_ice    ! rdt_ice is ice timestep 
     1183!      ! 
     1184!      !! Adjust fsalt. A +ve fsalt means adding salt to ocean 
     1185!      !!           fsalt(ji,jj) =  fsalt(ji,jj) + zpmess     ! adjust fsalt   
     1186!      !!                
     1187!      !!           emps(ji,jj) = emps(ji,jj) + zpmess        ! or adjust emps (see icestp1d)  
     1188!      !!                                                     ! E-P (kg m-2 s-2) 
     1189!      !            emp(ji,jj) = emp(ji,jj) + zpmess          ! E-P (kg m-2 s-2) 
     1190!               ENDDO !ji 
     1191!             ENDDO !jj! 
     1192! 
     1193!            ENDIF !ln_seaicebal 
     1194! 
     1195!#endif 
     1196 
     1197 
     1198      ENDIF 
     1199 
     1200   END SUBROUTINE seaice_asm_inc 
    9041201   !!====================================================================== 
    9051202END MODULE asminc 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/OPA_SRC/DIA/diahth.F90

    r3294 r3764  
    313313      ! surface boundary condition 
    314314      IF( lk_vvl ) THEN   ;   zthick(:,:) = 0._wp       ;   htc3(:,:) = 0._wp                                    
    315       ELSE                ;   zthick(:,:) = sshn(:,:)   ;   htc3(:,:) = tsn(:,:,jk,jp_tem) * sshn(:,:) * tmask(:,:,jk)    
     315      ELSE                ;   zthick(:,:) = sshn(:,:)   ;   htc3(:,:) = tsn(:,:,1,jp_tem) * sshn(:,:) * tmask(:,:,1)    
    316316      ENDIF 
    317317      ! integration down to ilevel 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90

    r3610 r3764  
    455455      NAMELIST/namptr/ ln_diaptr, ln_diaznl, ln_subbas, ln_ptrcomp, nn_fptr, nn_fwri 
    456456      !!---------------------------------------------------------------------- 
    457       IF( nn_timing == 1 )   CALL timing_start('dia_ptr_init') 
    458457 
    459458      REWIND( numnam )                 ! Read Namelist namptr : poleward transport parameters 
     
    474473       
    475474      IF( ln_diaptr) THEN   
     475      
     476         IF( nn_timing == 1 )   CALL timing_start('dia_ptr_init') 
    476477       
    477478         IF( ln_subbas ) THEN   ;   nptr = 5       ! Global, Atlantic, Pacific, Indian, Indo-Pacific 
     
    528529         nidom_ptr = FLIO_DOM_NONE 
    529530#endif 
     531      IF( nn_timing == 1 )   CALL timing_stop('dia_ptr_init') 
     532      ! 
    530533      ENDIF  
    531       !  
    532       IF( nn_timing == 1 )   CALL timing_stop('dia_ptr_init') 
    533534      !  
    534535   END SUBROUTINE dia_ptr_init 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/OPA_SRC/DIA/diawri_dimg.h90

    r3625 r3764  
    165165       fsel(:,:,6 ) = fsel(:,:,6 ) + sshn(:,:)  
    166166       fsel(:,:,7 ) = fsel(:,:,7 ) + qsr(:,:) 
    167        fsel(:,:,8 ) = fsel(:,:,8 ) + qrp (:,:) 
    168        fsel(:,:,9 ) = fsel(:,:,9 ) + erp (:,:) 
     167       IF( ln_ssr ) THEN 
     168          IF( nn_sstr /= 0 )   fsel(:,:,8 ) = fsel(:,:,8 ) + qrp (:,:) 
     169          IF( nn_sssr /= 0 )   fsel(:,:,9 ) = fsel(:,:,9 ) + erp (:,:) 
     170       ENDIF 
    169171       fsel(:,:,10) = fsel(:,:,10) + hmld(:,:) 
    170172       fsel(:,:,11) = fsel(:,:,11) + hmlp(:,:) 
     
    234236          fsel(:,:,6 ) = sshn(:,:) 
    235237          fsel(:,:,7 ) = qsr (:,:) * tmask(:,:,1) 
    236           fsel(:,:,8 ) = qrp (:,:) * tmask(:,:,1) 
    237           fsel(:,:,9 ) = erp (:,:) * tmask(:,:,1) 
     238          IF( ln_ssr ) THEN 
     239             IF( nn_sstr /= 0 )   fsel(:,:,8 ) = qrp (:,:) * tmask(:,:,1) 
     240             IF( nn_sssr /= 0 )   fsel(:,:,9 ) = erp (:,:) * tmask(:,:,1) 
     241          ENDIF 
    238242          fsel(:,:,10) = hmld(:,:) * tmask(:,:,1) 
    239243          fsel(:,:,11) = hmlp(:,:) * tmask(:,:,1) 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90

    r3680 r3764  
    22   !!====================================================================== 
    33   !!                       ***  MODULE  daymod  *** 
    4    !! Ocean        :  calendar  
     4   !! Ocean        :  calendar 
    55   !!===================================================================== 
    66   !! History :  OPA  ! 1994-09  (M. Pontaud M. Imbard)  Original code 
    77   !!                 ! 1997-03  (O. Marti) 
    8    !!                 ! 1997-05  (G. Madec)  
     8   !!                 ! 1997-05  (G. Madec) 
    99   !!                 ! 1997-08  (M. Imbard) 
    1010   !!   NEMO     1.0  ! 2003-09  (G. Madec)  F90 + nyear, nmonth, nday 
    1111   !!                 ! 2004-01  (A.M. Treguier) new calculation based on adatrj 
    1212   !!                 ! 2006-08  (G. Madec)  surface module major update 
    13    !!----------------------------------------------------------------------       
     13   !!---------------------------------------------------------------------- 
    1414 
    1515   !!---------------------------------------------------------------------- 
    1616   !!   day        : calendar 
    17    !!   
     17   !! 
    1818   !!           ------------------------------- 
    1919   !!           ----------- WARNING ----------- 
     
    2424   !!           ----------- WARNING ----------- 
    2525   !!           ------------------------------- 
    26    !!   
     26   !! 
    2727   !!---------------------------------------------------------------------- 
    2828   USE dom_oce         ! ocean space and time domain 
    2929   USE phycst          ! physical constants 
    3030   USE in_out_manager  ! I/O manager 
    31    USE iom             !  
     31   USE iom             ! 
    3232   USE ioipsl, ONLY :   ymds2ju   ! for calendar 
    3333   USE prtctl          ! Print control 
     
    4141   PUBLIC   day        ! called by step.F90 
    4242   PUBLIC   day_init   ! called by istate.F90 
    43  
    44    INTEGER ::   nsecd, nsecd05, ndt, ndt05 
     43   PUBLIC   day_mth    ! Needed by TAM 
     44 
     45   INTEGER, PUBLIC ::   nsecd, nsecd05, ndt, ndt05 ! (PUBLIC for TAM) 
    4546 
    4647   !!---------------------------------------------------------------------- 
     
    5455      !!---------------------------------------------------------------------- 
    5556      !!                   ***  ROUTINE day_init  *** 
    56       !!  
    57       !! ** Purpose :   Initialization of the calendar values to their values 1 time step before nit000  
     57      !! 
     58      !! ** Purpose :   Initialization of the calendar values to their values 1 time step before nit000 
    5859      !!                because day will be called at the beginning of step 
    5960      !! 
     
    8182      ndt05   = NINT(0.5 * rdttra(1)) 
    8283 
    83       IF( .NOT. lk_offline ) CALL day_rst( nit000, 'READ' )  
     84      IF( .NOT. lk_offline ) CALL day_rst( nit000, 'READ' ) 
    8485 
    8586      ! set the calandar from ndastp (read in restart file and namelist) 
     
    8788      nyear   =   ndastp / 10000 
    8889      nmonth  = ( ndastp - (nyear * 10000) ) / 100 
    89       nday    =   ndastp - (nyear * 10000) - ( nmonth * 100 )  
     90      nday    =   ndastp - (nyear * 10000) - ( nmonth * 100 ) 
    9091 
    9192      CALL ymds2ju( nyear, nmonth, nday, 0.0, fjulday )  ! we assume that we start run at 00:00 
     
    9596      nsec1jan000 = 0 
    9697      CALL day_mth 
    97        
     98 
    9899      IF ( nday == 0 ) THEN     !   for ex if ndastp = ndate0 - 1 
    99          nmonth = nmonth - 1   
     100         nmonth = nmonth - 1 
    100101         nday = nmonth_len(nmonth) 
    101102      ENDIF 
     
    106107         IF( nleapy == 1 )   CALL day_mth 
    107108      ENDIF 
    108        
     109 
    109110      ! day since january 1st 
    110111      nday_year = nday + SUM( nmonth_len(1:nmonth - 1) ) 
    111112 
    112       !compute number of days between last monday and today       
     113      !compute number of days between last monday and today 
    113114      CALL ymds2ju( 1900, 01, 01, 0.0, zjul )  ! compute julian day value of 01.01.1900 (our reference that was a Monday) 
    114       inbday = NINT(fjulday - zjul)            ! compute nb day between  01.01.1900 and current day   
    115       idweek = MOD(inbday, 7)                  ! compute nb day between last monday and current day   
     115      inbday = NINT(fjulday - zjul)            ! compute nb day between  01.01.1900 and current day 
     116      idweek = MOD(inbday, 7)                  ! compute nb day between last monday and current day 
    116117 
    117118      ! number of seconds since the beginning of current year/month/week/day at the middle of the time-step 
     
    135136      !!---------------------------------------------------------------------- 
    136137      !!                   ***  ROUTINE day_init  *** 
    137       !!  
     138      !! 
    138139      !! ** Purpose :   calendar values related to the months 
    139140      !! 
     
    147148 
    148149      ! length of the month of the current year (from nleapy, read in namelist) 
    149       IF ( nleapy < 2 ) THEN  
     150      IF ( nleapy < 2 ) THEN 
    150151         nmonth_len(:) = (/ 31, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 31 /) 
    151152         nyear_len(:) = 365 
     
    167168      ! time since Jan 1st   0     1     2    ...    11    12    13 
    168169      !          ---------*--|--*--|--*--| ... |--*--|--*--|--*--|-------------------------------------- 
    169       !                 <---> <---> <--->  ...  <---> <---> <--->         
     170      !                 <---> <---> <--->  ...  <---> <---> <---> 
    170171      ! month number      0     1     2    ...    11    12    13 
    171172      ! 
     
    180181         nmonth_end(jm) = nmonth_end(jm-1) + nsecd * nmonth_len(jm) 
    181182      END DO 
    182       !            
    183    END SUBROUTINE  
     183      ! 
     184   END SUBROUTINE 
    184185 
    185186 
     
    187188      !!---------------------------------------------------------------------- 
    188189      !!                      ***  ROUTINE day  *** 
    189       !!  
     190      !! 
    190191      !! ** Purpose :   Compute the date with a day iteration IF necessary. 
    191192      !! 
     
    199200      !!              - adatrj    : date in days since the beginning of the run 
    200201      !!              - nsec_year : current time of the year (in second since 00h, jan 1st) 
    201       !!----------------------------------------------------------------------       
     202      !!---------------------------------------------------------------------- 
    202203      INTEGER, INTENT(in) ::   kt        ! ocean time-step indices 
    203204      ! 
     
    210211      zprec = 0.1 / rday 
    211212      !                                                 ! New time-step 
    212       nsec_year  = nsec_year  + ndt  
    213       nsec_month = nsec_month + ndt                  
     213      nsec_year  = nsec_year  + ndt 
     214      nsec_month = nsec_month + ndt 
    214215      nsec_week  = nsec_week  + ndt 
    215       nsec_day   = nsec_day   + ndt                 
     216      nsec_day   = nsec_day   + ndt 
    216217      adatrj  = adatrj  + rdttra(1) / rday 
    217218      fjulday = fjulday + rdttra(1) / rday 
    218219      IF( ABS(fjulday - REAL(NINT(fjulday),wp)) < zprec )   fjulday = REAL(NINT(fjulday),wp)   ! avoid truncation error 
    219220      IF( ABS(adatrj  - REAL(NINT(adatrj ),wp)) < zprec )   adatrj  = REAL(NINT(adatrj ),wp)   ! avoid truncation error 
    220        
     221 
    221222      IF( nsec_day > nsecd ) THEN                       ! New day 
    222223         ! 
     
    251252 
    252253      IF( nsec_week > 7*nsecd )   nsec_week = ndt05     ! New week 
    253        
     254 
    254255      IF(ln_ctl) THEN 
    255256         WRITE(charout,FMT="('kt =', I4,'  d/m/y =',I2,I2,I4)") kt, nday, nmonth, nyear 
     
    268269      !!--------------------------------------------------------------------- 
    269270      !!                   ***  ROUTINE ts_rst  *** 
    270       !!  
     271      !! 
    271272      !!  ** Purpose : Read or write calendar in restart file: 
    272       !!  
     273      !! 
    273274      !!  WRITE(READ) mode: 
    274       !!       kt        : number of time step since the begining of the experiment at the  
     275      !!       kt        : number of time step since the begining of the experiment at the 
    275276      !!                   end of the current(previous) run 
    276       !!       adatrj(0) : number of elapsed days since the begining of the experiment at the  
     277      !!       adatrj(0) : number of elapsed days since the begining of the experiment at the 
    277278      !!                   end of the current(previous) run (REAL -> keep fractions of day) 
    278279      !!       ndastp    : date at the end of the current(previous) run (coded as yyyymmdd integer) 
    279       !!  
     280      !! 
    280281      !!   According to namelist parameter nrstdt, 
    281282      !!       nrstdt = 0  no control on the date (nit000 is  arbitrary). 
     
    295296      REAL(wp) ::   zkt, zndastp 
    296297      !!---------------------------------------------------------------------- 
    297        
     298 
    298299      IF( TRIM(cdrw) == 'READ' ) THEN 
    299300 
     
    312313               WRITE(numout,*) 
    313314            ENDIF 
    314             ! Control of date  
    315             IF( nit000 - NINT( zkt ) /= 1 .AND. nrstdt /= 0 )                                         &  
    316                  &   CALL ctl_stop( ' ===>>>> : problem with nit000 for the restart',                 &  
     315            ! Control of date 
     316            IF( nit000 - NINT( zkt ) /= 1 .AND. nrstdt /= 0 )                                         & 
     317                 &   CALL ctl_stop( ' ===>>>> : problem with nit000 for the restart',                 & 
    317318                 &                  ' verify the restart file or rerun with nrstdt = 0 (namelist)' ) 
    318319            ! define ndastp and adatrj 
    319             IF ( nrstdt == 2 ) THEN  
     320            IF ( nrstdt == 2 ) THEN 
    320321               ! read the parameters correspondting to nit000 - 1 (last time step of previous run) 
    321322               CALL iom_get( numror, 'ndastp', zndastp ) 
    322323               ndastp = NINT( zndastp ) 
    323324               CALL iom_get( numror, 'adatrj', adatrj  ) 
    324             ELSE  
     325            ELSE 
    325326               ! parameters correspondting to nit000 - 1 (as we start the step loop with a call to day) 
    326327               ndastp = ndate0 - 1     ! ndate0 read in the namelist in dom_nam, we assume that we start run at 00:00 
    327                adatrj = ( REAL( nit000-1, wp ) * rdttra(1) ) / rday  
    328                ! note this is wrong if time step has changed during run  
     328               adatrj = ( REAL( nit000-1, wp ) * rdttra(1) ) / rday 
     329               ! note this is wrong if time step has changed during run 
    329330            ENDIF 
    330331         ELSE 
    331332            ! parameters correspondting to nit000 - 1 (as we start the step loop with a call to day) 
    332333            ndastp = ndate0 - 1        ! ndate0 read in the namelist in dom_nam, we assume that we start run at 00:00 
    333             adatrj = ( REAL( nit000-1, wp ) * rdttra(1) ) / rday  
     334            adatrj = ( REAL( nit000-1, wp ) * rdttra(1) ) / rday 
    334335         ENDIF 
    335336         IF( ABS(adatrj  - REAL(NINT(adatrj),wp)) < 0.1 / rday )   adatrj = REAL(NINT(adatrj),wp)   ! avoid truncation error 
     
    347348            IF(lwp) WRITE(numout,*) 
    348349            IF(lwp) WRITE(numout,*) 'rst_write : write oce restart file  kt =', kt 
    349             IF(lwp) WRITE(numout,*) '~~~~~~~'          
     350            IF(lwp) WRITE(numout,*) '~~~~~~~' 
    350351         ENDIF 
    351352         ! calendar control 
    352          CALL iom_rstput( kt, nitrst, numrow, 'kt'     , REAL( kt    , wp) )   ! time-step  
     353         CALL iom_rstput( kt, nitrst, numrow, 'kt'     , REAL( kt    , wp) )   ! time-step 
    353354         CALL iom_rstput( kt, nitrst, numrow, 'ndastp' , REAL( ndastp, wp) )   ! date 
    354355         CALL iom_rstput( kt, nitrst, numrow, 'adatrj' , adatrj            )   ! number of elapsed days since 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90

    r3680 r3764  
    6868      !!              - 1D configuration, move Coriolis, u and v at T-point 
    6969      !!---------------------------------------------------------------------- 
    70       INTEGER ::   jk                ! dummy loop argument 
    71       INTEGER ::   iconf = 0         ! temporary integers 
    72       !!---------------------------------------------------------------------- 
    73       ! 
    74       IF( nn_timing == 1 )  CALL timing_start('dom_init') 
     70      INTEGER ::   jk          ! dummy loop argument 
     71      INTEGER ::   iconf = 0   ! local integers 
     72      !!---------------------------------------------------------------------- 
     73      ! 
     74      IF( nn_timing == 1 )   CALL timing_start('dom_init') 
    7575      ! 
    7676      IF(lwp) THEN 
     
    8888      IF( lk_vvl         )   CALL dom_vvl      ! Vertical variable mesh 
    8989      ! 
    90       IF( lk_c1d ) THEN                        ! 1D configuration  
    91          CALL cor_c1d                          ! Coriolis set at T-point 
    92          umask(:,:,:) = tmask(:,:,:)           ! U, V moved at T-point 
    93          vmask(:,:,:) = tmask(:,:,:) 
    94       END IF 
    95       ! 
    96       hu(:,:) = 0.e0                           ! Ocean depth at U- and V-points 
    97       hv(:,:) = 0.e0 
     90      IF( lk_c1d         )   CALL cor_c1d      ! 1D configuration: Coriolis set at T-point 
     91      ! 
     92      hu(:,:) = 0._wp                          ! Ocean depth at U- and V-points 
     93      hv(:,:) = 0._wp 
    9894      DO jk = 1, jpk 
    9995         hu(:,:) = hu(:,:) + fse3u(:,:,jk) * umask(:,:,jk) 
     
    10197      END DO 
    10298      !                                        ! Inverse of the local depth 
    103       hur(:,:) = 1. / ( hu(:,:) + 1.e0 - umask(:,:,1) ) * umask(:,:,1) 
    104       hvr(:,:) = 1. / ( hv(:,:) + 1.e0 - vmask(:,:,1) ) * vmask(:,:,1) 
     99      hur(:,:) = 1._wp / ( hu(:,:) + 1._wp - umask(:,:,1) ) * umask(:,:,1) 
     100      hvr(:,:) = 1._wp / ( hv(:,:) + 1._wp - vmask(:,:,1) ) * vmask(:,:,1) 
    105101 
    106102                             CALL dom_stp      ! time step 
     
    108104      IF( .NOT.ln_rstart )   CALL dom_ctl      ! Domain control 
    109105      ! 
    110       IF( nn_timing == 1 )  CALL timing_stop('dom_init') 
     106      IF( nn_timing == 1 )   CALL timing_stop('dom_init') 
    111107      ! 
    112108   END SUBROUTINE dom_init 
     
    294290         CALL mpp_maxloc( e2t(:,:), tmask(:,:,1), ze2max, iima2,ijma2 ) 
    295291      ELSE 
    296          ze1min = MINVAL( e1t(:,:), mask = tmask(:,:,1) == 1.e0 )     
    297          ze2min = MINVAL( e2t(:,:), mask = tmask(:,:,1) == 1.e0 )     
    298          ze1max = MAXVAL( e1t(:,:), mask = tmask(:,:,1) == 1.e0 )     
    299          ze2max = MAXVAL( e2t(:,:), mask = tmask(:,:,1) == 1.e0 )     
    300  
    301          iloc  = MINLOC( e1t(:,:), mask = tmask(:,:,1) == 1.e0 ) 
     292         ze1min = MINVAL( e1t(:,:), mask = tmask(:,:,1) == 1._wp )     
     293         ze2min = MINVAL( e2t(:,:), mask = tmask(:,:,1) == 1._wp )     
     294         ze1max = MAXVAL( e1t(:,:), mask = tmask(:,:,1) == 1._wp )     
     295         ze2max = MAXVAL( e2t(:,:), mask = tmask(:,:,1) == 1._wp )     
     296 
     297         iloc  = MINLOC( e1t(:,:), mask = tmask(:,:,1) == 1._wp ) 
    302298         iimi1 = iloc(1) + nimpp - 1 
    303299         ijmi1 = iloc(2) + njmpp - 1 
    304          iloc  = MINLOC( e2t(:,:), mask = tmask(:,:,1) == 1.e0 ) 
     300         iloc  = MINLOC( e2t(:,:), mask = tmask(:,:,1) == 1._wp ) 
    305301         iimi2 = iloc(1) + nimpp - 1 
    306302         ijmi2 = iloc(2) + njmpp - 1 
    307          iloc  = MAXLOC( e1t(:,:), mask = tmask(:,:,1) == 1.e0 ) 
     303         iloc  = MAXLOC( e1t(:,:), mask = tmask(:,:,1) == 1._wp ) 
    308304         iima1 = iloc(1) + nimpp - 1 
    309305         ijma1 = iloc(2) + njmpp - 1 
    310          iloc  = MAXLOC( e2t(:,:), mask = tmask(:,:,1) == 1.e0 ) 
     306         iloc  = MAXLOC( e2t(:,:), mask = tmask(:,:,1) == 1._wp ) 
    311307         iima2 = iloc(1) + nimpp - 1 
    312308         ijma2 = iloc(2) + njmpp - 1 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90

    r3702 r3764  
    1616   !!            3.3  ! 2010-11  (G. Madec) add mbk. arrays associated to the deepest ocean level 
    1717   !!            3.4  ! 2012-08  (J. Siddorn) added Siddorn and Furner stretching function 
     18   !!            3.4  ! 2012-12  (R. Bourdalle-Badie and G. Reffray)  modify C1D case   
    1819   !!---------------------------------------------------------------------- 
    1920 
     
    4041   USE lbclnk            ! ocean lateral boundary conditions (or mpp link) 
    4142   USE lib_mpp           ! distributed memory computing library 
    42    USE wrk_nemo        ! Memory allocation 
    43    USE timing          ! Timing 
     43   USE wrk_nemo          ! Memory allocation 
     44   USE timing            ! Timing 
    4445 
    4546   IMPLICIT NONE 
     
    8485      !!                ***  ROUTINE dom_zgr  *** 
    8586      !!                    
    86       !! ** Purpose :  set the depth of model levels and the resulting  
    87       !!      vertical scale factors. 
     87      !! ** Purpose :   set the depth of model levels and the resulting  
     88      !!              vertical scale factors. 
    8889      !! 
    8990      !! ** Method  : - reference 1D vertical coordinate (gdep._0, e3._0) 
     
    9798      !! ** Action  :   define gdep., e3., mbathy and bathy 
    9899      !!---------------------------------------------------------------------- 
    99       INTEGER ::   ioptio = 0   ! temporary integer 
     100      INTEGER ::   ioptio, ibat   ! local integer 
    100101      ! 
    101102      NAMELIST/namzgr/ ln_zco, ln_zps, ln_sco 
    102103      !!---------------------------------------------------------------------- 
    103104      ! 
    104       IF( nn_timing == 1 )  CALL timing_start('dom_zgr') 
     105      IF( nn_timing == 1 )   CALL timing_start('dom_zgr') 
    105106      ! 
    106107      REWIND( numnam )                 ! Read Namelist namzgr : vertical coordinate' 
     
    118119 
    119120      ioptio = 0                       ! Check Vertical coordinate options 
    120       IF( ln_zco ) ioptio = ioptio + 1 
    121       IF( ln_zps ) ioptio = ioptio + 1 
    122       IF( ln_sco ) ioptio = ioptio + 1 
     121      IF( ln_zco      )  ioptio = ioptio + 1 
     122      IF( ln_zps      )  ioptio = ioptio + 1 
     123      IF( ln_sco      )  ioptio = ioptio + 1 
    123124      IF( ioptio /= 1 )   CALL ctl_stop( ' none or several vertical coordinate options used' ) 
    124125      ! 
     
    127128                          CALL zgr_z            ! Reference z-coordinate system (always called) 
    128129                          CALL zgr_bat          ! Bathymetry fields (levels and meters) 
     130      IF( lk_c1d      )   CALL lbc_lnk( bathy , 'T', 1._wp )   ! 1D config.: same bathy value over the 3x3 domain 
    129131      IF( ln_zco      )   CALL zgr_zco          ! z-coordinate 
    130132      IF( ln_zps      )   CALL zgr_zps          ! Partial step z-coordinate 
     
    134136      ! ----------------------------------- 
    135137      IF( lzoom       )   CALL zgr_bat_zoom     ! correct mbathy in case of zoom subdomain 
    136       IF( .NOT.lk_c1d )   CALL zgr_bat_ctl      ! check bathymetry (mbathy) and suppress isoated ocean points 
     138      IF( .NOT.lk_c1d )   CALL zgr_bat_ctl      ! check bathymetry (mbathy) and suppress isolated ocean points 
    137139                          CALL zgr_bot_level    ! deepest ocean level for t-, u- and v-points 
    138140      ! 
    139       ! 
    140  
     141      IF( lk_c1d ) THEN                         ! 1D config.: same mbathy value over the 3x3 domain 
     142         ibat = mbathy(2,2) 
     143         mbathy(:,:) = ibat 
     144      END IF 
     145      ! 
    141146      IF( nprint == 1 .AND. lwp )   THEN 
    142147         WRITE(numout,*) ' MIN val mbathy ', MINVAL( mbathy(:,:) ), ' MAX ', MAXVAL( mbathy(:,:) ) 
     
    478483                    END DO 
    479484                 END DO 
    480                  IF(lwp) WRITE(numout,*) 
     485                 IF(lwp) WRITE(numout,*)      
    481486                 IF(lwp) WRITE(numout,*) '      orca_r2: Gibraltar strait open at i=',ii0,' j=',ij0 
    482487                 ! 
     
    742747      ! 
    743748      mbkt(:,:) = MAX( mbathy(:,:) , 1 )    ! bottom k-index of T-level (=1 over land) 
     749  
    744750      !                                     ! bottom k-index of W-level = mbkt+1 
    745751      DO jj = 1, jpjm1                      ! bottom k-index of u- (v-) level 
     
    12201226         END DO 
    12211227         ! 
    1222          ! Apply lateral boundary condition   CAUTION: kept the value when the lbc field is zero 
     1228         ! Apply lateral boundary condition   CAUTION: keep the value when the lbc field is zero 
    12231229         ztmp(:,:) = zenv(:,:)   ;   CALL lbc_lnk( zenv, 'T', 1._wp ) 
    12241230         DO jj = 1, nlcj 
     
    12311237      !                                                     ! ================ ! 
    12321238      ! 
    1233       !                                        ! envelop bathymetry saved in hbatt 
     1239      ! Fill ghost rows with appropriate values to avoid undefined e3 values with some mpp decompositions 
     1240      DO ji = nlci+1, jpi  
     1241         zenv(ji,1:nlcj) = zenv(nlci,1:nlcj) 
     1242      END DO 
     1243      ! 
     1244      DO jj = nlcj+1, jpj 
     1245         zenv(:,jj) = zenv(:,nlcj) 
     1246      END DO 
     1247      ! 
     1248      ! Envelope bathymetry saved in hbatt 
    12341249      hbatt(:,:) = zenv(:,:)  
    12351250      IF( MINVAL( gphit(:,:) ) * MAXVAL( gphit(:,:) ) <= 0._wp ) THEN 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90

    r3680 r3764  
    4141   USE dynspg_exp      ! pressure gradient schemes 
    4242   USE dynspg_ts       ! pressure gradient schemes 
     43   USE sol_oce         ! ocean solver variables 
    4344   USE lib_mpp         ! MPP library 
    4445   USE restart         ! restart 
     
    106107         hdivb(:,:,:) = 0._wp   ;   hdivn(:,:,:) = 0._wp 
    107108         ! 
    108          !                                       ! define e3u_b, e3v_b from e3t_b initialized in domzgr 
    109          CALL dom_vvl_2( nit000, fse3u_b(:,:,:), fse3v_b(:,:,:) ) 
    110          ! 
    111109         IF( cp_cfg == 'eel' ) THEN 
    112110            CALL istate_eel                      ! EEL   configuration : start from pre-defined U,V T-S fields 
     
    133131            ENDDO 
    134132         ENDIF 
     133         !                                       ! define e3u_b, e3v_b from e3t_b initialized in domzgr 
     134         CALL dom_vvl_2( nit000, fse3u_b(:,:,:), fse3v_b(:,:,:) ) 
    135135         !  
    136136      ENDIF 
     
    138138      IF( lk_agrif ) THEN                  ! read free surface arrays in restart file 
    139139         IF( ln_rstart ) THEN 
    140             IF( lk_dynspg_flt )   CALL flt_rst( nit000, 'READ' )      ! read or initialize the following fields 
    141             !                                                         ! gcx, gcxb for agrif_opa_init 
    142          ENDIF                                                        ! explicit case not coded yet with AGRIF 
     140            IF( lk_dynspg_flt )  THEN      ! read or initialize the following fields 
     141               !                           ! gcx, gcxb for agrif_opa_init 
     142               IF( sol_oce_alloc()  > 0 )   CALL ctl_stop('agrif sol_oce_alloc: allocation of arrays failed') 
     143               CALL flt_rst( nit000, 'READ' ) 
     144            ENDIF 
     145         ENDIF                             ! explicit case not coded yet with AGRIF 
    143146      ENDIF 
    144147      ! 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90

    r3632 r3764  
    1111   !!            8.5  !  2002-08  (A. Bozec)  hpg_zps: Original code 
    1212   !!   NEMO     1.0  !  2005-10  (A. Beckmann, B.W. An)  various s-coordinate options 
    13    !!                 !         Original code for hpg_ctl, hpg_hel hpg_wdj, hpg_djc, hpg_rot  
     13   !!                 !         Original code for hpg_ctl, hpg_hel hpg_wdj, hpg_djc, hpg_rot 
    1414   !!             -   !  2005-11  (G. Madec) style & small optimisation 
    1515   !!            3.3  !  2010-10  (C. Ethe, G. Madec) reorganisation of initialisation phase 
     
    3131   USE dom_oce         ! ocean space and time domain 
    3232   USE phycst          ! physical constants 
    33    USE trdmod          ! ocean dynamics trends  
     33   USE trdmod          ! ocean dynamics trends 
    3434   USE trdmod_oce      ! ocean variables trends 
    3535   USE in_out_manager  ! I/O manager 
    3636   USE prtctl          ! Print control 
    37    USE lbclnk          ! lateral boundary condition  
     37   USE lbclnk          ! lateral boundary condition 
    3838   USE lib_mpp         ! MPP library 
    3939   USE wrk_nemo        ! Memory Allocation 
     
    4646   PUBLIC   dyn_hpg_init   ! routine called by opa module 
    4747 
    48    !                                              !!* Namelist namdyn_hpg : hydrostatic pressure gradient  
     48   !                                              !!* Namelist namdyn_hpg : hydrostatic pressure gradient 
    4949   LOGICAL , PUBLIC ::   ln_hpg_zco    = .TRUE.    !: z-coordinate - full steps 
    5050   LOGICAL , PUBLIC ::   ln_hpg_zps    = .FALSE.   !: z-coordinate - partial steps (interpolation) 
     
    5454   LOGICAL , PUBLIC ::   ln_dynhpg_imp = .FALSE.   !: semi-implicite hpg flag 
    5555 
    56    INTEGER  ::   nhpg  =  0   ! = 0 to 7, type of pressure gradient scheme used ! (deduced from ln_hpg_... flags) 
     56   INTEGER , PUBLIC ::   nhpg  =  0   ! = 0 to 7, type of pressure gradient scheme used ! (deduced from ln_hpg_... flags) (PUBLIC for TAM) 
    5757 
    5858   !! * Substitutions 
     
    7070      !!                  ***  ROUTINE dyn_hpg  *** 
    7171      !! 
    72       !! ** Method  :   Call the hydrostatic pressure gradient routine  
     72      !! ** Method  :   Call the hydrostatic pressure gradient routine 
    7373      !!              using the scheme defined in the namelist 
    74       !!    
     74      !! 
    7575      !! ** Action : - Update (ua,va) with the now hydrastatic pressure trend 
    7676      !!             - Save the trend (l_trddyn=T) 
     
    8484      IF( l_trddyn ) THEN                    ! Temporary saving of ua and va trends (l_trddyn) 
    8585         CALL wrk_alloc( jpi,jpj,jpk, ztrdu, ztrdv ) 
    86          ztrdu(:,:,:) = ua(:,:,:)   
    87          ztrdv(:,:,:) = va(:,:,:)  
    88       ENDIF       
     86         ztrdu(:,:,:) = ua(:,:,:) 
     87         ztrdv(:,:,:) = va(:,:,:) 
     88      ENDIF 
    8989      ! 
    9090      SELECT CASE ( nhpg )      ! Hydrostatic pressure gradient computation 
     
    101101         CALL trd_mod( ztrdu, ztrdv, jpdyn_trd_hpg, 'DYN', kt ) 
    102102         CALL wrk_dealloc( jpi,jpj,jpk, ztrdu, ztrdv ) 
    103       ENDIF           
     103      ENDIF 
    104104      ! 
    105105      IF(ln_ctl)   CALL prt_ctl( tab3d_1=ua, clinfo1=' hpg  - Ua: ', mask1=umask,   & 
     
    161161      ! 
    162162      !                               ! Consistency check 
    163       ioptio = 0  
     163      ioptio = 0 
    164164      IF( ln_hpg_zco )   ioptio = ioptio + 1 
    165165      IF( ln_hpg_zps )   ioptio = ioptio + 1 
     
    185185      !!            ua = ua - 1/e1u * zhpi 
    186186      !!            va = va - 1/e2v * zhpj 
    187       !!  
     187      !! 
    188188      !! ** Action : - Update (ua,va) with the now hydrastatic pressure trend 
    189189      !!---------------------------------------------------------------------- 
     
    192192      INTEGER  ::   ji, jj, jk       ! dummy loop indices 
    193193      REAL(wp) ::   zcoef0, zcoef1   ! temporary scalars 
    194       REAL(wp), POINTER, DIMENSION(:,:,:) ::  zhpi, zhpj  
    195       !!---------------------------------------------------------------------- 
    196       !   
     194      REAL(wp), POINTER, DIMENSION(:,:,:) ::  zhpi, zhpj 
     195      !!---------------------------------------------------------------------- 
     196      ! 
    197197      CALL wrk_alloc( jpi,jpj,jpk, zhpi, zhpj ) 
    198198      ! 
     
    202202         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~   z-coordinate case ' 
    203203      ENDIF 
    204        
    205       zcoef0 = - grav * 0.5_wp      ! Local constant initialization  
     204 
     205      zcoef0 = - grav * 0.5_wp      ! Local constant initialization 
    206206 
    207207      ! Surface value 
     
    247247      !!--------------------------------------------------------------------- 
    248248      !!                 ***  ROUTINE hpg_zps  *** 
    249       !!                     
     249      !! 
    250250      !! ** Method  :   z-coordinate plus partial steps case.  blahblah... 
    251       !!  
     251      !! 
    252252      !! ** Action  : - Update (ua,va) with the now hydrastatic pressure trend 
    253       !!----------------------------------------------------------------------  
     253      !!---------------------------------------------------------------------- 
    254254      INTEGER, INTENT(in) ::   kt    ! ocean time-step index 
    255255      !! 
     
    257257      INTEGER  ::   iku, ikv                         ! temporary integers 
    258258      REAL(wp) ::   zcoef0, zcoef1, zcoef2, zcoef3   ! temporary scalars 
    259       REAL(wp), POINTER, DIMENSION(:,:,:) ::  zhpi, zhpj  
     259      REAL(wp), POINTER, DIMENSION(:,:,:) ::  zhpi, zhpj 
    260260      !!---------------------------------------------------------------------- 
    261261      ! 
     
    363363      INTEGER  ::   ji, jj, jk                 ! dummy loop indices 
    364364      REAL(wp) ::   zcoef0, zuap, zvap, znad   ! temporary scalars 
    365       REAL(wp), POINTER, DIMENSION(:,:,:) ::  zhpi, zhpj  
     365      REAL(wp), POINTER, DIMENSION(:,:,:) ::  zhpi, zhpj 
    366366      !!---------------------------------------------------------------------- 
    367367      ! 
     
    383383      ! Surface value 
    384384      DO jj = 2, jpjm1 
    385          DO ji = fs_2, fs_jpim1   ! vector opt.    
     385         DO ji = fs_2, fs_jpim1   ! vector opt. 
    386386            ! hydrostatic pressure gradient along s-surfaces 
    387387            zhpi(ji,jj,1) = zcoef0 / e1u(ji,jj) * ( fse3w(ji+1,jj  ,1) * ( znad + rhd(ji+1,jj  ,1) )   & 
     
    397397            ua(ji,jj,1) = ua(ji,jj,1) + zhpi(ji,jj,1) + zuap 
    398398            va(ji,jj,1) = va(ji,jj,1) + zhpj(ji,jj,1) + zvap 
    399          END DO   
    400       END DO    
    401              
     399         END DO 
     400      END DO 
     401 
    402402      ! interior value (2=<jk=<jpkm1) 
    403       DO jk = 2, jpkm1                                   
    404          DO jj = 2, jpjm1      
    405             DO ji = fs_2, fs_jpim1   ! vector opt.       
     403      DO jk = 2, jpkm1 
     404         DO jj = 2, jpjm1 
     405            DO ji = fs_2, fs_jpim1   ! vector opt. 
    406406               ! hydrostatic pressure gradient along s-surfaces 
    407                zhpi(ji,jj,jk) = zhpi(ji,jj,jk-1) + zcoef0 / e1u(ji,jj)   &  
    408                   &           * (  fse3w(ji+1,jj,jk) * ( rhd(ji+1,jj,jk) + rhd(ji+1,jj,jk-1) + 2*znad )   &  
     407               zhpi(ji,jj,jk) = zhpi(ji,jj,jk-1) + zcoef0 / e1u(ji,jj)   & 
     408                  &           * (  fse3w(ji+1,jj,jk) * ( rhd(ji+1,jj,jk) + rhd(ji+1,jj,jk-1) + 2*znad )   & 
    409409                  &              - fse3w(ji  ,jj,jk) * ( rhd(ji  ,jj,jk) + rhd(ji  ,jj,jk-1) + 2*znad )  ) 
    410410               zhpj(ji,jj,jk) = zhpj(ji,jj,jk-1) + zcoef0 / e2v(ji,jj)   & 
     
    432432      !! 
    433433      !! ** Method  :   Density Jacobian with Cubic polynomial scheme 
    434       !!  
     434      !! 
    435435      !! Reference: Shchepetkin and McWilliams, J. Geophys. Res., 108(C3), 3090, 2003 
    436436      !!---------------------------------------------------------------------- 
     
    441441      REAL(wp) ::   z1_10, cffu, cffx   !    "         " 
    442442      REAL(wp) ::   z1_12, cffv, cffy   !    "         " 
    443       REAL(wp), POINTER, DIMENSION(:,:,:) ::  zhpi, zhpj  
     443      REAL(wp), POINTER, DIMENSION(:,:,:) ::  zhpi, zhpj 
    444444      REAL(wp), POINTER, DIMENSION(:,:,:) ::  dzx, dzy, dzz, dzu, dzv, dzw 
    445445      REAL(wp), POINTER, DIMENSION(:,:,:) ::  drhox, drhoy, drhoz, drhou, drhov, drhow 
     
    447447      !!---------------------------------------------------------------------- 
    448448      ! 
    449       CALL wrk_alloc( jpi, jpj, jpk, dzx  , dzy  , dzz  , dzu  , dzv  , dzw   )  
    450       CALL wrk_alloc( jpi, jpj, jpk, drhox, drhoy, drhoz, drhou, drhov, drhow )  
    451       CALL wrk_alloc( jpi, jpj, jpk, rho_i, rho_j, rho_k,  zhpi,  zhpj        )  
     449      CALL wrk_alloc( jpi, jpj, jpk, dzx  , dzy  , dzz  , dzu  , dzv  , dzw   ) 
     450      CALL wrk_alloc( jpi, jpj, jpk, drhox, drhoy, drhoz, drhou, drhov, drhow ) 
     451      CALL wrk_alloc( jpi, jpj, jpk, rho_i, rho_j, rho_k,  zhpi,  zhpj        ) 
    452452      ! 
    453453 
     
    497497               cffu = 2._wp * drhox(ji+1,jj  ,jk) * drhox(ji,jj,jk  ) 
    498498               cffx = 2._wp * dzx  (ji+1,jj  ,jk) * dzx  (ji,jj,jk  ) 
    499    
     499 
    500500               cffv = 2._wp * drhoy(ji  ,jj+1,jk) * drhoy(ji,jj,jk  ) 
    501501               cffy = 2._wp * dzy  (ji  ,jj+1,jk) * dzy  (ji,jj,jk  ) 
     
    568568               &                     + 0.5_wp * ( rhd(ji,jj,2) - rhd(ji,jj,1) )         & 
    569569               &                              * ( fse3w (ji,jj,1) - fsde3w(ji,jj,1) )   & 
    570                &                              / ( fsde3w(ji,jj,2) - fsde3w(ji,jj,1) )  )  
     570               &                              / ( fsde3w(ji,jj,2) - fsde3w(ji,jj,1) )  ) 
    571571         END DO 
    572572      END DO 
     
    631631      ! ---------------- 
    632632      DO jk = 2, jpkm1 
    633          DO jj = 2, jpjm1  
     633         DO jj = 2, jpjm1 
    634634            DO ji = fs_2, fs_jpim1   ! vector opt. 
    635635               ! hydrostatic pressure gradient along s-surfaces 
     
    647647      END DO 
    648648      ! 
    649       CALL wrk_dealloc( jpi, jpj, jpk, dzx  , dzy  , dzz  , dzu  , dzv  , dzw   )  
    650       CALL wrk_dealloc( jpi, jpj, jpk, drhox, drhoy, drhoz, drhou, drhov, drhow )  
    651       CALL wrk_dealloc( jpi, jpj, jpk, rho_i, rho_j, rho_k,  zhpi,  zhpj        )  
     649      CALL wrk_dealloc( jpi, jpj, jpk, dzx  , dzy  , dzz  , dzu  , dzv  , dzw   ) 
     650      CALL wrk_dealloc( jpi, jpj, jpk, drhox, drhoy, drhoz, drhou, drhov, drhow ) 
     651      CALL wrk_dealloc( jpi, jpj, jpk, rho_i, rho_j, rho_k,  zhpi,  zhpj        ) 
    652652      ! 
    653653   END SUBROUTINE hpg_djc 
     
    676676      INTEGER  :: jk1, jis, jid, jjs, jjd 
    677677      REAL(wp) :: zuijk, zvijk, zpwes, zpwed, zpnss, zpnsd, zdeps 
    678       REAL(wp) :: zrhdt1  
     678      REAL(wp) :: zrhdt1 
    679679      REAL(wp) :: zdpdx1, zdpdx2, zdpdy1, zdpdy2 
    680       REAL(wp), POINTER, DIMENSION(:,:,:) ::   zdept, zrhh  
     680      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zdept, zrhh 
    681681      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zhpi, zu, zv, fsp, xsp, asp, bsp, csp, dsp 
    682682      !!---------------------------------------------------------------------- 
    683683      ! 
    684       CALL wrk_alloc( jpi,jpj,jpk, zhpi, zu, zv, fsp, xsp, asp, bsp, csp, dsp )  
    685       CALL wrk_alloc( jpi,jpj,jpk, zdept, zrhh )  
     684      CALL wrk_alloc( jpi,jpj,jpk, zhpi, zu, zv, fsp, xsp, asp, bsp, csp, dsp ) 
     685      CALL wrk_alloc( jpi,jpj,jpk, zdept, zrhh ) 
    686686      ! 
    687687      IF( kt == nit000 ) THEN 
     
    693693      !!---------------------------------------------------------------------- 
    694694      ! Local constant initialization 
    695       zcoef0 = - grav  
     695      zcoef0 = - grav 
    696696      znad = 0.0_wp 
    697697      IF( lk_vvl ) znad = 1._wp 
     
    700700      zhpi(:,:,:) = 0._wp 
    701701      zrhh(:,:,:) = rhd(:,:,:) 
    702        
     702 
    703703      ! Preparing vertical density profile "zrhh(:,:,:)" for hybrid-sco coordinate 
    704704      DO jj = 1, jpj 
    705         DO ji = 1, jpi    
     705        DO ji = 1, jpi 
    706706          jk = mbathy(ji,jj) 
    707707          IF( jk <= 0 ) THEN; zrhh(ji,jj,:) = 0._wp 
     
    711711                zrhh(ji,jj,jkk) = interp1(fsde3w(ji,jj,jkk),   fsde3w(ji,jj,jkk-1), & 
    712712                                         fsde3w(ji,jj,jkk-2), rhd(ji,jj,jkk-1), rhd(ji,jj,jkk-2)) 
    713              END DO  
     713             END DO 
    714714          ENDIF 
    715715        END DO 
     
    728728      xsp(:,:,:) = zdept(:,:,:) 
    729729 
    730       ! Construct the vertical density profile with the  
     730      ! Construct the vertical density profile with the 
    731731      ! constrained cubic spline interpolation 
    732732      ! rho(z) = asp + bsp*z + csp*z^2 + dsp*z^3 
    733       CALL cspline(fsp,xsp,asp,bsp,csp,dsp,polynomial_type)       
     733      CALL cspline(fsp,xsp,asp,bsp,csp,dsp,polynomial_type) 
    734734 
    735735      ! Integrate the hydrostatic pressure "zhpi(:,:,:)" at "T(ji,jj,1)" 
    736736      DO jj = 2, jpj 
    737         DO ji = 2, jpi  
     737        DO ji = 2, jpi 
    738738          zrhdt1 = zrhh(ji,jj,1) - interp3(zdept(ji,jj,1),asp(ji,jj,1), & 
    739739                                         bsp(ji,jj,1),   csp(ji,jj,1), & 
     
    741741 
    742742          ! assuming linear profile across the top half surface layer 
    743           zhpi(ji,jj,1) =  0.5_wp * fse3w(ji,jj,1) * zrhdt1   
     743          zhpi(ji,jj,1) =  0.5_wp * fse3w(ji,jj,1) * zrhdt1 
    744744        END DO 
    745745      END DO 
    746746 
    747747      ! Calculate the pressure "zhpi(:,:,:)" at "T(ji,jj,2:jpkm1)" 
    748       DO jk = 2, jpkm1                                   
    749         DO jj = 2, jpj      
     748      DO jk = 2, jpkm1 
     749        DO jj = 2, jpj 
    750750          DO ji = 2, jpi 
    751751            zhpi(ji,jj,jk) = zhpi(ji,jj,jk-1) +                          & 
     
    758758 
    759759      ! Z coordinate of U(ji,jj,1:jpkm1) and V(ji,jj,1:jpkm1) 
    760       DO jj = 2, jpjm1      
    761         DO ji = 2, jpim1   
     760      DO jj = 2, jpjm1 
     761        DO ji = 2, jpim1 
    762762          zu(ji,jj,1) = - ( fse3u(ji,jj,1) - sshu_n(ji,jj) * znad) 
    763763          zv(ji,jj,1) = - ( fse3v(ji,jj,1) - sshv_n(ji,jj) * znad) 
     
    765765      END DO 
    766766 
    767       DO jk = 2, jpkm1                                   
    768         DO jj = 2, jpjm1      
    769           DO ji = 2, jpim1   
     767      DO jk = 2, jpkm1 
     768        DO jj = 2, jpjm1 
     769          DO ji = 2, jpim1 
    770770            zu(ji,jj,jk) = zu(ji,jj,jk-1)- fse3u(ji,jj,jk) 
    771771            zv(ji,jj,jk) = zv(ji,jj,jk-1)- fse3v(ji,jj,jk) 
     
    773773        END DO 
    774774      END DO 
    775                 
    776       DO jk = 1, jpkm1                                   
    777         DO jj = 2, jpjm1      
    778           DO ji = 2, jpim1   
     775 
     776      DO jk = 1, jpkm1 
     777        DO jj = 2, jpjm1 
     778          DO ji = 2, jpim1 
    779779            zu(ji,jj,jk) = zu(ji,jj,jk) + 0.5_wp * fse3u(ji,jj,jk) 
    780780            zv(ji,jj,jk) = zv(ji,jj,jk) + 0.5_wp * fse3v(ji,jj,jk) 
     
    795795 
    796796 
    797       DO jk = 1, jpkm1                                   
    798         DO jj = 2, jpjm1      
    799           DO ji = 2, jpim1   
     797      DO jk = 1, jpkm1 
     798        DO jj = 2, jpjm1 
     799          DO ji = 2, jpim1 
    800800            zpwes = 0._wp; zpwed = 0._wp 
    801801            zpnss = 0._wp; zpnsd = 0._wp 
     
    812812 
    813813               ! integrate the pressure on the shallow side 
    814                jk1 = jk  
     814               jk1 = jk 
    815815               DO WHILE ( -zdept(jis,jj,jk1) > zuijk ) 
    816816                 IF( jk1 == mbku(ji,jj) ) THEN 
     
    819819                 ENDIF 
    820820                 zdeps = MIN(zdept(jis,jj,jk1+1), -zuijk) 
    821                  zpwes = zpwes +                                    &  
     821                 zpwes = zpwes +                                    & 
    822822                      integ_spline(zdept(jis,jj,jk1), zdeps,            & 
    823823                             asp(jis,jj,jk1),    bsp(jis,jj,jk1), & 
     
    825825                 jk1 = jk1 + 1 
    826826               END DO 
    827              
     827 
    828828               ! integrate the pressure on the deep side 
    829                jk1 = jk  
     829               jk1 = jk 
    830830               DO WHILE ( -zdept(jid,jj,jk1) < zuijk ) 
    831831                 IF( jk1 == 1 ) THEN 
     
    838838                 ENDIF 
    839839                 zdeps = MAX(zdept(jid,jj,jk1-1), -zuijk) 
    840                  zpwed = zpwed +                                        &  
     840                 zpwed = zpwed +                                        & 
    841841                        integ_spline(zdeps,              zdept(jid,jj,jk1), & 
    842842                               asp(jid,jj,jk1-1), bsp(jid,jj,jk1-1),  & 
     
    844844                 jk1 = jk1 - 1 
    845845               END DO 
    846              
     846 
    847847               ! update the momentum trends in u direction 
    848848 
    849849               zdpdx1 = zcoef0 / e1u(ji,jj) * (zhpi(ji+1,jj,jk) - zhpi(ji,jj,jk)) 
    850850               IF( lk_vvl ) THEN 
    851                  zdpdx2 = zcoef0 / e1u(ji,jj) * &  
    852                          ( REAL(jis-jid, wp) * (zpwes + zpwed) + (sshn(ji+1,jj)-sshn(ji,jj)) )  
     851                 zdpdx2 = zcoef0 / e1u(ji,jj) * & 
     852                         ( REAL(jis-jid, wp) * (zpwes + zpwed) + (sshn(ji+1,jj)-sshn(ji,jj)) ) 
    853853                ELSE 
    854                  zdpdx2 = zcoef0 / e1u(ji,jj) * REAL(jis-jid, wp) * (zpwes + zpwed)  
     854                 zdpdx2 = zcoef0 / e1u(ji,jj) * REAL(jis-jid, wp) * (zpwes + zpwed) 
    855855               ENDIF 
    856856 
     
    858858               &           umask(ji,jj,jk) * tmask(ji,jj,jk) * tmask(ji+1,jj,jk) 
    859859            ENDIF 
    860    
     860 
    861861            !!!!!     for v equation 
    862862            IF( jk <= mbkv(ji,jj) ) THEN 
     
    868868 
    869869               ! integrate the pressure on the shallow side 
    870                jk1 = jk  
     870               jk1 = jk 
    871871               DO WHILE ( -zdept(ji,jjs,jk1) > zvijk ) 
    872872                 IF( jk1 == mbkv(ji,jj) ) THEN 
     
    875875                 ENDIF 
    876876                 zdeps = MIN(zdept(ji,jjs,jk1+1), -zvijk) 
    877                  zpnss = zpnss +                                      &  
     877                 zpnss = zpnss +                                      & 
    878878                        integ_spline(zdept(ji,jjs,jk1), zdeps,            & 
    879879                               asp(ji,jjs,jk1),    bsp(ji,jjs,jk1), & 
     
    881881                 jk1 = jk1 + 1 
    882882               END DO 
    883              
     883 
    884884               ! integrate the pressure on the deep side 
    885                jk1 = jk  
     885               jk1 = jk 
    886886               DO WHILE ( -zdept(ji,jjd,jk1) < zvijk ) 
    887887                 IF( jk1 == 1 ) THEN 
     
    894894                 ENDIF 
    895895                 zdeps = MAX(zdept(ji,jjd,jk1-1), -zvijk) 
    896                  zpnsd = zpnsd +                                        &  
     896                 zpnsd = zpnsd +                                        & 
    897897                        integ_spline(zdeps,              zdept(ji,jjd,jk1), & 
    898898                               asp(ji,jjd,jk1-1), bsp(ji,jjd,jk1-1), & 
     
    900900                 jk1 = jk1 - 1 
    901901               END DO 
    902              
     902 
    903903 
    904904               ! update the momentum trends in v direction 
     
    907907               IF( lk_vvl ) THEN 
    908908                   zdpdy2 = zcoef0 / e2v(ji,jj) * & 
    909                            ( REAL(jjs-jjd, wp) * (zpnss + zpnsd) + (sshn(ji,jj+1)-sshn(ji,jj)) )  
     909                           ( REAL(jjs-jjd, wp) * (zpnss + zpnsd) + (sshn(ji,jj+1)-sshn(ji,jj)) ) 
    910910               ELSE 
    911                    zdpdy2 = zcoef0 / e2v(ji,jj) * REAL(jjs-jjd, wp) * (zpnss + zpnsd )  
     911                   zdpdy2 = zcoef0 / e2v(ji,jj) * REAL(jjs-jjd, wp) * (zpnss + zpnsd ) 
    912912               ENDIF 
    913913 
     
    916916            ENDIF 
    917917 
    918                      
     918 
    919919           END DO 
    920920        END DO 
    921921      END DO 
    922922      ! 
    923       CALL wrk_dealloc( jpi,jpj,jpk, zhpi, zu, zv, fsp, xsp, asp, bsp, csp, dsp )  
    924       CALL wrk_dealloc( jpi,jpj,jpk, zdept, zrhh )  
     923      CALL wrk_dealloc( jpi,jpj,jpk, zhpi, zu, zv, fsp, xsp, asp, bsp, csp, dsp ) 
     924      CALL wrk_dealloc( jpi,jpj,jpk, zdept, zrhh ) 
    925925      ! 
    926926   END SUBROUTINE hpg_prj 
     
    929929      !!---------------------------------------------------------------------- 
    930930      !!                 ***  ROUTINE cspline  *** 
    931       !!        
     931      !! 
    932932      !! ** Purpose :   constrained cubic spline interpolation 
    933       !!           
    934       !! ** Method  :   f(x) = asp + bsp*x + csp*x^2 + dsp*x^3  
     933      !! 
     934      !! ** Method  :   f(x) = asp + bsp*x + csp*x^2 + dsp*x^3 
    935935      !! Reference: CJC Kruger, Constrained Cubic Spline Interpoltation 
    936936      !! 
     
    938938      IMPLICIT NONE 
    939939      REAL(wp), DIMENSION(:,:,:), INTENT(in)  :: fsp, xsp           ! value and coordinate 
    940       REAL(wp), DIMENSION(:,:,:), INTENT(out) :: asp, bsp, csp, dsp ! coefficients of  
     940      REAL(wp), DIMENSION(:,:,:), INTENT(out) :: asp, bsp, csp, dsp ! coefficients of 
    941941                                                                    ! the interpoated function 
    942       INTEGER, INTENT(in) :: polynomial_type                        ! 1: cubic spline  
     942      INTEGER, INTENT(in) :: polynomial_type                        ! 1: cubic spline 
    943943                                                                    ! 2: Linear 
    944944 
    945       ! Local Variables       
     945      ! Local Variables 
    946946      INTEGER  ::   ji, jj, jk                 ! dummy loop indices 
    947947      INTEGER  ::   jpi, jpj, jpkm1 
     
    955955      jpkm1 = size(fsp,3) - 1 
    956956 
    957        
     957 
    958958      IF (polynomial_type == 1) THEN     ! Constrained Cubic Spline 
    959959         DO ji = 1, jpi 
    960960            DO jj = 1, jpj 
    961            !!Fritsch&Butland's method, 1984 (preferred, but more computation)               
     961           !!Fritsch&Butland's method, 1984 (preferred, but more computation) 
    962962           !    DO jk = 2, jpkm1-1 
    963            !       zdxtmp1 = xsp(ji,jj,jk)   - xsp(ji,jj,jk-1)   
    964            !       zdxtmp2 = xsp(ji,jj,jk+1) - xsp(ji,jj,jk)   
     963           !       zdxtmp1 = xsp(ji,jj,jk)   - xsp(ji,jj,jk-1) 
     964           !       zdxtmp2 = xsp(ji,jj,jk+1) - xsp(ji,jj,jk) 
    965965           !       zdf1    = ( fsp(ji,jj,jk)   - fsp(ji,jj,jk-1) ) / zdxtmp1 
    966966           !       zdf2    = ( fsp(ji,jj,jk+1) - fsp(ji,jj,jk)   ) / zdxtmp2 
    967967           ! 
    968968           !       zalpha = ( zdxtmp1 + 2._wp * zdxtmp2 ) / ( zdxtmp1 + zdxtmp2 ) / 3._wp 
    969            !      
     969           ! 
    970970           !       IF(zdf1 * zdf2 <= 0._wp) THEN 
    971971           !           zdf(jk) = 0._wp 
     
    974974           !       ENDIF 
    975975           !    END DO 
    976             
     976 
    977977           !!Simply geometric average 
    978978               DO jk = 2, jpkm1-1 
    979979                  zdf1 = (fsp(ji,jj,jk) - fsp(ji,jj,jk-1)) / (xsp(ji,jj,jk) - xsp(ji,jj,jk-1)) 
    980980                  zdf2 = (fsp(ji,jj,jk+1) - fsp(ji,jj,jk)) / (xsp(ji,jj,jk+1) - xsp(ji,jj,jk)) 
    981              
     981 
    982982                  IF(zdf1 * zdf2 <= 0._wp) THEN 
    983983                     zdf(jk) = 0._wp 
     
    986986                  ENDIF 
    987987               END DO 
    988             
     988 
    989989               zdf(1)     = 1.5_wp * ( fsp(ji,jj,2) - fsp(ji,jj,1) ) / & 
    990990                          &          ( xsp(ji,jj,2) - xsp(ji,jj,1) ) -  0.5_wp * zdf(2) 
     
    992992                          &          ( xsp(ji,jj,jpkm1) - xsp(ji,jj,jpkm1-1) ) - & 
    993993                          & 0.5_wp * zdf(jpkm1 - 1) 
    994     
     994 
    995995               DO jk = 1, jpkm1 - 1 
    996                  zdxtmp = xsp(ji,jj,jk+1) - xsp(ji,jj,jk)  
     996                 zdxtmp = xsp(ji,jj,jk+1) - xsp(ji,jj,jk) 
    997997                 ztmp1  = (zdf(jk+1) + 2._wp * zdf(jk)) / zdxtmp 
    998998                 ztmp2  =  6._wp * (fsp(ji,jj,jk+1) - fsp(ji,jj,jk)) / zdxtmp / zdxtmp 
    999                  zddf1  = -2._wp * ztmp1 + ztmp2  
     999                 zddf1  = -2._wp * ztmp1 + ztmp2 
    10001000                 ztmp1  = (2._wp * zdf(jk+1) + zdf(jk)) / zdxtmp 
    1001                  zddf2  =  2._wp * ztmp1 - ztmp2  
    1002        
     1001                 zddf2  =  2._wp * ztmp1 - ztmp2 
     1002 
    10031003                 dsp(ji,jj,jk) = (zddf2 - zddf1) / 6._wp / zdxtmp 
    10041004                 csp(ji,jj,jk) = ( xsp(ji,jj,jk+1) * zddf1 - xsp(ji,jj,jk)*zddf2 ) / 2._wp / zdxtmp 
    1005                  bsp(ji,jj,jk) = ( fsp(ji,jj,jk+1) - fsp(ji,jj,jk) ) / zdxtmp - &  
     1005                 bsp(ji,jj,jk) = ( fsp(ji,jj,jk+1) - fsp(ji,jj,jk) ) / zdxtmp - & 
    10061006                               & csp(ji,jj,jk) * ( xsp(ji,jj,jk+1) + xsp(ji,jj,jk) ) - & 
    10071007                               & dsp(ji,jj,jk) * ((xsp(ji,jj,jk+1) + xsp(ji,jj,jk))**2 - & 
     
    10131013            END DO 
    10141014         END DO 
    1015   
     1015 
    10161016      ELSE IF (polynomial_type == 2) THEN     ! Linear 
    10171017         DO ji = 1, jpi 
    10181018            DO jj = 1, jpj 
    10191019               DO jk = 1, jpkm1-1 
    1020                   zdxtmp =xsp(ji,jj,jk+1) - xsp(ji,jj,jk)  
     1020                  zdxtmp =xsp(ji,jj,jk+1) - xsp(ji,jj,jk) 
    10211021                  ztmp1 = fsp(ji,jj,jk+1) - fsp(ji,jj,jk) 
    1022     
     1022 
    10231023                  dsp(ji,jj,jk) = 0._wp 
    10241024                  csp(ji,jj,jk) = 0._wp 
     
    10331033      ENDIF 
    10341034 
    1035        
     1035 
    10361036   END SUBROUTINE cspline 
    10371037 
    10381038 
    1039    FUNCTION interp1(x, xl, xr, fl, fr)  RESULT(f)  
     1039   FUNCTION interp1(x, xl, xr, fl, fr)  RESULT(f) 
    10401040      !!---------------------------------------------------------------------- 
    10411041      !!                 ***  ROUTINE interp1  *** 
    1042       !!        
     1042      !! 
    10431043      !! ** Purpose :   1-d linear interpolation 
    1044       !!           
    1045       !! ** Method  :   
     1044      !! 
     1045      !! ** Method  : 
    10461046      !!                interpolation is straight forward 
    1047       !!                extrapolation is also permitted (no value limit)  
     1047      !!                extrapolation is also permitted (no value limit) 
    10481048      !! 
    10491049      !!---------------------------------------------------------------------- 
    10501050      IMPLICIT NONE 
    1051       REAL(wp), INTENT(in) ::  x, xl, xr, fl, fr    
     1051      REAL(wp), INTENT(in) ::  x, xl, xr, fl, fr 
    10521052      REAL(wp)             ::  f ! result of the interpolation (extrapolation) 
    10531053      REAL(wp)             ::  zdeltx 
     
    10601060        f = ( (x - xl ) * fr - ( x - xr ) * fl ) / zdeltx 
    10611061      ENDIF 
    1062        
     1062 
    10631063   END FUNCTION interp1 
    10641064 
    1065    FUNCTION interp2(x, a, b, c, d)  RESULT(f)  
     1065   FUNCTION interp2(x, a, b, c, d)  RESULT(f) 
    10661066      !!---------------------------------------------------------------------- 
    10671067      !!                 ***  ROUTINE interp1  *** 
    1068       !!        
     1068      !! 
    10691069      !! ** Purpose :   1-d constrained cubic spline interpolation 
    1070       !!           
     1070      !! 
    10711071      !! ** Method  :  cubic spline interpolation 
    10721072      !! 
    10731073      !!---------------------------------------------------------------------- 
    10741074      IMPLICIT NONE 
    1075       REAL(wp), INTENT(in) ::  x, a, b, c, d    
     1075      REAL(wp), INTENT(in) ::  x, a, b, c, d 
    10761076      REAL(wp)             ::  f ! value from the interpolation 
    10771077      !!---------------------------------------------------------------------- 
    10781078 
    1079       f = a + x* ( b + x * ( c + d * x ) )  
     1079      f = a + x* ( b + x * ( c + d * x ) ) 
    10801080 
    10811081   END FUNCTION interp2 
    10821082 
    10831083 
    1084    FUNCTION interp3(x, a, b, c, d)  RESULT(f)  
     1084   FUNCTION interp3(x, a, b, c, d)  RESULT(f) 
    10851085      !!---------------------------------------------------------------------- 
    10861086      !!                 ***  ROUTINE interp1  *** 
    1087       !!        
     1087      !! 
    10881088      !! ** Purpose :   Calculate the first order of deriavtive of 
    10891089      !!                a cubic spline function y=a+b*x+c*x^2+d*x^3 
    1090       !!           
     1090      !! 
    10911091      !! ** Method  :   f=dy/dx=b+2*c*x+3*d*x^2 
    10921092      !! 
    10931093      !!---------------------------------------------------------------------- 
    10941094      IMPLICIT NONE 
    1095       REAL(wp), INTENT(in) ::  x, a, b, c, d    
     1095      REAL(wp), INTENT(in) ::  x, a, b, c, d 
    10961096      REAL(wp)             ::  f ! value from the interpolation 
    10971097      !!---------------------------------------------------------------------- 
     
    11011101   END FUNCTION interp3 
    11021102 
    1103     
    1104    FUNCTION integ_spline(xl, xr, a, b, c, d)  RESULT(f)  
     1103 
     1104   FUNCTION integ_spline(xl, xr, a, b, c, d)  RESULT(f) 
    11051105      !!---------------------------------------------------------------------- 
    11061106      !!                 ***  ROUTINE interp1  *** 
    1107       !!        
     1107      !! 
    11081108      !! ** Purpose :   1-d constrained cubic spline integration 
    1109       !!           
    1110       !! ** Method  :  integrate polynomial a+bx+cx^2+dx^3 from xl to xr  
     1109      !! 
     1110      !! ** Method  :  integrate polynomial a+bx+cx^2+dx^3 from xl to xr 
    11111111      !! 
    11121112      !!---------------------------------------------------------------------- 
    11131113      IMPLICIT NONE 
    1114       REAL(wp), INTENT(in) ::  xl, xr, a, b, c, d    
    1115       REAL(wp)             ::  za1, za2, za3       
     1114      REAL(wp), INTENT(in) ::  xl, xr, a, b, c, d 
     1115      REAL(wp)             ::  za1, za2, za3 
    11161116      REAL(wp)             ::  f                   ! integration result 
    11171117      !!---------------------------------------------------------------------- 
    11181118 
    1119       za1 = 0.5_wp * b  
    1120       za2 = c / 3.0_wp  
    1121       za3 = 0.25_wp * d  
     1119      za1 = 0.5_wp * b 
     1120      za2 = c / 3.0_wp 
     1121      za3 = 0.25_wp * d 
    11221122 
    11231123      f  = xr * ( a + xr * ( za1 + xr * ( za2 + za3 * xr ) ) ) - & 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90

    r3294 r3764  
    156156# if defined key_obc 
    157157      !                                !* OBC open boundaries 
    158       CALL obc_dyn( kt ) 
     158      IF( lk_obc ) CALL obc_dyn( kt ) 
    159159      ! 
    160160      IF( .NOT. lk_dynspg_flt ) THEN 
     
    163163         !                                       sshn_b (= after ssha_b) for time-splitting case (lk_dynspg_ts=T) 
    164164         !                              - Correct the barotropic velocities 
    165          CALL obc_dyn_bt( kt ) 
     165         IF( lk_obc ) CALL obc_dyn_bt( kt ) 
    166166         ! 
    167167!!gm ERROR - potential BUG: sshn should not be modified at this stage !!   ssh_nxt not alrady called 
    168168         CALL lbc_lnk( sshn, 'T', 1. )         ! Boundary conditions on sshn 
    169169         ! 
    170          IF( ln_vol_cst )   CALL obc_vol( kt ) 
     170         IF( lk_obc .AND. ln_vol_cst )   CALL obc_vol( kt ) 
    171171         ! 
    172172         IF(ln_ctl)   CALL prt_ctl( tab2d_1=sshn, clinfo1=' ssh      : ', mask1=tmask ) 
     
    175175# elif defined key_bdy 
    176176      !                                !* BDY open boundaries 
    177       IF( lk_dynspg_exp ) CALL bdy_dyn( kt ) 
    178       IF( lk_dynspg_ts ) CALL bdy_dyn( kt, dyn3d_only=.true. ) 
     177      IF( lk_bdy .AND. lk_dynspg_exp ) CALL bdy_dyn( kt ) 
     178      IF( lk_bdy .AND. lk_dynspg_ts  ) CALL bdy_dyn( kt, dyn3d_only=.true. ) 
    179179 
    180180!!$   Do we need a call to bdy_vol here?? 
     
    248248               DO jk = 1, jpkm1                       ! Leap-Frog - Asselin filter and swap:  
    249249                  DO jj = 1, jpj                      !                   applied on thickness weighted velocity 
    250                      DO ji = 1, jpim1                 !                              --------------------------- 
     250                     DO ji = 1, jpi                   !                              --------------------------- 
    251251                        zue3a = ua(ji,jj,jk) * fse3u_a(ji,jj,jk) 
    252252                        zve3a = va(ji,jj,jk) * fse3v_a(ji,jj,jk) 
     
    268268               fse3u_b(:,:,1:jpkm1) = ze3u_f(:,:,1:jpkm1)      ! e3u_b <-- filtered scale factor 
    269269               fse3v_b(:,:,1:jpkm1) = ze3v_f(:,:,1:jpkm1) 
    270                CALL lbc_lnk( ub, 'U', -1. )                    ! lateral boundary conditions 
    271                CALL lbc_lnk( vb, 'V', -1. ) 
    272270            ENDIF 
    273271            ! 
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90 </