/[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.7 by edhill, Thu Oct 9 04:19:19 2003 UTC revision 1.11 by jmc, Fri Jul 16 01:20:57 2004 UTC
# Line 2  c $Header$ Line 2  c $Header$
2    
3  #include "EXF_OPTIONS.h"  #include "EXF_OPTIONS.h"
4    
   
5        subroutine exf_mapfields( mythid )        subroutine exf_mapfields( mythid )
6    
7  c     ==================================================================  c     ==================================================================
# 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 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_ustress*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_vstress*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 179  c             Short wave radiative flux. Line 194  c             Short wave radiative flux.
194               qsw(i,j,bi,bj)  = exf_outscal_swflux*swflux(i,j,bi,bj)               qsw(i,j,bi,bj)  = exf_outscal_swflux*swflux(i,j,bi,bj)
195              enddo              enddo
196            enddo            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
202              enddo
203  #endif  #endif
204    
205  #ifdef ALLOW_CLIMSST_RELAXATION  #ifdef ALLOW_CLIMSST_RELAXATION

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

  ViewVC Help
Powered by ViewVC 1.1.22