1 | MODULE solfrac_mod |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE solfrac *** |
---|
4 | !! POSH representation of solar absorbtion (Gntermann, 2009) |
---|
5 | !!===================================================================== |
---|
6 | !! History : ! 11-10 (J. While) Original code |
---|
7 | !!---------------------------------------------------------------------- |
---|
8 | |
---|
9 | !!---------------------------------------------------------------------- |
---|
10 | !! solfrac : function to calculate the solar fraction |
---|
11 | !!---------------------------------------------------------------------- |
---|
12 | |
---|
13 | USE par_kind |
---|
14 | IMPLICIT NONE |
---|
15 | |
---|
16 | !Parameters |
---|
17 | REAL(wp), PRIVATE, PARAMETER, DIMENSION(9) :: & |
---|
18 | & pp_wgt = (/0.2370, 0.36, 0.1790, & |
---|
19 | & 0.087, 0.08, 0.025, & |
---|
20 | & 0.025, 0.007, 0.0004/) |
---|
21 | REAL(wp), PRIVATE, PARAMETER, DIMENSION(9) :: & |
---|
22 | & pp_len = (/34.84, 2.266, 0.0315, & |
---|
23 | & 0.0055, 8.32e-4, 1.26e-4, & |
---|
24 | & 3.13e-4, 7.82e-4, 1.44e-5/) |
---|
25 | |
---|
26 | PUBLIC solfrac |
---|
27 | |
---|
28 | CONTAINS |
---|
29 | |
---|
30 | REAL(dp) FUNCTION solfrac(ptop,pbottom) |
---|
31 | !!---------------------------------------------------------------------- |
---|
32 | !! *** ROUTINE solfrac *** |
---|
33 | !! |
---|
34 | !! ** Purpose : Calculate the solar fraction absorbed between two |
---|
35 | !! layers |
---|
36 | !! |
---|
37 | !! ** Reference : POSH a model of diurnal warming, Gentemann et al, |
---|
38 | !! JGR, 2009 |
---|
39 | !!---------------------------------------------------------------------- |
---|
40 | |
---|
41 | !Dummy variabes |
---|
42 | REAL(wp), INTENT(IN) :: ptop, pbottom !Top and bottom of layer |
---|
43 | |
---|
44 | !local variables |
---|
45 | INTEGER :: jt |
---|
46 | |
---|
47 | !Calculate the solar fraction absorbed between the two layers |
---|
48 | solfrac = 0._wp |
---|
49 | DO jt = 1, 9 |
---|
50 | solfrac = solfrac + pp_wgt(jt) * ( exp ( -ptop / pp_len(jt) ) & |
---|
51 | & - exp ( -pbottom / pp_len(jt) ) ) |
---|
52 | END DO |
---|
53 | |
---|
54 | END FUNCTION |
---|
55 | |
---|
56 | END MODULE solfrac_mod |
---|