/[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.16 by heimbach, Thu Mar 2 15:30:11 2006 UTC
# Line 2  c $Header$ Line 2  c $Header$
2    
3  #include "EXF_OPTIONS.h"  #include "EXF_OPTIONS.h"
4    
5          subroutine exf_mapfields( mytime, myiter, mythid )
       subroutine exf_mapfields( mythid )  
6    
7  c     ==================================================================  c     ==================================================================
8  c     SUBROUTINE exf_mapfields  c     SUBROUTINE exf_mapfields
# Line 48  c     == global variables == Line 47  c     == global variables ==
47    
48  #include "EEPARAMS.h"  #include "EEPARAMS.h"
49  #include "SIZE.h"  #include "SIZE.h"
50    #include "PARAMS.h"
51  #include "FFIELDS.h"  #include "FFIELDS.h"
52    #include "GRID.h"
53    
54  #include "exf_param.h"  #include "exf_param.h"
55  #include "exf_constants.h"  #include "exf_constants.h"
56  #include "exf_fields.h"  #include "exf_fields.h"
57    #include "exf_clim_param.h"
58  #include "exf_clim_fields.h"  #include "exf_clim_fields.h"
59  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
60  # include "tamc.h"  # include "tamc.h"
# Line 62  c     == routine arguments == Line 65  c     == routine arguments ==
65  c     mythid - thread number for this instance of the routine.  c     mythid - thread number for this instance of the routine.
66    
67        integer mythid        integer mythid
68          integer myiter
69          _RL     mytime
70    
71  c     == local variables ==  c     == local variables ==
72    
73        integer bi,bj        integer bi,bj
74        integer i,j        integer i,j,k
75        integer jtlo        integer jtlo
76        integer jthi        integer jthi
77        integer itlo        integer itlo
# Line 107  c     == end of interface == Line 112  c     == end of interface ==
112              do i = imin,imax              do i = imin,imax
113  c            Heat flux.  c            Heat flux.
114               qnet(i,j,bi,bj) = exf_outscal_hflux*hflux(i,j,bi,bj)               qnet(i,j,bi,bj) = exf_outscal_hflux*hflux(i,j,bi,bj)
115                 if ( hfluxfile .EQ. ' ' )
116         &            qnet(i,j,bi,bj) = qnet(i,j,bi,bj) -
117         &            exf_outscal_hflux * ( hflux_exfremo_intercept +
118         &            hflux_exfremo_slope*(mytime-starttime) )
119              enddo              enddo
120            enddo            enddo
121    
# Line 115  c            Heat flux. Line 124  c            Heat flux.
124              do i = imin,imax              do i = imin,imax
125  c            Salt flux.  c            Salt flux.
126               empmr(i,j,bi,bj)= exf_outscal_sflux*sflux(i,j,bi,bj)               empmr(i,j,bi,bj)= exf_outscal_sflux*sflux(i,j,bi,bj)
127                 if ( sfluxfile .EQ. ' ' )
128         &            empmr(i,j,bi,bj) = empmr(i,j,bi,bj) -
129         &            exf_outscal_sflux * ( sflux_exfremo_intercept +
130         &            sflux_exfremo_slope*(mytime-starttime) )
131              enddo              enddo
132            enddo            enddo
133    
# Line 124  CADJ STORE ustress(:,:,bi,bj) = comlev1_ Line 137  CADJ STORE ustress(:,:,bi,bj) = comlev1_
137            do j = jmin,jmax            do j = jmin,jmax
138              do i = imin,imax              do i = imin,imax
139  c             Zonal wind stress.  c             Zonal wind stress.
140                if (ustress(i,j,bi,bj).gt.2.0D0) then                if (ustress(i,j,bi,bj).gt.windstressmax) then
141                  ustress(i,j,bi,bj)=2.0D0                  ustress(i,j,bi,bj)=windstressmax
142                endif                endif
143              enddo              enddo
144            enddo            enddo
# Line 134  CADJ STORE ustress(:,:,bi,bj) = comlev1_ Line 147  CADJ STORE ustress(:,:,bi,bj) = comlev1_
147  #endif  #endif
148            do j = jmin,jmax            do j = jmin,jmax
149              do i = imin,imax              do i = imin,imax
150                if (ustress(i,j,bi,bj).lt.-2.0D0) then                if (ustress(i,j,bi,bj).lt.-windstressmax) then
151                  ustress(i,j,bi,bj)=-2.0D0                  ustress(i,j,bi,bj)=-windstressmax
152                endif                endif
153              enddo              enddo
154            enddo            enddo
155            do j = jmin,jmax            do j = jmin,jmax
156              do i = imin,imax              do i = imin+1,imax
157               fu(i,j,bi,bj)   = exf_outscal_ustress*ustress(i,j,bi,bj)  #if (defined (ALLOW_BULKFORMULAE) || defined (USE_EXF_INTERPOLATION))
158    c     Shift wind stresses calculated at C-points to W/S points
159                  fu(i,j,bi,bj) = exf_outscal_ustress*
160         &              (ustress(i,j,bi,bj)+ustress(i-1,j,bi,bj))/2.*
161         &              maskW(i,j,1,bi,bj)
162    #else
163                  fu(i,j,bi,bj) = exf_outscal_ustress*ustress(i,j,bi,bj)
164    #endif
165              enddo              enddo
166            enddo            enddo
167    
# Line 151  CADJ STORE vstress(:,:,bi,bj) = comlev1_ Line 171  CADJ STORE vstress(:,:,bi,bj) = comlev1_
171            do j = jmin,jmax            do j = jmin,jmax
172              do i = imin,imax              do i = imin,imax
173  c             Meridional wind stress.  c             Meridional wind stress.
174                if (vstress(i,j,bi,bj).gt.2.0D0) then                if (vstress(i,j,bi,bj).gt.windstressmax) then
175                  vstress(i,j,bi,bj)=2.0D0                  vstress(i,j,bi,bj)=windstressmax
176                endif                endif
177              enddo              enddo
178            enddo            enddo
# Line 161  CADJ STORE vstress(:,:,bi,bj) = comlev1_ Line 181  CADJ STORE vstress(:,:,bi,bj) = comlev1_
181  #endif  #endif
182            do j = jmin,jmax            do j = jmin,jmax
183              do i = imin,imax              do i = imin,imax
184                if (vstress(i,j,bi,bj).lt.-2.0D0) then                if (vstress(i,j,bi,bj).lt.-windstressmax) then
185                  vstress(i,j,bi,bj)=-2.0D0                  vstress(i,j,bi,bj)=-windstressmax
186                endif                endif
187              enddo              enddo
188            enddo            enddo
189            do j = jmin,jmax            do j = jmin+1,jmax
190              do i = imin,imax              do i = imin,imax
191               fv(i,j,bi,bj)   = exf_outscal_vstress*vstress(i,j,bi,bj)  #if (defined (ALLOW_BULKFORMULAE) || defined (USE_EXF_INTERPOLATION))
192    c     Shift wind stresses calculated at C-points to W/S points
193                  fv(i,j,bi,bj) = exf_outscal_vstress*
194         &              (vstress(i,j,bi,bj)+vstress(i,j-1,bi,bj))/2.*
195         &              maskS(i,j,1,bi,bj)
196    #else
197                  fv(i,j,bi,bj) = exf_outscal_vstress*vstress(i,j,bi,bj)
198    #endif
199              enddo              enddo
200            enddo            enddo
201    

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

  ViewVC Help
Powered by ViewVC 1.1.22