/[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.5 - (hide annotations) (download)
Wed Jun 21 19:00:47 2000 UTC (23 years, 11 months ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint29, checkpoint31, checkpoint30
Changes since 1.4: +21 -18 lines
Made jwtype (Jerloff Water type) and internal parameter rather
than an argument. This helps compatibility between MIT/JPL codes.

1 adcroft 1.5 C $Header: $
2 adcroft 1.1
3     #include "CPP_OPTIONS.h"
4    
5     SUBROUTINE SWFRAC(
6 adcroft 1.5 I imax, fact, z,
7 adcroft 1.1 O swdk )
8     C /==========================================================\
9     C | SUBROUTINE SWFRAC |
10     C | Compute fraction of solar short-wave flux penetrating to |
11     C | specified depth, z, due to exponential decay in |
12     C | Jerlov water type jwtype. |
13     C | Reference : Two band solar absorption model of Paulson |
14     C | and Simpson (1977, JPO, 7, 952-956) |
15     C | Notes |
16     C | ===== |
17     C | Below 200m the solar penetration gets set to zero, |
18     C | otherwise the limit for the exponent (+/- 5678) needs to |
19     C | be taken care of. |
20     C | Written by : Jan Morzel |
21     C | Date : July 12, 1995 |
22     C \==========================================================/
23    
24     IMPLICIT NONE
25    
26     C === Routine arguments ===
27    
28     C input arguments
29 adcroft 1.5 C imax number of vertical grid points
30     C fact scale factor to apply to depth array
31     C z vertical depth for desired sw fraction
32     C (fact*z) is negative distance (m) from surface
33     C jwtype index for jerlov water type
34    
35     INTEGER imax
36     _RS fact
37     _RS z(imax)
38 adcroft 1.1
39     C output arguments
40 adcroft 1.5 C swdk short wave (radiation) fractional decay
41     _RS swdk(imax)
42    
43     C === Local variables ===
44 adcroft 1.1
45 adcroft 1.5 C max number of different water types
46     integer nwtype
47     PARAMETER(nwtype = 5)
48 adcroft 1.4
49 adcroft 1.1 _RS facz
50 adcroft 1.5 _RL rfac(nwtype),a1(nwtype),a2(nwtype)
51 adcroft 1.1 INTEGER i
52     C
53     C Jerlov water type : I IA IB II III
54     C jwtype 1 2 3 4 5
55     C
56     DATA rfac / 0.58 , 0.62 , 0.67 , 0.77 , 0.78 /
57     DATA a1 / 0.35 , 0.6 , 1.0 , 1.5 , 1.4 /
58     DATA a2 / 23.0 , 20.0 , 17.0 , 14.0 , 7.9 /
59 adcroft 1.5 INTEGER jwtype
60 adcroft 1.1 C
61 adcroft 1.5 jwtype=1
62 adcroft 1.1 DO i = 1,imax
63     facz = fact*z(i)
64     IF (facz .LT. (-200.)) THEN
65     swdk(i) = 0.
66     ELSE
67     swdk(i) = rfac(jwtype) * exp(facz/a1(jwtype))
68     $ + (1.-rfac(jwtype)) * exp(facz/a2(jwtype))
69     ENDIF
70     ENDDO
71 adcroft 1.4
72 adcroft 1.1 RETURN
73     END

  ViewVC Help
Powered by ViewVC 1.1.22