/[MITgcm]/MITgcm/pkg/ocn_compon_interf/ocn_apply_import.F
ViewVC logotype

Contents of /MITgcm/pkg/ocn_compon_interf/ocn_apply_import.F

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


Revision 1.3 - (show annotations) (download)
Mon Jul 26 20:13:47 2004 UTC (19 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint57t_post, checkpoint57o_post, checkpoint58e_post, checkpoint57v_post, checkpoint58u_post, checkpoint58w_post, checkpoint57m_post, checkpoint55c_post, checkpoint54e_post, checkpoint57s_post, checkpoint57k_post, checkpoint55d_pre, checkpoint57d_post, checkpoint57g_post, checkpoint57b_post, checkpoint57c_pre, checkpoint58r_post, checkpoint55j_post, checkpoint56b_post, checkpoint57i_post, checkpoint57y_post, checkpoint57e_post, checkpoint55h_post, checkpoint58n_post, checkpoint58x_post, checkpoint57g_pre, checkpoint55b_post, checkpoint58t_post, checkpoint58h_post, checkpoint54d_post, checkpoint56c_post, checkpoint57y_pre, checkpoint55, checkpoint57f_pre, checkpoint57a_post, checkpoint58q_post, checkpoint54f_post, checkpoint55g_post, checkpoint58j_post, checkpoint55f_post, checkpoint57r_post, checkpoint59, checkpoint58, checkpoint57a_pre, checkpoint55i_post, checkpoint57, checkpoint56, eckpoint57e_pre, checkpoint57h_done, checkpoint58f_post, checkpoint57x_post, checkpoint57n_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint57f_post, checkpoint58a_post, checkpoint58i_post, checkpoint57q_post, checkpoint58g_post, checkpoint58o_post, checkpoint57z_post, checkpoint57c_post, checkpoint58y_post, checkpoint55e_post, checkpoint58k_post, checkpoint58v_post, checkpoint55a_post, checkpoint58s_post, checkpoint58p_post, checkpoint57j_post, checkpoint58b_post, checkpoint57h_pre, checkpoint58m_post, checkpoint57l_post, checkpoint57h_post, checkpoint56a_post, checkpoint55d_post
Changes since 1.2: +56 -33 lines
update coupling interface to work with new staggerTimeStep

1 C $Header: /u/gcmpack/MITgcm/pkg/ocn_compon_interf/ocn_apply_import.F,v 1.2 2004/05/21 19:42:26 jmc Exp $
2 C $Name: $
3
4 #include "PACKAGES_CONFIG.h"
5 #include "CPP_OPTIONS.h"
6
7 CBOP
8 C !ROUTINE: OCN_APPLY_IMPORT
9 C !INTERFACE:
10 SUBROUTINE OCN_APPLY_IMPORT(
11 I apply2AllFields, myTime, myIter, myThid )
12 C !DESCRIPTION: \bv
13 C *==========================================================*
14 C | SUBROUTINE OCN_APPLY_IMPORT
15 C | o Apply imported coupling data to forcing fields
16 C *==========================================================*
17 C *==========================================================*
18 C \ev
19
20 C !USES:
21 IMPLICIT NONE
22 C === Global variables ===
23 #include "SIZE.h"
24 #include "EEPARAMS.h"
25 #include "PARAMS.h"
26 #include "CPL_PARAMS.h"
27 #include "OCNCPL.h"
28 #include "FFIELDS.h"
29 #include "SURFACE.h"
30 c #include "GRID.h"
31 c #include "DYNVARS.h"
32
33 C !INPUT/OUTPUT PARAMETERS:
34 C === Routine arguments ===
35 C apply2AllFields - flag: T= apply import to all coupling fields
36 C F= only forcing fields relevant for eta variations
37 C myTime - Simulation time
38 C myIter - Simulation timestep number
39 C myThid - Thread no. that called this routine.
40 LOGICAL apply2AllFields
41 _RL myTime
42 INTEGER myIter
43 INTEGER myThid
44
45 C !LOCAL VARIABLES:
46 C === Local arrays ===
47 INTEGER bi,bj,i,j
48 CEOP
49
50 C-- Use imported coupling data in place of input files data:
51 DO bj = myByLo(myThid), myByHi(myThid)
52 DO bi = myBxLo(myThid), myBxHi(myThid)
53
54 C-- Aplly import to all coupling fields (standard way)
55 IF ( apply2AllFields ) THEN
56
57 C- Dynamical forcing
58 IF ( useImportTau ) THEN
59 DO j=1-Oly,sNy+Oly
60 DO i=1-Olx,sNx+Olx
61 fu(i,j,bi,bj) = tauX(i,j,bi,bj)
62 fv(i,j,bi,bj) = tauY(i,j,bi,bj)
63 ENDDO
64 ENDDO
65 ENDIF
66 #ifdef ATMOSPHERIC_LOADING
67 IF ( useImportSLP ) THEN
68 DO j=1-Oly,sNy+Oly
69 DO i=1-Olx,sNx+Olx
70 pLoad(i,j,bi,bj) = atmSLPr(i,j,bi,bj)
71 ENDDO
72 ENDDO
73 ENDIF
74 IF ( useImportSIce ) THEN
75 DO j=1-Oly,sNy+Oly
76 DO i=1-Olx,sNx+Olx
77 sIceLoad(i,j,bi,bj) = seaIceMass(i,j,bi,bj)
78 ENDDO
79 ENDDO
80 ENDIF
81 #endif /* ATMOSPHERIC_LOADING */
82
83 C- Fresh-Water & Salinity forcing
84 IF ( useImportFW ) THEN
85 DO j=1-Oly,sNy+Oly
86 DO i=1-Olx,sNx+Olx
87 EmPmR(i,j,bi,bj) = FWFlux (i,j,bi,bj)
88 ENDDO
89 ENDDO
90 ENDIF
91 IF ( useImportFW ) THEN
92 DO j=1-Oly,sNy+Oly
93 DO i=1-Olx,sNx+Olx
94 saltFlux(i,j,bi,bj)= iceSaltFlx(i,j,bi,bj)
95 ENDDO
96 ENDDO
97 ENDIF
98
99 C- Heat Flux forcing
100 IF ( useImportHFlx ) THEN
101 DO j=1-Oly,sNy+Oly
102 DO i=1-Olx,sNx+Olx
103 Qnet(i,j,bi,bj)= HeatFlux (i,j,bi,bj)
104 ENDDO
105 ENDDO
106 #ifdef SHORTWAVE_HEATING
107 DO j=1-Oly,sNy+Oly
108 DO i=1-Olx,sNx+Olx
109 Qsw(i,j,bi,bj) = qShortWave(i,j,bi,bj)
110 ENDDO
111 ENDDO
112 #endif
113 ENDIF
114
115 C-- Apply only to forcings relevant for eta/surf.press variations
116 ELSE
117
118 #ifdef ATMOSPHERIC_LOADING
119 IF ( useImportSIce .AND. useImportSLP ) THEN
120 DO j=1-Oly,sNy+Oly
121 DO i=1-Olx,sNx+Olx
122 phi0surf(i,j,bi,bj) = atmSLPr(i,j,bi,bj)*recip_rhoConst
123 & + gravity*seaIceMass(i,j,bi,bj)*recip_rhoConst
124 ENDDO
125 ENDDO
126 ELSEIF ( useImportSIce ) THEN
127 DO j=1-Oly,sNy+Oly
128 DO i=1-Olx,sNx+Olx
129 phi0surf(i,j,bi,bj) = pload(i,j,bi,bj)*recip_rhoConst
130 & + gravity*seaIceMass(i,j,bi,bj)*recip_rhoConst
131 ENDDO
132 ENDDO
133 ELSEIF ( useImportSLP ) THEN
134 DO j=1-Oly,sNy+Oly
135 DO i=1-Olx,sNx+Olx
136 phi0surf(i,j,bi,bj) = atmSLPr(i,j,bi,bj)*recip_rhoConst
137 ENDDO
138 ENDDO
139 ENDIF
140 #endif /* ATMOSPHERIC_LOADING */
141
142 IF ( useImportFW ) THEN
143 DO j=1-Oly,sNy+Oly
144 DO i=1-Olx,sNx+Olx
145 EmPmR(i,j,bi,bj) = FWFlux (i,j,bi,bj)
146 ENDDO
147 ENDDO
148 ENDIF
149
150 C-- end if apply2AllFields / else blocks
151 ENDIF
152
153 C-- end bi,bj loop
154 ENDDO
155 ENDDO
156
157 C-- Fill in Halo region with valid values
158
159 #ifdef ATMOSPHERIC_LOADING
160 IF ( apply2AllFields ) THEN
161 IF ( useImportSLP ) _EXCH_XY_R4( pload, myThid )
162 IF ( useImportSIce) _EXCH_XY_R4( sIceload, myThid )
163 ELSEIF ( useImportSLP .OR. useImportSIce ) THEN
164 _EXCH_XY_R4( phi0surf, myThid )
165 ENDIF
166 #endif
167 IF ( useImportFW ) _EXCH_XY_R4(EmPmR, myThid )
168 IF ( apply2AllFields ) THEN
169 IF (useImportTau ) CALL EXCH_UV_XY_RS(fu,fv,.TRUE.,myThid)
170 IF (useImportFW ) _EXCH_XY_R4(saltFlux, myThid )
171 IF (useImportHFlx) _EXCH_XY_R4(Qnet , myThid )
172 #ifdef SHORTWAVE_HEATING
173 IF (useImportHFlx) _EXCH_XY_R4(Qsw , myThid )
174 #endif
175 ENDIF
176
177 RETURN
178 END

  ViewVC Help
Powered by ViewVC 1.1.22