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.
initrc.F90 in branches/dev_001_GM/NEMO/TOP_SRC – NEMO

source: branches/dev_001_GM/NEMO/TOP_SRC/initrc.F90 @ 773

Last change on this file since 773 was 773, checked in by gm, 16 years ago

dev_001_GM - small changes : compilation OK

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.5 KB
Line 
1MODULE initrc
2   !!======================================================================
3   !!                         ***  MODULE initrc  ***
4   !! TOP :   Initialisation of passive tracers
5   !!======================================================================
6   !! History :    -   !  1991-03  ()  original code
7   !!             1.0  !  2005-03 (O. Aumont, A. El Moussaoui) F90
8   !!              -   !  2005-10 (C. Ethe) print control
9   !!             2.0  !  2005-10 (C. Ethe, G. Madec) revised architecture
10   !!----------------------------------------------------------------------
11#if defined key_top
12   !!----------------------------------------------------------------------
13   !!   'key_top'                                                TOP models
14   !!----------------------------------------------------------------------
15   !!   ini_trc    :  initialisation of passive tracers
16   !!----------------------------------------------------------------------
17   USE oce_trc
18   USE trc
19   USE trcrst
20   USE trcctl
21   USE trclec
22   USE trcdtr
23   USE trcini
24   USE prtctl_trc      ! Print control passive tracers (prt_ctl_trc_init routine)
25   
26   IMPLICIT NONE
27   PRIVATE
28   
29   PUBLIC   ini_trc   ! called by ???
30
31    !! * Substitutions
32#  include "domzgr_substitute.h90"
33   !!----------------------------------------------------------------------
34   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005)
35   !! $Id$
36   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
37   !!----------------------------------------------------------------------
38 
39CONTAINS
40   
41   SUBROUTINE ini_trc
42      !!---------------------------------------------------------------------
43      !!                     ***  ROUTINE ini_trc  ***
44      !!
45      !! ** Purpose :   Initialization of the passive tracer fields
46      !!
47      !! ** Method  : - read namelist
48      !!              - control the consistancy
49      !!              - compute specific initialisations
50      !!              - set initial tracer fields (either read restart
51      !!                or read data or analytical formulation
52      !!---------------------------------------------------------------------
53      INTEGER ::   jk, jn    ! dummy loop indices
54      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zbt   ! workspace: masked grid volume
55      !!---------------------------------------------------------------------
56
57      IF(lwp) WRITE(numout,*)
58      IF(lwp) WRITE(numout,*) 'ini_trc : initial set up of the passive tracers'
59      IF(lwp) WRITE(numout,*) '~~~~~~~'
60
61      !                 ! masked grid volume
62      DO jk = 1, jpk
63         zbt(:,:,jk) = e1t(:,:) * e2t(:,:) * fse3t(:,:,jk) * tmask(:,:,jk) * tmask_i(:,:)
64      END DO
65#if defined key_off_degrad
66      zbt(:,:,:) = zbt(:,:,:) * facvol(:,:,jk)      ! degrad option: reduction by facvol
67#endif
68
69      !                 ! total volume of the ocean
70      areatot = SUM( zbt(:,:,:) )
71      IF( lk_mpp )   CALL mpp_sum( areatot )     ! sum over the global domain 
72
73      CALL trc_lec      ! READ passive tracers namelists
74
75      CALL trc_ctl      ! control consistency between parameters, cpp key and namelists
76
77      CALL trc_ini      ! computes some initializations
78
79      !                 ! set initial tracer values
80      IF( lrsttr ) THEN   ;   CALL trc_rst_read      ! restart from a file
81      ELSE                ;   CALL trc_dtr           ! analytical formulation or from data
82      ENDIF
83
84      !                 ! Computation content of all tracers
85      trai = 0.e0
86      DO jn = 1, jptra
87         trai = trai + SUM( trn(:,:,:,jn) * zbt(:,:,:) )
88      END DO     
89      IF( lk_mpp )   CALL mpp_sum( trai )     ! sum over the global domain 
90
91
92      !                 ! control print
93      IF(lwp) WRITE(numout,*) '          *** Total number of passive tracer jptra = ', jptra
94      IF(lwp) WRITE(numout,*) '          *** Total volume of ocean                = ', areatot
95      IF(lwp) WRITE(numout,*) '          *** Total inital content of all tracers  = ', trai
96      IF(lwp) WRITE(numout,*)
97
98      IF( ln_ctl )   CALL prt_ctl_trc_init      ! control print
99      !
100   END SUBROUTINE ini_trc
101
102#else
103   !!----------------------------------------------------------------------
104   !!  Empty module :                                     No passive tracer
105   !!----------------------------------------------------------------------
106CONTAINS
107   SUBROUTINE ini_trc                      ! Dummy routine   
108   END SUBROUTINE ini_trc
109#endif
110
111   !!======================================================================
112END MODULE initrc 
Note: See TracBrowser for help on using the repository browser.