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

Annotation of /MITgcm/model/src/plumefrac.F

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


Revision 1.3 - (hide annotations) (download)
Wed Nov 28 00:18:17 2007 UTC (16 years, 6 months ago) by dimitri
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
added pkg/salt_plume by gathering code, which were previously
spread around various files in model/inc and model/src
results remain numerically identical to before, as a first step
towards adding more options, etc., to this package

1 dimitri 1.3 C $Header: /u/gcmpack/MITgcm/model/src/plumefrac.F,v 1.2 2007/09/24 01:17:26 dimitri Exp $
2 dimitri 1.1 C $Name: $
3    
4     #include "PACKAGES_CONFIG.h"
5     #include "CPP_OPTIONS.h"
6    
7     CBOP
8     C !ROUTINE: PLUMEFRAC
9     C !INTERFACE:
10     SUBROUTINE PLUMEFRAC(
11     I imax, fact,SPDepth,
12     U plumek,
13     I myTime, myIter, myThid )
14     C !DESCRIPTION: \bv
15     C *==========================================================*
16     C | SUBROUTINE PLUMEFRAC
17     C | o Compute saltplume penetration.
18     C *==========================================================*
19     C | Compute fraction of saltplume (flux) penetrating to
20     C | specified depth, plumek, due to rejected salt
21     C | during freezing.
22     C | For example, if surface value is Saltplume0,
23     C | and each level gets equal fraction 1/5 down to SPDepth=5,
24     C | PLUMEFRAC will report plumek = 4/5 on output if the input
25     C | plumek = 1. Else, output plumek = 0.
26     C | Reference : Duffy et al, (GRL 1999)
27     C |
28     C |
29     C | =====
30     C | Written by : ATN (based on SWFRAC)
31     C | Date : Sep 13, 2007
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 SPDpeth :: corresponding SaltPlumeDepth(i,j) at this grid point
44     C myTime :: Current time in simulation
45     C myIter :: Current iteration number in simulation
46     C myThid :: My Thread Id. number
47     INTEGER imax
48     _RL fact
49     _RL myTime
50     INTEGER myIter
51     INTEGER myThid
52     C input/output arguments
53     C plumek :: on input: vertical depth for desired plume fraction
54     C (fact*plumek) is negative distance (m) from surface
55     C plumek :: on output: saltplume contribution fraction
56     _RL plumek(imax), SPDepth(imax)
57    
58 dimitri 1.2 #ifdef ALLOW_SALT_PLUME
59 dimitri 1.1 C !LOCAL VARIABLES:
60     C === Local variables ===
61     _RL facz
62     INTEGER i
63 dimitri 1.2 _RL one , tinee
64     parameter( one = 1. _d 0, tinee = 1.e-1)
65 dimitri 1.1 #ifdef ALLOW_CAL
66     LOGICAL first, changed
67     INTEGER count0, count1
68     #endif /* ALLOW_CAL */
69     CEOP
70    
71     #ifdef ALLOW_CAL
72     ceh3 this should have an IF ( useCALENDAR ) THEN
73     CML(
74     C myIter = 0 makes cal_getMonthsRec always return count0=12
75     C so that jerl(count0) = 2.
76     C The following lines are meant to be an example of how to
77     C include time dependent water types. However, it would probably
78     C make more sense to first think about a regionally varying
79     C water type before implementing a time dependence.
80     CML CALL cal_GetMonthsRec(
81     CML O fac, first, changed, count0, count1,
82     CML I myTime, myIter, myThid )
83     CML jwtype=jerl(count0)
84     CML)
85     #else /* ALLOW_CAL undef */
86     #endif /* ALLOW_CAL */
87    
88     DO i = 1,imax
89     facz = abs(fact*plumek(i))
90     IF (SPDepth(i).GT.facz .AND. SPDepth(i).GT.tinee) THEN
91 dimitri 1.2 plumek(i) = one - min(one,facz/abs(SPDepth(i)))
92 dimitri 1.1 ELSE
93     plumek(i) = 0.
94     ENDIF
95     ENDDO
96    
97 dimitri 1.2 #endif /* ALLOW_SALT_PLUME */
98    
99 dimitri 1.1 RETURN
100     END

  ViewVC Help
Powered by ViewVC 1.1.22