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 |
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 |
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 |
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 |
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+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
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 |
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 |
352 |
|
|
353 |
endif |
endif |
354 |
|
|
355 |
end |
RETURN |
356 |
|
END |