/[MITgcm]/MITgcm/pkg/shelfice/shelfice_forcing.F
ViewVC logotype

Annotation of /MITgcm/pkg/shelfice/shelfice_forcing.F

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


Revision 1.1 - (hide annotations) (download)
Tue Feb 7 11:45:21 2006 UTC (18 years, 4 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint58e_post, checkpoint58n_post, checkpoint58h_post, checkpoint58j_post, checkpoint58f_post, checkpoint58d_post, checkpoint58c_post, checkpoint58a_post, checkpoint58i_post, checkpoint58g_post, checkpoint58k_post, checkpoint58b_post, checkpoint58m_post
o add new package shelfice

1 mlosch 1.1 C $Header: $
2     C $Name: $
3    
4     #include "PACKAGES_CONFIG.h"
5     #include "CPP_OPTIONS.h"
6    
7     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
8     CBOP
9     C !ROUTINE: SHELFICE_FORCING_T
10     C !INTERFACE:
11     SUBROUTINE SHELFICE_FORCING_T(
12     I iMin,iMax, jMin,jMax, bi,bj, kLev,
13     I myTime, myThid )
14     C !DESCRIPTION: \bv
15     C *==========================================================*
16     C | S/R SHELFICE_FORCING_T
17     C | o Contains problem specific forcing for temperature.
18     C *==========================================================*
19     C | Adds terms to gT for forcing by shelfice sources
20     C | e.g. heat flux
21     C *==========================================================*
22     C \ev
23    
24     C !USES:
25     IMPLICIT NONE
26     C == Global data ==
27     #include "SIZE.h"
28     #include "EEPARAMS.h"
29     #include "PARAMS.h"
30     #include "GRID.h"
31     #include "DYNVARS.h"
32     #include "FFIELDS.h"
33     #include "SHELFICE.h"
34    
35     C !INPUT/OUTPUT PARAMETERS:
36     C == Routine arguments ==
37     C iMin,iMax :: Working range of x-index for applying forcing.
38     C jMin,jMax :: Working range of y-index for applying forcing.
39     C bi,bj :: Current tile indices
40     C kLev :: Current vertical level index
41     C myTime :: Current time in simulation
42     C myThid :: Thread Id number
43     INTEGER iMin, iMax, jMin, jMax, kLev, bi, bj
44     _RL myTime
45     INTEGER myThid
46    
47     #ifdef ALLOW_SHELFICE
48     C !LOCAL VARIABLES:
49     C == Local variables ==
50     C i,j :: Loop counters
51     C kSurface :: index of surface layer
52     INTEGER i, j
53     INTEGER kSurface
54     CEOP
55    
56     IF ( fluidIsAir ) THEN
57     kSurface = 0
58     ELSEIF ( usingPCoords ) THEN
59     kSurface = Nr
60     ELSE
61     kSurface = 1
62     ENDIF
63    
64     C-- Forcing term
65     DO j=1,sNy
66     DO i=1,sNx
67     IF ( kLev .EQ. kTopC(I,J,bi,bj) ) THEN
68     gT(i,j,kLev,bi,bj)=gT(i,j,kLev,bi,bj)
69     & +shelficeForcingT(i,j,bi,bj)
70     & *recip_drF(kLev)*recip_hFacC(i,j,kLev,bi,bj)
71     ENDIF
72     ENDDO
73     ENDDO
74    
75     #endif /* ALLOW_SHELFICE */
76     RETURN
77     END
78    
79     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
80     CBOP
81     C !ROUTINE: SHELFICE_FORCING_S
82     C !INTERFACE:
83     SUBROUTINE SHELFICE_FORCING_S(
84     I iMin,iMax, jMin,jMax, bi,bj, kLev,
85     I myTime, myThid )
86    
87     C !DESCRIPTION: \bv
88     C *==========================================================*
89     C | S/R SHELFICE_FORCING_S
90     C | o Contains problem specific forcing for merid velocity.
91     C *==========================================================*
92     C | Adds terms to gS for forcing by shelfice sources
93     C | e.g. fresh-water flux (virtual salt flux).
94     C *==========================================================*
95     C \ev
96    
97     C !USES:
98     IMPLICIT NONE
99     C == Global data ==
100     #include "SIZE.h"
101     #include "EEPARAMS.h"
102     #include "PARAMS.h"
103     #include "GRID.h"
104     #include "DYNVARS.h"
105     C#include "FFIELDS.h"
106     #include "SHELFICE.h"
107    
108     C !INPUT/OUTPUT PARAMETERS:
109     C == Routine arguments ==
110     C iMin,iMax :: Working range of x-index for applying forcing.
111     C jMin,jMax :: Working range of y-index for applying forcing.
112     C bi,bj :: Current tile indices
113     C kLev :: Current vertical level index
114     C myTime :: Current time in simulation
115     C myThid :: Thread Id number
116     INTEGER iMin, iMax, jMin, jMax, kLev, bi, bj
117     _RL myTime
118     INTEGER myThid
119    
120     #ifdef ALLOW_SHELFICE
121     C !LOCAL VARIABLES:
122     C == Local variables ==
123     C i,j :: Loop counters
124     C kSurface :: index of surface layer
125     INTEGER i, j
126     INTEGER kSurface
127     CEOP
128    
129     IF ( fluidIsAir ) THEN
130     kSurface = 0
131     ELSEIF ( usingPCoords ) THEN
132     kSurface = Nr
133     ELSE
134     kSurface = 1
135     ENDIF
136    
137     C-- Forcing term
138     DO j=1,sNy
139     DO i=1,sNx
140     IF ( kLev .EQ. kTopC(I,J,bi,bj) ) THEN
141     gS(i,j,kLev,bi,bj)=gS(i,j,kLev,bi,bj)
142     & +shelficeForcingS(i,j,bi,bj)
143     & *recip_drF(kLev)*recip_hFacC(i,j,kLev,bi,bj)
144     ENDIF
145     ENDDO
146     ENDDO
147    
148     #endif /* ALLOW_SHELFICE */
149     RETURN
150     END

  ViewVC Help
Powered by ViewVC 1.1.22