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 trunk/NEMO/TOP_SRC/PISCES – NEMO

source: trunk/NEMO/TOP_SRC/PISCES/p4zbio.F90 @ 1073

Last change on this file since 1073 was 1073, checked in by cetlod, 16 years ago

update PISCES model, see ticket:190

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