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.
trdini.F90 in NEMO/trunk/src/OCE/TRD – NEMO

source: NEMO/trunk/src/OCE/TRD/trdini.F90 @ 13286

Last change on this file since 13286 was 12377, checked in by acc, 4 years ago

The big one. Merging all 2019 developments from the option 1 branch back onto the trunk.

This changeset reproduces 2019/dev_r11943_MERGE_2019 on the trunk using a 2-URL merge
onto a working copy of the trunk. I.e.:

svn merge --ignore-ancestry \

svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/trunk \
svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/branches/2019/dev_r11943_MERGE_2019 ./

The --ignore-ancestry flag avoids problems that may otherwise arise from the fact that
the merge history been trunk and branch may have been applied in a different order but
care has been taken before this step to ensure that all applicable fixes and updates
are present in the merge branch.

The trunk state just before this step has been branched to releases/release-4.0-HEAD
and that branch has been immediately tagged as releases/release-4.0.2. Any fixes
or additions in response to tickets on 4.0, 4.0.1 or 4.0.2 should be done on
releases/release-4.0-HEAD. From now on future 'point' releases (e.g. 4.0.2) will
remain unchanged with periodic releases as needs demand. Note release-4.0-HEAD is a
transitional naming convention. Future full releases, say 4.2, will have a release-4.2
branch which fulfills this role and the first point release (e.g. 4.2.0) will be made
immediately following the release branch creation.

2020 developments can be started from any trunk revision later than this one.

  • Property svn:keywords set to Id
File size: 5.3 KB
Line 
1MODULE trdini
2   !!======================================================================
3   !!                       ***  MODULE  trdini  ***
4   !! Ocean diagnostics:  ocean tracers and dynamic trends
5   !!=====================================================================
6   !! History :   3.5  !  2012-02  (G. Madec) add 3D trends output for T, S, U, V, PE and KE
7   !!----------------------------------------------------------------------
8
9   !!----------------------------------------------------------------------
10   !!   trd_init      : initialization step
11   !!----------------------------------------------------------------------
12   USE dom_oce        ! ocean domain
13   USE trd_oce        ! trends: ocean variables
14   USE trdken         ! trends: 3D kinetic   energy
15   USE trdpen         ! trends: 3D potential energy
16   USE trdglo         ! trends: global domain averaged tracers and dynamics
17   USE trdmxl         ! trends: mixed layer averaged trends (tracer only)
18   USE trdvor         ! trends: vertical averaged vorticity
19   USE in_out_manager ! I/O manager
20   USE lib_mpp        ! MPP library
21
22   IMPLICIT NONE
23   PRIVATE
24
25   PUBLIC   trd_init   ! called by nemogcm.F90 module
26
27   !!----------------------------------------------------------------------
28   !! NEMO/OCE 4.0 , NEMO Consortium (2018)
29   !! $Id$
30   !! Software governed by the CeCILL license (see ./LICENSE)
31   !!----------------------------------------------------------------------
32CONTAINS
33
34   SUBROUTINE trd_init( Kmm )
35      !!----------------------------------------------------------------------
36      !!                  ***  ROUTINE trd_init  ***
37      !!
38      !! ** Purpose :   Initialization of trend diagnostics
39      !!----------------------------------------------------------------------
40      INTEGER, INTENT(in) ::   Kmm  ! time level index
41      INTEGER ::   ios   ! local integer
42      !!
43      NAMELIST/namtrd/ ln_dyn_trd, ln_KE_trd, ln_vor_trd, ln_dyn_mxl,   &
44         &             ln_tra_trd, ln_PE_trd, ln_glo_trd, ln_tra_mxl, nn_trd 
45      !!----------------------------------------------------------------------
46      !
47      READ  ( numnam_ref, namtrd, IOSTAT = ios, ERR = 901 )
48901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrd in reference namelist' )
49      !
50      READ  ( numnam_cfg, namtrd, IOSTAT = ios, ERR = 902 )
51902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrd in configuration namelist' )
52      IF(lwm) WRITE( numond, namtrd )
53      !
54      IF(lwp) THEN                  ! control print
55         WRITE(numout,*)
56         WRITE(numout,*) 'trd_init : Momentum/Tracers trends'
57         WRITE(numout,*) '~~~~~~~~'
58         WRITE(numout,*) '   Namelist namtrd : set trends parameters'
59         WRITE(numout,*) '      global domain averaged dyn & tra trends   ln_glo_trd  = ', ln_glo_trd
60         WRITE(numout,*) '      U & V trends: 3D output                   ln_dyn_trd  = ', ln_dyn_trd
61         WRITE(numout,*) '      U & V trends: Mixed Layer averaged        ln_dyn_mxl  = ', ln_dyn_mxl
62         WRITE(numout,*) '      T & S trends: 3D output                   ln_tra_trd  = ', ln_tra_trd
63         WRITE(numout,*) '      T & S trends: Mixed Layer averaged        ln_tra_mxl  = ', ln_tra_mxl
64         WRITE(numout,*) '      Kinetic   Energy trends                   ln_KE_trd   = ', ln_KE_trd
65         WRITE(numout,*) '      Potential Energy trends                   ln_PE_trd   = ', ln_PE_trd
66         WRITE(numout,*) '      Barotropic vorticity trends               ln_vor_trd  = ', ln_vor_trd
67         !
68         WRITE(numout,*) '      frequency of trends diagnostics (glo)     nn_trd      = ', nn_trd
69      ENDIF
70      !
71      !                             ! trend extraction flags 
72      l_trdtra = .FALSE.                                                       ! tracers 
73      IF ( ln_tra_trd .OR. ln_PE_trd .OR. ln_tra_mxl .OR.   &
74         & ln_glo_trd                                       )   l_trdtra = .TRUE. 
75      !
76      l_trddyn = .FALSE.                                                       ! momentum
77      IF ( ln_dyn_trd .OR. ln_KE_trd .OR. ln_dyn_mxl .OR.   &
78         & ln_vor_trd .OR. ln_glo_trd                       )   l_trddyn = .TRUE.
79      !
80
81!!gm check the stop below     
82      IF( ln_dyn_mxl )   CALL ctl_stop( 'ML diag on momentum are not yet coded we stop' )
83      !
84
85!!gm end
86      IF( ln_tra_mxl .OR. ln_vor_trd )   CALL ctl_stop( 'ML tracer and Barotropic vorticity diags are still using old IOIPSL' )
87!!gm end
88      !
89!      IF( .NOT.ln_linssh .AND. ( l_trdtra .OR. l_trddyn ) )  CALL ctl_stop( 'trend diagnostics with variable volume not validated' )
90     
91!!gm  : Potential BUG : 3D output only for vector invariant form!  add a ctl_stop or code the flux form case
92!!gm  : bug/pb for vertical advection of tracer in vvl case: add T.dt[eta] in the output...
93
94      !                             ! diagnostic initialization 
95      IF( ln_glo_trd )   CALL trd_glo_init( Kmm )      ! global domain averaged trends
96      IF( ln_tra_mxl )   CALL trd_mxl_init      ! mixed-layer          trends 
97      IF( ln_vor_trd )   CALL trd_vor_init      ! barotropic vorticity trends
98      IF( ln_KE_trd  )   CALL trd_ken_init      ! 3D Kinetic    energy trends
99      IF( ln_PE_trd  )   CALL trd_pen_init      ! 3D Potential  energy trends
100      !
101   END SUBROUTINE trd_init
102
103   !!======================================================================
104END MODULE trdini
Note: See TracBrowser for help on using the repository browser.