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.
p5zbio.F90 in branches/CNRS/dev_r4826_PISCES_QUOTA/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z – NEMO

source: branches/CNRS/dev_r4826_PISCES_QUOTA/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p5zbio.F90 @ 5266

Last change on this file since 5266 was 5266, checked in by cetlod, 9 years ago

PISCES_QUOTA : First commits, see ticket #1516

File size: 6.4 KB
Line 
1MODULE p5zbio
2   !!======================================================================
3   !!                         ***  MODULE p5zbio  ***
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_quota
10   !!----------------------------------------------------------------------
11   !!   'key_pisces_quota'     PISCES bio-model with variable stoichiometry
12   !!----------------------------------------------------------------------
13   !!   p5z_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 p5zsink         !  vertical flux of particulate matter due to sinking
20   USE p4zopt          !  optical model
21   USE p5zlim          !  Co-limitations of differents nutrients
22   USE p5zprod         !  Growth rate of the 2 phyto groups
23   USE p5zmort         !  Mortality terms for phytoplankton
24   USE p5zmicro        !  Sources and sinks of microzooplankton
25   USE p5zmeso         !  Sources and sinks of mesozooplankton
26   USE p5zrem          !  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  p5z_bio   
35
36   !!* Substitution
37#  include "top_substitute.h90"
38   !!----------------------------------------------------------------------
39   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
40   !! $Id: p4zbio.F90 3160 2011-11-20 14:27:18Z cetlod $
41   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
42   !!----------------------------------------------------------------------
43
44CONTAINS
45
46   SUBROUTINE p5z_bio ( kt, jnt )
47      !!---------------------------------------------------------------------
48      !!                     ***  ROUTINE p5z_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('p5z_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      CALL p4z_opt  ( kt, jnt )     ! Optic: PAR in the water column
82      CALL p5z_sink ( kt, jnt )     ! vertical flux of particulate organic matter
83      DO jk = 1, jpk
84        DO jj = 1, jpj
85          DO ji = 1, jpi
86            IF (mig(ji) == 72 .and. mjg(jj) == 74 .and. jk == 5) THEN
87            DO jn = 1, jptra
88            write(0,*) 'plante ',trn(ji,jj,jk,jn)*1E6
89            END DO
90            ENDIF
91          END DO
92        END DO
93      END DO
94      CALL p4z_fechem(kt, jnt )     ! Iron chemistry/scavenging
95      CALL p5z_lim  ( kt, jnt )     ! co-limitations by the various nutrients
96      CALL p5z_prod ( kt, jnt )     ! phytoplankton growth rate over the global ocean.
97      !                             ! (for each element : C, Si, Fe, Chl )
98      CALL p5z_mort ( kt      )     ! phytoplankton mortality
99      !                             ! zooplankton sources/sinks routines
100      CALL p5z_micro( kt, jnt )           ! microzooplankton
101      CALL p5z_meso ( kt, jnt )           ! mesozooplankton
102      CALL p5z_rem  ( kt, jnt )     ! remineralization terms of organic matter+scavenging of Fe
103      !                             ! test if tracers concentrations fall below 0.
104      xnegtr(:,:,:) = 1.e0
105      DO jn = jp_pcs0, jp_pcs1
106         DO jk = 1, jpk
107            DO jj = 1, jpj
108               DO ji = 1, jpi
109                  IF( ( trn(ji,jj,jk,jn) + tra(ji,jj,jk,jn) ) < 0.e0 ) THEN
110                     ztra             = ABS( trn(ji,jj,jk,jn) ) / ( ABS( tra(ji,jj,jk,jn) ) + rtrn )
111
112                     xnegtr(ji,jj,jk) = MIN( xnegtr(ji,jj,jk),  ztra )
113                  ENDIF
114              END DO
115            END DO
116         END DO
117      END DO
118      !                                ! where at least 1 tracer concentration becomes negative
119      !                                !
120      DO jn = jp_pcs0, jp_pcs1
121         trn(:,:,:,jn) = trn(:,:,:,jn) + xnegtr(:,:,:) * tra(:,:,:,jn) * tmask(:,:,:)
122      END DO
123
124      DO jn = jp_pcs0, jp_pcs1
125        CALL lbc_lnk( trn(:,:,:,jn), 'T', 1. )
126      END DO
127
128      tra(:,:,:,:) = 0.e0
129
130#if defined key_kriest
131      !
132      zcoef1 = 1.e0 / xkr_massp 
133      zcoef2 = 1.e0 / xkr_massp / 1.1
134      DO jk = 1,jpkm1
135         trn(:,:,jk,jpnum) = MAX(  trn(:,:,jk,jpnum), trn(:,:,jk,jppoc) * zcoef1 / xnumm(jk)  )
136         trn(:,:,jk,jpnum) = MIN(  trn(:,:,jk,jpnum), trn(:,:,jk,jppoc) * zcoef2              )
137      END DO
138#endif
139
140      !
141      IF(ln_ctl)   THEN  ! print mean trends (used for debugging)
142         WRITE(charout, FMT="('bio ')")
143         CALL prt_ctl_trc_info(charout)
144         CALL prt_ctl_trc(tab4d=trn, mask=tmask, clinfo=ctrcnm)
145      ENDIF
146      !
147      IF( nn_timing == 1 )  CALL timing_stop('p5z_bio')
148      !
149   END SUBROUTINE p5z_bio
150
151#else
152   !!======================================================================
153   !!  Dummy module :                                   No PISCES bio-model
154   !!======================================================================
155CONTAINS
156   SUBROUTINE p5z_bio                         ! Empty routine
157   END SUBROUTINE p5z_bio
158#endif 
159
160   !!======================================================================
161END MODULE  p5zbio
162
Note: See TracBrowser for help on using the repository browser.