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.
p4zbio.F90 in branches/UKMO/dev_r5107_iceshelf_fw_input_coupled_model/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z – NEMO

source: branches/UKMO/dev_r5107_iceshelf_fw_input_coupled_model/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zbio.F90 @ 5511

Last change on this file since 5511 was 5511, checked in by davestorkey, 9 years ago

UKMO/dev_r5107_iceshelf_fw_input_coupled_model branch: clear SVN keywords

File size: 5.9 KB
Line 
1MODULE p4zbio
2   !!======================================================================
3   !!                         ***  MODULE p4zbio  ***
4   !! TOP :   PISCES bio-model
5   !!======================================================================
6   !! History :   1.0  !  2004     (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_bio        :   computes the interactions between the different
14   !!                      compartments of PISCES
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 p4zopt          !  optical model
21   USE p4zlim          !  Co-limitations of differents nutrients
22   USE p4zprod         !  Growth rate of the 2 phyto groups
23   USE p4zmort         !  Mortality terms for phytoplankton
24   USE p4zmicro        !  Sources and sinks of microzooplankton
25   USE p4zmeso         !  Sources and sinks of mesozooplankton
26   USE p4zrem          !  Remineralisation of organic matter
27   USE p4zfechem
28   USE prtctl_trc      !  print control for debugging
29   USE iom             !  I/O manager
30 
31   IMPLICIT NONE
32   PRIVATE
33
34   PUBLIC  p4z_bio   
35
36   !!* Substitution
37#  include "top_substitute.h90"
38   !!----------------------------------------------------------------------
39   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
40   !! $Id$
41   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
42   !!----------------------------------------------------------------------
43
44CONTAINS
45
46   SUBROUTINE p4z_bio ( kt, jnt )
47      !!---------------------------------------------------------------------
48      !!                     ***  ROUTINE p4z_bio  ***
49      !!
50      !! ** Purpose :   Ecosystem model in the whole ocean: computes the
51      !!              different interactions between the different compartments
52      !!              of PISCES
53      !!
54      !! ** Method  : - ???
55      !!---------------------------------------------------------------------
56      INTEGER, INTENT(in) :: kt, jnt
57      INTEGER  ::  ji, jj, jk, jn
58      REAL(wp) ::  ztra
59#if defined key_kriest
60      REAL(wp) ::  zcoef1, zcoef2
61#endif
62      CHARACTER (len=25) :: charout
63
64      !!---------------------------------------------------------------------
65      !
66      IF( nn_timing == 1 )  CALL timing_start('p4z_bio')
67      !
68      !     ASSIGN THE SHEAR RATE THAT IS USED FOR AGGREGATION
69      !     OF PHYTOPLANKTON AND DETRITUS
70
71      xdiss(:,:,:) = 1.
72!!gm the use of nmld should be better here?
73      DO jk = 2, jpkm1
74         DO jj = 1, jpj
75            DO ji = 1, jpi
76               IF( fsdepw(ji,jj,jk+1) > hmld(ji,jj) )   xdiss(ji,jj,jk) = 0.01
77            END DO
78         END DO
79      END DO
80
81         
82      CALL p4z_opt  ( kt, jnt )     ! Optic: PAR in the water column
83      CALL p4z_sink ( kt, jnt )     ! vertical flux of particulate organic matter
84      CALL p4z_fechem(kt, jnt )     ! Iron chemistry/scavenging
85      CALL p4z_lim  ( kt, jnt )     ! co-limitations by the various nutrients
86      CALL p4z_prod ( kt, jnt )     ! phytoplankton growth rate over the global ocean.
87      !                             ! (for each element : C, Si, Fe, Chl )
88      CALL p4z_mort ( kt      )     ! phytoplankton mortality
89      !                             ! zooplankton sources/sinks routines
90      CALL p4z_micro( kt, jnt )           ! microzooplankton
91      CALL p4z_meso ( kt, jnt )           ! mesozooplankton
92      CALL p4z_rem  ( kt, jnt )     ! remineralization terms of organic matter+scavenging of Fe
93      !                             ! test if tracers concentrations fall below 0.
94      xnegtr(:,:,:) = 1.e0
95      DO jn = jp_pcs0, jp_pcs1
96         DO jk = 1, jpk
97            DO jj = 1, jpj
98               DO ji = 1, jpi
99                  IF( ( trn(ji,jj,jk,jn) + tra(ji,jj,jk,jn) ) < 0.e0 ) THEN
100                     ztra             = ABS( trn(ji,jj,jk,jn) ) / ( ABS( tra(ji,jj,jk,jn) ) + rtrn )
101
102                     xnegtr(ji,jj,jk) = MIN( xnegtr(ji,jj,jk),  ztra )
103                  ENDIF
104              END DO
105            END DO
106         END DO
107      END DO
108      !                                ! where at least 1 tracer concentration becomes negative
109      !                                !
110      DO jn = jp_pcs0, jp_pcs1
111         trn(:,:,:,jn) = trn(:,:,:,jn) + xnegtr(:,:,:) * tra(:,:,:,jn)
112      END DO
113
114
115      tra(:,:,:,:) = 0.e0
116
117#if defined key_kriest
118      !
119      zcoef1 = 1.e0 / xkr_massp 
120      zcoef2 = 1.e0 / xkr_massp / 1.1
121      DO jk = 1,jpkm1
122         trn(:,:,jk,jpnum) = MAX(  trn(:,:,jk,jpnum), trn(:,:,jk,jppoc) * zcoef1 / xnumm(jk)  )
123         trn(:,:,jk,jpnum) = MIN(  trn(:,:,jk,jpnum), trn(:,:,jk,jppoc) * zcoef2              )
124      END DO
125#endif
126
127      !
128      IF(ln_ctl)   THEN  ! print mean trends (used for debugging)
129         WRITE(charout, FMT="('bio ')")
130         CALL prt_ctl_trc_info(charout)
131         CALL prt_ctl_trc(tab4d=trn, mask=tmask, clinfo=ctrcnm)
132      ENDIF
133      !
134      IF( nn_timing == 1 )  CALL timing_stop('p4z_bio')
135      !
136   END SUBROUTINE p4z_bio
137
138#else
139   !!======================================================================
140   !!  Dummy module :                                   No PISCES bio-model
141   !!======================================================================
142CONTAINS
143   SUBROUTINE p4z_bio                         ! Empty routine
144   END SUBROUTINE p4z_bio
145#endif 
146
147   !!======================================================================
148END MODULE  p4zbio
149
Note: See TracBrowser for help on using the repository browser.