1 |
C /u/gcmpack/models/MITgcmUV/model/src/ini_forcing.F,v 1.15 1998/12/15 00:20:34 adcroft Exp |
C $Header$ |
2 |
|
C $Name$ |
3 |
|
|
4 |
|
#include "PACKAGES_CONFIG.h" |
5 |
#include "CPP_OPTIONS.h" |
#include "CPP_OPTIONS.h" |
6 |
|
|
7 |
C I.Fukumori 8/24/98 |
CBOP |
8 |
CStartOfInterface |
C !ROUTINE: SWFRAC |
9 |
|
C !INTERFACE: |
10 |
SUBROUTINE SWFRAC( |
SUBROUTINE SWFRAC( |
11 |
I imax, fact, z, jwtype, |
I imax, fact, |
12 |
O swdk ) |
I mytime, mythid, |
13 |
C /==========================================================\ |
U swdk ) |
14 |
C | SUBROUTINE SWFRAC | |
C !DESCRIPTION: \bv |
15 |
C | Compute fraction of solar short-wave flux penetrating to | |
C *==========================================================* |
16 |
C | specified depth, z, due to exponential decay in | |
C | SUBROUTINE SWFRAC |
17 |
C | Jerlov water type jwtype. | |
C | o Compute solar short-wave flux penetration. |
18 |
C | Reference : Two band solar absorption model of Paulson | |
C *==========================================================* |
19 |
C | and Simpson (1977, JPO, 7, 952-956) | |
C | Compute fraction of solar short-wave flux penetrating to |
20 |
C | Notes | |
C | specified depth, swdk, due to exponential decay in |
21 |
C | ===== | |
C | Jerlov water type jwtype. |
22 |
C | Below 200m the solar penetration gets set to zero, | |
C | Reference : Two band solar absorption model of Paulson |
23 |
C | otherwise the limit for the exponent (+/- 5678) needs to | |
C | and Simpson (1977, JPO, 7, 952-956) |
24 |
C | be taken care of. | |
C | Notes |
25 |
C | Written by : Jan Morzel | |
C | ===== |
26 |
C | Date : July 12, 1995 | |
C | Parameter jwtype is hardcoded to 3 for time being. |
27 |
C \==========================================================/ |
C | Below 200m the solar penetration gets set to zero, |
28 |
|
C | otherwise the limit for the exponent (+/- 5678) needs to |
29 |
|
C | be taken care of. |
30 |
|
C | Written by : Jan Morzel |
31 |
|
C | Date : July 12, 1995 |
32 |
|
C *==========================================================* |
33 |
|
C \ev |
34 |
|
|
35 |
|
C !USES: |
36 |
IMPLICIT NONE |
IMPLICIT NONE |
37 |
|
|
38 |
integer nwtype |
C !INPUT/OUTPUT PARAMETERS: |
|
PARAMETER(nwtype=5) ! max number of different water types |
|
|
|
|
39 |
C === Routine arguments === |
C === Routine arguments === |
|
|
|
40 |
C input arguments |
C input arguments |
41 |
INTEGER imax ! number of vertical grid points |
C imax :: number of vertical grid points |
42 |
_RS fact ! scale factor to apply to depth array |
C fact :: scale factor to apply to depth array |
43 |
_RS z(imax) ! vertical depth for desired sw fraction |
C myTime :: current time in simulation |
44 |
! (fact*z) is negative distance (m) from surface |
C myThid :: thread number for this instance of the routine. |
45 |
INTEGER jwtype ! index for jerlov water type |
INTEGER imax |
46 |
|
_RL fact |
47 |
C output arguments |
_RL mytime |
48 |
_RS swdk(imax) ! short wave (radiation) fractional decay |
integer mythid |
49 |
|
C input/output arguments |
50 |
#ifdef ALLOW_KPP |
C swdk :: on input: vertical depth for desired sw fraction |
51 |
|
C (fact*swdk) is negative distance (m) from surface |
52 |
|
C swdk :: on output: short wave (radiation) fractional decay |
53 |
|
_RL swdk(imax) |
54 |
|
|
55 |
|
C !LOCAL VARIABLES: |
56 |
C === Local variables === |
C === Local variables === |
57 |
_RS facz |
C max number of different water types |
58 |
_RS rfac(nwtype),a1(nwtype),a2(nwtype) |
integer nwtype , jwtype |
59 |
|
PARAMETER(nwtype=5) |
60 |
|
_RL facz |
61 |
|
_RL rfac(nwtype),a1(nwtype),a2(nwtype) |
62 |
INTEGER i |
INTEGER i |
63 |
|
#ifdef ALLOW_CALENDAR |
64 |
|
_RL fac |
65 |
|
logical first, changed |
66 |
|
integer count0, count1 |
67 |
|
integer myiter |
68 |
|
integer jerl(12) |
69 |
|
data jerl / 2 , 2 , 2 , 3 , 3 , 3 , 4 , 4 , 4 , 4 , 3 , 2 / |
70 |
|
#endif /* ALLOW_CALENDAR */ |
71 |
C |
C |
72 |
C Jerlov water type : I IA IB II III |
C Jerlov water type : I IA IB II III |
73 |
C jwtype 1 2 3 4 5 |
C jwtype 1 2 3 4 5 |
75 |
DATA rfac / 0.58 , 0.62 , 0.67 , 0.77 , 0.78 / |
DATA rfac / 0.58 , 0.62 , 0.67 , 0.77 , 0.78 / |
76 |
DATA a1 / 0.35 , 0.6 , 1.0 , 1.5 , 1.4 / |
DATA a1 / 0.35 , 0.6 , 1.0 , 1.5 , 1.4 / |
77 |
DATA a2 / 23.0 , 20.0 , 17.0 , 14.0 , 7.9 / |
DATA a2 / 23.0 , 20.0 , 17.0 , 14.0 , 7.9 / |
78 |
C |
CEOP |
79 |
|
|
80 |
|
#ifdef ALLOW_CALENDAR |
81 |
|
ceh3 this should have an IF ( useCALENDAR ) THEN |
82 |
|
myiter=0 |
83 |
|
call cal_GetMonthsRec( |
84 |
|
O fac, first, changed, count0, count1, |
85 |
|
I mytime, myiter, mythid ) |
86 |
|
jwtype=jerl(count0) |
87 |
|
#else /* ALLOW_CALENDAR undef */ |
88 |
|
jwtype=2 |
89 |
|
#endif /* ALLOW_CALENDAR */ |
90 |
|
|
91 |
DO i = 1,imax |
DO i = 1,imax |
92 |
facz = fact*z(i) |
facz = fact*swdk(i) |
93 |
IF (facz .LT. (-200.)) THEN |
IF (facz .LT. (-200.)) THEN |
94 |
swdk(i) = 0. |
swdk(i) = 0. |
95 |
ELSE |
ELSE |
98 |
ENDIF |
ENDIF |
99 |
ENDDO |
ENDDO |
100 |
|
|
|
#endif |
|
|
|
|
101 |
RETURN |
RETURN |
102 |
END |
END |