/[MITgcm]/MITgcm/pkg/exf/exf_mapfields.F
ViewVC logotype

Diff of /MITgcm/pkg/exf/exf_mapfields.F

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

revision 1.5 by dimitri, Tue Feb 18 05:33:54 2003 UTC revision 1.11 by jmc, Fri Jul 16 01:20:57 2004 UTC
# Line 1  Line 1 
1  c $Header$  c $Header$
2    
3  #include "EXF_CPPOPTIONS.h"  #include "EXF_OPTIONS.h"
   
4    
5        subroutine exf_mapfields( mythid )        subroutine exf_mapfields( mythid )
6    
# Line 49  c     == global variables == Line 48  c     == global variables ==
48  #include "EEPARAMS.h"  #include "EEPARAMS.h"
49  #include "SIZE.h"  #include "SIZE.h"
50  #include "FFIELDS.h"  #include "FFIELDS.h"
51    #include "GRID.h"
52    
53  #include "exf_param.h"  #include "exf_param.h"
54  #include "exf_constants.h"  #include "exf_constants.h"
55  #include "exf_fields.h"  #include "exf_fields.h"
# Line 106  c     == end of interface == Line 107  c     == end of interface ==
107            do j = jmin,jmax            do j = jmin,jmax
108              do i = imin,imax              do i = imin,imax
109  c            Heat flux.  c            Heat flux.
110               qnet(i,j,bi,bj) = exf_outscal_hfl*hflux(i,j,bi,bj)               qnet(i,j,bi,bj) = exf_outscal_hflux*hflux(i,j,bi,bj)
111              enddo              enddo
112            enddo            enddo
113    
# Line 114  c            Heat flux. Line 115  c            Heat flux.
115            do j = jmin,jmax            do j = jmin,jmax
116              do i = imin,imax              do i = imin,imax
117  c            Salt flux.  c            Salt flux.
118               empmr(i,j,bi,bj)= exf_outscal_sfl*sflux(i,j,bi,bj)               empmr(i,j,bi,bj)= exf_outscal_sflux*sflux(i,j,bi,bj)
119              enddo              enddo
120            enddo            enddo
121    
# Line 124  CADJ STORE ustress(:,:,bi,bj) = comlev1_ Line 125  CADJ STORE ustress(:,:,bi,bj) = comlev1_
125            do j = jmin,jmax            do j = jmin,jmax
126              do i = imin,imax              do i = imin,imax
127  c             Zonal wind stress.  c             Zonal wind stress.
128                if (ustress(i,j,bi,bj).gt.2.0D0) then                if (ustress(i,j,bi,bj).gt.windstressmax) then
129                  ustress(i,j,bi,bj)=2.0D0                  ustress(i,j,bi,bj)=windstressmax
130                endif                endif
131              enddo              enddo
132            enddo            enddo
# Line 134  CADJ STORE ustress(:,:,bi,bj) = comlev1_ Line 135  CADJ STORE ustress(:,:,bi,bj) = comlev1_
135  #endif  #endif
136            do j = jmin,jmax            do j = jmin,jmax
137              do i = imin,imax              do i = imin,imax
138                if (ustress(i,j,bi,bj).lt.-2.0D0) then                if (ustress(i,j,bi,bj).lt.-windstressmax) then
139                  ustress(i,j,bi,bj)=-2.0D0                  ustress(i,j,bi,bj)=-windstressmax
140                endif                endif
141              enddo              enddo
142            enddo            enddo
143            do j = jmin,jmax            do j = jmin,jmax
144              do i = imin,imax              do i = imin+1,imax
145               fu(i,j,bi,bj)   = exf_outscal_ust*ustress(i,j,bi,bj)  #if (defined (ALLOW_BULKFORMULAE) || defined (USE_EXF_INTERPOLATION))
146    c     Shift wind stresses calculated at C-points to W/S points
147                  fu(i,j,bi,bj) = exf_outscal_ustress*
148         &              (ustress(i,j,bi,bj)+ustress(i-1,j,bi,bj))/2.*
149         &              maskW(i,j,1,bi,bj)
150    #else
151                  fu(i,j,bi,bj) = exf_outscal_ustress*ustress(i,j,bi,bj)
152    #endif
153              enddo              enddo
154            enddo            enddo
155    
# Line 151  CADJ STORE vstress(:,:,bi,bj) = comlev1_ Line 159  CADJ STORE vstress(:,:,bi,bj) = comlev1_
159            do j = jmin,jmax            do j = jmin,jmax
160              do i = imin,imax              do i = imin,imax
161  c             Meridional wind stress.  c             Meridional wind stress.
162                if (vstress(i,j,bi,bj).gt.2.0D0) then                if (vstress(i,j,bi,bj).gt.windstressmax) then
163                  vstress(i,j,bi,bj)=2.0D0                  vstress(i,j,bi,bj)=windstressmax
164                endif                endif
165              enddo              enddo
166            enddo            enddo
# Line 161  CADJ STORE vstress(:,:,bi,bj) = comlev1_ Line 169  CADJ STORE vstress(:,:,bi,bj) = comlev1_
169  #endif  #endif
170            do j = jmin,jmax            do j = jmin,jmax
171              do i = imin,imax              do i = imin,imax
172                if (vstress(i,j,bi,bj).lt.-2.0D0) then                if (vstress(i,j,bi,bj).lt.-windstressmax) then
173                  vstress(i,j,bi,bj)=-2.0D0                  vstress(i,j,bi,bj)=-windstressmax
174                endif                endif
175              enddo              enddo
176            enddo            enddo
177            do j = jmin,jmax            do j = jmin+1,jmax
178              do i = imin,imax              do i = imin,imax
179               fv(i,j,bi,bj)   = exf_outscal_vst*vstress(i,j,bi,bj)  #if (defined (ALLOW_BULKFORMULAE) || defined (USE_EXF_INTERPOLATION))
180    c     Shift wind stresses calculated at C-points to W/S points
181                  fv(i,j,bi,bj) = exf_outscal_vstress*
182         &              (vstress(i,j,bi,bj)+vstress(i,j-1,bi,bj))/2.*
183         &              maskS(i,j,1,bi,bj)
184    #else
185                  fv(i,j,bi,bj) = exf_outscal_vstress*vstress(i,j,bi,bj)
186    #endif
187              enddo              enddo
188            enddo            enddo
189    
# Line 176  CADJ STORE vstress(:,:,bi,bj) = comlev1_ Line 191  CADJ STORE vstress(:,:,bi,bj) = comlev1_
191  c             Short wave radiative flux.  c             Short wave radiative flux.
192            do j = jmin,jmax            do j = jmin,jmax
193              do i = imin,imax              do i = imin,imax
194               qsw(i,j,bi,bj)  = exf_outscal_swf*swflux(i,j,bi,bj)               qsw(i,j,bi,bj)  = exf_outscal_swflux*swflux(i,j,bi,bj)
195                enddo
196              enddo
197    C         net heat flux = heat flux (except SW) + SW flux.
198              do j = jmin,jmax
199                do i = imin,imax
200                 qnet(i,j,bi,bj) = qnet(i,j,bi,bj) + qsw(i,j,bi,bj)
201              enddo              enddo
202            enddo            enddo
203  #endif  #endif

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.22