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 branches/2014/dev_r4650_UKMO14.12_STAND_ALONE_OBSOPER/NEMOGCM/NEMO/TOP_SRC/MY_TRC – NEMO

source: branches/2014/dev_r4650_UKMO14.12_STAND_ALONE_OBSOPER/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcsms_my_trc.F90 @ 5600

Last change on this file since 5600 was 5600, checked in by andrewryan, 9 years ago

merged in latest version of trunk alongside changes to SAO_SRC to be compatible with latest OBS

  • Property svn:keywords set to Id
File size: 3.9 KB
Line 
1MODULE trcsms_my_trc
2   !!======================================================================
3   !!                         ***  MODULE trcsms_my_trc  ***
4   !! TOP :   Main module of the MY_TRC tracers
5   !!======================================================================
6   !! History :   2.0  !  2007-12  (C. Ethe, G. Madec) Original code
7   !!----------------------------------------------------------------------
8#if defined key_my_trc
9   !!----------------------------------------------------------------------
10   !!   'key_my_trc'                                               CFC tracers
11   !!----------------------------------------------------------------------
12   !! trc_sms_my_trc       : MY_TRC model main routine
13   !! trc_sms_my_trc_alloc : allocate arrays specific to MY_TRC sms
14   !!----------------------------------------------------------------------
15   USE par_trc         ! TOP parameters
16   USE oce_trc         ! Ocean variables
17   USE trc             ! TOP variables
18   USE trd_oce
19   USE trdtrc
20
21   IMPLICIT NONE
22   PRIVATE
23
24   PUBLIC   trc_sms_my_trc       ! called by trcsms.F90 module
25   PUBLIC   trc_sms_my_trc_alloc ! called by trcini_my_trc.F90 module
26
27   ! Defined HERE the arrays specific to MY_TRC sms and ALLOCATE them in trc_sms_my_trc_alloc
28
29   !!----------------------------------------------------------------------
30   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
31   !! $Id$
32   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
33   !!----------------------------------------------------------------------
34CONTAINS
35
36   SUBROUTINE trc_sms_my_trc( kt )
37      !!----------------------------------------------------------------------
38      !!                     ***  trc_sms_my_trc  ***
39      !!
40      !! ** Purpose :   main routine of MY_TRC model
41      !!
42      !! ** Method  : -
43      !!----------------------------------------------------------------------
44      !
45      INTEGER, INTENT(in) ::   kt   ! ocean time-step index
46      INTEGER ::   jn   ! dummy loop index
47      REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrmyt
48      !!----------------------------------------------------------------------
49      !
50      IF( nn_timing == 1 )  CALL timing_start('trc_sms_my_trc')
51      !
52      IF(lwp) WRITE(numout,*)
53      IF(lwp) WRITE(numout,*) ' trc_sms_my_trc:  MY_TRC model'
54      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~'
55
56      IF( l_trdtrc )  CALL wrk_alloc( jpi, jpj, jpk, ztrmyt )
57
58      IF( l_trdtrc ) THEN      ! Save the trends in the ixed layer
59          DO jn = jp_myt0, jp_myt1
60            ztrmyt(:,:,:) = tra(:,:,:,jn)
61            CALL trd_trc( ztrmyt, jn, jptra_sms, kt )   ! save trends
62          END DO
63          CALL wrk_dealloc( jpi, jpj, jpk, ztrmyt )
64      END IF
65      !
66      IF( nn_timing == 1 )  CALL timing_stop('trc_sms_my_trc')
67      !
68   END SUBROUTINE trc_sms_my_trc
69
70
71   INTEGER FUNCTION trc_sms_my_trc_alloc()
72      !!----------------------------------------------------------------------
73      !!              ***  ROUTINE trc_sms_my_trc_alloc  ***
74      !!----------------------------------------------------------------------
75      !
76      ! ALLOCATE here the arrays specific to MY_TRC
77      ! ALLOCATE( tab(...) , STAT=trc_sms_my_trc_alloc )
78      trc_sms_my_trc_alloc = 0      ! set to zero if no array to be allocated
79      !
80      IF( trc_sms_my_trc_alloc /= 0 ) CALL ctl_warn('trc_sms_my_trc_alloc : failed to allocate arrays')
81      !
82   END FUNCTION trc_sms_my_trc_alloc
83
84
85#else
86   !!----------------------------------------------------------------------
87   !!   Dummy module                                        No MY_TRC model
88   !!----------------------------------------------------------------------
89CONTAINS
90   SUBROUTINE trc_sms_my_trc( kt )             ! Empty routine
91      INTEGER, INTENT( in ) ::   kt
92      WRITE(*,*) 'trc_sms_my_trc: You should not have seen this print! error?', kt
93   END SUBROUTINE trc_sms_my_trc
94#endif
95
96   !!======================================================================
97END MODULE trcsms_my_trc
Note: See TracBrowser for help on using the repository browser.