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

Last change on this file since 7646 was 7646, checked in by timgraham, 5 years ago

Merge of dev_merge_2016 into trunk. UPDATE TO ARCHFILES NEEDED for XIOS2.
LIM_SRC_s/limrhg.F90 to follow in next commit due to change of kind (I'm unable to do it in this commit).
Merged using the following steps:

1) svn merge —reintegrate svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk .
2) Resolve minor conflicts in sette.sh and namelist_cfg for ORCA2LIM3 (due to a change in trunk after branch was created)
3) svn commit
4) svn switch svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk
5) svn merge svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/branches/2016/dev_merge_2016 .
6) At this stage I checked out a clean copy of the branch to compare against what is about to be committed to the trunk.
6) svn commit #Commit code to the trunk

In this commit I have also reverted a change to Fcheck_archfile.sh which was causing problems on the Paris machine.

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