1 | MODULE trcini |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE trcini *** |
---|
4 | !! TOP : Manage the passive tracer initialization |
---|
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 | !!---------------------------------------------------------------------- |
---|
16 | !! trc_ini : Initialization for passive tracer |
---|
17 | !!---------------------------------------------------------------------- |
---|
18 | USE oce_trc |
---|
19 | USE trc |
---|
20 | USE trcrst |
---|
21 | USE trcctl |
---|
22 | USE trclec |
---|
23 | USE trcini_cfc ! CFC initialisation |
---|
24 | USE trcini_lobster ! LOBSTER initialisation |
---|
25 | USE trcini_pisces ! PISCES initialisation |
---|
26 | USE trcini_my_trc ! MY_TRC initialisation |
---|
27 | USE trcdta ! |
---|
28 | USE trdmld_trc_oce |
---|
29 | USE trdmld_trc |
---|
30 | |
---|
31 | USE in_out_manager ! I/O manager |
---|
32 | USE prtctl_trc ! Print control passive tracers (prt_ctl_trc_init routine) |
---|
33 | USE lib_mpp ! distributed memory computing library |
---|
34 | |
---|
35 | IMPLICIT NONE |
---|
36 | PRIVATE |
---|
37 | |
---|
38 | PUBLIC trc_ini ! called by opa |
---|
39 | |
---|
40 | !! * Substitutions |
---|
41 | # include "domzgr_substitute.h90" |
---|
42 | !!---------------------------------------------------------------------- |
---|
43 | !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) |
---|
44 | !! $Id$ |
---|
45 | !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) |
---|
46 | !!---------------------------------------------------------------------- |
---|
47 | |
---|
48 | CONTAINS |
---|
49 | |
---|
50 | SUBROUTINE trc_ini |
---|
51 | !!--------------------------------------------------------------------- |
---|
52 | !! *** ROUTINE trc_ini *** |
---|
53 | !! |
---|
54 | !! ** Purpose : Initialization of the passive tracer fields |
---|
55 | !! |
---|
56 | !! ** Method : - read namelist |
---|
57 | !! - control the consistancy |
---|
58 | !! - compute specific initialisations |
---|
59 | !! - set initial tracer fields (either read restart |
---|
60 | !! or read data or analytical formulation |
---|
61 | !!--------------------------------------------------------------------- |
---|
62 | INTEGER :: jk, jn ! dummy loop indices |
---|
63 | REAL(wp), DIMENSION(jpi,jpj,jpk) :: zbt ! workspace: masked grid volume |
---|
64 | CHARACTER (len=25) :: charout |
---|
65 | |
---|
66 | !!--------------------------------------------------------------------- |
---|
67 | |
---|
68 | IF(lwp) WRITE(numout,*) |
---|
69 | IF(lwp) WRITE(numout,*) 'trc_ini : initial set up of the passive tracers' |
---|
70 | IF(lwp) WRITE(numout,*) '~~~~~~~' |
---|
71 | |
---|
72 | ! ! masked grid volume |
---|
73 | DO jk = 1, jpk |
---|
74 | zbt(:,:,jk) = e1t(:,:) * e2t(:,:) * fse3t(:,:,jk) * tmask(:,:,jk) * tmask_i(:,:) |
---|
75 | END DO |
---|
76 | #if defined key_off_degrad |
---|
77 | DO jk = 1, jpk |
---|
78 | zbt(:,:,:) = zbt(:,:,:) * facvol(:,:,jk) ! degrad option: reduction by facvol |
---|
79 | ENDDO |
---|
80 | #endif |
---|
81 | |
---|
82 | ! ! total volume of the ocean |
---|
83 | areatot = SUM( zbt(:,:,:) ) |
---|
84 | IF( lk_mpp ) CALL mpp_sum( areatot ) ! sum over the global domain |
---|
85 | |
---|
86 | CALL trc_lec ! READ passive tracers namelists |
---|
87 | |
---|
88 | CALL trc_ctl ! control consistency between parameters, cpp key |
---|
89 | |
---|
90 | IF( lk_lobster ) THEN ; CALL trc_ini_lobster ! LOBSTER bio-model |
---|
91 | ELSE ; IF(lwp) WRITE(numout,*) ' LOBSTER not used' |
---|
92 | ENDIF |
---|
93 | |
---|
94 | IF( lk_pisces ) THEN ; CALL trc_ini_pisces ! PISCES bio-model |
---|
95 | ELSE ; IF(lwp) WRITE(numout,*) ' PISCES not used' |
---|
96 | ENDIF |
---|
97 | |
---|
98 | IF( lk_cfc ) THEN ; CALL trc_ini_cfc ! CFC tracers |
---|
99 | ELSE ; IF(lwp) WRITE(numout,*) ' CFC not used' |
---|
100 | ENDIF |
---|
101 | |
---|
102 | IF( lk_my_trc ) THEN ; CALL trc_ini_my_trc ! MY_TRC tracers |
---|
103 | ELSE ; IF(lwp) WRITE(numout,*) ' MY_TRC not used' |
---|
104 | ENDIF |
---|
105 | |
---|
106 | IF( .NOT. lrsttr ) THEN |
---|
107 | |
---|
108 | # if defined key_dtatrc |
---|
109 | ! Initialization of tracer from a file that may also be used for damping |
---|
110 | CALL trc_dta( nittrc000 ) |
---|
111 | DO jn = 1, jptra |
---|
112 | IF( lutini(jn) ) trn(:,:,:,jn) = trdta(:,:,:,jn) * tmask(:,:,:) ! initialisation from file if required |
---|
113 | END DO |
---|
114 | # endif |
---|
115 | trb(:,:,:,:) = trn(:,:,:,:) |
---|
116 | |
---|
117 | ELSE |
---|
118 | |
---|
119 | CALL trc_rst_read ! restart from a file |
---|
120 | |
---|
121 | ENDIF |
---|
122 | |
---|
123 | IF( lk_trdmld_trc ) CALL trd_mld_trc_init ! trends: Mixed-layer |
---|
124 | |
---|
125 | ! ! Computation content of all tracers |
---|
126 | trai = 0.e0 |
---|
127 | DO jn = 1, jptra |
---|
128 | trai = trai + SUM( trn(:,:,:,jn) * zbt(:,:,:) ) |
---|
129 | END DO |
---|
130 | IF( lk_mpp ) CALL mpp_sum( trai ) ! sum over the global domain |
---|
131 | |
---|
132 | |
---|
133 | ! ! control print |
---|
134 | IF(lwp) WRITE(numout,*) ' *** Total number of passive tracer jptra = ', jptra |
---|
135 | IF(lwp) WRITE(numout,*) ' *** Total volume of ocean = ', areatot |
---|
136 | IF(lwp) WRITE(numout,*) ' *** Total inital content of all tracers = ', trai |
---|
137 | IF(lwp) WRITE(numout,*) |
---|
138 | |
---|
139 | IF( ln_ctl ) CALL prt_ctl_trc_init ! control print |
---|
140 | ! |
---|
141 | |
---|
142 | IF(ln_ctl) THEN ! print mean trends (used for debugging) |
---|
143 | WRITE(charout, FMT="('ini ')") |
---|
144 | CALL prt_ctl_trc_info( charout ) |
---|
145 | CALL prt_ctl_trc( tab4d=trn, mask=tmask, clinfo=ctrcnm ) |
---|
146 | ENDIF |
---|
147 | |
---|
148 | END SUBROUTINE trc_ini |
---|
149 | |
---|
150 | #else |
---|
151 | !!---------------------------------------------------------------------- |
---|
152 | !! Empty module : No passive tracer |
---|
153 | !!---------------------------------------------------------------------- |
---|
154 | CONTAINS |
---|
155 | SUBROUTINE trc_ini ! Dummy routine |
---|
156 | END SUBROUTINE trc_ini |
---|
157 | #endif |
---|
158 | |
---|
159 | !!====================================================================== |
---|
160 | END MODULE trcini |
---|