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.
trcsms_my_trc.F90 in NEMO/trunk/src/TOP/MY_TRC – NEMO

source: NEMO/trunk/src/TOP/MY_TRC/trcsms_my_trc.F90 @ 12377

Last change on this file since 12377 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: 3.4 KB
Line 
1MODULE trcsms_my_trc
2   !!======================================================================
3   !!                         ***  MODULE trcsms_my_trc  ***
4   !! TOP :   Main module of the MY_TRC tracers
5   !!======================================================================
6   !! History :      !  2007  (C. Ethe, G. Madec)  Original code
7   !!                !  2016  (C. Ethe, T. Lovato) Revised architecture
8   !!----------------------------------------------------------------------
9   !! trc_sms_my_trc       : MY_TRC model main routine
10   !! trc_sms_my_trc_alloc : allocate arrays specific to MY_TRC sms
11   !!----------------------------------------------------------------------
12   USE par_trc         ! TOP parameters
13   USE oce_trc         ! Ocean variables
14   USE trc             ! TOP variables
15   USE trd_oce
16   USE trdtrc
17
18   IMPLICIT NONE
19   PRIVATE
20
21   PUBLIC   trc_sms_my_trc       ! called by trcsms.F90 module
22   PUBLIC   trc_sms_my_trc_alloc ! called by trcini_my_trc.F90 module
23
24   ! Defined HERE the arrays specific to MY_TRC sms and ALLOCATE them in trc_sms_my_trc_alloc
25
26   !!----------------------------------------------------------------------
27   !! NEMO/TOP 4.0 , NEMO Consortium (2018)
28   !! $Id$
29   !! Software governed by the CeCILL license (see ./LICENSE)
30   !!----------------------------------------------------------------------
31CONTAINS
32
33   SUBROUTINE trc_sms_my_trc( kt, Kbb, Kmm, Krhs )
34      !!----------------------------------------------------------------------
35      !!                     ***  trc_sms_my_trc  ***
36      !!
37      !! ** Purpose :   main routine of MY_TRC model
38      !!
39      !! ** Method  : -
40      !!----------------------------------------------------------------------
41      !
42      INTEGER, INTENT(in) ::   kt   ! ocean time-step index
43      INTEGER, INTENT(in) ::   Kbb, Kmm, Krhs  ! time level indices
44      INTEGER ::   jn   ! dummy loop index
45      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: ztrmyt
46      !!----------------------------------------------------------------------
47      !
48      IF( ln_timing )   CALL timing_start('trc_sms_my_trc')
49      !
50      IF(lwp) WRITE(numout,*)
51      IF(lwp) WRITE(numout,*) ' trc_sms_my_trc:  MY_TRC model'
52      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~'
53
54      IF( l_trdtrc )  ALLOCATE( ztrmyt(jpi,jpj,jpk) )
55
56      ! add here the call to BGC model
57
58      ! Save the trends in the mixed layer
59      IF( l_trdtrc ) THEN
60          DO jn = jp_myt0, jp_myt1
61            ztrmyt(:,:,:) = tr(:,:,:,jn,Krhs)
62            CALL trd_trc( ztrmyt, jn, jptra_sms, kt, Kmm )   ! save trends
63          END DO
64          DEALLOCATE( ztrmyt )
65      END IF
66      !
67      IF( ln_timing )   CALL timing_stop('trc_sms_my_trc')
68      !
69   END SUBROUTINE trc_sms_my_trc
70
71
72   INTEGER FUNCTION trc_sms_my_trc_alloc()
73      !!----------------------------------------------------------------------
74      !!              ***  ROUTINE trc_sms_my_trc_alloc  ***
75      !!----------------------------------------------------------------------
76      !
77      ! ALLOCATE here the arrays specific to MY_TRC
78      ! ALLOCATE( tab(...) , STAT=trc_sms_my_trc_alloc )
79      trc_sms_my_trc_alloc = 0      ! set to zero if no array to be allocated
80      !
81      IF( trc_sms_my_trc_alloc /= 0 ) CALL ctl_stop( 'STOP', 'trc_sms_my_trc_alloc : failed to allocate arrays' )
82      !
83   END FUNCTION trc_sms_my_trc_alloc
84
85   !!======================================================================
86END MODULE trcsms_my_trc
Note: See TracBrowser for help on using the repository browser.