1 | MODULE trcsms_pisces |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE trcsms_pisces *** |
---|
4 | !! TOP : PISCES Source Minus Sink manager |
---|
5 | !!====================================================================== |
---|
6 | !! History : 1.0 ! 2004-03 (O. Aumont) Original code |
---|
7 | !! 2.0 ! 2007-12 (C. Ethe, G. Madec) F90 |
---|
8 | !!---------------------------------------------------------------------- |
---|
9 | #if defined key_pisces |
---|
10 | !!---------------------------------------------------------------------- |
---|
11 | !! 'key_pisces' PISCES bio-model |
---|
12 | !!---------------------------------------------------------------------- |
---|
13 | !! trcsms_pisces : Time loop of passive tracers sms |
---|
14 | !!---------------------------------------------------------------------- |
---|
15 | USE oce_trc ! shared variables between ocean and passive tracers |
---|
16 | USE trc ! passive tracers common variables |
---|
17 | USE sms_pisces ! PISCES Source Minus Sink variables |
---|
18 | USE p4zbio ! Biological model |
---|
19 | USE p4zche ! Chemical model |
---|
20 | USE p4zsink ! vertical flux of particulate matter due to sinking |
---|
21 | USE p4zopt ! optical model |
---|
22 | USE p4zlim ! Co-limitations of differents nutrients |
---|
23 | USE p4zprod ! Growth rate of the 2 phyto groups |
---|
24 | USE p4zmort ! Mortality terms for phytoplankton |
---|
25 | USE p4zmicro ! Sources and sinks of microzooplankton |
---|
26 | USE p4zmeso ! Sources and sinks of mesozooplankton |
---|
27 | USE p4zrem ! Remineralisation of organic matter |
---|
28 | USE p4zlys ! Calcite saturation |
---|
29 | USE p4zflx ! Gas exchange |
---|
30 | USE p4zsed ! Sedimentation |
---|
31 | USE p4zint ! time interpolation |
---|
32 | USE trdmod_oce ! Ocean trends variables |
---|
33 | USE trdmod_trc ! TOP trends variables |
---|
34 | USE sedmodel ! Sediment model |
---|
35 | USE prtctl_trc ! print control for debugging |
---|
36 | |
---|
37 | IMPLICIT NONE |
---|
38 | PRIVATE |
---|
39 | |
---|
40 | PUBLIC trc_sms_pisces ! called in trcsms.F90 |
---|
41 | |
---|
42 | !!---------------------------------------------------------------------- |
---|
43 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
44 | !! $Id$ |
---|
45 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
46 | !!---------------------------------------------------------------------- |
---|
47 | |
---|
48 | CONTAINS |
---|
49 | |
---|
50 | SUBROUTINE trc_sms_pisces( kt ) |
---|
51 | !!--------------------------------------------------------------------- |
---|
52 | !! *** ROUTINE trc_sms_pisces *** |
---|
53 | !! |
---|
54 | !! ** Purpose : Managment of the call to Biological sources and sinks |
---|
55 | !! routines of PISCES bio-model |
---|
56 | !! |
---|
57 | !! ** Method : - at each new day ... |
---|
58 | !! - several calls of bio and sed ??? |
---|
59 | !! - ... |
---|
60 | !!--------------------------------------------------------------------- |
---|
61 | ! |
---|
62 | INTEGER, INTENT( in ) :: kt ! ocean time-step index |
---|
63 | !! |
---|
64 | INTEGER :: jnt, jn |
---|
65 | CHARACTER (len=25) :: charout |
---|
66 | !!--------------------------------------------------------------------- |
---|
67 | |
---|
68 | IF( kt == nittrc000 ) CALL trc_sms_pisces_init ! Initialization (first time-step only) |
---|
69 | IF( ln_rsttr .AND. ln_pisdmp .AND. MOD( kt - 1, nn_pisdmp ) == 0 ) CALL trc_sms_pisces_dmp( kt ) ! Relaxation of some tracers |
---|
70 | |
---|
71 | IF( ndayflxtr /= nday_year ) THEN ! New days |
---|
72 | ! |
---|
73 | ndayflxtr = nday_year |
---|
74 | |
---|
75 | IF(lwp) write(numout,*) |
---|
76 | IF(lwp) write(numout,*) ' New chemical constants and various rates for biogeochemistry at new day : ', nday_year |
---|
77 | IF(lwp) write(numout,*) '~~~~~~' |
---|
78 | |
---|
79 | CALL p4z_che ! computation of chemical constants |
---|
80 | CALL p4z_int ! computation of various rates for biogeochemistry |
---|
81 | ! |
---|
82 | ENDIF |
---|
83 | |
---|
84 | DO jnt = 1, nrdttrc ! Potential time splitting if requested |
---|
85 | ! |
---|
86 | CALL p4z_bio (kt, jnt) ! Compute soft tissue production (POC) |
---|
87 | CALL p4z_sed (kt, jnt) ! compute soft tissue remineralisation |
---|
88 | ! |
---|
89 | trb(:,:,:,:) = trn(:,:,:,:) |
---|
90 | ! |
---|
91 | END DO |
---|
92 | |
---|
93 | CALL p4z_lys( kt ) ! Compute CaCO3 saturation |
---|
94 | CALL p4z_flx( kt ) ! Compute surface fluxes |
---|
95 | |
---|
96 | DO jn = jp_pcs0, jp_pcs1 |
---|
97 | CALL lbc_lnk( trn(:,:,:,jn), 'T', 1. ) |
---|
98 | CALL lbc_lnk( trb(:,:,:,jn), 'T', 1. ) |
---|
99 | CALL lbc_lnk( tra(:,:,:,jn), 'T', 1. ) |
---|
100 | END DO |
---|
101 | |
---|
102 | |
---|
103 | IF( l_trdtrc ) THEN |
---|
104 | DO jn = jp_pcs0, jp_pcs1 |
---|
105 | CALL trd_mod_trc( tra(:,:,:,jn), jn, jptra_trd_sms, kt ) ! save trends |
---|
106 | END DO |
---|
107 | END IF |
---|
108 | |
---|
109 | IF( lk_sed ) THEN |
---|
110 | ! |
---|
111 | CALL sed_model( kt ) ! Main program of Sediment model |
---|
112 | ! |
---|
113 | DO jn = jp_pcs0, jp_pcs1 |
---|
114 | CALL lbc_lnk( trn(:,:,:,jn), 'T', 1. ) |
---|
115 | END DO |
---|
116 | ! |
---|
117 | ENDIF |
---|
118 | ! |
---|
119 | END SUBROUTINE trc_sms_pisces |
---|
120 | |
---|
121 | SUBROUTINE trc_sms_pisces_dmp( kt ) |
---|
122 | !!---------------------------------------------------------------------- |
---|
123 | !! *** trc_sms_pisces_dmp *** |
---|
124 | !! |
---|
125 | !! ** purpose : Relaxation of some tracers |
---|
126 | !!---------------------------------------------------------------------- |
---|
127 | ! |
---|
128 | INTEGER, INTENT( in ) :: kt ! time step |
---|
129 | ! |
---|
130 | REAL(wp) :: alkmean = 2426. ! mean value of alkalinity ( Glodap ; for Goyet 2391. ) |
---|
131 | REAL(wp) :: po4mean = 2.165 ! mean value of phosphates |
---|
132 | REAL(wp) :: no3mean = 30.90 ! mean value of nitrate |
---|
133 | REAL(wp) :: silmean = 91.51 ! mean value of silicate |
---|
134 | ! |
---|
135 | REAL(wp) :: zarea, zalksum, zpo4sum, zno3sum, zsilsum |
---|
136 | !!--------------------------------------------------------------------- |
---|
137 | |
---|
138 | |
---|
139 | IF(lwp) WRITE(numout,*) |
---|
140 | IF(lwp) WRITE(numout,*) ' trc_sms_pisces_dmp : Relaxation of nutrients at time-step kt = ', kt |
---|
141 | IF(lwp) WRITE(numout,*) |
---|
142 | |
---|
143 | IF( cp_cfg == "orca" .AND. .NOT. lk_c1d ) THEN ! ORCA condiguration (not 1D) ! |
---|
144 | ! ! --------------------------- ! |
---|
145 | ! set total alkalinity, phosphate, nitrate & silicate |
---|
146 | zarea = 1._wp / glob_sum( cvol(:,:,:) ) * 1e6 |
---|
147 | |
---|
148 | zalksum = glob_sum( trn(:,:,:,jptal) * cvol(:,:,:) ) * zarea |
---|
149 | zpo4sum = glob_sum( trn(:,:,:,jppo4) * cvol(:,:,:) ) * zarea / 122. |
---|
150 | zno3sum = glob_sum( trn(:,:,:,jpno3) * cvol(:,:,:) ) * zarea / 7.6 |
---|
151 | zsilsum = glob_sum( trn(:,:,:,jpsil) * cvol(:,:,:) ) * zarea |
---|
152 | |
---|
153 | IF(lwp) WRITE(numout,*) ' TALK mean : ', zalksum |
---|
154 | trn(:,:,:,jptal) = trn(:,:,:,jptal) * alkmean / zalksum |
---|
155 | |
---|
156 | IF(lwp) WRITE(numout,*) ' PO4 mean : ', zpo4sum |
---|
157 | trn(:,:,:,jppo4) = trn(:,:,:,jppo4) * po4mean / zpo4sum |
---|
158 | |
---|
159 | IF(lwp) WRITE(numout,*) ' NO3 mean : ', zno3sum |
---|
160 | trn(:,:,:,jpno3) = trn(:,:,:,jpno3) * no3mean / zno3sum |
---|
161 | |
---|
162 | IF(lwp) WRITE(numout,*) ' SiO3 mean : ', zsilsum |
---|
163 | trn(:,:,:,jpsil) = MIN( 400.e-6,trn(:,:,:,jpsil) * silmean / zsilsum ) |
---|
164 | ! |
---|
165 | ENDIF |
---|
166 | |
---|
167 | END SUBROUTINE trc_sms_pisces_dmp |
---|
168 | |
---|
169 | SUBROUTINE trc_sms_pisces_init |
---|
170 | !!---------------------------------------------------------------------- |
---|
171 | !! *** ROUTINE trc_sms_pisces_init *** |
---|
172 | !! |
---|
173 | !! ** Purpose : Initialization of PH variable |
---|
174 | !! |
---|
175 | !!---------------------------------------------------------------------- |
---|
176 | INTEGER :: ji, jj, jk |
---|
177 | REAL(wp) :: zcaralk, zbicarb, zco3 |
---|
178 | REAL(wp) :: ztmas, ztmas1 |
---|
179 | |
---|
180 | IF( .NOT. ln_rsttr ) THEN |
---|
181 | ! Initialization of chemical variables of the carbon cycle |
---|
182 | ! -------------------------------------------------------- |
---|
183 | DO jk = 1, jpk |
---|
184 | DO jj = 1, jpj |
---|
185 | DO ji = 1, jpi |
---|
186 | ztmas = tmask(ji,jj,jk) |
---|
187 | ztmas1 = 1. - tmask(ji,jj,jk) |
---|
188 | zcaralk = trn(ji,jj,jk,jptal) - borat(ji,jj,jk) / ( 1. + 1.E-8 / ( rtrn + akb3(ji,jj,jk) ) ) |
---|
189 | zco3 = ( zcaralk - trn(ji,jj,jk,jpdic) ) * ztmas + 0.5e-3 * ztmas1 |
---|
190 | zbicarb = ( 2. * trn(ji,jj,jk,jpdic) - zcaralk ) |
---|
191 | hi(ji,jj,jk) = ( ak23(ji,jj,jk) * zbicarb / zco3 ) * ztmas + 1.e-9 * ztmas1 |
---|
192 | END DO |
---|
193 | END DO |
---|
194 | END DO |
---|
195 | ! |
---|
196 | END IF |
---|
197 | |
---|
198 | ! Time step duration for biology |
---|
199 | xstep = rfact2 / rday |
---|
200 | |
---|
201 | CALL p4z_sink_init ! vertical flux of particulate organic matter |
---|
202 | CALL p4z_opt_init ! Optic: PAR in the water column |
---|
203 | CALL p4z_lim_init ! co-limitations by the various nutrients |
---|
204 | CALL p4z_prod_init ! phytoplankton growth rate over the global ocean. |
---|
205 | CALL p4z_rem_init ! remineralisation |
---|
206 | CALL p4z_mort_init ! phytoplankton mortality |
---|
207 | CALL p4z_micro_init ! microzooplankton |
---|
208 | CALL p4z_meso_init ! mesozooplankton |
---|
209 | CALL p4z_sed_init ! sedimentation |
---|
210 | CALL p4z_lys_init ! calcite saturation |
---|
211 | CALL p4z_flx_init ! gas exchange |
---|
212 | |
---|
213 | ndayflxtr = 0 |
---|
214 | |
---|
215 | END SUBROUTINE trc_sms_pisces_init |
---|
216 | |
---|
217 | #else |
---|
218 | !!====================================================================== |
---|
219 | !! Dummy module : No PISCES bio-model |
---|
220 | !!====================================================================== |
---|
221 | CONTAINS |
---|
222 | SUBROUTINE trc_sms_pisces( kt ) ! Empty routine |
---|
223 | INTEGER, INTENT( in ) :: kt |
---|
224 | WRITE(*,*) 'trc_sms_pisces: You should not have seen this print! error?', kt |
---|
225 | END SUBROUTINE trc_sms_pisces |
---|
226 | #endif |
---|
227 | |
---|
228 | !!====================================================================== |
---|
229 | END MODULE trcsms_pisces |
---|