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 @ 5285

Last change on this file since 5285 was 5285, checked in by aumont, 9 years ago

test

File size: 6.4 KB
RevLine 
[5266]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
[5285]8   !!             3.0  !  2015-05  (O. Aumont) PISCES QUOTA
[5266]9   !!----------------------------------------------------------------------
10#if defined key_pisces_quota
11   !!----------------------------------------------------------------------
12   !!   'key_pisces_quota'     PISCES bio-model with variable stoichiometry
13   !!----------------------------------------------------------------------
14   !!   p5z_bio        :   computes the interactions between the different
15   !!                      compartments of PISCES
16   !!----------------------------------------------------------------------
17   USE oce_trc         !  shared variables between ocean and passive tracers
18   USE trc             !  passive tracers common variables
19   USE sms_pisces      !  PISCES Source Minus Sink variables
20   USE p5zsink         !  vertical flux of particulate matter due to sinking
21   USE p4zopt          !  optical model
22   USE p5zlim          !  Co-limitations of differents nutrients
23   USE p5zprod         !  Growth rate of the 2 phyto groups
24   USE p5zmort         !  Mortality terms for phytoplankton
25   USE p5zmicro        !  Sources and sinks of microzooplankton
26   USE p5zmeso         !  Sources and sinks of mesozooplankton
27   USE p5zrem          !  Remineralisation of organic matter
28   USE p4zfechem
29   USE prtctl_trc      !  print control for debugging
30   USE iom             !  I/O manager
31 
32   IMPLICIT NONE
33   PRIVATE
34
35   PUBLIC  p5z_bio   
36
37   !!* Substitution
38#  include "top_substitute.h90"
39   !!----------------------------------------------------------------------
40   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
41   !! $Id: p4zbio.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 p5z_bio ( kt, jnt )
48      !!---------------------------------------------------------------------
49      !!                     ***  ROUTINE p5z_bio  ***
50      !!
51      !! ** Purpose :   Ecosystem model in the whole ocean: computes the
52      !!              different interactions between the different compartments
53      !!              of PISCES
54      !!
55      !! ** Method  : - ???
56      !!---------------------------------------------------------------------
57      INTEGER, INTENT(in) :: kt, jnt
58      INTEGER  ::  ji, jj, jk, jn
59      REAL(wp) ::  ztra
60#if defined key_kriest
61      REAL(wp) ::  zcoef1, zcoef2
62#endif
63      CHARACTER (len=25) :: charout
64
65      !!---------------------------------------------------------------------
66      !
67      IF( nn_timing == 1 )  CALL timing_start('p5z_bio')
68      !
69      !     ASSIGN THE SHEAR RATE THAT IS USED FOR AGGREGATION
70      !     OF PHYTOPLANKTON AND DETRITUS
71
72      xdiss(:,:,:) = 1.
73!!gm the use of nmld should be better here?
74      DO jk = 2, jpkm1
75         DO jj = 1, jpj
76            DO ji = 1, jpi
77               IF( fsdepw(ji,jj,jk+1) > hmld(ji,jj) )   xdiss(ji,jj,jk) = 0.01
78            END DO
79         END DO
80      END DO
81
82      CALL p4z_opt  ( kt, jnt )     ! Optic: PAR in the water column
83      CALL p5z_sink ( kt, jnt )     ! vertical flux of particulate organic matter
84      DO jk = 1, jpk
85        DO jj = 1, jpj
86          DO ji = 1, jpi
87            IF (mig(ji) == 72 .and. mjg(jj) == 74 .and. jk == 5) THEN
88            DO jn = 1, jptra
89            write(0,*) 'plante ',trn(ji,jj,jk,jn)*1E6
90            END DO
91            ENDIF
92          END DO
93        END DO
94      END DO
95      CALL p4z_fechem(kt, jnt )     ! Iron chemistry/scavenging
96      CALL p5z_lim  ( kt, jnt )     ! co-limitations by the various nutrients
97      CALL p5z_prod ( kt, jnt )     ! phytoplankton growth rate over the global ocean.
98      !                             ! (for each element : C, Si, Fe, Chl )
99      CALL p5z_mort ( kt      )     ! phytoplankton mortality
100      !                             ! zooplankton sources/sinks routines
101      CALL p5z_micro( kt, jnt )           ! microzooplankton
102      CALL p5z_meso ( kt, jnt )           ! mesozooplankton
103      CALL p5z_rem  ( kt, jnt )     ! remineralization terms of organic matter+scavenging of Fe
104      !                             ! test if tracers concentrations fall below 0.
105      xnegtr(:,:,:) = 1.e0
106      DO jn = jp_pcs0, jp_pcs1
107         DO jk = 1, jpk
108            DO jj = 1, jpj
109               DO ji = 1, jpi
110                  IF( ( trn(ji,jj,jk,jn) + tra(ji,jj,jk,jn) ) < 0.e0 ) THEN
111                     ztra             = ABS( trn(ji,jj,jk,jn) ) / ( ABS( tra(ji,jj,jk,jn) ) + rtrn )
112
113                     xnegtr(ji,jj,jk) = MIN( xnegtr(ji,jj,jk),  ztra )
114                  ENDIF
115              END DO
116            END DO
117         END DO
118      END DO
119      !                                ! where at least 1 tracer concentration becomes negative
120      !                                !
121      DO jn = jp_pcs0, jp_pcs1
122         trn(:,:,:,jn) = trn(:,:,:,jn) + xnegtr(:,:,:) * tra(:,:,:,jn) * tmask(:,:,:)
123      END DO
124
125      DO jn = jp_pcs0, jp_pcs1
126        CALL lbc_lnk( trn(:,:,:,jn), 'T', 1. )
127      END DO
128
129      tra(:,:,:,:) = 0.e0
130
131#if defined key_kriest
132      !
133      zcoef1 = 1.e0 / xkr_massp 
134      zcoef2 = 1.e0 / xkr_massp / 1.1
135      DO jk = 1,jpkm1
136         trn(:,:,jk,jpnum) = MAX(  trn(:,:,jk,jpnum), trn(:,:,jk,jppoc) * zcoef1 / xnumm(jk)  )
137         trn(:,:,jk,jpnum) = MIN(  trn(:,:,jk,jpnum), trn(:,:,jk,jppoc) * zcoef2              )
138      END DO
139#endif
140
141      !
142      IF(ln_ctl)   THEN  ! print mean trends (used for debugging)
143         WRITE(charout, FMT="('bio ')")
144         CALL prt_ctl_trc_info(charout)
145         CALL prt_ctl_trc(tab4d=trn, mask=tmask, clinfo=ctrcnm)
146      ENDIF
147      !
148      IF( nn_timing == 1 )  CALL timing_stop('p5z_bio')
149      !
150   END SUBROUTINE p5z_bio
151
152#else
153   !!======================================================================
154   !!  Dummy module :                                   No PISCES bio-model
155   !!======================================================================
156CONTAINS
157   SUBROUTINE p5z_bio                         ! Empty routine
158   END SUBROUTINE p5z_bio
159#endif 
160
161   !!======================================================================
162END MODULE  p5zbio
163
Note: See TracBrowser for help on using the repository browser.