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/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/TOP_SRC/PISCES – NEMO

source: branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/TOP_SRC/PISCES/p4zbio.F90 @ 2819

Last change on this file since 2819 was 2819, checked in by cetlod, 13 years ago

Improvment of branch dev_r2787_LOCEAN3_TRA_TRP

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