source: NEMO/branches/2020/dev_r12563_ASINTER-06_ABL_improvement/src/TOP/PISCES/P4Z/p4zagg.F90

Last change on this file was 12377, checked in by acc, 10 months ago

The big one. Merging all 2019 developments from the option 1 branch back onto the trunk.

This changeset reproduces 2019/dev_r11943_MERGE_2019 on the trunk using a 2-URL merge
onto a working copy of the trunk. I.e.:

svn merge —ignore-ancestry \

svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/trunk \
svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/branches/2019/dev_r11943_MERGE_2019 ./

The —ignore-ancestry flag avoids problems that may otherwise arise from the fact that
the merge history been trunk and branch may have been applied in a different order but
care has been taken before this step to ensure that all applicable fixes and updates
are present in the merge branch.

The trunk state just before this step has been branched to releases/release-4.0-HEAD
and that branch has been immediately tagged as releases/release-4.0.2. Any fixes
or additions in response to tickets on 4.0, 4.0.1 or 4.0.2 should be done on
releases/release-4.0-HEAD. From now on future 'point' releases (e.g. 4.0.2) will
remain unchanged with periodic releases as needs demand. Note release-4.0-HEAD is a
transitional naming convention. Future full releases, say 4.2, will have a release-4.2
branch which fulfills this role and the first point release (e.g. 4.2.0) will be made
immediately following the release branch creation.

2020 developments can be started from any trunk revision later than this one.

  • Property svn:keywords set to Id
