/[MITgcm]/MITgcm/verification/hs94.128x64x5/code/external_forcing.F
ViewVC logotype

Contents of /MITgcm/verification/hs94.128x64x5/code/external_forcing.F

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


Revision 1.7 - (show annotations) (download)
Wed May 1 00:56:11 2002 UTC (22 years ago) by jmc
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint51k_post, checkpoint47e_post, checkpoint52l_pre, checkpoint46l_post, checkpoint57g_pre, checkpoint46g_pre, checkpoint47c_post, checkpoint50c_post, checkpoint57b_post, checkpoint46f_post, checkpoint57g_post, checkpoint48e_post, checkpoint56b_post, checkpoint50c_pre, checkpoint46b_post, checkpoint52j_pre, checkpoint51o_pre, checkpoint54d_post, checkpoint54e_post, checkpoint51l_post, checkpoint48i_post, checkpoint46l_pre, checkpoint57d_post, checkpoint57i_post, checkpoint50d_pre, checkpoint52k_post, checkpoint55, checkpoint54, checkpoint57, checkpoint56, checkpoint51, checkpoint50, checkpoint53, checkpoint52, checkpoint50d_post, checkpoint52f_post, checkpoint50b_pre, checkpoint54f_post, checkpoint51f_post, checkpoint48b_post, checkpoint51d_post, checkpoint48c_pre, checkpoint47d_pre, checkpoint51t_post, checkpoint51n_post, checkpoint55i_post, checkpoint57l_post, checkpoint52i_pre, checkpoint51s_post, checkpoint47a_post, checkpoint55c_post, checkpoint48d_pre, checkpoint51j_post, checkpoint47i_post, checkpoint52e_pre, checkpoint57f_post, checkpoint52e_post, checkpoint51n_pre, checkpoint47d_post, checkpoint53d_post, checkpoint46d_pre, checkpoint57a_post, checkpoint48d_post, checkpoint57h_pre, checkpoint48f_post, checkpoint45d_post, checkpoint52b_pre, checkpoint54b_post, checkpoint46j_pre, checkpoint57h_post, checkpoint51l_pre, checkpoint52m_post, checkpoint55g_post, checkpoint48h_post, checkpoint51q_post, checkpoint51b_pre, checkpoint46a_post, checkpoint47g_post, checkpoint52b_post, checkpoint52c_post, checkpoint46j_post, checkpoint51h_pre, checkpoint46k_post, checkpoint46b_pre, checkpoint48a_post, checkpoint45a_post, checkpoint57c_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, checkpoint52f_pre, checkpoint55d_post, checkpoint47j_post, checkpoint54a_pre, checkpoint53c_post, checkpoint55d_pre, checkpoint57c_pre, checkpoint55j_post, branch-exfmods-tag, branchpoint-genmake2, checkpoint54a_post, checkpoint46e_pre, checkpoint55h_post, checkpoint51r_post, checkpoint48c_post, checkpoint45b_post, checkpoint51i_post, checkpoint57e_post, checkpoint55b_post, checkpoint51b_post, checkpoint51c_post, checkpoint46c_pre, checkpoint53a_post, checkpoint46, checkpoint47b_post, checkpoint55f_post, checkpoint46h_pre, checkpoint52d_post, checkpoint53g_post, checkpoint46m_post, checkpoint46a_pre, checkpoint50g_post, checkpoint45c_post, eckpoint57e_pre, checkpoint46g_post, checkpoint52a_pre, checkpoint50h_post, checkpoint52i_post, checkpoint50e_pre, checkpoint50i_post, checkpoint51i_pre, checkpoint52h_pre, checkpoint56a_post, checkpoint53f_post, checkpoint57h_done, checkpoint52j_post, checkpoint47f_post, checkpoint50e_post, checkpoint46i_post, checkpoint57j_post, checkpoint57f_pre, checkpoint46c_post, branch-netcdf, checkpoint52l_post, checkpoint52n_post, checkpoint53b_pre, checkpoint46e_post, checkpoint56c_post, checkpoint51e_post, checkpoint57a_pre, checkpoint55a_post, checkpoint47, checkpoint48, checkpoint49, checkpoint46h_post, checkpoint51o_post, checkpoint57k_post, checkpoint51f_pre, checkpoint53b_post, checkpoint47h_post, checkpoint52a_post, checkpoint51g_post, ecco_c52_e35, checkpoint46d_post, checkpoint50b_post, checkpoint51m_post, checkpoint53d_pre, checkpoint55e_post, checkpoint54c_post, checkpoint51a_post, checkpoint51p_post, checkpoint48g_post, checkpoint51u_post
Branch point for: branch-exfmods-curt, branch-genmake2, branch-nonh, tg2-branch, netcdf-sm0, checkpoint51n_branch
Changes since 1.6: +39 -51 lines
make external_forcing.F compatible with partial cell (copied from hs94.cs)
and reduce Olx,Oly from 5 to 3.

