1 | MODULE p4zlys |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE p4zlys *** |
---|
4 | !! TOP : PISCES |
---|
5 | !!====================================================================== |
---|
6 | !! History : - ! 1988-07 (E. MAIER-REIMER) Original code |
---|
7 | !! - ! 1998 (O. Aumont) additions |
---|
8 | !! - ! 1999 (C. Le Quere) modifications |
---|
9 | !! 1.0 ! 2004 (O. Aumont) modifications |
---|
10 | !! 2.0 ! 2007-12 (C. Ethe, G. Madec) F90 |
---|
11 | !! ! 2011-02 (J. Simeon, J. Orr) Calcon salinity dependence |
---|
12 | !! 3.4 ! 2011-06 (O. Aumont, C. Ethe) Improvment of calcite dissolution |
---|
13 | !!---------------------------------------------------------------------- |
---|
14 | #if defined key_pisces |
---|
15 | !!---------------------------------------------------------------------- |
---|
16 | !! 'key_pisces' PISCES bio-model |
---|
17 | !!---------------------------------------------------------------------- |
---|
18 | !! p4z_lys : Compute the CaCO3 dissolution |
---|
19 | !! p4z_lys_init : Read the namelist parameters |
---|
20 | !!---------------------------------------------------------------------- |
---|
21 | USE oce_trc ! shared variables between ocean and passive tracers |
---|
22 | USE trc ! passive tracers common variables |
---|
23 | USE sms_pisces ! PISCES Source Minus Sink variables |
---|
24 | USE prtctl_trc ! print control for debugging |
---|
25 | USE iom ! I/O manager |
---|
26 | |
---|
27 | IMPLICIT NONE |
---|
28 | PRIVATE |
---|
29 | |
---|
30 | PUBLIC p4z_lys ! called in trcsms_pisces.F90 |
---|
31 | PUBLIC p4z_lys_init ! called in trcsms_pisces.F90 |
---|
32 | |
---|
33 | !! * Shared module variables |
---|
34 | REAL(wp), PUBLIC :: kdca !: diss. rate constant calcite |
---|
35 | REAL(wp), PUBLIC :: nca !: order of reaction for calcite dissolution |
---|
36 | |
---|
37 | !! * Module variables |
---|
38 | REAL(wp) :: calcon = 1.03E-2 !: mean calcite concentration [Ca2+] in sea water [mole/kg solution] |
---|
39 | |
---|
40 | INTEGER :: rmtss !: number of seconds per month |
---|
41 | |
---|
42 | !!---------------------------------------------------------------------- |
---|
43 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
44 | !! $Id: p4zlys.F90 3321 2012-03-05 17:10:55Z cetlod $ |
---|
45 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
46 | !!---------------------------------------------------------------------- |
---|
47 | |
---|
48 | CONTAINS |
---|
49 | |
---|
50 | SUBROUTINE p4z_lys( kt, knt ) |
---|
51 | !!--------------------------------------------------------------------- |
---|
52 | !! *** ROUTINE p4z_lys *** |
---|
53 | !! |
---|
54 | !! ** Purpose : CALCULATES DEGREE OF CACO3 SATURATION IN THE WATER |
---|
55 | !! COLUMN, DISSOLUTION/PRECIPITATION OF CACO3 AND LOSS |
---|
56 | !! OF CACO3 TO THE CACO3 SEDIMENT POOL. |
---|
57 | !! |
---|
58 | !! ** Method : - ??? |
---|
59 | !!--------------------------------------------------------------------- |
---|
60 | ! |
---|
61 | INTEGER, INTENT(in) :: kt, knt ! ocean time step |
---|
62 | INTEGER :: ji, jj, jk, jn |
---|
63 | REAL(wp) :: zalk, zdic, zph, zah2 |
---|
64 | REAL(wp) :: zdispot, zfact, zcalcon, zalka, zaldi |
---|
65 | REAL(wp) :: zomegaca, zexcess, zexcess0 |
---|
66 | CHARACTER (len=25) :: charout |
---|
67 | REAL(wp), POINTER, DIMENSION(:,:,:) :: zco3, zco3sat, zcaldiss |
---|
68 | !!--------------------------------------------------------------------- |
---|
69 | ! |
---|
70 | IF( nn_timing == 1 ) CALL timing_start('p4z_lys') |
---|
71 | ! |
---|
72 | CALL wrk_alloc( jpi, jpj, jpk, zco3, zco3sat, zcaldiss ) |
---|
73 | ! |
---|
74 | zco3 (:,:,:) = 0. |
---|
75 | zcaldiss(:,:,:) = 0. |
---|
76 | ! ------------------------------------------- |
---|
77 | ! COMPUTE [CO3--] and [H+] CONCENTRATIONS |
---|
78 | ! ------------------------------------------- |
---|
79 | |
---|
80 | DO jn = 1, 5 ! BEGIN OF ITERATION |
---|
81 | ! |
---|
82 | DO jk = 1, jpkm1 |
---|
83 | DO jj = 1, jpj |
---|
84 | DO ji = 1, jpi |
---|
85 | zfact = rhop(ji,jj,jk) / 1000. + rtrn |
---|
86 | zph = hi(ji,jj,jk) * tmask(ji,jj,jk) / zfact + ( 1.-tmask(ji,jj,jk) ) * 1.e-9 ! [H+] |
---|
87 | zdic = trb(ji,jj,jk,jpdic) / zfact |
---|
88 | zalka = trb(ji,jj,jk,jptal) / zfact |
---|
89 | ! CALCULATE [ALK]([CO3--], [HCO3-]) |
---|
90 | zalk = zalka - ( akw3(ji,jj,jk) / zph - zph / ( aphscale(ji,jj,jk) + rtrn ) & |
---|
91 | & + borat(ji,jj,jk) / ( 1. + zph / akb3(ji,jj,jk) ) ) |
---|
92 | ! CALCULATE [H+] and [CO3--] |
---|
93 | zaldi = zdic - zalk |
---|
94 | zah2 = SQRT( zaldi * zaldi + 4.* ( zalk * ak23(ji,jj,jk) / ak13(ji,jj,jk) ) * ( zdic + zaldi ) ) |
---|
95 | zah2 = 0.5 * ak13(ji,jj,jk) / zalk * ( zaldi + zah2 ) |
---|
96 | ! |
---|
97 | zco3(ji,jj,jk) = zalk / ( 2. + zah2 / ak23(ji,jj,jk) ) * zfact |
---|
98 | hi(ji,jj,jk) = zah2 * zfact |
---|
99 | END DO |
---|
100 | END DO |
---|
101 | END DO |
---|
102 | ! |
---|
103 | END DO |
---|
104 | |
---|
105 | ! --------------------------------------------------------- |
---|
106 | ! CALCULATE DEGREE OF CACO3 SATURATION AND CORRESPONDING |
---|
107 | ! DISSOLOUTION AND PRECIPITATION OF CACO3 (BE AWARE OF |
---|
108 | ! MGCO3) |
---|
109 | ! --------------------------------------------------------- |
---|
110 | |
---|
111 | DO jk = 1, jpkm1 |
---|
112 | DO jj = 1, jpj |
---|
113 | DO ji = 1, jpi |
---|
114 | |
---|
115 | ! DEVIATION OF [CO3--] FROM SATURATION VALUE |
---|
116 | ! Salinity dependance in zomegaca and divide by rhop/1000 to have good units |
---|
117 | zcalcon = calcon * ( tsn(ji,jj,jk,jp_sal) / 35._wp ) |
---|
118 | zfact = rhop(ji,jj,jk) / 1000._wp |
---|
119 | zomegaca = ( zcalcon * zco3(ji,jj,jk) ) / ( aksp(ji,jj,jk) * zfact + rtrn ) |
---|
120 | zco3sat(ji,jj,jk) = aksp(ji,jj,jk) * zfact / ( zcalcon + rtrn ) |
---|
121 | |
---|
122 | ! SET DEGREE OF UNDER-/SUPERSATURATION |
---|
123 | excess(ji,jj,jk) = 1._wp - zomegaca |
---|
124 | zexcess0 = MAX( 0., excess(ji,jj,jk) ) |
---|
125 | zexcess = zexcess0**nca |
---|
126 | |
---|
127 | ! AMOUNT CACO3 (12C) THAT RE-ENTERS SOLUTION |
---|
128 | ! (ACCORDING TO THIS FORMULATION ALSO SOME PARTICULATE |
---|
129 | ! CACO3 GETS DISSOLVED EVEN IN THE CASE OF OVERSATURATION) |
---|
130 | zdispot = kdca * zexcess * trb(ji,jj,jk,jpcal) |
---|
131 | # if defined key_degrad |
---|
132 | zdispot = zdispot * facvol(ji,jj,jk) |
---|
133 | # endif |
---|
134 | ! CHANGE OF [CO3--] , [ALK], PARTICULATE [CACO3], |
---|
135 | ! AND [SUM(CO2)] DUE TO CACO3 DISSOLUTION/PRECIPITATION |
---|
136 | zcaldiss(ji,jj,jk) = zdispot * rfact2 / rmtss ! calcite dissolution |
---|
137 | zco3(ji,jj,jk) = zco3(ji,jj,jk) + zcaldiss(ji,jj,jk) |
---|
138 | ! |
---|
139 | tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) + 2. * zcaldiss(ji,jj,jk) |
---|
140 | tra(ji,jj,jk,jpcal) = tra(ji,jj,jk,jpcal) - zcaldiss(ji,jj,jk) |
---|
141 | tra(ji,jj,jk,jpdic) = tra(ji,jj,jk,jpdic) + zcaldiss(ji,jj,jk) |
---|
142 | END DO |
---|
143 | END DO |
---|
144 | END DO |
---|
145 | ! |
---|
146 | |
---|
147 | IF( lk_iomput .AND. knt == nrdttrc ) THEN |
---|
148 | IF( iom_use( "PH" ) ) CALL iom_put( "PH" , -1. * LOG10( hi(:,:,:) ) * tmask(:,:,:) ) |
---|
149 | IF( iom_use( "CO3" ) ) CALL iom_put( "CO3" , zco3(:,:,:) * 1.e+3 * tmask(:,:,:) ) |
---|
150 | IF( iom_use( "CO3sat" ) ) CALL iom_put( "CO3sat", zco3sat(:,:,:) * 1.e+3 * tmask(:,:,:) ) |
---|
151 | IF( iom_use( "DCAL" ) ) CALL iom_put( "DCAL" , zcaldiss(:,:,:) * 1.e+3 * rfact2r * tmask(:,:,:) ) |
---|
152 | ELSE |
---|
153 | IF( ln_diatrc ) THEN |
---|
154 | trc3d(:,:,:,jp_pcs0_3d ) = -1. * LOG10( hi(:,:,:) ) * tmask(:,:,:) |
---|
155 | trc3d(:,:,:,jp_pcs0_3d + 1) = zco3(:,:,:) * tmask(:,:,:) |
---|
156 | trc3d(:,:,:,jp_pcs0_3d + 2) = zco3sat(:,:,:) * tmask(:,:,:) |
---|
157 | ENDIF |
---|
158 | ENDIF |
---|
159 | ! |
---|
160 | IF(ln_ctl) THEN ! print mean trends (used for debugging) |
---|
161 | WRITE(charout, FMT="('lys ')") |
---|
162 | CALL prt_ctl_trc_info(charout) |
---|
163 | CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm) |
---|
164 | ENDIF |
---|
165 | ! |
---|
166 | CALL wrk_dealloc( jpi, jpj, jpk, zco3, zco3sat, zcaldiss ) |
---|
167 | ! |
---|
168 | IF( nn_timing == 1 ) CALL timing_stop('p4z_lys') |
---|
169 | ! |
---|
170 | END SUBROUTINE p4z_lys |
---|
171 | |
---|
172 | SUBROUTINE p4z_lys_init |
---|
173 | |
---|
174 | !!---------------------------------------------------------------------- |
---|
175 | !! *** ROUTINE p4z_lys_init *** |
---|
176 | !! |
---|
177 | !! ** Purpose : Initialization of CaCO3 dissolution parameters |
---|
178 | !! |
---|
179 | !! ** Method : Read the nampiscal namelist and check the parameters |
---|
180 | !! called at the first timestep (nittrc000) |
---|
181 | !! |
---|
182 | !! ** input : Namelist nampiscal |
---|
183 | !! |
---|
184 | !!---------------------------------------------------------------------- |
---|
185 | INTEGER :: ji, jj, jk |
---|
186 | INTEGER :: ios ! Local integer output status for namelist read |
---|
187 | REAL(wp) :: zcaralk, zbicarb, zco3 |
---|
188 | REAL(wp) :: ztmas, ztmas1 |
---|
189 | |
---|
190 | NAMELIST/nampiscal/ kdca, nca |
---|
191 | !!---------------------------------------------------------------------- |
---|
192 | |
---|
193 | REWIND( numnatp_ref ) ! Namelist nampiscal in reference namelist : Pisces CaCO3 dissolution |
---|
194 | READ ( numnatp_ref, nampiscal, IOSTAT = ios, ERR = 901) |
---|
195 | 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampiscal in reference namelist', lwp ) |
---|
196 | |
---|
197 | REWIND( numnatp_cfg ) ! Namelist nampiscal in configuration namelist : Pisces CaCO3 dissolution |
---|
198 | READ ( numnatp_cfg, nampiscal, IOSTAT = ios, ERR = 902 ) |
---|
199 | 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampiscal in configuration namelist', lwp ) |
---|
200 | IF(lwm) WRITE ( numonp, nampiscal ) |
---|
201 | |
---|
202 | IF(lwp) THEN ! control print |
---|
203 | WRITE(numout,*) ' ' |
---|
204 | WRITE(numout,*) ' Namelist parameters for CaCO3 dissolution, nampiscal' |
---|
205 | WRITE(numout,*) ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' |
---|
206 | WRITE(numout,*) ' diss. rate constant calcite (per month) kdca =', kdca |
---|
207 | WRITE(numout,*) ' order of reaction for calcite dissolution nca =', nca |
---|
208 | ENDIF |
---|
209 | |
---|
210 | ! Number of seconds per month |
---|
211 | rmtss = nyear_len(1) * rday / raamo |
---|
212 | ! |
---|
213 | END SUBROUTINE p4z_lys_init |
---|
214 | |
---|
215 | #else |
---|
216 | !!====================================================================== |
---|
217 | !! Dummy module : No PISCES bio-model |
---|
218 | !!====================================================================== |
---|
219 | CONTAINS |
---|
220 | SUBROUTINE p4z_lys( kt ) ! Empty routine |
---|
221 | INTEGER, INTENT( in ) :: kt |
---|
222 | WRITE(*,*) 'p4z_lys: You should not have seen this print! error?', kt |
---|
223 | END SUBROUTINE p4z_lys |
---|
224 | #endif |
---|
225 | !!====================================================================== |
---|
226 | END MODULE p4zlys |
---|