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 trunk/NEMOGCM/NEMO/TOP_SRC/MY_TRC – NEMO

source: trunk/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcsms_my_trc.F90 @ 7953

Last change on this file since 7953 was 7646, checked in by timgraham, 7 years ago

Merge of dev_merge_2016 into trunk. UPDATE TO ARCHFILES NEEDED for XIOS2.
LIM_SRC_s/limrhg.F90 to follow in next commit due to change of kind (I'm unable to do it in this commit).
Merged using the following steps:

1) svn merge --reintegrate svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk .
2) Resolve minor conflicts in sette.sh and namelist_cfg for ORCA2LIM3 (due to a change in trunk after branch was created)
3) svn commit
4) svn switch svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk
5) svn merge svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/branches/2016/dev_merge_2016 .
6) At this stage I checked out a clean copy of the branch to compare against what is about to be committed to the trunk.
6) svn commit #Commit code to the trunk

In this commit I have also reverted a change to Fcheck_archfile.sh which was causing problems on the Paris machine.

  • Property svn:keywords set to Id
File size: 3.5 KB
RevLine 
[932]1MODULE trcsms_my_trc
2   !!======================================================================
3   !!                         ***  MODULE trcsms_my_trc  ***
4   !! TOP :   Main module of the MY_TRC tracers
5   !!======================================================================
[7646]6   !! History :      !  2007  (C. Ethe, G. Madec)  Original code
7   !!                !  2016  (C. Ethe, T. Lovato) Revised architecture
[932]8   !!----------------------------------------------------------------------
[3294]9   !! trc_sms_my_trc       : MY_TRC model main routine
[2715]10   !! trc_sms_my_trc_alloc : allocate arrays specific to MY_TRC sms
[932]11   !!----------------------------------------------------------------------
12   USE par_trc         ! TOP parameters
[1255]13   USE oce_trc         ! Ocean variables
14   USE trc             ! TOP variables
[4990]15   USE trd_oce
16   USE trdtrc
[7646]17   USE trcbc, only : trc_bc
[932]18
19   IMPLICIT NONE
20   PRIVATE
21
[2715]22   PUBLIC   trc_sms_my_trc       ! called by trcsms.F90 module
23   PUBLIC   trc_sms_my_trc_alloc ! called by trcini_my_trc.F90 module
[932]24
[2715]25   ! Defined HERE the arrays specific to MY_TRC sms and ALLOCATE them in trc_sms_my_trc_alloc
[3294]26
[932]27   !!----------------------------------------------------------------------
[7646]28   !! NEMO/TOP 4.0 , NEMO Consortium (2016)
[3294]29   !! $Id$
[2715]30   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
[932]31   !!----------------------------------------------------------------------
32CONTAINS
33
34   SUBROUTINE trc_sms_my_trc( kt )
35      !!----------------------------------------------------------------------
[3294]36      !!                     ***  trc_sms_my_trc  ***
[932]37      !!
38      !! ** Purpose :   main routine of MY_TRC model
39      !!
[3294]40      !! ** Method  : -
[932]41      !!----------------------------------------------------------------------
[2715]42      !
43      INTEGER, INTENT(in) ::   kt   ! ocean time-step index
44      INTEGER ::   jn   ! dummy loop index
[3294]45      REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrmyt
[5385]46      !!----------------------------------------------------------------------
[3294]47      !
48      IF( nn_timing == 1 )  CALL timing_start('trc_sms_my_trc')
49      !
[932]50      IF(lwp) WRITE(numout,*)
51      IF(lwp) WRITE(numout,*) ' trc_sms_my_trc:  MY_TRC model'
52      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~'
[1162]53
[3294]54      IF( l_trdtrc )  CALL wrk_alloc( jpi, jpj, jpk, ztrmyt )
55
[7646]56      CALL trc_bc ( kt )       ! tracers: surface and lateral Boundary Conditions
[6140]57
58      ! add here the call to BGC model
59
60      ! Save the trends in the mixed layer
61      IF( l_trdtrc ) THEN
[1255]62          DO jn = jp_myt0, jp_myt1
63            ztrmyt(:,:,:) = tra(:,:,:,jn)
[4990]64            CALL trd_trc( ztrmyt, jn, jptra_sms, kt )   ! save trends
[1255]65          END DO
[3294]66          CALL wrk_dealloc( jpi, jpj, jpk, ztrmyt )
[1255]67      END IF
[932]68      !
[3294]69      IF( nn_timing == 1 )  CALL timing_stop('trc_sms_my_trc')
70      !
[932]71   END SUBROUTINE trc_sms_my_trc
[2715]72
73   INTEGER FUNCTION trc_sms_my_trc_alloc()
74      !!----------------------------------------------------------------------
75      !!              ***  ROUTINE trc_sms_my_trc_alloc  ***
76      !!----------------------------------------------------------------------
77      !
78      ! ALLOCATE here the arrays specific to MY_TRC
79      ! ALLOCATE( tab(...) , STAT=trc_sms_my_trc_alloc )
80      trc_sms_my_trc_alloc = 0      ! set to zero if no array to be allocated
81      !
82      IF( trc_sms_my_trc_alloc /= 0 ) CALL ctl_warn('trc_sms_my_trc_alloc : failed to allocate arrays')
83      !
84   END FUNCTION trc_sms_my_trc_alloc
85
[932]86   !!======================================================================
87END MODULE trcsms_my_trc
Note: See TracBrowser for help on using the repository browser.