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

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

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

revision 1.8 by cnh, Sun Feb 4 14:38:48 2001 UTC revision 1.9.20.1 by edhill, Thu Oct 2 18:10:45 2003 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2  C $Name$  C $Name$
3    
4    #include "PACKAGES_CONFIG.h"
5  #include "CPP_OPTIONS.h"  #include "CPP_OPTIONS.h"
6    
7    CBOP
8    C     !ROUTINE: SWFRAC
9    C     !INTERFACE:
10        SUBROUTINE SWFRAC(        SUBROUTINE SWFRAC(
11       I     imax, fact,       I     imax, fact,
12       I     mytime, mythid,       I     mytime, mythid,
13       U     swdk )       U     swdk )
14  C     /==========================================================\  C     !DESCRIPTION: \bv
15  C     | SUBROUTINE SWFRAC                                        |  C     *==========================================================*
16  C     | Compute fraction of solar short-wave flux penetrating to |  C     | SUBROUTINE SWFRAC                                        
17  C     | specified depth, swdk, due to exponential decay in       |  C     | o Compute solar short-wave flux penetration.
18  C     | Jerlov water type jwtype.                                |  C     *==========================================================*
19  C     | Reference : Two band solar absorption model of Paulson   |  C     | Compute fraction of solar short-wave flux penetrating to  
20  C     |             and Simpson (1977, JPO, 7, 952-956)          |  C     | specified depth, swdk, due to exponential decay in        
21  C     | Notes                                                    |  C     | Jerlov water type jwtype.                                
22  C     | =====                                                    |  C     | Reference : Two band solar absorption model of Paulson    
23  C     | Parameter jwtype is hardcoded to 3 for time being.       |  C     |             and Simpson (1977, JPO, 7, 952-956)          
24  C     | Below 200m the solar penetration gets set to zero,       |  C     | Notes                                                    
25  C     | otherwise the limit for the exponent (+/- 5678) needs to |  C     | =====                                                    
26  C     | be taken care of.                                        |  C     | Parameter jwtype is hardcoded to 3 for time being.        
27  C     | Written by   : Jan Morzel                                |  C     | Below 200m the solar penetration gets set to zero,        
28  C     | Date         : July 12, 1995                             |  C     | otherwise the limit for the exponent (+/- 5678) needs to  
29  C     \==========================================================/  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        IMPLICIT NONE
37    
38    C     !INPUT/OUTPUT PARAMETERS:
39  C     === Routine arguments ===  C     === Routine arguments ===
   
40  C     input arguments  C     input arguments
41  C     imax    number of vertical grid points  C     imax    :: number of vertical grid points
42  C     fact    scale  factor to apply to depth array  C     fact    :: scale  factor to apply to depth array
43  C     myTime  current time in simulation  C     myTime  :: current time in simulation
44  C     myThid  thread number for this instance of the routine.  C     myThid  :: thread number for this instance of the routine.
   
45        INTEGER imax        INTEGER imax
46        _RL     fact        _RL     fact
47        _RL     mytime        _RL     mytime
48        integer mythid        integer mythid
   
49  C     input/output arguments  C     input/output arguments
50  C     swdk    on input: vertical depth for desired sw fraction  C     swdk    :: on input: vertical depth for desired sw fraction
51  C             (fact*swdk) is negative distance (m) from surface  C               (fact*swdk) is negative distance (m) from surface
52  C     swdk    on output: short wave (radiation) fractional decay  C     swdk    :: on output: short wave (radiation) fractional decay
53        _RL     swdk(imax)        _RL     swdk(imax)
54    
55    C     !LOCAL VARIABLES:
56  C     === Local variables ===  C     === Local variables ===
   
57  C     max number of different water types  C     max number of different water types
58        integer   nwtype  , jwtype        integer   nwtype  , jwtype
59        PARAMETER(nwtype=5)        PARAMETER(nwtype=5)
   
60        _RL facz        _RL facz
61        _RL rfac(nwtype),a1(nwtype),a2(nwtype)        _RL rfac(nwtype),a1(nwtype),a2(nwtype)
62        INTEGER i        INTEGER i
   
63  #ifdef ALLOW_CALENDAR  #ifdef ALLOW_CALENDAR
64        _RL     fac        _RL     fac
65        logical first, changed        logical first, changed
# Line 63  C     max number of different water type Line 68  C     max number of different water type
68        integer jerl(12)        integer jerl(12)
69        data jerl / 2 , 2 , 2 , 3 , 3 , 3 , 4 , 4 , 4 , 4 , 3 , 2 /        data jerl / 2 , 2 , 2 , 3 , 3 , 3 , 4 , 4 , 4 , 4 , 3 , 2 /
70  #endif /* ALLOW_CALENDAR */  #endif /* ALLOW_CALENDAR */
   
71  C  C
72  C     Jerlov water type :  I       IA      IB      II      III  C     Jerlov water type :  I       IA      IB      II      III
73  C                jwtype    1       2       3       4       5  C                jwtype    1       2       3       4       5
# Line 71  C Line 75  C
75        DATA rfac         /  0.58 ,  0.62 ,  0.67 ,  0.77 ,  0.78 /        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  /        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  /        DATA a2           / 23.0  , 20.0  , 17.0  , 14.0  ,  7.9  /
78  C  CEOP
79    
80  #ifdef ALLOW_CALENDAR  #ifdef ALLOW_CALENDAR
81    ceh3 this should have an IF ( useCALENDAR ) THEN
82        myiter=0        myiter=0
83        call  cal_GetMonthsRec(        call  cal_GetMonthsRec(
84       O     fac, first, changed, count0, count1,       O     fac, first, changed, count0, count1,

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9.20.1

  ViewVC Help
Powered by ViewVC 1.1.22