2 |
|
|
3 |
subroutine exf_set_gen( |
subroutine exf_set_gen( |
4 |
& genfile, genstartdate, genperiod, exf_inscal_gen, |
& genfile, genstartdate, genperiod, exf_inscal_gen, |
5 |
& genfld, gen0, gen1, genmask, |
& genfld, gen0, gen1, genmask, |
6 |
|
#ifdef USE_EXF_INTERPOLATION |
7 |
|
& gen_lon0, gen_lon_inc, gen_lat0, gen_lat_inc, |
8 |
|
& gen_nlon, gen_nlat, |
9 |
|
#endif |
10 |
& mycurrenttime, mycurrentiter, mythid ) |
& mycurrenttime, mycurrentiter, mythid ) |
11 |
|
|
12 |
c ================================================================== |
c ================================================================== |
49 |
_RL mycurrenttime |
_RL mycurrenttime |
50 |
integer mycurrentiter |
integer mycurrentiter |
51 |
integer mythid |
integer mythid |
52 |
|
#ifdef USE_EXF_INTERPOLATION |
53 |
|
_RL gen_lon0, gen_lon_inc |
54 |
|
_RL gen_lat0, gen_lat_inc(MAX_LAT_INC) |
55 |
|
INTEGER gen_nlon, gen_nlat |
56 |
|
#endif |
57 |
|
|
58 |
c == local variables == |
c == local variables == |
59 |
|
|
77 |
& ) |
& ) |
78 |
|
|
79 |
if ( first ) then |
if ( first ) then |
80 |
|
#ifdef USE_EXF_INTERPOLATION |
81 |
|
call new_interp( genfile, exf_iprec |
82 |
|
& , gen1, count0, xC, yC |
83 |
|
& , gen_lon0,gen_lon_inc |
84 |
|
& , gen_lat0,gen_lat_inc |
85 |
|
& , gen_nlon,gen_nlat,mythid |
86 |
|
& ) |
87 |
|
#else |
88 |
call mdsreadfield( genfile, exf_iprec, exf_yftype, 1 |
call mdsreadfield( genfile, exf_iprec, exf_yftype, 1 |
89 |
& , gen1, count0, mythid |
& , gen1, count0, mythid |
90 |
& ) |
& ) |
91 |
|
#endif |
92 |
|
|
93 |
if (exf_yftype .eq. 'RL') then |
if (exf_yftype .eq. 'RL') then |
94 |
call exf_filter_rl( gen1, genmask, mythid ) |
call exf_filter_rl( gen1, genmask, mythid ) |
100 |
if (( first ) .or. ( changed )) then |
if (( first ) .or. ( changed )) then |
101 |
call exf_SwapFFields( gen0, gen1, mythid ) |
call exf_SwapFFields( gen0, gen1, mythid ) |
102 |
|
|
103 |
|
#ifdef USE_EXF_INTERPOLATION |
104 |
|
call new_interp( genfile, exf_iprec |
105 |
|
& , gen1, count1, xC, yC |
106 |
|
& , gen_lon0,gen_lon_inc |
107 |
|
& , gen_lat0,gen_lat_inc |
108 |
|
& , gen_nlon,gen_nlat,mythid |
109 |
|
& ) |
110 |
|
#else |
111 |
call mdsreadfield( genfile, exf_iprec, exf_yftype, 1 |
call mdsreadfield( genfile, exf_iprec, exf_yftype, 1 |
112 |
& , gen1, count1, mythid |
& , gen1, count1, mythid |
113 |
& ) |
& ) |
114 |
|
#endif |
115 |
|
|
116 |
if (exf_yftype .eq. 'RL') then |
if (exf_yftype .eq. 'RL') then |
117 |
call exf_filter_rl( gen1, genmask, mythid ) |
call exf_filter_rl( gen1, genmask, mythid ) |