New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
solfrac_mod.F90 in NEMO/trunk/src/OCE/DIU – NEMO

source: NEMO/trunk/src/OCE/DIU/solfrac_mod.F90 @ 12489

Last change on this file since 12489 was 10069, checked in by nicolasmartin, 6 years ago

Fix mistakes of previous commit on SVN keywords property

  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1MODULE solfrac_mod
2   !!======================================================================
3   !!                    ***  MODULE  solfrac  ***
4   !!     POSH representation of solar absorption (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                                                   
28CONTAINS
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   
56END MODULE solfrac_mod
Note: See TracBrowser for help on using the repository browser.