1 C $Header: /u/gcmpack/MITgcm/verification/hs94.128x64x5/code/external_forcing.F,v 1.6 2001/06/06 16:59:07 adcroft Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 CStartOfInterface
7 SUBROUTINE EXTERNAL_FORCING_U(
8 I iMin, iMax, jMin, jMax,bi,bj,kLev,
9 I myCurrentTime,myThid)
10 C /==========================================================\
11 C | S/R EXTERNAL_FORCING_U |
12 C | o Contains problem specific forcing for zonal velocity. |
13 C |==========================================================|
14 C | Adds terms to gU for forcing by external sources |
15 C | e.g. wind stress, bottom friction etc.................. |
16 C \==========================================================/
17 IMPLICIT NONE
18
19 C == Global data ==
20 #include "SIZE.h"
21 #include "EEPARAMS.h"
22 #include "PARAMS.h"
23 #include "GRID.h"
24 #include "DYNVARS.h"
25 #include "FFIELDS.h"
26
27 C == Routine arguments ==
28 C iMin - Working range of tile for applying forcing.
29 C iMax
30 C jMin
31 C jMax
32 C kLev
33 INTEGER iMin, iMax, jMin, jMax, kLev, bi, bj
34 _RL myCurrentTime
35 INTEGER myThid
36 CEndOfInterface
37
38 C == Local variables ==
39 C Loop counters
40 INTEGER I, J
41 _RL recip_P0g,termP,kV,kF,sigma_b
42
43 C-- Forcing term(s)
44 kF=1. _d 0/86400. _d 0
45 sigma_b = 0.7 _d 0
46 c DO J=jMin,jMax
47 c DO I=iMin,iMax
48 DO J=1,sNy
49 DO I=1,sNx+1
50 IF ( hFacW(i,j,kLev,bi,bj) .GT. 0. ) THEN
51 recip_P0g=MAX(recip_Rcol(I,J,bi,bj),recip_Rcol(I-1,J,bi,bj))
52 termP=0.5 _d 0*( MIN(rF(kLev)*recip_P0g,1. _d 0)
53 & +rF(kLev+1)*recip_P0g )
54 kV=kF*MAX( 0. _d 0, (termP-sigma_b)/(1. _d 0-sigma_b) )
55 gU(i,j,kLev,bi,bj)=gU(i,j,kLev,bi,bj)
56 & -kV*uVel(i,j,kLev,bi,bj)
57 ENDIF
58 ENDDO
59 ENDDO
60
61 RETURN
62 END
63 CStartOfInterface
64 SUBROUTINE EXTERNAL_FORCING_V(
65 I iMin, iMax, jMin, jMax,bi,bj,kLev,
66 I myCurrentTime,myThid)
67 C /==========================================================\
68 C | S/R EXTERNAL_FORCING_V |
69 C | o Contains problem specific forcing for merid velocity. |
70 C |==========================================================|
71 C | Adds terms to gV for forcing by external sources |
72 C | e.g. wind stress, bottom friction etc.................. |
73 C \==========================================================/
74 IMPLICIT NONE
75
76 C == Global data ==
77 #include "SIZE.h"
78 #include "EEPARAMS.h"
79 #include "PARAMS.h"
80 #include "GRID.h"
81 #include "DYNVARS.h"
82 #include "FFIELDS.h"
83
84
85 C == Routine arguments ==
86 C iMin - Working range of tile for applying forcing.
87 C iMax
88 C jMin
89 C jMax
90 C kLev
91 INTEGER iMin, iMax, jMin, jMax, kLev, bi, bj
92 _RL myCurrentTime
93 INTEGER myThid
94 CEndOfInterface
95 C == Local variables ==
96 C Loop counters
97 INTEGER I, J
98 _RL recip_P0g,termP,kV,kF,sigma_b
99
100 C-- Forcing term(s)
101 kF=1. _d 0/86400. _d 0
102 sigma_b = 0.7 _d 0
103 c DO J=jMin,jMax
104 c DO I=iMin,iMax
105 DO J=1,sNy+1
106 DO I=1,sNx
107 IF ( hFacS(i,j,kLev,bi,bj) .GT. 0. ) THEN
108 recip_P0g=MAX(recip_Rcol(I,J,bi,bj),recip_Rcol(I,J-1,bi,bj))
109 termP=0.5 _d 0*( MIN(rF(kLev)*recip_P0g,1. _d 0)
110 & +rF(kLev+1)*recip_P0g )
111 kV=kF*MAX( 0. _d 0, (termP-sigma_b)/(1. _d 0-sigma_b) )
112 gV(i,j,kLev,bi,bj)=gV(i,j,kLev,bi,bj)
113 & -kV*vVel(i,j,kLev,bi,bj)
114 ENDIF
115 ENDDO
116 ENDDO
117
118 RETURN
119 END
120 CStartOfInterface
121 SUBROUTINE EXTERNAL_FORCING_T(
122 I iMin, iMax, jMin, jMax,bi,bj,kLev,
123 I myCurrentTime,myThid)
124 C /==========================================================\
125 C | S/R EXTERNAL_FORCING_T |
126 C | o Contains problem specific forcing for temperature. |
127 C |==========================================================|
128 C | Adds terms to gT for forcing by external sources |
129 C | e.g. heat flux, climatalogical relaxation.............. |
130 C \==========================================================/
131 IMPLICIT NONE
132
133 C == Global data ==
134 #include "SIZE.h"
135 #include "EEPARAMS.h"
136 #include "PARAMS.h"
137 #include "GRID.h"
138 #include "DYNVARS.h"
139 #include "FFIELDS.h"
140
141 C == Routine arguments ==
142 C iMin - Working range of tile for applying forcing.
143 C iMax
144 C jMin
145 C jMax
146 C kLev
147 INTEGER iMin, iMax, jMin, jMax, kLev, bi, bj
148 _RL myCurrentTime
149 INTEGER myThid
150 CEndOfInterface
151
152 C == Local variables ==
153 C Loop counters
154 INTEGER I, J
155 _RL thetaLim,kT,ka,ks,sigma_b,term1,term2,thetaEq,termP
156
157 C-- Forcing term(s)
158 ka=1. _d 0/(40. _d 0*86400. _d 0)
159 ks=1. _d 0/(4. _d 0 *86400. _d 0)
160 sigma_b = 0.7 _d 0
161 DO J=jMin,jMax
162 DO I=iMin,iMax
163 term1=60. _d 0*(sin(yC(I,J,bi,bj)*deg2rad)**2)
164 termP=0.5 _d 0*( rF(kLev) + rF(kLev+1) )
165 term2=10. _d 0*log(termP/atm_po)
166 & *(cos(yC(I,J,bi,bj)*deg2rad)**2)
167 thetaLim = 200. _d 0/ ((termP/atm_po)**atm_kappa)
168 thetaEq=315. _d 0-term1-term2
169 thetaEq=MAX(thetaLim,thetaEq)
170 termP=0.5 _d 0*( MIN(rF(kLev),Ro_surf(I,J,bi,bj))+rF(kLev+1) )
171 kT=ka+(ks-ka)
172 & *MAX(0. _d 0,
173 & (termP*recip_Rcol(I,J,bi,bj)-sigma_b)/(1. _d 0-sigma_b) )
174 & *COS((yC(I,J,bi,bj)*deg2rad))**4
175 gT(i,j,kLev,bi,bj)=gT(i,j,kLev,bi,bj)
176 & - kT*( theta(I,J,kLev,bi,bj)-thetaEq )
177 & *maskC(i,j,kLev,bi,bj)
178 ENDDO
179 ENDDO
180
181 RETURN
182 END
183 CStartOfInterface
184 SUBROUTINE EXTERNAL_FORCING_S(
185 I iMin, iMax, jMin, jMax,bi,bj,kLev,
186 I myCurrentTime,myThid)
187 C /==========================================================\
188 C | S/R EXTERNAL_FORCING_S |
189 C | o Contains problem specific forcing for merid velocity. |
190 C |==========================================================|
191 C | Adds terms to gS for forcing by external sources |
192 C | e.g. fresh-water flux, climatalogical relaxation....... |
193 C \==========================================================/
194 IMPLICIT NONE
195
196 C == Global data ==
197 #include "SIZE.h"
198 #include "EEPARAMS.h"
199 #include "PARAMS.h"
200 #include "GRID.h"
201 #include "DYNVARS.h"
202 #include "FFIELDS.h"
203
204 C == Routine arguments ==
205 C iMin - Working range of tile for applying forcing.
206 C iMax
207 C jMin
208 C jMax
209 C kLev
210 INTEGER iMin, iMax, jMin, jMax, kLev, bi, bj
211 _RL myCurrentTime
212 INTEGER myThid
213 CEndOfInterface
214
215 C == Local variables ==
216 C Loop counters
217 INTEGER I, J
218
219 C-- Forcing term(s)
220
221 RETURN
222 END

  ViewVC Help
Powered by ViewVC 1.1.22