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 changed: 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 |
#ifdef ALLOW_RUNOFF |
35 |
|
36 |
c == local variables == |
37 |
|
38 |
integer bi, bj |
39 |
integer i, j |
40 |
|
41 |
_RL fac |
42 |
|
43 |
c == end of interface == |
44 |
|
45 |
do bj = mybylo(mythid), mybyhi(mythid) |
46 |
do bi = mybxlo(mythid), mybxhi(mythid) |
47 |
do j = 1, sny |
48 |
do i = 1, snx |
49 |
runoff(i,j,bi,bj) = 0. _d 0 |
50 |
enddo |
51 |
enddo |
52 |
enddo |
53 |
enddo |
54 |
|
55 |
if ( runofffile .NE. ' ' ) then |
56 |
call mdsreadfield( runofffile, exf_iprec, exf_yftype, 1 |
57 |
& , runoff, 1, mythid |
58 |
& ) |
59 |
if (exf_yftype .eq. 'RL') then |
60 |
call exf_filter_rl( runoff, runoffmask, mythid ) |
61 |
else |
62 |
call exf_filter_rs( runoff, runoffmask, mythid ) |
63 |
end if |
64 |
|
65 |
cds conversion from m/yr to m/s and changing sign. |
66 |
fac = -1.0/(86400.*365.0) |
67 |
do bj = mybylo(mythid), mybyhi(mythid) |
68 |
do bi = mybxlo(mythid), mybxhi(mythid) |
69 |
do j = 1, sny |
70 |
do i = 1, snx |
71 |
if (runoff(i,j,bi,bj).gt.20.) runoff(i,j,bi,bj)=0. |
72 |
runoff(i,j,bi,bj) = fac*runoff(i,j,bi,bj) |
73 |
enddo |
74 |
enddo |
75 |
enddo |
76 |
enddo |
77 |
endif |
78 |
|
79 |
#endif ALLOW_RUNOFF |
80 |
|
81 |
end |