/[MITgcm]/MITgcm/pkg/ctrl/ctrl_get_gen.F
ViewVC logotype

Diff of /MITgcm/pkg/ctrl/ctrl_get_gen.F

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

revision 1.4 by edhill, Sat Nov 1 04:50:02 2003 UTC revision 1.7 by heimbach, Thu Nov 11 06:28:33 2004 UTC
# Line 64  c     == local variables == Line 64  c     == local variables ==
64        integer imin,imax        integer imin,imax
65        integer ilgen        integer ilgen
66    
67          _RL     gensign
68        _RL     genfac        _RL     genfac
69          logical doCtrlUpdate
70        logical genfirst        logical genfirst
71        logical genchanged        logical genchanged
72        integer gencount0        integer gencount0
# Line 114  c--   Get the counters, flags, and the i Line 116  c--   Get the counters, flags, and the i
116       &                       doglobalread, ladinit, optimcycle,       &                       doglobalread, ladinit, optimcycle,
117       &                       mythid, xx_gen_dummy )       &                       mythid, xx_gen_dummy )
118  #ifdef ALLOW_CTRL_SMOOTH  #ifdef ALLOW_CTRL_SMOOTH
119            call ctrl_smooth(xx_gen1,genmask)          if ( xx_gen_file .EQ. xx_tauu_file .OR.
120         &       xx_gen_file .EQ. xx_tauv_file )
121         &     call ctrl_smooth(xx_gen1,genmask)
122  #endif  #endif
123        endif        endif
124    
# Line 125  c--   Get the counters, flags, and the i Line 129  c--   Get the counters, flags, and the i
129       &                       doglobalread, ladinit, optimcycle,       &                       doglobalread, ladinit, optimcycle,
130       &                       mythid, xx_gen_dummy )       &                       mythid, xx_gen_dummy )
131  #ifdef ALLOW_CTRL_SMOOTH  #ifdef ALLOW_CTRL_SMOOTH
132            call ctrl_smooth(xx_gen1,genmask)          if ( xx_gen_file .EQ. xx_tauu_file .OR.
133         &       xx_gen_file .EQ. xx_tauv_file )
134         &     call ctrl_smooth(xx_gen1,genmask)
135  #endif  #endif
136        endif        endif
137    
138  c--   Add control to model variable.  c--   Add control to model variable.
139    cph(
140    cph this flag ported from the SIO code (dont know why its here)
141          if ( gencount0 .LE. 2 .AND.
142         &     ( xx_gen_file .EQ. xx_tauu_file .OR.
143         &       xx_gen_file .EQ. xx_tauv_file ) ) then
144             doCtrlUpdate = .FALSE.
145          else
146             doCtrlUpdate = .TRUE.
147          endif
148          if ( xx_gen_file .EQ. xx_tauu_file .OR.
149         &     xx_gen_file .EQ. xx_tauv_file ) then
150             gensign = -1.
151          else
152             gensign = 1.
153          endif
154    c
155    cph since the above is ECCO specific, we undo it here:
156    cph      doCtrlUpdate = .TRUE.
157    c
158          if ( doCtrlUpdate ) then
159    cph)
160        do bj = jtlo,jthi        do bj = jtlo,jthi
161          do bi = itlo,ithi          do bi = itlo,ithi
162  c--       Calculate mask for tracer cells (0 => land, 1 => water).  c--       Calculate mask for tracer cells (0 => land, 1 => water).
# Line 137  c--       Calculate mask for tracer cell Line 164  c--       Calculate mask for tracer cell
164            do j = 1,sny            do j = 1,sny
165              do i = 1,snx              do i = 1,snx
166                genfld(i,j,bi,bj) = genfld (i,j,bi,bj)                genfld(i,j,bi,bj) = genfld (i,j,bi,bj)
167       &                         + genfac            *xx_gen0(i,j,bi,bj)       &              + gensign*genfac            *xx_gen0(i,j,bi,bj)
168       &                         + (1. _d 0 - genfac)*xx_gen1(i,j,bi,bj)       &              + gensign*(1. _d 0 - genfac)*xx_gen1(i,j,bi,bj)
169                genfld(i,j,bi,bj) = genfld(i,j,bi,bj)*genmask(i,j,k,bi,bj)                genfld(i,j,bi,bj) = genfld(i,j,bi,bj)*genmask(i,j,k,bi,bj)
170              enddo              enddo
171            enddo            enddo
172          enddo          enddo
173        enddo        enddo
174    cph(
175          endif
176    cph)
177    
178  #endif /* ALLOW_EXF */  #endif /* ALLOW_EXF */
179    

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

  ViewVC Help
Powered by ViewVC 1.1.22