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

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

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

revision 1.19 by heimbach, Wed Apr 18 13:24:28 2007 UTC revision 1.23 by dimitri, Fri Jan 25 01:07:49 2008 UTC
# Line 46  c     == global variables == Line 46  c     == global variables ==
46    
47  #include "EXF_PARAM.h"  #include "EXF_PARAM.h"
48  #include "EXF_CONSTANTS.h"  #include "EXF_CONSTANTS.h"
 #include "EXF_CLIM_PARAM.h"  
49    
50  c     == routine arguments ==  c     == routine arguments ==
51    
# Line 112  c     Jan. through Dec. Line 111  c     Jan. through Dec.
111    
112           elseif ( genperiod .lt. 0 ) then           elseif ( genperiod .lt. 0 ) then
113              print *, 'genperiod is out of range'              print *, 'genperiod is out of range'
114              STOP 'ABNORMAL END: S/R EXF_GETFFIELDREC'              STOP 'ABNORMAL END: S/R EXF_SET_GEN'
115    
116           else           else
117  c     get record numbers and interpolation factor for gen  c     get record numbers and interpolation factor for gen
# Line 147  C     Complete filename with YR or _YEAR Line 146  C     Complete filename with YR or _YEAR
146                 genfile0 = genfile                 genfile0 = genfile
147              endif              endif
148    
   
149  #ifdef USE_EXF_INTERPOLATION  #ifdef USE_EXF_INTERPOLATION
150              call exf_interp( genfile0, exf_iprec              call exf_interp( genfile0, exf_iprec
151       &           , gen1, count0, gen_xout, gen_yout       &           , gen1, count0, gen_xout, gen_yout
# Line 156  C     Complete filename with YR or _YEAR Line 154  C     Complete filename with YR or _YEAR
154       &           , gen_nlon,gen_nlat,interp_method,mythid       &           , gen_nlon,gen_nlat,interp_method,mythid
155       &           )       &           )
156  #else  #else
157                _BARRIER
158              call mdsreadfield( genfile0, exf_iprec, exf_yftype, 1              call mdsreadfield( genfile0, exf_iprec, exf_yftype, 1
159       &           , gen1, count0, mythid       &           , gen1, count0, mythid
160       &           )       &           )
161                _BARRIER
162  #endif /* USE_EXF_INTERPOLATION */  #endif /* USE_EXF_INTERPOLATION */
163    
164              if (exf_yftype .eq. 'RL') then              if (exf_yftype .eq. 'RL') then
# Line 197  C     Complete filename with YR or _YEAR Line 197  C     Complete filename with YR or _YEAR
197       &           , gen_nlon,gen_nlat,interp_method,mythid       &           , gen_nlon,gen_nlat,interp_method,mythid
198       &           )       &           )
199  #else  #else
200                _BARRIER
201              call mdsreadfield( genfile1, exf_iprec, exf_yftype, 1              call mdsreadfield( genfile1, exf_iprec, exf_yftype, 1
202       &           , gen1, count1, mythid       &           , gen1, count1, mythid
203       &           )       &           )
204                _BARRIER
205  #endif /* USE_EXF_INTERPOLATION */  #endif /* USE_EXF_INTERPOLATION */
206    
207              if (exf_yftype .eq. 'RL') then              if (exf_yftype .eq. 'RL') then
# Line 215  c     Loop over tiles. Line 217  c     Loop over tiles.
217             do j = 1,sny             do j = 1,sny
218              do i = 1,snx              do i = 1,snx
219  c     Interpolate linearly onto the  time.  c     Interpolate linearly onto the  time.
 cph             if ( genfile .EQ. climsstfile ) then  
 cph                if (gen0(i,j,bi,bj) .lt. climtempfreeze) then  
 cph                   gen0(i,j,bi,bj) = climtempfreeze  
 cph                endif  
 cph                if (gen1(i,j,bi,bj) .lt. climtempfreeze) then  
 cph                   gen1(i,j,bi,bj) = climtempfreeze  
 cph                endif  
 cph             endif  
220               genfld(i,j,bi,bj) = exf_inscal_gen * (               genfld(i,j,bi,bj) = exf_inscal_gen * (
221       &                          fac * gen0(i,j,bi,bj) +       &                          fac * gen0(i,j,bi,bj) +
222       &              (exf_one - fac) * gen1(i,j,bi,bj) )       &              (exf_one - fac) * gen1(i,j,bi,bj) )
# Line 230  cph             endif Line 224  cph             endif
224       &            genfld(i,j,bi,bj) -       &            genfld(i,j,bi,bj) -
225       &            exf_inscal_gen * ( genremove_intercept +       &            exf_inscal_gen * ( genremove_intercept +
226       &            genremove_slope*(mytime-starttime) )       &            genremove_slope*(mytime-starttime) )
                   enddo  
                enddo  
227              enddo              enddo
228               enddo
229              enddo
230           enddo           enddo
231    
232        endif        endif
233    
234        end        RETURN
235          END
236    
237  C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
238  C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Line 331  c     == end of interface == Line 325  c     == end of interface ==
325       &        , gen_nlon,gen_nlat,interp_method,mythid       &        , gen_nlon,gen_nlat,interp_method,mythid
326       &        )       &        )
327  #else  #else
328             _BARRIER
329           call mdsreadfield( genfile, exf_iprec, exf_yftype, 1           call mdsreadfield( genfile, exf_iprec, exf_yftype, 1
330       &        , genfld, count, mythid       &        , genfld, count, mythid
331       &        )       &        )
332             _BARRIER
333  #endif /* USE_EXF_INTERPOLATION */  #endif /* USE_EXF_INTERPOLATION */
334    
335           if (exf_yftype .eq. 'RL') then           if (exf_yftype .eq. 'RL') then
# Line 342  c     == end of interface == Line 338  c     == end of interface ==
338              call exf_filter_rs( genfld, genmask, mythid )              call exf_filter_rs( genfld, genmask, mythid )
339           end if           end if
340    
341  c     Loop over tiles.  c     Loop over tiles and scale genfld
342           do bj = mybylo(mythid),mybyhi(mythid)           do bj = mybylo(mythid),mybyhi(mythid)
343              do bi = mybxlo(mythid),mybxhi(mythid)              do bi = mybxlo(mythid),mybxhi(mythid)
344                 do j = 1,sny                 do j = 1,sny
345                    do i = 1,snx                    do i = 1,snx
 c     Interpolate linearly onto the  time.  
346                       genfld(i,j,bi,bj) =                       genfld(i,j,bi,bj) =
347       &                    exf_inscal_gen * genfld(i,j,bi,bj)       &                    exf_inscal_gen * genfld(i,j,bi,bj)
348                    enddo                    enddo
# Line 357  c     Interpolate linearly onto the  tim Line 352  c     Interpolate linearly onto the  tim
352    
353        endif        endif
354    
355        end        RETURN
356          END

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.23

  ViewVC Help
Powered by ViewVC 1.1.22