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

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

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


Revision 1.10 - (show annotations) (download)
Thu Oct 9 04:19:18 2003 UTC (20 years, 7 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint51o_pre, checkpoint51l_post, checkpoint51t_post, checkpoint51n_post, checkpoint51s_post, checkpoint51n_pre, checkpoint51l_pre, checkpoint51q_post, checkpoint51r_post, checkpoint51i_post, checkpoint51o_post, checkpoint51m_post, checkpoint51p_post
Branch point for: branch-nonh, tg2-branch, checkpoint51n_branch
Changes since 1.9: +3 -1 lines
 o first check-in for the "branch-genmake2" merge
 o verification suite as run on shelley (gcc 3.2.2):

Wed Oct  8 23:42:29 EDT 2003
                T           S           U           V
G D M    c        m  s        m  s        m  s        m  s
E p a R  g  m  m  e  .  m  m  e  .  m  m  e  .  m  m  e  .
N n k u  2  i  a  a  d  i  a  a  d  i  a  a  d  i  a  a  d
2 d e n  d  n  x  n  .  n  x  n  .  n  x  n  .  n  x  n  .

OPTFILE=NONE

Y Y Y Y 13 16 16 16  0 16 16 16 16 16 16 16 16 13 12  0  0 pass  adjustment.128x64x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16  0  0 16 16  0  0 pass  adjustment.cs-32x32x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16 22  0 16 16 22  0 pass  adjust_nlfs.cs-32x32x1
Y Y Y Y -- 13 13 16 16 13 13 13 13 16 16 16 16 16 16 16 16 N/O   advect_cs
Y Y Y Y -- 22 16 16 16 16 16 16 13 16 16 16 16 16 16 16 16 N/O   advect_xy
Y Y Y Y -- 13 16 13 16 16 16 16 16 16 16 22 16 16 16 16 16 N/O   advect_xz
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  aim.5l_cs
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 16 16 16 16 13 16 pass  aim.5l_Equatorial_Channel
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 13 16 16 13 13 16 pass  aim.5l_LatLon
Y Y Y Y 13 16 16 16 16 16 16 16 16 16 13 12 13 13 16 13 16 pass  exp0
Y Y Y Y 14 16 16 16 16 16 16 16 22 16 16 16 13 16 16 22 16 pass  exp1
Y Y Y Y 13 13 16 13 16 16 16 16 16 13 13 16 16 13 13 13 13 pass  exp2
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  exp4
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 22 16 16 16 22 16 pass  exp5
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  front_relax
Y Y Y Y 14 16 16 13 13 16 16 13 13 16 13 13 16 12 13 13 16 pass  global_ocean.90x40x15
Y Y Y Y 10 16 16 13 13 16 13 16 16 13 13 13 13 16 16 13 16 FAIL  global_ocean.cs32x15
Y Y Y Y  6 11 12 13 13 12 13 16 13  9  9  9  9 10  9  9 11 FAIL  global_ocean_pressure
Y Y Y Y 14 16 16 13 16 16 16 13 13 13 13 13 16 12 16 13 16 pass  global_with_exf
Y Y Y Y 14 16 16 16 16 16 16 16 16 11 13 22 13 16 16  9 16 pass  hs94.128x64x5
Y Y Y Y 13 16 16 16 16 16 16 16 16 11 16 16 16 13 16 22 13 pass  hs94.1x64x5
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 13 13 16 16 22 13 pass  hs94.cs-32x32x5
Y Y Y Y 10 10 16 13 13 16 16 16 22 16 13 13 13 13 13 22 13 FAIL  ideal_2D_oce
Y Y Y Y  8 16 16 16 16 16 16 16 16 13 13  8 16 16 16 16 16 FAIL  internal_wave
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 13 22 13 13 13 22 16 pass  inverted_barometer
Y Y Y Y 12 16 16 16 16 16 16 16 16 16 13 12 13 13 13 13 13 FAIL  lab_sea
Y Y Y Y 11 16 16 16 16 16 16 16 13 13 13 12 13 16 13 12 13 FAIL  natl_box
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  plume_on_slope
Y Y Y Y 13 16 16 16 16 13 16 16 16 16 16 16 16 13 16 16 16 pass  solid-body.cs-32x32x1

1 C $Header: /u/u3/gcmpack/MITgcm/model/src/swfrac.F,v 1.9.20.1 2003/10/02 18:10:45 edhill Exp $
2 C $Name: $
3
4 #include "PACKAGES_CONFIG.h"
5 #include "CPP_OPTIONS.h"
6
7 CBOP
8 C !ROUTINE: SWFRAC
9 C !INTERFACE:
10 SUBROUTINE SWFRAC(
11 I imax, fact,
12 I mytime, mythid,
13 U swdk )
14 C !DESCRIPTION: \bv
15 C *==========================================================*
16 C | SUBROUTINE SWFRAC
17 C | o Compute solar short-wave flux penetration.
18 C *==========================================================*
19 C | Compute fraction of solar short-wave flux penetrating to
20 C | specified depth, swdk, due to exponential decay in
21 C | Jerlov water type jwtype.
22 C | Reference : Two band solar absorption model of Paulson
23 C | and Simpson (1977, JPO, 7, 952-956)
24 C | Notes
25 C | =====
26 C | Parameter jwtype is hardcoded to 3 for time being.
27 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
37
38 C !INPUT/OUTPUT PARAMETERS:
39 C === Routine arguments ===
40 C input arguments
41 C imax :: number of vertical grid points
42 C fact :: scale factor to apply to depth array
43 C myTime :: current time in simulation
44 C myThid :: thread number for this instance of the routine.
45 INTEGER imax
46 _RL fact
47 _RL mytime
48 integer mythid
49 C input/output arguments
50 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 ===
57 C max number of different water types
58 integer nwtype , jwtype
59 PARAMETER(nwtype=5)
60 _RL facz
61 _RL rfac(nwtype),a1(nwtype),a2(nwtype)
62 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
72 C Jerlov water type : I IA IB II III
73 C jwtype 1 2 3 4 5
74 C
75 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 /
77 DATA a2 / 23.0 , 20.0 , 17.0 , 14.0 , 7.9 /
78 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
92 facz = fact*swdk(i)
93 IF (facz .LT. (-200.)) THEN
94 swdk(i) = 0.
95 ELSE
96 swdk(i) = rfac(jwtype) * exp(facz/a1(jwtype))
97 $ + (1.-rfac(jwtype)) * exp(facz/a2(jwtype))
98 ENDIF
99 ENDDO
100
101 RETURN
102 END

  ViewVC Help
Powered by ViewVC 1.1.22