/[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.4 - (hide annotations) (download)
Tue Mar 14 20:28:16 2000 UTC (24 years, 2 months ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint28, checkpoint25, checkpoint27, checkpoint26
Changes since 1.3: +4 -2 lines
Minor mods for compiling on T3E.

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

  ViewVC Help
Powered by ViewVC 1.1.22