/[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.6 by heimbach, Fri May 23 18:37:31 2003 UTC revision 1.13 by heimbach, Tue Dec 13 19:46:46 2005 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"
56    #include "exf_clim_param.h"
57  #include "exf_clim_fields.h"  #include "exf_clim_fields.h"
58  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
59  # include "tamc.h"  # include "tamc.h"
# Line 66  c     mythid - thread number for this in Line 68  c     mythid - thread number for this in
68  c     == local variables ==  c     == local variables ==
69    
70        integer bi,bj        integer bi,bj
71        integer i,j        integer i,j,k
72        integer jtlo        integer jtlo
73        integer jthi        integer jthi
74        integer itlo        integer itlo
# Line 124  CADJ STORE ustress(:,:,bi,bj) = comlev1_ Line 126  CADJ STORE ustress(:,:,bi,bj) = comlev1_
126            do j = jmin,jmax            do j = jmin,jmax
127              do i = imin,imax              do i = imin,imax
128  c             Zonal wind stress.  c             Zonal wind stress.
129                if (ustress(i,j,bi,bj).gt.2.0D0) then                if (ustress(i,j,bi,bj).gt.windstressmax) then
130                  ustress(i,j,bi,bj)=2.0D0                  ustress(i,j,bi,bj)=windstressmax
131                endif                endif
132              enddo              enddo
133            enddo            enddo
# Line 134  CADJ STORE ustress(:,:,bi,bj) = comlev1_ Line 136  CADJ STORE ustress(:,:,bi,bj) = comlev1_
136  #endif  #endif
137            do j = jmin,jmax            do j = jmin,jmax
138              do i = imin,imax              do i = imin,imax
139                if (ustress(i,j,bi,bj).lt.-2.0D0) then                if (ustress(i,j,bi,bj).lt.-windstressmax) then
140                  ustress(i,j,bi,bj)=-2.0D0                  ustress(i,j,bi,bj)=-windstressmax
141                endif                endif
142              enddo              enddo
143            enddo            enddo
144            do j = jmin,jmax            do j = jmin,jmax
145              do i = imin,imax              do i = imin+1,imax
146               fu(i,j,bi,bj)   = exf_outscal_ustress*ustress(i,j,bi,bj)  #if (defined (ALLOW_BULKFORMULAE) || defined (USE_EXF_INTERPOLATION))
147    c     Shift wind stresses calculated at C-points to W/S points
148                  fu(i,j,bi,bj) = exf_outscal_ustress*
149         &              (ustress(i,j,bi,bj)+ustress(i-1,j,bi,bj))/2.*
150         &              maskW(i,j,1,bi,bj)
151    #else
152                  fu(i,j,bi,bj) = exf_outscal_ustress*ustress(i,j,bi,bj)
153    #endif
154              enddo              enddo
155            enddo            enddo
156    
# Line 151  CADJ STORE vstress(:,:,bi,bj) = comlev1_ Line 160  CADJ STORE vstress(:,:,bi,bj) = comlev1_
160            do j = jmin,jmax            do j = jmin,jmax
161              do i = imin,imax              do i = imin,imax
162  c             Meridional wind stress.  c             Meridional wind stress.
163                if (vstress(i,j,bi,bj).gt.2.0D0) then                if (vstress(i,j,bi,bj).gt.windstressmax) then
164                  vstress(i,j,bi,bj)=2.0D0                  vstress(i,j,bi,bj)=windstressmax
165                endif                endif
166              enddo              enddo
167            enddo            enddo
# Line 161  CADJ STORE vstress(:,:,bi,bj) = comlev1_ Line 170  CADJ STORE vstress(:,:,bi,bj) = comlev1_
170  #endif  #endif
171            do j = jmin,jmax            do j = jmin,jmax
172              do i = imin,imax              do i = imin,imax
173                if (vstress(i,j,bi,bj).lt.-2.0D0) then                if (vstress(i,j,bi,bj).lt.-windstressmax) then
174                  vstress(i,j,bi,bj)=-2.0D0                  vstress(i,j,bi,bj)=-windstressmax
175                endif                endif
176              enddo              enddo
177            enddo            enddo
178            do j = jmin,jmax            do j = jmin+1,jmax
179              do i = imin,imax              do i = imin,imax
180               fv(i,j,bi,bj)   = exf_outscal_vstress*vstress(i,j,bi,bj)  #if (defined (ALLOW_BULKFORMULAE) || defined (USE_EXF_INTERPOLATION))
181    c     Shift wind stresses calculated at C-points to W/S points
182                  fv(i,j,bi,bj) = exf_outscal_vstress*
183         &              (vstress(i,j,bi,bj)+vstress(i,j-1,bi,bj))/2.*
184         &              maskS(i,j,1,bi,bj)
185    #else
186                  fv(i,j,bi,bj) = exf_outscal_vstress*vstress(i,j,bi,bj)
187    #endif
188              enddo              enddo
189            enddo            enddo
190    
# Line 197  c             Short wave radiative flux. Line 213  c             Short wave radiative flux.
213            enddo            enddo
214  #endif  #endif
215    
216    #ifdef ALLOW_CLIMTEMP_RELAXATION
217              if ( climtempfile .NE. ' ' ) then
218                 do k = 1, Nr
219                    do j = jmin,jmax
220                       do i = imin,imax
221                          thetaStar(i,j,k,bi,bj)  = climtemp(i,j,k,bi,bj)
222                       enddo
223                    enddo
224                 enddo
225              endif
226    #endif
227    
228    #ifdef ALLOW_CLIMSALT_RELAXATION
229              if ( climsaltfile .NE. ' ' ) then
230                 do k = 1, Nr
231                    do j = jmin,jmax
232                       do i = imin,imax
233                          saltStar(i,j,k,bi,bj)  = climsalt(i,j,k,bi,bj)
234                       enddo
235                    enddo
236                 enddo
237              endif
238    #endif
239    
240  #ifdef ATMOSPHERIC_LOADING  #ifdef ATMOSPHERIC_LOADING
241            do j = jmin,jmax            do j = jmin,jmax
242              do i = imin,imax              do i = imin,imax
# Line 224  c      _EXCH_XY_R4(    fv, mythid ) Line 264  c      _EXCH_XY_R4(    fv, mythid )
264  #ifdef ALLOW_CLIMSSS_RELAXATION  #ifdef ALLOW_CLIMSSS_RELAXATION
265        _EXCH_XY_R4(   sss, mythid )        _EXCH_XY_R4(   sss, mythid )
266  #endif  #endif
267    #ifdef ALLOW_CLIMTEMP_RELAXATION
268          _EXCH_XYZ_R4( thetaStar, mythid )
269    #endif
270    #ifdef ALLOW_CLIMSALT_RELAXATION
271          _EXCH_XYZ_R4( saltStar, mythid )
272    #endif
273  #ifdef ATMOSPHERIC_LOADING  #ifdef ATMOSPHERIC_LOADING
274        _EXCH_XY_R4( pload, mythid )        _EXCH_XY_R4( pload, mythid )
275  #endif  #endif

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.22