New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
p4zmort.F90 in trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z – NEMO

source: trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmort.F90 @ 4624

Last change on this file since 4624 was 4624, checked in by acc, 10 years ago

#1305. Fix slow start-up problems on some systems by introducing and using lwm logical to restrict output of merged namelists to the first (or only) processor. lwm is true only on the first processor regardless of ln_ctl. Small changes to all flavours of nemogcm.F90 are also required to write namctl and namcfg after the call to mynode which now opens output.namelist.dyn and writes nammpp.

File size: 12.7 KB
Line 
1MODULE p4zmort
2   !!======================================================================
3   !!                         ***  MODULE p4zmort  ***
4   !! TOP :   PISCES Compute the mortality terms for phytoplankton
5   !!======================================================================
6   !! History :   1.0  !  2002     (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   !!   p4z_mort       :   Compute the mortality terms for phytoplankton
14   !!   p4z_mort_init  :   Initialize the mortality params for phytoplankton
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 p4zsink         !  vertical flux of particulate matter due to sinking
20   USE p4zprod         !  Primary productivity
21   USE prtctl_trc      !  print control for debugging
22
23   IMPLICIT NONE
24   PRIVATE
25
26   PUBLIC   p4z_mort   
27   PUBLIC   p4z_mort_init   
28
29   !! * Shared module variables
30   REAL(wp), PUBLIC :: wchl    !:
31   REAL(wp), PUBLIC :: wchld   !:
32   REAL(wp), PUBLIC :: wchldm  !:
33   REAL(wp), PUBLIC :: mprat   !:
34   REAL(wp), PUBLIC :: mprat2  !:
35
36
37   !!* Substitution
38#  include "top_substitute.h90"
39   !!----------------------------------------------------------------------
40   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
41   !! $Id: p4zmort.F90 3160 2011-11-20 14:27:18Z cetlod $
42   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
43   !!----------------------------------------------------------------------
44
45CONTAINS
46
47   SUBROUTINE p4z_mort( kt )
48      !!---------------------------------------------------------------------
49      !!                     ***  ROUTINE p4z_mort  ***
50      !!
51      !! ** Purpose :   Calls the different subroutine to initialize and compute
52      !!                the different phytoplankton mortality terms
53      !!
54      !! ** Method  : - ???
55      !!---------------------------------------------------------------------
56      INTEGER, INTENT(in) ::   kt ! ocean time step
57      !!---------------------------------------------------------------------
58
59      CALL p4z_nano            ! nanophytoplankton
60
61      CALL p4z_diat            ! diatoms
62
63   END SUBROUTINE p4z_mort
64
65
66   SUBROUTINE p4z_nano
67      !!---------------------------------------------------------------------
68      !!                     ***  ROUTINE p4z_nano  ***
69      !!
70      !! ** Purpose :   Compute the mortality terms for nanophytoplankton
71      !!
72      !! ** Method  : - ???
73      !!---------------------------------------------------------------------
74      INTEGER  :: ji, jj, jk
75      REAL(wp) :: zsizerat, zcompaph
76      REAL(wp) :: zfactfe, zfactch, zprcaca, zfracal
77      REAL(wp) :: ztortp , zrespp , zmortp , zstep
78      CHARACTER (len=25) :: charout
79      !!---------------------------------------------------------------------
80      !
81      IF( nn_timing == 1 )  CALL timing_start('p4z_nano')
82      !
83      prodcal(:,:,:) = 0.  !: calcite production variable set to zero
84      DO jk = 1, jpkm1
85         DO jj = 1, jpj
86            DO ji = 1, jpi
87               zcompaph = MAX( ( trn(ji,jj,jk,jpphy) - 1e-8 ), 0.e0 )
88               zstep    = xstep
89# if defined key_degrad
90               zstep    = zstep * facvol(ji,jj,jk)
91# endif
92               !     When highly limited by macronutrients, very small cells
93               !     dominate the community. As a consequence, aggregation
94               !     due to turbulence is negligible. Mortality is also set
95               !     to 0
96               zsizerat = MIN(1., MAX( 0., (quotan(ji,jj,jk) - 0.2) / 0.3) ) * trn(ji,jj,jk,jpphy)
97               !     Squared mortality of Phyto similar to a sedimentation term during
98               !     blooms (Doney et al. 1996)
99               zrespp = wchl * 1.e6 * zstep * xdiss(ji,jj,jk) * zcompaph * zsizerat 
100
101               !     Phytoplankton mortality. This mortality loss is slightly
102               !     increased when nutrients are limiting phytoplankton growth
103               !     as observed for instance in case of iron limitation.
104               ztortp = mprat * xstep * zcompaph / ( xkmort + trn(ji,jj,jk,jpphy) ) * zsizerat
105
106               zmortp = zrespp + ztortp
107
108               !   Update the arrays TRA which contains the biological sources and sinks
109
110               zfactfe = trn(ji,jj,jk,jpnfe)/(trn(ji,jj,jk,jpphy)+rtrn)
111               zfactch = trn(ji,jj,jk,jpnch)/(trn(ji,jj,jk,jpphy)+rtrn)
112               tra(ji,jj,jk,jpphy) = tra(ji,jj,jk,jpphy) - zmortp
113               tra(ji,jj,jk,jpnch) = tra(ji,jj,jk,jpnch) - zmortp * zfactch
114               tra(ji,jj,jk,jpnfe) = tra(ji,jj,jk,jpnfe) - zmortp * zfactfe
115               zprcaca = xfracal(ji,jj,jk) * zmortp
116               !
117               prodcal(ji,jj,jk) = prodcal(ji,jj,jk) + zprcaca  ! prodcal=prodcal(nanophy)+prodcal(microzoo)+prodcal(mesozoo)
118               !
119               zfracal = 0.5 * xfracal(ji,jj,jk)
120               tra(ji,jj,jk,jpdic) = tra(ji,jj,jk,jpdic) - zprcaca
121               tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) - 2. * zprcaca
122               tra(ji,jj,jk,jpcal) = tra(ji,jj,jk,jpcal) + zprcaca
123#if defined key_kriest
124               tra(ji,jj,jk,jppoc) = tra(ji,jj,jk,jppoc) + zmortp
125               tra(ji,jj,jk,jpnum) = tra(ji,jj,jk,jpnum) + ztortp * xkr_dnano + zrespp * xkr_ddiat
126               tra(ji,jj,jk,jpsfe) = tra(ji,jj,jk,jpsfe) + zmortp * zfactfe
127#else
128               tra(ji,jj,jk,jpgoc) = tra(ji,jj,jk,jpgoc) + zfracal * zmortp
129               tra(ji,jj,jk,jppoc) = tra(ji,jj,jk,jppoc) + ( 1. - zfracal ) * zmortp
130               tra(ji,jj,jk,jpsfe) = tra(ji,jj,jk,jpsfe) + ( 1. - zfracal ) * zmortp * zfactfe
131               tra(ji,jj,jk,jpbfe) = tra(ji,jj,jk,jpbfe) + zfracal * zmortp * zfactfe
132#endif
133            END DO
134         END DO
135      END DO
136      !
137       IF(ln_ctl)   THEN  ! print mean trends (used for debugging)
138         WRITE(charout, FMT="('nano')")
139         CALL prt_ctl_trc_info(charout)
140         CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm)
141       ENDIF
142      !
143      IF( nn_timing == 1 )  CALL timing_stop('p4z_nano')
144      !
145   END SUBROUTINE p4z_nano
146
147   SUBROUTINE p4z_diat
148      !!---------------------------------------------------------------------
149      !!                     ***  ROUTINE p4z_diat  ***
150      !!
151      !! ** Purpose :   Compute the mortality terms for diatoms
152      !!
153      !! ** Method  : - ???
154      !!---------------------------------------------------------------------
155      INTEGER  ::  ji, jj, jk
156      REAL(wp) ::  zfactfe,zfactsi,zfactch, zcompadi
157      REAL(wp) ::  zrespp2, ztortp2, zmortp2, zstep
158      REAL(wp) ::  zlim2, zlim1
159      CHARACTER (len=25) :: charout
160      !!---------------------------------------------------------------------
161      !
162      IF( nn_timing == 1 )  CALL timing_start('p4z_diat')
163      !
164
165      !    Aggregation term for diatoms is increased in case of nutrient
166      !    stress as observed in reality. The stressed cells become more
167      !    sticky and coagulate to sink quickly out of the euphotic zone
168      !     ------------------------------------------------------------
169
170      DO jk = 1, jpkm1
171         DO jj = 1, jpj
172            DO ji = 1, jpi
173
174               zcompadi = MAX( ( trn(ji,jj,jk,jpdia) - 1e-9), 0. )
175
176               !    Aggregation term for diatoms is increased in case of nutrient
177               !    stress as observed in reality. The stressed cells become more
178               !    sticky and coagulate to sink quickly out of the euphotic zone
179               !     ------------------------------------------------------------
180               zstep   = xstep
181# if defined key_degrad
182               zstep = zstep * facvol(ji,jj,jk)
183# endif
184               !  Phytoplankton respiration
185               !     ------------------------
186               zlim2   = xlimdia(ji,jj,jk) * xlimdia(ji,jj,jk)
187               zlim1   = 0.25 * ( 1. - zlim2 ) / ( 0.25 + zlim2 ) 
188               zrespp2 = 1.e6 * zstep * (  wchld + wchldm * zlim1 ) * xdiss(ji,jj,jk) * zcompadi * trn(ji,jj,jk,jpdia)
189
190               !     Phytoplankton mortality.
191               !     ------------------------
192               ztortp2 = mprat2 * zstep * trn(ji,jj,jk,jpdia)  / ( xkmort + trn(ji,jj,jk,jpdia) ) * zcompadi 
193
194               zmortp2 = zrespp2 + ztortp2
195
196               !   Update the arrays tra which contains the biological sources and sinks
197               !   ---------------------------------------------------------------------
198               zfactch = trn(ji,jj,jk,jpdch) / ( trn(ji,jj,jk,jpdia) + rtrn )
199               zfactfe = trn(ji,jj,jk,jpdfe) / ( trn(ji,jj,jk,jpdia) + rtrn )
200               zfactsi = trn(ji,jj,jk,jpdsi) / ( trn(ji,jj,jk,jpdia) + rtrn )
201               tra(ji,jj,jk,jpdia) = tra(ji,jj,jk,jpdia) - zmortp2 
202               tra(ji,jj,jk,jpdch) = tra(ji,jj,jk,jpdch) - zmortp2 * zfactch
203               tra(ji,jj,jk,jpdfe) = tra(ji,jj,jk,jpdfe) - zmortp2 * zfactfe
204               tra(ji,jj,jk,jpdsi) = tra(ji,jj,jk,jpdsi) - zmortp2 * zfactsi
205               tra(ji,jj,jk,jpgsi) = tra(ji,jj,jk,jpgsi) + zmortp2 * zfactsi
206#if defined key_kriest
207               tra(ji,jj,jk,jppoc) = tra(ji,jj,jk,jppoc) + zmortp2 
208               tra(ji,jj,jk,jpnum) = tra(ji,jj,jk,jpnum) + ztortp2 * xkr_ddiat + zrespp2 * xkr_daggr
209               tra(ji,jj,jk,jpsfe) = tra(ji,jj,jk,jpsfe) + zmortp2 * zfactfe
210#else
211               tra(ji,jj,jk,jpgoc) = tra(ji,jj,jk,jpgoc) + zrespp2 + 0.5 * ztortp2
212               tra(ji,jj,jk,jppoc) = tra(ji,jj,jk,jppoc) + 0.5 * ztortp2
213               tra(ji,jj,jk,jpsfe) = tra(ji,jj,jk,jpsfe) + 0.5 * ztortp2 * zfactfe
214               tra(ji,jj,jk,jpbfe) = tra(ji,jj,jk,jpbfe) + ( zrespp2 + 0.5 * ztortp2 ) * zfactfe
215#endif
216            END DO
217         END DO
218      END DO
219      !
220      IF(ln_ctl)   THEN  ! print mean trends (used for debugging)
221         WRITE(charout, FMT="('diat')")
222         CALL prt_ctl_trc_info(charout)
223         CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm)
224      ENDIF
225      !
226      IF( nn_timing == 1 )  CALL timing_stop('p4z_diat')
227      !
228   END SUBROUTINE p4z_diat
229
230   SUBROUTINE p4z_mort_init
231
232      !!----------------------------------------------------------------------
233      !!                  ***  ROUTINE p4z_mort_init  ***
234      !!
235      !! ** Purpose :   Initialization of phytoplankton parameters
236      !!
237      !! ** Method  :   Read the nampismort namelist and check the parameters
238      !!      called at the first timestep
239      !!
240      !! ** input   :   Namelist nampismort
241      !!
242      !!----------------------------------------------------------------------
243
244      NAMELIST/nampismort/ wchl, wchld, wchldm, mprat, mprat2
245      INTEGER :: ios                 ! Local integer output status for namelist read
246
247      REWIND( numnatp_ref )              ! Namelist nampismort in reference namelist : Pisces phytoplankton
248      READ  ( numnatp_ref, nampismort, IOSTAT = ios, ERR = 901)
249901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampismort in reference namelist', lwp )
250
251      REWIND( numnatp_cfg )              ! Namelist nampismort in configuration namelist : Pisces phytoplankton
252      READ  ( numnatp_cfg, nampismort, IOSTAT = ios, ERR = 902 )
253902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampismort in configuration namelist', lwp )
254      IF(lwm) WRITE ( numonp, nampismort )
255
256      IF(lwp) THEN                         ! control print
257         WRITE(numout,*) ' '
258         WRITE(numout,*) ' Namelist parameters for phytoplankton mortality, nampismort'
259         WRITE(numout,*) ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
260         WRITE(numout,*) '    quadratic mortality of phytoplankton      wchl      =', wchl
261         WRITE(numout,*) '    maximum quadratic mortality of diatoms    wchld     =', wchld
262         WRITE(numout,*) '    maximum quadratic mortality of diatoms    wchldm    =', wchldm
263         WRITE(numout,*) '    phytoplankton mortality rate              mprat     =', mprat
264         WRITE(numout,*) '    Diatoms mortality rate                    mprat2    =', mprat2
265      ENDIF
266
267   END SUBROUTINE p4z_mort_init
268
269#else
270   !!======================================================================
271   !!  Dummy module :                                   No PISCES bio-model
272   !!======================================================================
273CONTAINS
274   SUBROUTINE p4z_mort                    ! Empty routine
275   END SUBROUTINE p4z_mort
276#endif 
277
278   !!======================================================================
279END MODULE  p4zmort
Note: See TracBrowser for help on using the repository browser.