File size: 8.8 KB
Line 
1MODULE p4zagg
2   !!======================================================================
3   !!                         ***  MODULE p4zagg  ***
4   !! TOP :  PISCES  aggregation of particles
5   !!======================================================================
6   !! History :   1.0  !  2004     (O. Aumont) Original code
7   !!             2.0  !  2007-12  (C. Ethe, G. Madec)  F90
8   !!             3.4  !  2011-06  (O. Aumont, C. Ethe) Change aggregation formula
9   !!             3.5  !  2012-07  (O. Aumont) Introduce potential time-splitting
10   !!             3.6  !  2015-05  (O. Aumont) PISCES quota
11   !!----------------------------------------------------------------------
12
13   !!----------------------------------------------------------------------
14   !!   p4z_agg       :  Compute aggregation of particles
15   !!----------------------------------------------------------------------
16   USE oce_trc         !  shared variables between ocean and passive tracers
17   USE trc             !  passive tracers common variables
18   USE sms_pisces      !  PISCES Source Minus Sink variables
19   USE prtctl_trc      !  print control for debugging
20
21   IMPLICIT NONE
22   PRIVATE
23
24   PUBLIC   p4z_agg         ! called in p4zbio.F90
25
26   !! * Substitutions
27#  include "do_loop_substitute.h90"
28   !!----------------------------------------------------------------------
29   !! NEMO/TOP 4.0 , NEMO Consortium (2018)
30   !! $Id$
31   !! Software governed by the CeCILL license (see ./LICENSE)
32   !!----------------------------------------------------------------------
33CONTAINS
34
35   SUBROUTINE p4z_agg ( kt, knt, Kbb, Krhs )
36      !!---------------------------------------------------------------------
37      !!                     ***  ROUTINE p4z_agg  ***
38      !!
39      !! ** Purpose :   Compute aggregation of particles
40      !!
41      !! ** Method  : - ???
42      !!---------------------------------------------------------------------
43      INTEGER, INTENT(in) ::   kt, knt   !
44      INTEGER, INTENT(in) ::   Kbb, Krhs ! time level indices
45      !
46      INTEGER  ::   ji, jj, jk
47      REAL(wp) ::   zagg, zagg1, zagg2, zagg3, zagg4
48      REAL(wp) ::   zaggpoc1, zaggpoc2, zaggpoc3, zaggpoc4
49      REAL(wp) ::   zaggpoc , zaggfe, zaggdoc, zaggdoc2, zaggdoc3
50      REAL(wp) ::   zaggpon , zaggdon, zaggdon2, zaggdon3
51      REAL(wp) ::   zaggpop, zaggdop, zaggdop2, zaggdop3
52      REAL(wp) ::   zaggtmp, zfact, zmax
53      CHARACTER (len=25) :: charout
54      !!---------------------------------------------------------------------
55      !
56      IF( ln_timing )   CALL timing_start('p4z_agg')
57      !
58      !  Exchange between organic matter compartments due to coagulation/disaggregation
59      !  ---------------------------------------------------
60      IF( ln_p4z ) THEN
61         !
62         DO_3D_11_11( 1, jpkm1 )
63            !
64            zfact = xstep * xdiss(ji,jj,jk)
65            !  Part I : Coagulation dependent on turbulence
66            zagg1 = 25.9  * zfact * tr(ji,jj,jk,jppoc,Kbb) * tr(ji,jj,jk,jppoc,Kbb)
67            zagg2 = 4452. * zfact * tr(ji,jj,jk,jppoc,Kbb) * tr(ji,jj,jk,jpgoc,Kbb)
68
69            ! Part II : Differential settling
70
71            !  Aggregation of small into large particles
72            zagg3 =  47.1 * xstep * tr(ji,jj,jk,jppoc,Kbb) * tr(ji,jj,jk,jpgoc,Kbb)
73            zagg4 =  3.3  * xstep * tr(ji,jj,jk,jppoc,Kbb) * tr(ji,jj,jk,jppoc,Kbb)
74
75            zagg   = zagg1 + zagg2 + zagg3 + zagg4
76            zaggfe = zagg * tr(ji,jj,jk,jpsfe,Kbb) / ( tr(ji,jj,jk,jppoc,Kbb) + rtrn )
77
78            ! Aggregation of DOC to POC :
79            ! 1st term is shear aggregation of DOC-DOC
80            ! 2nd term is shear aggregation of DOC-POC
81            ! 3rd term is differential settling of DOC-POC
82            zaggdoc  = ( ( 0.369 * 0.3 * tr(ji,jj,jk,jpdoc,Kbb) + 102.4 * tr(ji,jj,jk,jppoc,Kbb) ) * zfact       &
83            &            + 2.4 * xstep * tr(ji,jj,jk,jppoc,Kbb) ) * 0.3 * tr(ji,jj,jk,jpdoc,Kbb)
84            ! transfer of DOC to GOC :
85            ! 1st term is shear aggregation
86            ! 2nd term is differential settling
87            zaggdoc2 = ( 3.53E3 * zfact + 0.1 * xstep ) * tr(ji,jj,jk,jpgoc,Kbb) * 0.3 * tr(ji,jj,jk,jpdoc,Kbb)
88            ! tranfer of DOC to POC due to brownian motion
89            zaggdoc3 =  114. * 0.3 * tr(ji,jj,jk,jpdoc,Kbb) *xstep * 0.3 * tr(ji,jj,jk,jpdoc,Kbb)
90
91            !  Update the trends
92            tr(ji,jj,jk,jppoc,Krhs) = tr(ji,jj,jk,jppoc,Krhs) - zagg + zaggdoc + zaggdoc3
93            tr(ji,jj,jk,jpgoc,Krhs) = tr(ji,jj,jk,jpgoc,Krhs) + zagg + zaggdoc2
94            tr(ji,jj,jk,jpsfe,Krhs) = tr(ji,jj,jk,jpsfe,Krhs) - zaggfe
95            tr(ji,jj,jk,jpbfe,Krhs) = tr(ji,jj,jk,jpbfe,Krhs) + zaggfe
96            tr(ji,jj,jk,jpdoc,Krhs) = tr(ji,jj,jk,jpdoc,Krhs) - zaggdoc - zaggdoc2 - zaggdoc3
97            !
98            conspoc(ji,jj,jk) = conspoc(ji,jj,jk) - zagg + zaggdoc + zaggdoc3
99            prodgoc(ji,jj,jk) = prodgoc(ji,jj,jk) + zagg + zaggdoc2
100            !
101         END_3D
102      ELSE    ! ln_p5z
103        !
104         DO_3D_11_11( 1, jpkm1 )
105            !
106            zfact = xstep * xdiss(ji,jj,jk)
107            !  Part I : Coagulation dependent on turbulence
108            zaggtmp = 25.9  * zfact * tr(ji,jj,jk,jppoc,Kbb)
109            zaggpoc1 = zaggtmp * tr(ji,jj,jk,jppoc,Kbb)
110            zaggtmp = 4452. * zfact * tr(ji,jj,jk,jpgoc,Kbb)
111            zaggpoc2 = zaggtmp * tr(ji,jj,jk,jppoc,Kbb)
112
113            ! Part II : Differential settling
114
115            !  Aggregation of small into large particles
116            zaggtmp =  47.1 * xstep * tr(ji,jj,jk,jpgoc,Kbb)
117            zaggpoc3 = zaggtmp * tr(ji,jj,jk,jppoc,Kbb)
118            zaggtmp =  3.3  * xstep * tr(ji,jj,jk,jppoc,Kbb)
119            zaggpoc4 = zaggtmp * tr(ji,jj,jk,jppoc,Kbb)
120
121            zaggpoc   = zaggpoc1 + zaggpoc2 + zaggpoc3 + zaggpoc4
122            zaggpon = zaggpoc * tr(ji,jj,jk,jppon,Kbb) / ( tr(ji,jj,jk,jppoc,Kbb) + rtrn)
123            zaggpop = zaggpoc * tr(ji,jj,jk,jppop,Kbb) / ( tr(ji,jj,jk,jppoc,Kbb) + rtrn)
124            zaggfe = zaggpoc * tr(ji,jj,jk,jpsfe,Kbb) / ( tr(ji,jj,jk,jppoc,Kbb)  + rtrn )
125
126            ! Aggregation of DOC to POC :
127            ! 1st term is shear aggregation of DOC-DOC
128            ! 2nd term is shear aggregation of DOC-POC
129            ! 3rd term is differential settling of DOC-POC
130            zaggtmp = ( ( 0.369 * 0.3 * tr(ji,jj,jk,jpdoc,Kbb) + 102.4 * tr(ji,jj,jk,jppoc,Kbb) ) * zfact       &
131            &            + 2.4 * xstep * tr(ji,jj,jk,jppoc,Kbb) )
132            zaggdoc  = zaggtmp * 0.3 * tr(ji,jj,jk,jpdoc,Kbb)
133            zaggdon  = zaggtmp * 0.3 * tr(ji,jj,jk,jpdon,Kbb)
134            zaggdop  = zaggtmp * 0.3 * tr(ji,jj,jk,jpdop,Kbb)
135
136            ! transfer of DOC to GOC :
137            ! 1st term is shear aggregation
138            ! 2nd term is differential settling
139            zaggtmp = ( 3.53E3 * zfact + 0.1 * xstep ) * tr(ji,jj,jk,jpgoc,Kbb)
140            zaggdoc2 = zaggtmp * 0.3 * tr(ji,jj,jk,jpdoc,Kbb)
141            zaggdon2 = zaggtmp * 0.3 * tr(ji,jj,jk,jpdon,Kbb)
142            zaggdop2 = zaggtmp * 0.3 * tr(ji,jj,jk,jpdop,Kbb)
143
144            ! tranfer of DOC to POC due to brownian motion
145            zaggtmp = ( 114. * 0.3 * tr(ji,jj,jk,jpdoc,Kbb) ) * xstep
146            zaggdoc3 =  zaggtmp * 0.3 * tr(ji,jj,jk,jpdoc,Kbb)
147            zaggdon3 =  zaggtmp * 0.3 * tr(ji,jj,jk,jpdon,Kbb)
148            zaggdop3 =  zaggtmp * 0.3 * tr(ji,jj,jk,jpdop,Kbb)
149
150            !  Update the trends
151            tr(ji,jj,jk,jppoc,Krhs) = tr(ji,jj,jk,jppoc,Krhs) - zaggpoc + zaggdoc + zaggdoc3
152            tr(ji,jj,jk,jppon,Krhs) = tr(ji,jj,jk,jppon,Krhs) - zaggpon + zaggdon + zaggdon3
153            tr(ji,jj,jk,jppop,Krhs) = tr(ji,jj,jk,jppop,Krhs) - zaggpop + zaggdop + zaggdop3
154            tr(ji,jj,jk,jpgoc,Krhs) = tr(ji,jj,jk,jpgoc,Krhs) + zaggpoc + zaggdoc2
155            tr(ji,jj,jk,jpgon,Krhs) = tr(ji,jj,jk,jpgon,Krhs) + zaggpon + zaggdon2
156            tr(ji,jj,jk,jpgop,Krhs) = tr(ji,jj,jk,jpgop,Krhs) + zaggpop + zaggdop2
157            tr(ji,jj,jk,jpsfe,Krhs) = tr(ji,jj,jk,jpsfe,Krhs) - zaggfe
158            tr(ji,jj,jk,jpbfe,Krhs) = tr(ji,jj,jk,jpbfe,Krhs) + zaggfe
159            tr(ji,jj,jk,jpdoc,Krhs) = tr(ji,jj,jk,jpdoc,Krhs) - zaggdoc - zaggdoc2 - zaggdoc3
160            tr(ji,jj,jk,jpdon,Krhs) = tr(ji,jj,jk,jpdon,Krhs) - zaggdon - zaggdon2 - zaggdon3
161            tr(ji,jj,jk,jpdop,Krhs) = tr(ji,jj,jk,jpdop,Krhs) - zaggdop - zaggdop2 - zaggdop3
162            !
163            conspoc(ji,jj,jk) = conspoc(ji,jj,jk) - zaggpoc + zaggdoc + zaggdoc3
164            prodgoc(ji,jj,jk) = prodgoc(ji,jj,jk) + zaggpoc + zaggdoc2
165            !
166         END_3D
167         !
168      ENDIF
169      !
170      IF(sn_cfctl%l_prttrc)   THEN  ! print mean trends (used for debugging)
171         WRITE(charout, FMT="('agg')")
172         CALL prt_ctl_trc_info(charout)
173         CALL prt_ctl_trc(tab4d=tr(:,:,:,:,Krhs), mask=tmask, clinfo=ctrcnm)
174      ENDIF
175      !
176      IF( ln_timing )   CALL timing_stop('p4z_agg')
177      !
178   END SUBROUTINE p4z_agg
179
180   !!======================================================================
181END MODULE p4zagg
Note: See TracBrowser for help on using the repository browser.