1 | MODULE p4zint |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE p4zint *** |
---|
4 | !! TOP : PISCES interpolation and computation of various accessory fields |
---|
5 | !!====================================================================== |
---|
6 | !! History : 1.0 ! 2004-03 (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_int : interpolation and computation of various accessory fields |
---|
14 | !!---------------------------------------------------------------------- |
---|
15 | USE oce_trc ! |
---|
16 | USE trc |
---|
17 | USE sms_pisces |
---|
18 | |
---|
19 | IMPLICIT NONE |
---|
20 | PRIVATE |
---|
21 | |
---|
22 | PUBLIC p4z_int |
---|
23 | PUBLIC p4z_int_alloc |
---|
24 | |
---|
25 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tgfunc !: Temp. dependancy of various biological rates |
---|
26 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tgfunc2 !: Temp. dependancy of mesozooplankton rates |
---|
27 | |
---|
28 | REAL(wp) :: xksilim = 16.5e-6_wp ! Half-saturation constant for the Si half-saturation constant computation |
---|
29 | |
---|
30 | !!---------------------------------------------------------------------- |
---|
31 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
32 | !! $Id$ |
---|
33 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
34 | !!---------------------------------------------------------------------- |
---|
35 | CONTAINS |
---|
36 | |
---|
37 | SUBROUTINE p4z_int |
---|
38 | !!--------------------------------------------------------------------- |
---|
39 | !! *** ROUTINE p4z_int *** |
---|
40 | !! |
---|
41 | !! ** Purpose : interpolation and computation of various accessory fields |
---|
42 | !! |
---|
43 | !! ** Method : - ??? |
---|
44 | !!--------------------------------------------------------------------- |
---|
45 | INTEGER :: ji, jj |
---|
46 | REAL(wp) :: zdum |
---|
47 | !!--------------------------------------------------------------------- |
---|
48 | |
---|
49 | ! Computation of phyto and zoo metabolic rate |
---|
50 | ! ------------------------------------------- |
---|
51 | tgfunc (:,:,:) = EXP( 0.063913 * tsn(:,:,:,jp_tem) ) |
---|
52 | tgfunc2(:,:,:) = EXP( 0.07608 * tsn(:,:,:,jp_tem) ) |
---|
53 | |
---|
54 | ! Computation of the silicon dependant half saturation |
---|
55 | ! constant for silica uptake |
---|
56 | ! --------------------------------------------------- |
---|
57 | DO ji = 1, jpi |
---|
58 | DO jj = 1, jpj |
---|
59 | zdum = trn(ji,jj,1,jpsil) * trn(ji,jj,1,jpsil) |
---|
60 | xksimax(ji,jj) = MAX( xksimax(ji,jj), ( 1.+ 7.* zdum / ( xksilim * xksilim + zdum ) ) * 1e-6 ) |
---|
61 | END DO |
---|
62 | END DO |
---|
63 | ! |
---|
64 | IF( nday_year == nyear_len(1) ) THEN |
---|
65 | xksi = xksimax |
---|
66 | xksimax = 0._wp |
---|
67 | ENDIF |
---|
68 | ! |
---|
69 | END SUBROUTINE p4z_int |
---|
70 | |
---|
71 | |
---|
72 | INTEGER FUNCTION p4z_int_alloc() |
---|
73 | !!---------------------------------------------------------------------- |
---|
74 | !! *** ROUTINE p4z_int_alloc *** |
---|
75 | !!---------------------------------------------------------------------- |
---|
76 | ALLOCATE( tgfunc(jpi,jpj,jpk), tgfunc2(jpi,jpj,jpk), STAT=p4z_int_alloc ) |
---|
77 | ! |
---|
78 | IF( p4z_int_alloc /= 0 ) CALL ctl_warn('p4z_int_alloc : failed to allocate arrays.') |
---|
79 | ! |
---|
80 | END FUNCTION p4z_int_alloc |
---|
81 | |
---|
82 | #else |
---|
83 | !!====================================================================== |
---|
84 | !! Dummy module : No PISCES bio-model |
---|
85 | !!====================================================================== |
---|
86 | CONTAINS |
---|
87 | SUBROUTINE p4z_int ! Empty routine |
---|
88 | WRITE(*,*) 'p4z_int: You should not have seen this print! error?' |
---|
89 | END SUBROUTINE p4z_int |
---|
90 | #endif |
---|
91 | |
---|
92 | !!====================================================================== |
---|
93 | END MODULE p4zint |
---|