/[MITgcm]/MITgcm/model/src/swfrac.F
ViewVC logotype

Annotation of /MITgcm/model/src/swfrac.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.8 - (hide annotations) (download)
Sun Feb 4 14:38:48 2001 UTC (23 years, 4 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint40pre3, checkpoint40pre1, checkpoint40pre7, checkpoint40pre6, checkpoint40pre9, checkpoint40pre8, checkpoint38, checkpoint40pre2, checkpoint40pre4, pre38tag1, c37_adj, pre38-close, checkpoint39, checkpoint37, checkpoint36, checkpoint35, checkpoint40pre5, checkpoint40
Branch point for: pre38
Changes since 1.7: +2 -1 lines
Made sure each .F and .h file had
the CVS keywords Header and Name at its start.
Most had header but very few currently have Name, so
lots of changes!

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

  ViewVC Help
Powered by ViewVC 1.1.22