/[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.9 - (hide annotations) (download)
Wed Sep 26 18:09:16 2001 UTC (22 years, 8 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint47e_post, checkpoint44e_post, checkpoint46l_post, checkpoint46g_pre, checkpoint47c_post, release1_p13_pre, checkpoint50c_post, checkpoint46f_post, checkpoint48e_post, checkpoint50c_pre, checkpoint44f_post, checkpoint46b_post, checkpoint43a-release1mods, ecco_c50_e32, ecco_c50_e33, ecco_c50_e30, ecco_c50_e31, release1_p13, checkpoint48i_post, checkpoint46l_pre, chkpt44d_post, checkpoint51, checkpoint50, release1_p8, release1_p9, checkpoint50d_post, release1_p1, release1_p2, release1_p3, release1_p4, release1_p5, release1_p6, release1_p7, checkpoint50b_pre, checkpoint44e_pre, checkpoint51f_post, release1_b1, ecco_c51_e34d, ecco_c51_e34e, ecco_c51_e34f, ecco_c51_e34g, ecco_c51_e34a, ecco_c51_e34b, ecco_c51_e34c, checkpoint48b_post, checkpoint43, checkpoint51d_post, checkpoint48c_pre, checkpoint47d_pre, release1_chkpt44d_post, checkpoint47a_post, checkpoint48d_pre, checkpoint51j_post, checkpoint47i_post, release1_p11, checkpoint47d_post, icebear5, icebear4, icebear3, icebear2, checkpoint46d_pre, checkpoint48d_post, release1-branch_tutorials, checkpoint48f_post, checkpoint45d_post, checkpoint46j_pre, chkpt44a_post, checkpoint44h_pre, checkpoint48h_post, ecco_c50_e29, checkpoint51b_pre, checkpoint46a_post, checkpoint47g_post, checkpoint46j_post, checkpoint51h_pre, checkpoint46k_post, ecco_c50_e28, chkpt44c_pre, checkpoint48a_post, checkpoint45a_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, ecco_c44_e19, ecco_c44_e18, ecco_c44_e17, ecco_c44_e16, release1_p12, release1_p10, release1_p16, release1_p17, release1_p14, release1_p15, checkpoint47j_post, ecco_c50_e33a, checkpoint44g_post, branchpoint-genmake2, checkpoint46e_pre, checkpoint48c_post, checkpoint45b_post, checkpoint46b_pre, release1-branch-end, release1_final_v1, checkpoint51b_post, checkpoint51c_post, checkpoint46c_pre, checkpoint46, checkpoint47b_post, checkpoint44b_post, ecco_c51_e34, checkpoint46h_pre, checkpoint46m_post, checkpoint46a_pre, checkpoint50g_post, checkpoint45c_post, ecco_ice2, ecco_ice1, checkpoint44h_post, checkpoint46g_post, release1_p12_pre, ecco_c44_e22, checkpoint50h_post, checkpoint50e_pre, checkpoint50i_post, ecco_c44_e25, checkpoint51i_pre, checkpoint47f_post, checkpoint50e_post, chkpt44a_pre, checkpoint46i_post, ecco_c44_e23, ecco_c44_e20, ecco_c44_e21, ecco_c44_e26, ecco_c44_e27, ecco_c44_e24, checkpoint46c_post, ecco-branch-mod1, ecco-branch-mod2, ecco-branch-mod3, ecco-branch-mod4, ecco-branch-mod5, checkpoint50d_pre, checkpoint46e_post, release1_beta1, checkpoint51e_post, checkpoint44b_pre, checkpoint42, checkpoint41, checkpoint47, checkpoint44, checkpoint45, checkpoint48, checkpoint49, checkpoint46h_post, checkpoint51f_pre, chkpt44c_post, checkpoint48g_post, checkpoint47h_post, checkpoint44f_pre, checkpoint51g_post, checkpoint46d_post, checkpoint50b_post, release1-branch_branchpoint, checkpoint51a_post
Branch point for: c24_e25_ice, branch-exfmods-curt, release1_final, release1-branch, branch-genmake2, release1, ecco-branch, release1_50yr, icebear, release1_coupled
Changes since 1.8: +37 -33 lines
Bringing comments up to data and formatting for document extraction.

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

  ViewVC Help
Powered by ViewVC 1.1.22