1 |
#include "EXF_CPPOPTIONS.h" |
#include "EXF_OPTIONS.h" |
2 |
|
|
3 |
subroutine exf_init_runoff( mythid ) |
subroutine exf_init_runoff( mythid ) |
4 |
|
|
35 |
|
|
36 |
c == local variables == |
c == local variables == |
37 |
|
|
38 |
integer bi, bj |
integer bi, bj, i, j, interp_method |
|
integer i, j |
|
39 |
|
|
40 |
c == end of interface == |
c == end of interface == |
41 |
|
|
51 |
|
|
52 |
if ( runofffile .NE. ' ' ) then |
if ( runofffile .NE. ' ' ) then |
53 |
#ifdef USE_EXF_INTERPOLATION |
#ifdef USE_EXF_INTERPOLATION |
54 |
call new_interp( |
interp_method = 2 |
55 |
|
call exf_interp( |
56 |
& runofffile, exf_iprec |
& runofffile, exf_iprec |
57 |
& , runoff, 1, xC, yC |
& , runoff, 1, xC, yC |
58 |
& ,runoff_lon0,runoff_lon_inc |
& ,runoff_lon0,runoff_lon_inc |
59 |
& ,runoff_lat0,runoff_lat_inc |
& ,runoff_lat0,runoff_lat_inc |
60 |
& ,runoff_nlon,runoff_nlat,mythid ) |
& ,runoff_nlon,runoff_nlat,interp_method,mythid ) |
61 |
#else |
#else |
62 |
call mdsreadfield( runofffile, exf_iprec, exf_yftype, 1 |
call mdsreadfield( runofffile, exf_iprec, exf_yftype, 1 |
63 |
& , runoff, 1, mythid |
& , runoff, 1, mythid |
74 |
do bi = mybxlo(mythid), mybxhi(mythid) |
do bi = mybxlo(mythid), mybxhi(mythid) |
75 |
do j = 1, sny |
do j = 1, sny |
76 |
do i = 1, snx |
do i = 1, snx |
77 |
if (runoff(i,j,bi,bj).gt.20.) runoff(i,j,bi,bj)=0. |
if (ABS(runoff(i,j,bi,bj)).gt.20.) runoff(i,j,bi,bj)=0. |
78 |
runoff(i,j,bi,bj) = exf_inscal_runoff*runoff(i,j,bi,bj) |
runoff(i,j,bi,bj)=exf_inscal_runoff*runoff(i,j,bi,bj) |
79 |
enddo |
enddo |
80 |
enddo |
enddo |
81 |
enddo |
enddo |
82 |
enddo |
enddo |
83 |
endif |
endif |
84 |
|
|
85 |
|
print *, 'WARNING: runoff raw file cut off at values > 20!' |
86 |
|
CALL PLOT_FIELD_XYRL( runoff, |
87 |
|
& 'Runoff after rescaling and exf_inscal_runoff' , |
88 |
|
& 0, myThid ) |
89 |
|
|
90 |
#endif |
#endif |
91 |
|
|
92 |
end |
end |