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 @ 763

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

dev_001_GM - Style only addition in TOP F90 h90 routines

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