1 |
#include "EXF_CPPOPTIONS.h" |
2 |
|
3 |
subroutine exf_init_runoff( mythid ) |
4 |
|
5 |
c ================================================================== |
6 |
c SUBROUTINE exf_init_runoff |
7 |
c ================================================================== |
8 |
c |
9 |
c o |
10 |
c |
11 |
c started: Ralf.Giering@FastOpt.de 25-Mai-2000 |
12 |
c mods for pkg/seaice: menemenlis@jpl.nasa.gov 20-Dec-2002 |
13 |
c |
14 |
c ================================================================== |
15 |
c SUBROUTINE exf_init_runoff |
16 |
c ================================================================== |
17 |
|
18 |
implicit none |
19 |
|
20 |
c == global variables == |
21 |
|
22 |
#include "EEPARAMS.h" |
23 |
#include "SIZE.h" |
24 |
#include "GRID.h" |
25 |
|
26 |
#include "exf_param.h" |
27 |
#include "exf_fields.h" |
28 |
#include "exf_constants.h" |
29 |
|
30 |
c == routine arguments == |
31 |
|
32 |
integer mythid |
33 |
|
34 |
#if (defined (ALLOW_RUNOFF) || defined (ALLOW_SEAICE)) |
35 |
|
36 |
c == local variables == |
37 |
|
38 |
integer bi, bj |
39 |
integer i, j |
40 |
|
41 |
c == end of interface == |
42 |
|
43 |
do bj = mybylo(mythid), mybyhi(mythid) |
44 |
do bi = mybxlo(mythid), mybxhi(mythid) |
45 |
do j = 1, sny |
46 |
do i = 1, snx |
47 |
runoff(i,j,bi,bj) = 0. _d 0 |
48 |
enddo |
49 |
enddo |
50 |
enddo |
51 |
enddo |
52 |
|
53 |
if ( runofffile .NE. ' ' ) then |
54 |
#ifdef USE_EXF_INTERPOLATION |
55 |
call new_interp( |
56 |
& runofffile, exf_iprec |
57 |
& , runoff, 1, xC, yC |
58 |
& ,runoff_lon0,runoff_lon_inc |
59 |
& ,runoff_lat0,runoff_lat_inc |
60 |
& ,runoff_nlon,runoff_nlat,mythid ) |
61 |
#else |
62 |
call mdsreadfield( runofffile, exf_iprec, exf_yftype, 1 |
63 |
& , runoff, 1, mythid |
64 |
& ) |
65 |
#endif |
66 |
if (exf_yftype .eq. 'RL') then |
67 |
call exf_filter_rl( runoff, runoffmask, mythid ) |
68 |
else |
69 |
call exf_filter_rs( runoff, runoffmask, mythid ) |
70 |
end if |
71 |
|
72 |
c-- scale runoff array |
73 |
do bj = mybylo(mythid), mybyhi(mythid) |
74 |
do bi = mybxlo(mythid), mybxhi(mythid) |
75 |
do j = 1, sny |
76 |
do i = 1, snx |
77 |
if (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) |
79 |
enddo |
80 |
enddo |
81 |
enddo |
82 |
enddo |
83 |
endif |
84 |
|
85 |
#endif |
86 |
|
87 |
end |