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 5766 – NEMO

Changeset 5766


Ignore:
Timestamp:
2015-09-28T16:42:34+02:00 (9 years ago)
Author:
cetlod
Message:

LDF: phasing the improvements/simplifications of TOP component

Location:
branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM
Files:
2 deleted
53 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/CONFIG/ORCA2_LIM/cpp_ORCA2_LIM.fcm

    r5759 r5766  
    1 bld::tool::fppkeys key_trabbl key_lim2 key_dynspg_flt  key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx  key_mpp_mpi 
     1bld::tool::fppkeys key_trabbl key_lim2 key_dynspg_flt  key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx  key_mpp_mpi key_iomput 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_cfg

    r5759 r5766  
    150150   ln_traldf_lev   =  .false.  !  iso-level 
    151151   ln_traldf_hor   =  .false.  !  horizontal (geopotential) 
    152    ln_traldf_iso   =  .false.  !  iso-neutral (Standard operator) 
    153    ln_traldf_triad =  .true.   !  iso-neutral (Triads   operator) 
     152   ln_traldf_iso   =  .true.  !  iso-neutral (Standard operator) 
     153   ln_traldf_triad =  .false.   !  iso-neutral (Triads   operator) 
    154154   ! 
    155155   !                       !  iso-neutral options:         
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_cfg

    r5759 r5766  
    133133   ln_traldf_lev   =  .false.  !  iso-level 
    134134   ln_traldf_hor   =  .false.  !  horizontal (geopotential) 
    135    ln_traldf_iso   =  .true.   !  iso-neutral (standard operator) 
    136    ln_traldf_triad =  .false.  !  iso-neutral (triad    operator) 
     135   ln_traldf_iso   =  .true.  !  iso-neutral (Standard operator) 
     136   ln_traldf_triad =  .false.   !  iso-neutral (Triads   operator) 
    137137   ! 
    138    !                       !  iso-neutral options:         
     138   !                             !  iso-neutral options: 
    139139   ln_traldf_msc   =  .true.   !  Method of Stabilizing Correction (both operators) 
    140140   rn_slpmax       =   0.01    !  slope limit                      (both operators) 
     
    144144   ! 
    145145   !                       !  Coefficients: 
    146    nn_aht_ijk_t    = 0         !  space/time variation of eddy coef 
     146   nn_aht_ijk_t    = 21        !  space/time variation of eddy coef 
    147147   !                                !   =-20 (=-30)    read in eddy_induced_velocity_2D.nc (..._3D.nc) file 
    148    !                                !   =  0           constant  
    149    !                                !   = 10 F(k)      =ldf_c1d  
    150    !                                !   = 20 F(i,j)    =ldf_c2d  
     148   !                                !   =  0           constant 
     149   !                                !   = 10 F(k)      =ldf_c1d 
     150   !                                !   = 20 F(i,j)    =ldf_c2d 
    151151   !                                !   = 21 F(i,j,t)  =Treguier et al. JPO 1997 formulation 
    152152   !                                !   = 30 F(i,j,k)  =ldf_c2d + ldf_c1d 
     
    158158&namtra_ldfeiv !   eddy induced velocity param. 
    159159!---------------------------------------------------------------------------------- 
    160    ln_ldfeiv     =.false.   ! use eddy induced velocity parameterization 
    161    ln_ldfeiv_dia =.false.   ! diagnose eiv stream function and velocities 
     160   ln_ldfeiv     =.true.   ! use eddy induced velocity parameterization 
     161   ln_ldfeiv_dia =.true.   ! diagnose eiv stream function and velocities 
    162162   rn_aeiv_0     = 2000.   ! eddy induced velocity coefficient   [m2/s] 
    163163   nn_aei_ijk_t  = 21      ! space/time variation of the eiv coeficient 
    164164   !                                !   =-20 (=-30)    read in eddy_induced_velocity_2D.nc (..._3D.nc) file 
    165    !                                !   =  0           constant  
    166    !                                !   = 10 F(k)      =ldf_c1d  
    167    !                                !   = 20 F(i,j)    =ldf_c2d  
     165   !                                !   =  0           constant 
     166   !                                !   = 10 F(k)      =ldf_c1d 
     167   !                                !   = 20 F(i,j)    =ldf_c2d 
    168168   !                                !   = 21 F(i,j,t)  =Treguier et al. JPO 1997 formulation 
    169169   !                                !   = 30 F(i,j,k)  =ldf_c2d + ldf_c1d 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/cpp_ORCA2_LIM_PISCES.fcm

    r5759 r5766  
    1 bld::tool::fppkeys key_trabbl key_lim2 key_dynspg_flt key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx key_top key_pisces key_mpp_mpi 
     1bld::tool::fppkeys key_trabbl key_lim2 key_dynspg_flt key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx key_top key_pisces key_mpp_mpi key_iomput 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/CONFIG/SHARED/namelist_top_ref

    r5416 r5766  
    5252&namtrc_ldf    !   lateral diffusion scheme for passive tracer  
    5353!----------------------------------------------------------------------- 
    54 !                               !  Type of the operator :  
    55    ln_trcldf_lap    =  .true.   !     laplacian operator        
    56    ln_trcldf_bilap  =  .false.  !     bilaplacian operator      
    57                                 !  Direction of action  : 
    58    ln_trcldf_level  =  .false.  !     iso-level                 
    59    ln_trcldf_hor    =  .false.  !     horizontal (geopotential)         (require "key_ldfslp" when ln_sco=T) 
    60    ln_trcldf_iso    =  .true.   !     iso-neutral                       (require "key_ldfslp") 
    61 !                               !  Coefficient 
    62    rn_ahtrc_0       =  2000.    !  horizontal eddy diffusivity for tracers [m2/s] 
    63    rn_ahtrb_0       =     0.    !     background eddy diffusivity for ldf_iso [m2/s] 
     54   ln_trcldf_lap   =  .true.   !    laplacian operator 
     55   ln_trcldf_blp   =  .false.  !  bilaplacian operator 
     56   !                       !  Direction of action: 
     57   ln_trcldf_lev   =  .false.  !  iso-level 
     58   ln_trcldf_hor   =  .false.  !  horizontal (geopotential) 
     59   ln_trcldf_iso   =  .true.   !  iso-neutral (standard operator) 
     60   ln_trcldf_triad =  .false.  !  iso-neutral (triad    operator) 
     61   ! 
     62   rn_ahtrc_0        = 2000.     !  lateral eddy diffusivity   (lap. operator) [m2/s] 
     63   rn_bhtrc_0        = 1.e+12    !  lateral eddy diffusivity (bilap. operator) [m4/s] 
    6464/ 
    6565!----------------------------------------------------------------------- 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90

    r5758 r5766  
    127127         ENDIF 
    128128         ! 
    129          CALL eos( tsb, rhd, rhop, gdept_0(:,:,:) )        ! before potential and in situ densities 
    130 #if ! defined key_c1d 
    131          IF( ln_zps .AND. .NOT. ln_isfcav)                                 & 
    132             &            CALL zps_hde    ( nit000, jpts, tsb, gtsu, gtsv,  &    ! Partial steps: before horizontal gradient 
    133             &                                            rhd, gru , grv    )  ! of t, s, rd at the last ocean level 
    134          IF( ln_zps .AND.       ln_isfcav)                                 & 
    135             &            CALL zps_hde_isf( nit000, jpts, tsb, gtsu, gtsv,  &    ! Partial steps for top cell (ISF) 
    136             &                                            rhd, gru , grv , aru , arv , gzu , gzv , ge3ru , ge3rv ,   & 
    137             &                                     gtui, gtvi, grui, grvi, arui, arvi, gzui, gzvi, ge3rui, ge3rvi    ) ! of t, s, rd at the last ocean level 
    138 #endif 
    139          !    
    140129         ! - ML - sshn could be modified by istate_eel, so that initialization of fse3t_b is done here 
    141130         IF( lk_vvl ) THEN 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traldf.F90

    r5758 r5766  
    150150         IF ( ln_sco ) THEN               ! s-coordinate 
    151151            IF ( ln_traldf_lev   )   nldf = n_lap     ! iso-level  (no rotation) 
    152             IF ( ln_traldf_hor   )   nldf = n_lap_it  ! horizontal (   rotation)       !!gm   a checker.... 
     152            IF ( ln_traldf_hor   )   nldf = n_lap_i   ! horizontal (   rotation)    
    153153            IF ( ln_traldf_iso   )   nldf = n_lap_i   ! iso-neutral: standard (rotation) 
    154154            IF ( ln_traldf_triad )   nldf = n_lap_it  ! iso-neutral: triad    (rotation) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/SAS_SRC/diawri.F90

    r5217 r5766  
    2626   USE dom_oce         ! ocean space and time domain 
    2727   USE zdf_oce         ! ocean vertical physics 
    28    USE ldftra_oce      ! ocean active tracers: lateral physics 
    2928   USE ldfdyn_oce      ! ocean dynamics: lateral physics 
    30    USE traldf_iso_grif, ONLY : psix_eiv, psiy_eiv 
    3129   USE sol_oce         ! solver variables 
    3230   USE sbc_oce         ! Surface boundary condition: ocean fields 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/C14b/trcsms_c14b.F90

    r5215 r5766  
    5050 
    5151   !! * Substitutions 
    52 #  include "top_substitute.h90" 
    53  
     52#  include "domzgr_substitute.h90" 
    5453   !!---------------------------------------------------------------------- 
    5554   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/C14b/trcwri_c14b.F90

    r5407 r5766  
    2020   PUBLIC trc_wri_c14b  
    2121 
    22 #  include "top_substitute.h90" 
    2322CONTAINS 
    2423 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90

    r4996 r5766  
    5151 
    5252   !! * Substitutions 
    53 #  include "top_substitute.h90" 
     53#  include "domzgr_substitute.h90" 
    5454   !!---------------------------------------------------------------------- 
    5555   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/CFC/trcwri_cfc.F90

    r5407 r5766  
    2020   PUBLIC trc_wri_cfc  
    2121 
    22 #  include "top_substitute.h90" 
    2322CONTAINS 
    2423 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcwri_my_trc.F90

    r5407 r5766  
    2020   PUBLIC trc_wri_my_trc  
    2121 
    22 #  include "top_substitute.h90" 
    2322CONTAINS 
    2423 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zbio.F90

    r5656 r5766  
    5959   REAL(wp) ::   fdbod      ! zooplankton mortality fraction that goes to detritus 
    6060 
    61    !!* Substitution 
    62 #  include "top_substitute.h90" 
     61   !! * Substitutions 
     62#  include "domzgr_substitute.h90" 
     63#  include "vectopt_loop_substitute.h90" 
    6364   !!---------------------------------------------------------------------- 
    6465   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zexp.F90

    r5215 r5766  
    4141   REAL(wp)                                ::   areacot   !: surface coastal area 
    4242 
    43    !!* Substitution 
    44 #  include "top_substitute.h90" 
     43   !! * Substitutions 
     44#  include "domzgr_substitute.h90" 
     45#  include "vectopt_loop_substitute.h90" 
    4546   !!---------------------------------------------------------------------- 
    4647   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zopt.F90

    r5385 r5766  
    4040   REAL(wp), PUBLIC ::  reddom    ! redfield ratio (C:N) for DOM 
    4141 
    42    !!* Substitution 
    43 #  include "top_substitute.h90" 
     42   !! * Substitutions 
     43#  include "domzgr_substitute.h90" 
    4444   !!---------------------------------------------------------------------- 
    4545   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsed.F90

    r5215 r5766  
    3434   REAL(wp), PUBLIC ::   xhr         ! coeff for martin''s remineralisation profile 
    3535 
    36    !!* Substitution 
    37 #  include "top_substitute.h90" 
     36   !! * Substitutions 
     37#  include "domzgr_substitute.h90" 
    3838   !!---------------------------------------------------------------------- 
    3939   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zbio.F90

    r5656 r5766  
    3434   PUBLIC  p4z_bio     
    3535 
    36    !!* Substitution 
    37 #  include "top_substitute.h90" 
     36   !! * Substitutions 
     37#  include "domzgr_substitute.h90" 
    3838   !!---------------------------------------------------------------------- 
    3939   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zche.F90

    r5656 r5766  
    164164   REAL(wp) :: devk55  = 0.3692E-3       
    165165 
    166    !!* Substitution 
    167 #include "top_substitute.h90" 
     166   !! * Substitutions 
     167#  include "domzgr_substitute.h90" 
    168168   !!---------------------------------------------------------------------- 
    169169   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zfechem.F90

    r5385 r5766  
    3939   REAL(wp) :: kl1, kl2, kb1, kb2, ks, kpr, spd, con, kth 
    4040 
    41    !!* Substitution 
    42 #  include "top_substitute.h90" 
     41   !! * Substitutions 
     42#  include "domzgr_substitute.h90" 
    4343   !!---------------------------------------------------------------------- 
    4444   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zflx.F90

    r5656 r5766  
    5959   REAL(wp) ::  xconv  = 0.01_wp / 3600._wp !: coefficients for conversion  
    6060 
    61    !!* Substitution 
    62 #  include "top_substitute.h90" 
     61   !! * Substitutions 
     62#  include "domzgr_substitute.h90" 
    6363   !!---------------------------------------------------------------------- 
    6464   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlim.F90

    r5656 r5766  
    5252   REAL(wp) ::  xcoef2   = 1.21E-5 * 14. / 55.85 / 7.625 * 0.5 * 1.5 
    5353   REAL(wp) ::  xcoef3   = 1.15E-4 * 14. / 55.85 / 7.625 * 0.5  
    54    !!* Substitution 
    55 #  include "top_substitute.h90" 
     54 
    5655   !!---------------------------------------------------------------------- 
    5756   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmeso.F90

    r5656 r5766  
    5050   REAL(wp), PUBLIC ::  grazflux     !: mesozoo flux feeding rate 
    5151 
    52    !!* Substitution 
    53 #  include "top_substitute.h90" 
    5452   !!---------------------------------------------------------------------- 
    5553   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmicro.F90

    r5656 r5766  
    4949 
    5050 
    51    !!* Substitution 
    52 #  include "top_substitute.h90" 
    5351   !!---------------------------------------------------------------------- 
    5452   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmort.F90

    r5656 r5766  
    3535 
    3636 
    37    !!* Substitution 
    38 #  include "top_substitute.h90" 
    3937   !!---------------------------------------------------------------------- 
    4038   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90

    r5656 r5766  
    5151   REAL(wp), DIMENSION(3,61), PUBLIC ::   xkrgb   !: tabulated attenuation coefficients for RGB absorption 
    5252    
    53    !!* Substitution 
    54 #  include "top_substitute.h90" 
     53   !! * Substitutions 
     54#  include "domzgr_substitute.h90" 
    5555   !!---------------------------------------------------------------------- 
    5656   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zprod.F90

    r5656 r5766  
    5454   REAL(wp) :: texcret2               !: 1 - excret2         
    5555 
    56  
    57    !!* Substitution 
    58 #  include "top_substitute.h90" 
     56   !! * Substitutions 
     57#  include "domzgr_substitute.h90" 
    5958   !!---------------------------------------------------------------------- 
    6059   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zrem.F90

    r5385 r5766  
    5050   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   denitnh4   !: -    -    -    -   - 
    5151 
    52    !!* Substitution 
    53 #  include "top_substitute.h90" 
     52   !! * Substitutions 
     53#  include "domzgr_substitute.h90" 
    5454   !!---------------------------------------------------------------------- 
    5555   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsbc.F90

    r5656 r5766  
    8181 
    8282 
    83    !!* Substitution 
    84 #  include "top_substitute.h90" 
     83   !! * Substitutions 
     84#  include "domzgr_substitute.h90" 
     85#  include "vectopt_loop_substitute.h90" 
    8586   !!---------------------------------------------------------------------- 
    8687   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90

    r5656 r5766  
    3838   REAL(wp) :: r1_rday                  !: inverse of rday 
    3939 
    40    !!* Substitution 
    41 #  include "top_substitute.h90" 
     40   !! * Substitutions 
     41#  include "domzgr_substitute.h90" 
    4242   !!---------------------------------------------------------------------- 
    4343   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsink.F90

    r5656 r5766  
    6565#endif 
    6666 
    67    !!* Substitution 
    68 #  include "top_substitute.h90" 
     67   !! * Substitutions 
     68#  include "domzgr_substitute.h90" 
    6969   !!---------------------------------------------------------------------- 
    7070   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90

    r5547 r5766  
    4545 
    4646 
    47    !! * Substitutions 
    48 #  include "top_substitute.h90" 
    4947   !!---------------------------------------------------------------------- 
    5048   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/trcini_pisces.F90

    r5385 r5766  
    2727   PUBLIC   trc_ini_pisces   ! called by trcini.F90 module 
    2828 
    29  
    30 #  include "top_substitute.h90" 
    3129   !!---------------------------------------------------------------------- 
    3230   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/trcwri_pisces.F90

    r4996 r5766  
    2121   PUBLIC trc_wri_pisces  
    2222 
    23 #  include "top_substitute.h90" 
     23   !! * Substitutions 
     24#  include "domzgr_substitute.h90" 
     25 
    2426CONTAINS 
    2527 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90

    r5758 r5766  
    1212   !!---------------------------------------------------------------------- 
    1313   !!   trc_adv      : compute ocean tracer advection trend 
    14    !!   trc_adv_ctl  : control the different options of advection scheme 
     14   !!   trc_adv_ini  : control the different options of advection scheme 
    1515   !!---------------------------------------------------------------------- 
    1616   USE oce_trc         ! ocean dynamics and active tracers 
    1717   USE trc             ! ocean passive tracers variables 
    18    USE trcnam_trp      ! passive tracers transport namelist variables 
    1918   USE traadv_cen2     ! 2nd order centered scheme (tra_adv_cen2   routine) 
    2019   USE traadv_tvd      ! TVD      scheme           (tra_adv_tvd    routine) 
     
    2322   USE traadv_ubs      ! UBS      scheme           (tra_adv_ubs    routine) 
    2423   USE traadv_qck      ! QUICKEST scheme           (tra_adv_qck    routine) 
    25    USE traadv_eiv      ! eddy induced velocity     (tra_adv_eiv    routine) 
    2624   USE traadv_mle      ! ML eddy induced velocity  (tra_adv_mle    routine) 
    2725   USE ldftra          ! lateral diffusion coefficient on tracers 
     
    3129   PRIVATE 
    3230 
    33    PUBLIC   trc_adv          ! routine called by step module 
    34    PUBLIC   trc_adv_alloc    ! routine called by nemogcm module 
     31   PUBLIC   trc_adv        
     32   PUBLIC   trc_adv_alloc  
     33   PUBLIC   trc_adv_ini   
     34 
     35   !                                        !!: ** Advection (namtrc_adv) ** 
     36   LOGICAL , PUBLIC ::   ln_trcadv_cen2      ! 2nd order centered scheme flag 
     37   LOGICAL , PUBLIC ::   ln_trcadv_tvd       ! TVD scheme flag 
     38   LOGICAL , PUBLIC ::   ln_trcadv_muscl     ! MUSCL scheme flag 
     39   LOGICAL , PUBLIC ::   ln_trcadv_muscl2    ! MUSCL2 scheme flag 
     40   LOGICAL , PUBLIC ::   ln_trcadv_ubs       ! UBS scheme flag 
     41   LOGICAL , PUBLIC ::   ln_trcadv_qck       ! QUICKEST scheme flag 
     42   LOGICAL , PUBLIC ::   ln_trcadv_msc_ups   ! use upstream scheme within muscl 
    3543 
    3644   INTEGER ::   nadv   ! choice of the type of advection scheme 
     
    7987      CALL wrk_alloc( jpi,jpj,jpk,   zun, zvn, zwn ) 
    8088      ! 
    81  
    82       IF( kt == nittrc000 )   CALL trc_adv_ctl          ! initialisation & control of options 
    83  
    8489      IF( ( neuler == 0 .AND. kt == nittrc000 ) .OR. ln_top_euler ) THEN     ! at nittrc000 
    8590         r2dt(:) =  rdttrc(:)           ! = rdttrc (use or restarting with Euler time stepping) 
     
    131136 
    132137 
    133    SUBROUTINE trc_adv_ctl 
     138   SUBROUTINE trc_adv_ini 
    134139      !!--------------------------------------------------------------------- 
    135       !!                  ***  ROUTINE trc_adv_ctl  *** 
     140      !!                  ***  ROUTINE trc_adv_ini  *** 
    136141      !!                 
    137142      !! ** Purpose : Control the consistency between namelist options for  
     
    139144      !!---------------------------------------------------------------------- 
    140145      INTEGER ::   ioptio 
    141       !!---------------------------------------------------------------------- 
    142       ! 
     146      INTEGER ::  ios                 ! Local integer output status for namelist read 
     147      !! 
     148      NAMELIST/namtrc_adv/ ln_trcadv_cen2 , ln_trcadv_tvd   ,    & 
     149         &                 ln_trcadv_muscl, ln_trcadv_muscl2,    & 
     150         &                 ln_trcadv_ubs  , ln_trcadv_qck, ln_trcadv_msc_ups 
     151      !!---------------------------------------------------------------------- 
     152      ! 
     153      REWIND( numnat_ref )              !  namtrc_adv in reference namelist  
     154      READ  ( numnat_ref, namtrc_adv, IOSTAT = ios, ERR = 901) 
     155901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_adv in reference namelist', lwp ) 
     156 
     157      REWIND( numnat_cfg )              ! namtrc_adv in configuration namelist 
     158      READ  ( numnat_cfg, namtrc_adv, IOSTAT = ios, ERR = 902 ) 
     159902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_adv in configuration namelist', lwp ) 
     160      IF(lwm) WRITE ( numont, namtrc_adv ) 
     161 
     162      IF(lwp) THEN                    ! Namelist print 
     163         WRITE(numout,*) 
     164         WRITE(numout,*) 'trc_adv_ini : choice/control of the tracer advection scheme' 
     165         WRITE(numout,*) '~~~~~~~~~~~' 
     166         WRITE(numout,*) '   Namelist namtrc_adv : chose a advection scheme for tracers' 
     167         WRITE(numout,*) '      2nd order advection scheme     ln_trcadv_cen2   = ', ln_trcadv_cen2 
     168         WRITE(numout,*) '      TVD advection scheme           ln_trcadv_tvd    = ', ln_trcadv_tvd 
     169         WRITE(numout,*) '      MUSCL  advection scheme        ln_trcadv_muscl  = ', ln_trcadv_muscl 
     170         WRITE(numout,*) '      MUSCL2 advection scheme        ln_trcadv_muscl2 = ', ln_trcadv_muscl2 
     171         WRITE(numout,*) '      UBS    advection scheme        ln_trcadv_ubs    = ', ln_trcadv_ubs 
     172         WRITE(numout,*) '      QUICKEST advection scheme      ln_trcadv_qck    = ', ln_trcadv_qck 
     173      ENDIF 
     174      ! 
     175 
    143176      ioptio = 0                      ! Parameter control 
    144177      IF( ln_trcadv_cen2   )   ioptio = ioptio + 1 
     
    169202      ENDIF 
    170203      ! 
    171    END SUBROUTINE trc_adv_ctl 
     204   END SUBROUTINE trc_adv_ini 
    172205    
    173206#else 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcbbl.F90

    r4990 r5766  
    2222   USE oce_trc             ! ocean dynamics and active tracers variables 
    2323   USE trc                 ! ocean passive tracers variables 
    24    USE trcnam_trp      ! passive tracers transport namelist variables 
    2524   USE trabbl              !  
    2625   USE prtctl_trc          ! Print control for debbuging 
     
    3029   PUBLIC   trc_bbl       !  routine called by step.F90 
    3130 
    32  
    33    !! * Substitutions 
    34 #  include "top_substitute.h90" 
    3531   !!---------------------------------------------------------------------- 
    3632   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90

    r5506 r5766  
    1818   USE oce_trc         ! ocean dynamics and tracers variables 
    1919   USE trc             ! ocean passive tracers variables 
    20    USE trcnam_trp      ! passive tracers transport namelist variables 
    2120   USE trcdta 
    2221   USE tradmp 
     
    2928   PRIVATE 
    3029 
    31    PUBLIC trc_dmp            ! routine called by step.F90 
    32    PUBLIC trc_dmp_clo        ! routine called by step.F90 
    33    PUBLIC trc_dmp_alloc      ! routine called by nemogcm.F90 
     30   PUBLIC trc_dmp       
     31   PUBLIC trc_dmp_clo    
     32   PUBLIC trc_dmp_alloc   
     33   PUBLIC trc_dmp_ini     
     34 
     35   INTEGER , PUBLIC ::   nn_zdmp_tr    ! = 0/1/2 flag for damping in the mixed layer 
     36   CHARACTER(LEN=200) , PUBLIC :: cn_resto_tr    !File containing restoration coefficient 
    3437 
    3538   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   restotr   ! restoring coeff. on tracers (s-1) 
     
    4043 
    4144   !! * Substitutions 
    42 #  include "top_substitute.h90" 
     45#  include "domzgr_substitute.h90" 
     46#  include "vectopt_loop_substitute.h90" 
    4347   !!---------------------------------------------------------------------- 
    4448   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
     
    9094      IF( nn_timing == 1 )  CALL timing_start('trc_dmp') 
    9195      ! 
    92       ! 0. Initialization (first time-step only) 
    93       !    -------------- 
    94       IF( kt == nittrc000 ) CALL trc_dmp_init 
    95  
    9696      IF( l_trdtrc )   CALL wrk_alloc( jpi, jpj, jpk, ztrtrd )   ! temporary save of trends 
    9797      ! 
     
    171171   END SUBROUTINE trc_dmp 
    172172 
     173   SUBROUTINE trc_dmp_ini 
     174      !!---------------------------------------------------------------------- 
     175      !!                  ***  ROUTINE trc_dmp_ini  *** 
     176      !!  
     177      !! ** Purpose :   Initialization for the newtonian damping  
     178      !! 
     179      !! ** Method  :   read the nammbf namelist and check the parameters 
     180      !!              called by trc_dmp at the first timestep (nittrc000) 
     181      !!---------------------------------------------------------------------- 
     182      ! 
     183      INTEGER ::  ios                 ! Local integer output status for namelist read 
     184      INTEGER :: imask  !local file handle 
     185      ! 
     186      NAMELIST/namtrc_dmp/ nn_zdmp_tr , cn_resto_tr 
     187      !!---------------------------------------------------------------------- 
     188 
     189      IF( nn_timing == 1 )  CALL timing_start('trc_dmp_init') 
     190      ! 
     191 
     192      REWIND( numnat_ref )              ! Namelist namtrc_dmp in reference namelist : Passive tracers newtonian damping 
     193      READ  ( numnat_ref, namtrc_dmp, IOSTAT = ios, ERR = 909) 
     194909   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dmp in reference namelist', lwp ) 
     195 
     196      REWIND( numnat_cfg )              ! Namelist namtrc_dmp in configuration namelist : Passive tracers newtonian damping 
     197      READ  ( numnat_cfg, namtrc_dmp, IOSTAT = ios, ERR = 910) 
     198910   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dmp in configuration namelist', lwp ) 
     199      IF(lwm) WRITE ( numont, namtrc_dmp ) 
     200 
     201      IF(lwp) THEN                       ! Namelist print 
     202         WRITE(numout,*) 
     203         WRITE(numout,*) 'trc_dmp : Passive tracers newtonian damping' 
     204         WRITE(numout,*) '~~~~~~~' 
     205         WRITE(numout,*) '   Namelist namtrc_dmp : set damping parameter' 
     206         WRITE(numout,*) '      mixed layer damping option     nn_zdmp_tr = ', nn_zdmp_tr, '(zoom: forced to 0)' 
     207         WRITE(numout,*) '      Restoration coeff file    cn_resto_tr = ', cn_resto_tr 
     208      ENDIF 
     209      ! 
     210      IF( lzoom )   nn_zdmp_tr = 0           ! restoring to climatology at closed north or south boundaries 
     211      SELECT CASE ( nn_zdmp_tr ) 
     212      CASE ( 0 )   ;   IF(lwp) WRITE(numout,*) '   tracer damping throughout the water column' 
     213      CASE ( 1 )   ;   IF(lwp) WRITE(numout,*) '   no tracer damping in the turbocline (avt > 5 cm2/s)' 
     214      CASE ( 2 )   ;   IF(lwp) WRITE(numout,*) '   no tracer damping in the mixed layer' 
     215      CASE DEFAULT 
     216         WRITE(ctmp1,*) 'bad flag value for nn_zdmp_tr = ', nn_zdmp_tr 
     217         CALL ctl_stop(ctmp1) 
     218      END SELECT 
     219 
     220      IF( .NOT. ln_tradmp )   & 
     221         &   CALL ctl_stop( 'passive trace damping need key_tradmp to compute damping coef.' ) 
     222      ! 
     223      !                          ! Read damping coefficients from file 
     224      !Read in mask from file 
     225      CALL iom_open ( cn_resto_tr, imask) 
     226      CALL iom_get  ( imask, jpdom_autoglo, 'resto', restotr) 
     227      CALL iom_close( imask ) 
     228      ! 
     229      IF( nn_timing == 1 )  CALL timing_stop('trc_dmp_init') 
     230      ! 
     231   END SUBROUTINE trc_dmp_ini 
     232 
    173233   SUBROUTINE trc_dmp_clo( kt ) 
    174234      !!--------------------------------------------------------------------- 
     
    303363 
    304364 
    305    SUBROUTINE trc_dmp_init 
    306       !!---------------------------------------------------------------------- 
    307       !!                  ***  ROUTINE trc_dmp_init  *** 
    308       !!  
    309       !! ** Purpose :   Initialization for the newtonian damping  
    310       !! 
    311       !! ** Method  :   read the nammbf namelist and check the parameters 
    312       !!              called by trc_dmp at the first timestep (nittrc000) 
    313       !!---------------------------------------------------------------------- 
    314       ! 
    315       INTEGER :: imask  !local file handle 
    316  
    317       IF( nn_timing == 1 )  CALL timing_start('trc_dmp_init') 
    318       ! 
    319  
    320       IF( lzoom )   nn_zdmp_tr = 0           ! restoring to climatology at closed north or south boundaries 
    321       SELECT CASE ( nn_zdmp_tr ) 
    322       CASE ( 0 )   ;   IF(lwp) WRITE(numout,*) '   tracer damping throughout the water column' 
    323       CASE ( 1 )   ;   IF(lwp) WRITE(numout,*) '   no tracer damping in the turbocline (avt > 5 cm2/s)' 
    324       CASE ( 2 )   ;   IF(lwp) WRITE(numout,*) '   no tracer damping in the mixed layer' 
    325       CASE DEFAULT 
    326          WRITE(ctmp1,*) 'bad flag value for nn_zdmp_tr = ', nn_zdmp_tr 
    327          CALL ctl_stop(ctmp1) 
    328       END SELECT 
    329  
    330       IF( .NOT. ln_tradmp )   & 
    331          &   CALL ctl_stop( 'passive trace damping need key_tradmp to compute damping coef.' ) 
    332       ! 
    333       !                          ! Read damping coefficients from file 
    334       !Read in mask from file 
    335       CALL iom_open ( cn_resto_tr, imask) 
    336       CALL iom_get  ( imask, jpdom_autoglo, 'resto', restotr) 
    337       CALL iom_close( imask ) 
    338       ! 
    339       IF( nn_timing == 1 )  CALL timing_stop('trc_dmp_init') 
    340       ! 
    341    END SUBROUTINE trc_dmp_init 
    342  
    343365#else 
    344366   !!---------------------------------------------------------------------- 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcldf.F90

    r5758 r5766  
    1313   !!---------------------------------------------------------------------- 
    1414   !!   trc_ldf      : update the tracer trend with the lateral diffusion 
    15    !!       ldf_ctl  : initialization, namelist read, and parameters control 
     15   !!   trc_ldf_ini  : initialization, namelist read, and parameters control 
    1616   !!---------------------------------------------------------------------- 
    1717   USE trc           ! ocean passive tracers variables 
    1818   USE oce_trc       ! ocean dynamics and active tracers 
    19    USE trcnam_trp    ! passive tracers transport namelist variables 
    2019   USE ldfslp        ! lateral diffusion: iso-neutral slope 
    2120   USE traldf_lap    ! lateral diffusion: laplacian iso-level            operator  (tra_ldf_lap   routine) 
     
    3130   PRIVATE 
    3231 
    33    PUBLIC   trc_ldf    ! called by trctrp.F90 
    34    !                                                 !!: ** lateral mixing namelist (nam_trcldf) ** 
    35    REAL(wp) ::  rldf_rat    ! ratio between active and passive tracers diffusive coefficient 
     32   PUBLIC   trc_ldf     
     33   PUBLIC   trc_ldf_ini    
     34   ! 
     35   LOGICAL , PUBLIC ::   ln_trcldf_lap       !:   laplacian operator 
     36   LOGICAL , PUBLIC ::   ln_trcldf_blp       !: bilaplacian operator 
     37   LOGICAL , PUBLIC ::   ln_trcldf_lev       !: iso-level   direction 
     38   LOGICAL , PUBLIC ::   ln_trcldf_hor       !: horizontal  direction (rotation to geopotential) 
     39   LOGICAL , PUBLIC ::   ln_trcldf_iso       !: iso-neutral direction (standard) 
     40   LOGICAL , PUBLIC ::   ln_trcldf_triad     !: iso-neutral direction (triad) 
     41   REAL(wp), PUBLIC ::   rn_ahtrc_0          !:   laplacian diffusivity coefficient for passive tracer [m2/s] 
     42   REAL(wp), PUBLIC ::   rn_bhtrc_0          !: bilaplacian      -          --     -       -   [m4/s] 
     43   ! 
     44                                                 !!: ** lateral mixing namelist (nam_trcldf) ** 
     45   REAL(wp) ::  rldf    ! ratio between active and passive tracers diffusive coefficient 
    3646   INTEGER  ::  nldf = 0   ! type of lateral diffusion used defined from ln_trcldf_... namlist logicals) 
    3747    
     
    6474      ! 
    6575       
    66 !!gm  this call should be put in trcini ! 
    67       IF( kt == nittrc000 )   CALL ldf_ctl          ! initialisation & control of options 
    68 !!gm end 
    69  
    7076      IF( l_trdtrc )  THEN 
    7177         CALL wrk_alloc( jpi,jpj,jpk,jptra,   ztrtrd ) 
     
    7581      !                                        ! set the lateral diffusivity coef. for passive tracer       
    7682      CALL wrk_alloc( jpi,jpj,jpk,   zahu, zahv ) 
    77       zahu(:,:,:) = rldf_rat * ahtu(:,:,:) 
    78       zahv(:,:,:) = rldf_rat * ahtv(:,:,:) 
     83      zahu(:,:,:) = rldf * ahtu(:,:,:) 
     84      zahv(:,:,:) = rldf * ahtv(:,:,:) 
    7985 
    8086      SELECT CASE ( nldf )                     !* compute lateral mixing trend and add it to the general trend 
     
    115121!!gm ldf_ctl should be called in trcini  so that l_ldfslp=T  cause the slope init and calculation 
    116122 
    117    SUBROUTINE ldf_ctl 
     123   SUBROUTINE trc_ldf_ini 
    118124      !!---------------------------------------------------------------------- 
    119125      !!                  ***  ROUTINE ldf_ctl  *** 
     
    129135      !!---------------------------------------------------------------------- 
    130136      INTEGER ::   ioptio, ierr         ! temporary integers 
    131       !!---------------------------------------------------------------------- 
     137      INTEGER ::  ios                 ! Local integer output status for namelist read 
     138      ! 
     139      NAMELIST/namtrc_ldf/ ln_trcldf_lap, ln_trcldf_blp, & 
     140         &                 ln_trcldf_lev, ln_trcldf_hor, ln_trcldf_iso, ln_trcldf_triad,  & 
     141         &                 rn_ahtrc_0   , rn_bhtrc_0 
     142      !!---------------------------------------------------------------------- 
     143      REWIND( numnat_ref )              !  namtrc_ldf in reference namelist  
     144      READ  ( numnat_ref, namtrc_ldf, IOSTAT = ios, ERR = 903) 
     145903   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_ldf in reference namelist', lwp ) 
     146 
     147      REWIND( numnat_cfg )              !  namtrc_ldf in configuration namelist  
     148      READ  ( numnat_cfg, namtrc_ldf, IOSTAT = ios, ERR = 904 ) 
     149904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_ldf in configuration namelist', lwp ) 
     150      IF(lwm) WRITE ( numont, namtrc_ldf ) 
     151 
     152      IF(lwp) THEN                    ! Namelist print 
     153         WRITE(numout,*) 
     154         WRITE(numout,*) 'trc_ldf_ini : lateral tracer diffusive operator' 
     155         WRITE(numout,*) '~~~~~~~~~~~' 
     156         WRITE(numout,*) '   Namelist namtrc_ldf : set lateral mixing parameters (type, direction, coefficients)' 
     157         WRITE(numout,*) '      operator' 
     158         WRITE(numout,*) '           laplacian                 ln_trcldf_lap   = ', ln_trcldf_lap 
     159         WRITE(numout,*) '         bilaplacian                 ln_trcldf_blp   = ', ln_trcldf_blp 
     160         WRITE(numout,*) '      direction of action' 
     161         WRITE(numout,*) '         iso-level                   ln_trcldf_lev   = ', ln_trcldf_lev 
     162         WRITE(numout,*) '         horizontal (geopotential)   ln_trcldf_hor   = ', ln_trcldf_hor 
     163         WRITE(numout,*) '         iso-neutral (standard)      ln_trcldf_iso   = ', ln_trcldf_iso 
     164         WRITE(numout,*) '         iso-neutral (triad)         ln_trcldf_triad = ', ln_trcldf_triad 
     165         WRITE(numout,*) '      diffusivity coefficient' 
     166         WRITE(numout,*) '           laplacian                 rn_ahtrc_0      = ', rn_ahtrc_0 
     167         WRITE(numout,*) '         bilaplacian                 rn_bhtrc_0      = ', rn_bhtrc_0 
     168      ENDIF 
    132169      !       
    133170      !                                ! control the namelist parameters 
     
    172209         IF( ABS(rn_aht_0) < 2._wp*TINY(1.e0) ) THEN 
    173210            IF( ABS(rn_ahtrc_0) < 2._wp*TINY(1.e0) ) THEN 
    174                rldf_rat = 1.0_wp 
     211               rldf = 1.0_wp 
    175212            ELSE 
    176                CALL ctl_stop( 'STOP', 'trc_ldf_ctl : cannot define rldf_rat, rn_aht_0==0, rn_ahtrc_0 /=0' ) 
     213               CALL ctl_stop( 'STOP', 'trc_ldf_ctl : cannot define rldf, rn_aht_0==0, rn_ahtrc_0 /=0' ) 
    177214            ENDIF 
    178215         ELSE 
    179             rldf_rat = rn_ahtrc_0 / rn_aht_0 
     216            rldf = rn_ahtrc_0 / rn_aht_0 
    180217         ENDIF 
    181218      ENDIF 
     
    203240         IF( ABS(rn_bht_0) < 2._wp*TINY(1.e0) ) THEN 
    204241            IF( ABS(rn_bhtrc_0) < 2._wp*TINY(1.e0) ) THEN 
    205                rldf_rat = 1.0_wp 
     242               rldf = 1.0_wp 
    206243            ELSE 
    207                CALL ctl_stop( 'STOP', 'trc_ldf_ctl : cannot define rldf_rat, rn_aht_0==0, rn_ahtrc_0 /=0' ) 
     244               CALL ctl_stop( 'STOP', 'trc_ldf_ctl : cannot define rldf, rn_aht_0==0, rn_ahtrc_0 /=0' ) 
    208245            ENDIF 
    209246         ELSE 
    210             rldf_rat = SQRT(  ABS( rn_bhtrc_0 / rn_bht_0 )  ) 
     247            rldf = SQRT(  ABS( rn_bhtrc_0 / rn_bht_0 )  ) 
    211248         ENDIF 
    212249      ENDIF 
     
    231268      ENDIF 
    232269      ! 
    233    END SUBROUTINE ldf_ctl 
     270   END SUBROUTINE trc_ldf_ini 
    234271#else 
    235272   !!---------------------------------------------------------------------- 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcrad.F90

    r4990 r5766  
    2222   PRIVATE 
    2323 
    24    PUBLIC trc_rad         ! routine called by trcstp.F90 
    25  
    26    !! * Substitutions 
    27 #  include "top_substitute.h90" 
     24   PUBLIC trc_rad      
     25   PUBLIC trc_rad_ini   
     26 
     27   LOGICAL , PUBLIC ::   ln_trcrad           !: flag to artificially correct negative concentrations 
     28 
    2829   !!---------------------------------------------------------------------- 
    2930   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
     
    7677      ! 
    7778   END SUBROUTINE trc_rad 
     79 
     80   SUBROUTINE trc_rad_ini 
     81      !!--------------------------------------------------------------------- 
     82      !!                  ***  ROUTINE trc _rad_ini *** 
     83      !! 
     84      !! ** Purpose : read  namelist options  
     85      !!---------------------------------------------------------------------- 
     86      INTEGER ::  ios                 ! Local integer output status for namelist read 
     87      NAMELIST/namtrc_rad/ ln_trcrad 
     88      !!---------------------------------------------------------------------- 
     89 
     90      ! 
     91      REWIND( numnat_ref )              ! namtrc_rad in reference namelist  
     92      READ  ( numnat_ref, namtrc_rad, IOSTAT = ios, ERR = 907) 
     93907   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_rad in reference namelist', lwp ) 
     94 
     95      REWIND( numnat_cfg )              ! namtrc_rad in configuration namelist  
     96      READ  ( numnat_cfg, namtrc_rad, IOSTAT = ios, ERR = 908 ) 
     97908   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_rad in configuration namelist', lwp ) 
     98      IF(lwm) WRITE ( numont, namtrc_rad ) 
     99 
     100      IF(lwp) THEN                     !   ! Control print 
     101         WRITE(numout,*) 
     102         WRITE(numout,*) '   Namelist namtrc_rad : treatment of negative concentrations' 
     103         WRITE(numout,*) '      correct artificially negative concen. or not ln_trcrad = ', ln_trcrad 
     104      ENDIF 
     105      ! 
     106   END SUBROUTINE trc_rad_ini 
    78107 
    79108   SUBROUTINE trc_rad_sms( kt, ptrb, ptrn, jp_sms0, jp_sms1, cpreserv ) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90

    r5385 r5766  
    3131 
    3232   !! * Substitutions 
    33 #  include "top_substitute.h90" 
     33#  include "domzgr_substitute.h90" 
     34#  include "vectopt_loop_substitute.h90" 
    3435   !!---------------------------------------------------------------------- 
    3536   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
     
    8384         CASE( 0    )   ;   zswitch = 1  ! (0) standard levitating sea-ice : salt exchange only 
    8485         CASE( 1, 2 )   ;   zswitch = 0  ! (1) levitating sea-ice: salt and volume exchange but no pressure effect                                 
    85                                          ! (2) embedded sea-ice : salt and volume fluxes and pressure 
     86      !                                  ! (2) embedded sea-ice : salt and volume fluxes and pressure 
    8687      END SELECT 
    8788 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90

    r5758 r5766  
    1515   USE oce_trc         ! ocean dynamics and active tracers variables 
    1616   USE trc             ! ocean passive tracers variables  
    17    USE trcnam_trp      ! passive tracers transport namelist variables 
    1817   USE trabbl          ! bottom boundary layer               (trc_bbl routine) 
    1918   USE trcbbl          ! bottom boundary layer               (trc_bbl routine) 
    20    USE zdfkpp          ! KPP non-local tracer fluxes         (trc_kpp routine) 
    2119   USE trcdmp          ! internal damping                    (trc_dmp routine) 
    2220   USE trcldf          ! lateral mixing                      (trc_ldf routine) 
     
    3836   PUBLIC   trc_trp    ! called by trc_stp 
    3937 
    40    !! * Substitutions 
    41 #  include "top_substitute.h90" 
    4238   !!---------------------------------------------------------------------- 
    4339   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
     
    6965         IF( ln_trcdmp_clo )    CALL trc_dmp_clo( kt )      ! internal damping trends on closed seas only 
    7066                                CALL trc_adv    ( kt )      ! horizontal & vertical advection  
     67         !                                                         ! Partial top/bottom cell: GRADh( trb )   
     68         IF( ln_zps ) THEN 
     69           IF( ln_isfcav ) THEN ; CALL zps_hde_isf( kt, jptra, trb, pgtu=gtru, pgtv=gtrv, pgtui=gtrui, pgtvi=gtrvi )  ! both top & bottom 
     70           ELSE                 ; CALL zps_hde    ( kt, jptra, trb, gtru, gtrv )                                      !  only bottom 
     71           ENDIF 
     72         ENDIF 
     73         !                                                       
    7174                                CALL trc_ldf    ( kt )      ! lateral mixing 
    7275#if defined key_agrif 
     
    7881 
    7982#if defined key_agrif 
    80       IF( .NOT.Agrif_Root())    CALL Agrif_Update_Trc( kt ) ! Update tracer at AGRIF zoom boundaries : children only 
     83         IF( .NOT.Agrif_Root()) CALL Agrif_Update_Trc( kt ) ! Update tracer at AGRIF zoom boundaries : children only 
    8184#endif 
    82  
    83       !                                                         ! Partial top/bottom cell: GRADh( trn )   
    84       IF( ln_isfcav .AND. ln_zps ) THEN   ;   CALL zps_hde_isf( kt, jptra, trn, gtru, gtrv, gtrui, gtrvi )  ! both top & bottom 
    85       ELSEIF(             ln_zps ) THEN   ;   CALL zps_hde    ( kt, jptra, trn, gtru, gtrv )                ! only bottom  
    86       ENDIF 
    87 !!gm         IF( ln_zps ) THEN 
    88 !            &            CALL zps_hde    ( kt, jptra, trn, gtru, gtrv )   ! Partial steps: now horizontal gradient of passive 
    89 !            IF( ln_isfcav)        & 
    90 !            &            CALL zps_hde_isf( kt, jptra, trn, pgtu=gtru, pgtv=gtrv, pgtui=gtrui, pgtvi=gtrvi )  ! Partial steps: now horizontal gradient of passive 
    91 !!gm         ENDIF 
    9285         ! 
    9386      ELSE                                               ! 1D vertical configuration 
    9487                                CALL trc_sbc( kt )            ! surface boundary condition 
    95          IF( .NOT. lk_offline .AND. lk_zdfkpp )    & 
    96             &                   CALL trc_kpp( kt )            ! KPP non-local tracer fluxes 
    9788                                CALL trc_zdf( kt )            ! vertical mixing and after tracer fields 
    9889                                CALL trc_nxt( kt )            ! tracer fields at next time step      
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90

    r5385 r5766  
    1111   !!   'key_top'                                                TOP models 
    1212   !!---------------------------------------------------------------------- 
    13    !!   trc_ldf     : update the tracer trend with the lateral diffusion 
    14    !!       ldf_ctl : initialization, namelist read, and parameters control 
     13   !!   trc_zdf     : update the tracer trend with the lateral diffusion 
     14   !!   trc_zdf_ini : initialization, namelist read, and parameters control 
    1515   !!---------------------------------------------------------------------- 
    1616   USE oce_trc         ! ocean dynamics and active tracers 
    1717   USE trc             ! ocean passive tracers variables 
    18    USE trcnam_trp      ! passive tracers transport namelist variables 
    1918   USE trazdf_exp      ! vertical diffusion: explicit (tra_zdf_exp     routine) 
    2019   USE trazdf_imp      ! vertical diffusion: implicit (tra_zdf_imp     routine) 
     20   USE trcldf    
    2121   USE trd_oce 
    2222   USE trdtra 
     
    2828   PUBLIC   trc_zdf          ! called by step.F90  
    2929   PUBLIC   trc_zdf_alloc    ! called by nemogcm.F90  
     30   PUBLIC   trc_zdf_ini    ! called by nemogcm.F90  
     31   !                                        !!: ** Vertical diffusion 
     32   !                                        (nam_trczdf) ** 
     33   LOGICAL , PUBLIC ::   ln_trczdf_exp       !: explicit vertical diffusion scheme flag 
     34   INTEGER , PUBLIC ::   nn_trczdf_exp       !: number of sub-time step (explicit time stepping) 
    3035 
    3136   INTEGER ::   nzdf = 0               ! type vertical diffusion algorithm used 
     
    5560   END FUNCTION trc_zdf_alloc 
    5661 
    57  
    5862   SUBROUTINE trc_zdf( kt ) 
    5963      !!---------------------------------------------------------------------- 
     
    7175      IF( nn_timing == 1 )  CALL timing_start('trc_zdf') 
    7276      ! 
    73       IF( kt == nittrc000 )   CALL zdf_ctl          ! initialisation & control of options 
    74  
    7577      IF( ( neuler == 0 .AND. kt == nittrc000 ) .OR. ln_top_euler ) THEN     ! at nittrc000 
    7678         r2dt(:) =  rdttrc(:)           ! = rdttrc (use or restarting with Euler time stepping) 
     
    116118   END SUBROUTINE trc_zdf 
    117119 
    118  
    119    SUBROUTINE zdf_ctl 
     120   SUBROUTINE trc_zdf_ini 
    120121      !!---------------------------------------------------------------------- 
    121       !!                 ***  ROUTINE zdf_ctl  *** 
     122      !!                 ***  ROUTINE trc_zdf_ini  *** 
    122123      !! 
    123124      !! ** Purpose :   Choose the vertical mixing scheme 
     
    128129      !!      NB: The implicit scheme is required when using :  
    129130      !!             - rotated lateral mixing operator 
    130       !!             - TKE, GLS or KPP vertical mixing scheme 
     131      !!             - TKE, GLS vertical mixing scheme 
     132      !!---------------------------------------------------------------------- 
     133      INTEGER ::  ios                 ! Local integer output status for namelist read 
     134      ! 
     135      NAMELIST/namtrc_zdf/ ln_trczdf_exp  , nn_trczdf_exp 
    131136      !!---------------------------------------------------------------------- 
    132137 
     138      !                                ! Vertical mixing 
     139      REWIND( numnat_ref )             ! namtrc_zdf in reference namelist  
     140      READ  ( numnat_ref, namtrc_zdf, IOSTAT = ios, ERR = 905) 
     141905   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_zdf in reference namelist', lwp ) 
     142 
     143      REWIND( numnat_cfg )             ! namtrc_zdf in configuration namelist  
     144      READ  ( numnat_cfg, namtrc_zdf, IOSTAT = ios, ERR = 906 ) 
     145906   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_zdf in configuration namelist', lwp ) 
     146      IF(lwm) WRITE ( numont, namtrc_zdf ) 
     147 
     148      IF(lwp) THEN                     !   ! Control print 
     149         WRITE(numout,*) 
     150         WRITE(numout,*) '   Namelist namtrc_zdf : set vertical diffusion  parameters' 
     151         WRITE(numout,*) '      time splitting / backward scheme ln_trczdf_exp = ', ln_trczdf_exp 
     152         WRITE(numout,*) '      number of time step              nn_trczdf_exp = ', nn_trczdf_exp 
     153      ENDIF 
     154 
    133155      !  Define the vertical tracer physics scheme 
    134       ! ========================================== 
    135  
    136       ! Choice from ln_zdfexp already read in namelist in zdfini module 
    137       IF( ln_trczdf_exp ) THEN           ! use explicit scheme 
    138          nzdf = 0 
    139       ELSE                               ! use implicit scheme 
    140          nzdf = 1 
     156      IF( ln_trczdf_exp ) THEN  ;  nzdf = 0     ! explicit scheme 
     157      ELSE                      ;  nzdf = 1     ! implicit scheme 
    141158      ENDIF 
    142159 
     
    144161      IF( ln_trcldf_iso                               )   nzdf = 1      ! iso-neutral lateral physics 
    145162      IF( ln_trcldf_hor .AND. ln_sco                  )   nzdf = 1      ! horizontal lateral physics in s-coordinate 
    146 #if defined key_zdftke || defined key_zdfgls || defined key_zdfkpp 
    147                                                           nzdf = 1      ! TKE, GLS or KPP physics        
     163#if defined key_zdftke || defined key_zdfgls  
     164                                                          nzdf = 1      ! TKE or GLS physics        
    148165#endif 
    149       IF( ln_trczdf_exp .AND. nzdf == 1 )   THEN 
    150          CALL ctl_stop( 'trc_zdf : If using the rotated lateral mixing operator or TKE, GLS or KPP vertical scheme ', & 
     166      IF( ln_trczdf_exp .AND. nzdf == 1 )  &  
     167         CALL ctl_stop( 'trc_zdf : If using the rotated lateral mixing operator or TKE, GLS vertical scheme ', & 
    151168            &           '          the implicit scheme is required, set ln_trczdf_exp = .false.' ) 
    152       ENDIF 
    153  
    154       ! Test: esopa 
    155       IF( lk_esopa )    nzdf = -1                      ! All schemes used 
    156169 
    157170      IF(lwp) THEN 
     
    159172         WRITE(numout,*) 'trc:zdf_ctl : vertical passive tracer physics scheme' 
    160173         WRITE(numout,*) '~~~~~~~~~~~' 
    161          IF( nzdf == -1 )   WRITE(numout,*) '              ESOPA test All scheme used' 
    162174         IF( nzdf ==  0 )   WRITE(numout,*) '              Explicit time-splitting scheme' 
    163175         IF( nzdf ==  1 )   WRITE(numout,*) '              Implicit (euler backward) scheme' 
    164176      ENDIF 
    165177 
    166    END SUBROUTINE zdf_ctl 
     178   END SUBROUTINE trc_zdf_ini 
    167179#else 
    168180   !!---------------------------------------------------------------------- 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc.F90

    r5215 r5766  
    2424   USE zdfddm  , ONLY : avs  ! salinity vertical diffusivity coeff. at w-point 
    2525# endif 
    26    USE trcnam_trp        ! passive tracers transport namelist variables 
    2726   USE trdtrc_oce    ! definition of main arrays used for trends computations 
    2827   USE in_out_manager    ! I/O manager 
     
    6766 
    6867   !! * Substitutions 
    69 #  include "top_substitute.h90" 
     68#  include "domzgr_substitute.h90" 
    7069#  include "zdfddm_substitute.h90" 
    7170   !!---------------------------------------------------------------------- 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trdtrc.F90

    r5215 r5766  
    1414   !!---------------------------------------------------------------------- 
    1515   USE trc               ! tracer definitions (trn, trb, tra, etc.) 
    16    USE trcnam_trp 
    1716   USE trd_oce 
    1817   USE trdtrc_oce       ! definition of main arrays used for trends computations 
     
    2928   PUBLIC trd_trc 
    3029 
    31    !! * Substitutions 
    32 #  include "top_substitute.h90" 
    3330   !!---------------------------------------------------------------------- 
    3431   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/trcdia.F90

    r4292 r5766  
    5151   INTEGER  ::   nhoritb   !:  id for horizontal mesh 
    5252 
    53    !! * Substitutions 
    54 #  include "top_substitute.h90" 
    5553   !!---------------------------------------------------------------------- 
    5654   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/trcini.F90

    r5758 r5766  
    1818   USE oce_trc         ! shared variables between ocean and passive tracers 
    1919   USE trc             ! passive tracers common variables 
    20    USE trcrst          ! passive tracers restart 
    2120   USE trcnam          ! Namelist read 
    22    USE trcini_cfc      ! CFC      initialisation 
    23    USE trcini_pisces   ! PISCES   initialisation 
    24    USE trcini_c14b     ! C14 bomb initialisation 
    25    USE trcini_my_trc   ! MY_TRC   initialisation 
    26    USE trcdta          ! initialisation from files 
    2721   USE daymod          ! calendar manager 
    28    USE zpshde          ! partial step: hor. derivative   (zps_hde routine) 
    2922   USE prtctl_trc      ! Print control passive tracers (prt_ctl_trc_init routine) 
    3023   USE trcsub          ! variables to substep passive tracers 
     24   USE trcrst 
    3125   USE lib_mpp         ! distribued memory computing library 
    3226   USE sbc_oce 
     
    5953      !!                or read data or analytical formulation 
    6054      !!--------------------------------------------------------------------- 
    61       INTEGER ::   jk, jn, jl    ! dummy loop indices 
    62       CHARACTER (len=25) :: charout 
    63       REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrcdta   ! 4D  workspace 
    6455      !!--------------------------------------------------------------------- 
    6556      ! 
     
    7061      IF(lwp) WRITE(numout,*) '~~~~~~~' 
    7162 
    72       CALL top_alloc()              ! allocate TOP arrays 
    73  
     63      ! 
     64      CALL top_alloc()   ! allocate TOP arrays 
     65      ! 
     66      CALL trc_ini_ctl   ! control  
     67      ! 
     68      CALL trc_nam       ! read passive tracers namelists 
     69      ! 
     70      IF(lwp) WRITE(numout,*) 
     71      ! 
     72      IF( ln_rsttr .AND. .NOT. lk_offline ) CALL trc_rst_cal( nit000, 'READ' )   ! calendar 
     73      ! 
     74      IF(lwp) WRITE(numout,*) 
     75      ! 
     76      CALL trc_ini_sms   ! SMS 
     77      ! 
     78      CALL trc_ini_trp   ! passive tracers transport 
     79      ! 
     80      CALL trc_ice_ini   ! Tracers in sea ice 
     81      ! 
     82      IF( lwp )  & 
     83         &  CALL ctl_opn( numstr, 'tracer.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp , narea ) 
     84      ! 
     85      CALL trc_ini_state  !  passive tracers initialisation : from a restart or from clim 
     86      ! 
     87      IF( nn_dttrc /= 1 )        CALL trc_sub_ini      ! Initialize variables for substepping passive tracers 
     88      ! 
     89      CALL trc_ini_inv   ! Inventories 
     90      ! 
     91      IF( nn_timing == 1 )   CALL timing_stop('trc_init') 
     92      ! 
     93   END SUBROUTINE trc_init 
     94 
     95   SUBROUTINE trc_ini_ctl 
     96      !!---------------------------------------------------------------------- 
     97      !!                     ***  ROUTINE trc_ini_ctl  *** 
     98      !! ** Purpose :        Control  + ocean volume 
     99      !!---------------------------------------------------------------------- 
     100      INTEGER ::   jk    ! dummy loop indices 
     101      ! 
     102      ! Define logical parameter ton control dirunal cycle in TOP 
    74103      l_trcdm2dc = ln_dm2dc .OR. ( ln_cpl .AND. ncpl_qsr_freq /= 1 ) 
    75104      l_trcdm2dc = l_trcdm2dc  .AND. .NOT. lk_offline 
     
    78107         & Computation of a daily mean shortwave for some biogeochemical models) ') 
    79108 
     109      ! 
    80110      IF( nn_cla == 1 )   & 
    81111         &  CALL ctl_stop( ' Cross Land Advection not yet implemented with passive tracer ; nn_cla must be 0' ) 
    82  
    83       CALL trc_nam      ! read passive tracers namelists 
    84       ! 
    85       IF(lwp) WRITE(numout,*) 
    86       ! 
    87       IF( ln_rsttr .AND. .NOT. lk_offline ) CALL trc_rst_cal( nit000, 'READ' )   ! calendar 
    88       ! 
    89       IF(lwp) WRITE(numout,*) 
    90                                                               ! masked grid volume 
     112      ! 
     113   END SUBROUTINE trc_ini_ctl 
     114 
     115   SUBROUTINE trc_ini_inv 
     116      !!---------------------------------------------------------------------- 
     117      !!                     ***  ROUTINE trc_ini_stat  *** 
     118      !! ** Purpose :      passive tracers inventories at initialsation phase 
     119      !!---------------------------------------------------------------------- 
     120      INTEGER ::  jk, jn    ! dummy loop indices 
     121      CHARACTER (len=25) :: charout 
     122      !!---------------------------------------------------------------------- 
    91123      !                                                              ! masked grid volume 
    92124      DO jk = 1, jpk 
     
    96128      !                                                              ! total volume of the ocean  
    97129      areatot = glob_sum( cvol(:,:,:) ) 
    98  
     130      ! 
     131      trai(:) = 0._wp                                                   ! initial content of all tracers 
     132      DO jn = 1, jptra 
     133         trai(jn) = trai(jn) + glob_sum( trn(:,:,:,jn) * cvol(:,:,:)   ) 
     134      END DO 
     135 
     136      IF(lwp) THEN               ! control print 
     137         WRITE(numout,*) 
     138         WRITE(numout,*) 
     139         WRITE(numout,*) '          *** Total number of passive tracer jptra = ', jptra 
     140         WRITE(numout,*) '          *** Total volume of ocean                = ', areatot 
     141         WRITE(numout,*) '          *** Total inital content of all tracers ' 
     142         WRITE(numout,*) 
     143         DO jn = 1, jptra 
     144            WRITE(numout,9000) jn, TRIM( ctrcnm(jn) ), trai(jn) 
     145         ENDDO 
     146         WRITE(numout,*) 
     147      ENDIF 
     148      IF(lwp) WRITE(numout,*) 
     149      IF(ln_ctl) THEN            ! print mean trends (used for debugging) 
     150         CALL prt_ctl_trc_init 
     151         WRITE(charout, FMT="('ini ')") 
     152         CALL prt_ctl_trc_info( charout ) 
     153         CALL prt_ctl_trc( tab4d=trn, mask=tmask, clinfo=ctrcnm ) 
     154      ENDIF 
     1559000  FORMAT(' tracer nb : ',i2,'      name :',a10,'      initial content :',e18.10) 
     156      ! 
     157   END SUBROUTINE trc_ini_inv 
     158 
     159   SUBROUTINE trc_ini_sms 
     160      !!---------------------------------------------------------------------- 
     161      !!                     ***  ROUTINE trc_ini_sms  *** 
     162      !! ** Purpose :   SMS initialisation 
     163      !!---------------------------------------------------------------------- 
     164      USE trcini_cfc      ! CFC      initialisation 
     165      USE trcini_pisces   ! PISCES   initialisation 
     166      USE trcini_c14b     ! C14 bomb initialisation 
     167      USE trcini_my_trc   ! MY_TRC   initialisation 
     168      !!---------------------------------------------------------------------- 
    99169      IF( lk_pisces  )       CALL trc_ini_pisces       ! PISCES  bio-model 
    100170      IF( lk_cfc     )       CALL trc_ini_cfc          ! CFC     tracers 
    101171      IF( lk_c14b    )       CALL trc_ini_c14b         ! C14 bomb  tracer 
    102172      IF( lk_my_trc  )       CALL trc_ini_my_trc       ! MY_TRC  tracers 
    103  
    104       CALL trc_ice_ini                                 ! Tracers in sea ice 
    105  
    106       IF( lwp ) THEN 
    107          ! 
    108          CALL ctl_opn( numstr, 'tracer.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp , narea ) 
    109          ! 
    110       ENDIF 
    111  
     173      ! 
     174   END SUBROUTINE trc_ini_sms 
     175 
     176   SUBROUTINE trc_ini_trp 
     177      !!---------------------------------------------------------------------- 
     178      !!                     ***  ROUTINE trc_ini_trp  *** 
     179      !! 
     180      !! ** Purpose :   Allocate all the dynamic arrays of the OPA modules 
     181      !!---------------------------------------------------------------------- 
     182      USE trcdmp , ONLY:  trc_dmp_ini 
     183      USE trcadv , ONLY:  trc_adv_ini 
     184      USE trcldf , ONLY:  trc_ldf_ini 
     185      USE trczdf , ONLY:  trc_zdf_ini 
     186      USE trcrad , ONLY:  trc_rad_ini 
     187      ! 
     188      INTEGER :: ierr 
     189      !!---------------------------------------------------------------------- 
     190      ! 
     191      IF( ln_trcdmp )  CALL  trc_dmp_ini          ! damping 
     192                       CALL  trc_adv_ini          ! advection 
     193                       CALL  trc_ldf_ini          ! lateral diffusion 
     194                       CALL  trc_zdf_ini          ! vertical diffusion 
     195                       CALL  trc_rad_ini          ! positivity of passive tracers  
     196      ! 
     197   END SUBROUTINE trc_ini_trp 
     198 
     199   SUBROUTINE trc_ini_state 
     200      !!---------------------------------------------------------------------- 
     201      !!                     ***  ROUTINE trc_ini_state *** 
     202      !! ** Purpose :          Initialisation of passive tracer concentration  
     203      !!---------------------------------------------------------------------- 
     204      USE zpshde          ! partial step: hor. derivative   (zps_hde routine) 
     205      USE trcrst          ! passive tracers restart 
     206      USE trcdta          ! initialisation from files 
     207      ! 
     208      INTEGER ::   jk, jn, jl    ! dummy loop indices 
     209      REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrcdta   ! 4D  workspace 
     210      !!---------------------------------------------------------------------- 
     211      ! 
    112212      IF( ln_trcdta )      CALL trc_dta_init(jptra) 
    113  
    114213 
    115214      IF( ln_rsttr ) THEN 
     
    146245  
    147246      tra(:,:,:,:) = 0._wp 
    148  
    149 !!gm  case not.lk_c1d   is useless since in 1D, 9 identical column all resulting arrays are zero 
    150 !!                       it is at the initialization so not a issue      
    151 !      IF(.NOT. lk_c1d ) THEN 
    152 !!gm 
    153       IF( ln_isfcav .AND. ln_zps ) THEN   ;   CALL zps_hde_isf( nit000, jptra, trn, gtru, gtrv, gtrui, gtrvi )  ! both top & bottom 
    154       ELSEIF(             ln_zps ) THEN   ;   CALL zps_hde    ( nit000, jptra, trn, gtru, gtrv )                ! only bottom  
    155       ENDIF 
    156 !!gm       
    157 !      ENDIF 
    158 !!gm 
    159  
    160 !!gm  ===>>>>>>  Anyyway, I don't understand why a call to zps_hde is needed here ! 
    161  
    162       ! 
    163       IF( nn_dttrc /= 1 )        CALL trc_sub_ini      ! Initialize variables for substepping passive tracers 
    164       ! 
    165  
    166       trai(:) = 0._wp                                                   ! initial content of all tracers 
    167       DO jn = 1, jptra 
    168          trai(jn) = trai(jn) + glob_sum( trn(:,:,:,jn) * cvol(:,:,:)   ) 
    169       END DO 
    170  
    171       IF(lwp) THEN               ! control print 
    172          WRITE(numout,*) 
    173          WRITE(numout,*) 
    174          WRITE(numout,*) '          *** Total number of passive tracer jptra = ', jptra 
    175          WRITE(numout,*) '          *** Total volume of ocean                = ', areatot 
    176          WRITE(numout,*) '          *** Total inital content of all tracers ' 
    177          WRITE(numout,*) 
    178          DO jn = 1, jptra 
    179             WRITE(numout,9000) jn, TRIM( ctrcnm(jn) ), trai(jn) 
    180          ENDDO 
    181          WRITE(numout,*) 
    182       ENDIF 
    183       IF(lwp) WRITE(numout,*) 
    184       IF(ln_ctl) THEN            ! print mean trends (used for debugging) 
    185          CALL prt_ctl_trc_init 
    186          WRITE(charout, FMT="('ini ')") 
    187          CALL prt_ctl_trc_info( charout ) 
    188          CALL prt_ctl_trc( tab4d=trn, mask=tmask, clinfo=ctrcnm ) 
    189       ENDIF 
    190 9000  FORMAT(' tracer nb : ',i2,'      name :',a10,'      initial content :',e18.10) 
    191       ! 
    192       IF( nn_timing == 1 )   CALL timing_stop('trc_init') 
    193       ! 
    194    END SUBROUTINE trc_init 
    195  
     247      !                                                         ! Partial top/bottom cell: GRADh(trn) 
     248   END SUBROUTINE trc_ini_state 
    196249 
    197250   SUBROUTINE top_alloc 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/trcnam.F90

    r5758 r5766  
    2020   USE oce_trc           ! shared variables between ocean and passive tracers 
    2121   USE trc               ! passive tracers common variables 
    22    USE trcnam_trp        ! Transport namelist 
    2322   USE trcnam_pisces     ! PISCES namelist 
    2423   USE trcnam_cfc        ! CFC SMS namelist 
     
    3534   PUBLIC trc_nam      ! called in trcini 
    3635 
    37    !! * Substitutions 
    38 #  include "top_substitute.h90" 
    3936   !!---------------------------------------------------------------------- 
    4037   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
     
    6259                              CALL trc_nam_dia     ! Parameters of additional diagnostics 
    6360      !                                       
    64                               CALL trc_nam_trp     ! namelist of transport 
    65       ! 
    6661      ! 
    6762      IF( ln_rsttr                     )   ln_trcdta     = .FALSE.   ! restart : no need of clim data 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/trcrst.F90

    r5513 r5766  
    2525   USE oce_trc 
    2626   USE trc 
    27    USE trcnam_trp 
    2827   USE iom 
    2928   USE daymod 
     
    3736 
    3837   !! * Substitutions 
    39 #  include "top_substitute.h90" 
     38#  include "domzgr_substitute.h90" 
    4039    
    4140CONTAINS 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/trcsub.F90

    r5758 r5766  
    4848   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:)   ::  uslp_tm  , vslp_tm  , wslpi_tm  , wslpj_tm     !: time mean  
    4949 
    50    !!* Substitution 
    51 #  include "top_substitute.h90" 
     50   !! * Substitutions 
     51#  include "domzgr_substitute.h90" 
    5252   !!---------------------------------------------------------------------- 
    5353   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/trcwri.F90

    r3750 r5766  
    2626 
    2727   PUBLIC trc_wri       
    28  
    29    !! * Substitutions 
    30 #  include "top_substitute.h90" 
    3128 
    3229CONTAINS 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/SETTE/param.cfg

    r5423 r5766  
    1 #- forcing files storing  
     1#- forcing files storing 
    22FORCING_DIR=~/FORCING 
    3 #- input files storing  
     3#- input files storing 
    44INPUT_DIR=${CONFIG_DIR}/${NEW_CONF}/EXP00 
    55#- only for IBM 
    66#TMPDIR=${CONFIG_DIR}/${NEW_CONF}/EXP00 
    7 #- VALIDATION files storing  
     7#- VALIDATION files storing 
    88NEMO_VALIDATION_DIR=~/NEMO_VALIDATION 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/SETTE/sette.sh

    r5753 r5766  
    291291    . ./prepare_exe_dir.sh 
    292292    JOB_FILE=${EXE_DIR}/run_job.sh 
    293     NPROC=4 
     293    NPROC=8 
    294294    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    295295    cd ${EXE_DIR} 
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/SETTE/sette_rpt

    r5589 r5766  
    393393 
    394394 
     395  if ( -d ./WORCA2_LIM_OBS ) then 
     396    set dorv = `ls -1rtd ./WORCA2_LIM_OBS/{$mach}/* | tail -1l ` 
     397    set dorv = $dorv:t 
     398    set f1o = ./WORCA2_LIM_OBS/{$mach}/{$dorv}/REPRO_2_8/ocean.output 
     399    set f1s = ./WORCA2_LIM_OBS/{$mach}/{$dorv}/REPRO_2_8/solver.stat 
     400    set f2o = ./WORCA2_LIM_OBS/{$mach}/{$dorv}/REPRO_4_4/ocean.output 
     401    set f2s = ./WORCA2_LIM_OBS/{$mach}/{$dorv}/REPRO_4_4/solver.stat 
     402 
     403    cmp -s $f1s $f2s 
     404    if ( $status == 0 ) then 
     405      echo "ORCA2_LIM_OBS   reproducibility passed" 
     406    else 
     407      echo "ORCA2_LIM_OBS   reproducibility FAILED" 
     408      if ( $pass == 1 ) then 
     409        echo "<return> to view solver.stat differences" 
     410        set y = $< 
     411        sdiff $f1s $f2s 
     412        echo "<return> to view ocean.output differences" 
     413        set y = $< 
     414        sdiff $f1o $f2o | grep "|" 
     415        echo "<return> to continue" 
     416        set y = $< 
     417      endif 
     418    endif 
     419  endif 
     420 
     421 
    395422  if ( -d ./WSAS_32 ) then 
    396423    set dorv = `ls -1rtd ./WSAS_32/{$mach}/* | tail -1l ` 
Note: See TracChangeset for help on using the changeset viewer.