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