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 |
call mdsreadfield( runofffile, exf_iprec, exf_yftype, 1 |
55 |
& , runoff, 1, mythid |
56 |
& ) |
57 |
if (exf_yftype .eq. 'RL') then |
58 |
call exf_filter_rl( runoff, runoffmask, mythid ) |
59 |
else |
60 |
call exf_filter_rs( runoff, runoffmask, mythid ) |
61 |
end if |
62 |
|
63 |
c-- scale runoff array |
64 |
do bj = mybylo(mythid), mybyhi(mythid) |
65 |
do bi = mybxlo(mythid), mybxhi(mythid) |
66 |
do j = 1, sny |
67 |
do i = 1, snx |
68 |
if (runoff(i,j,bi,bj).gt.20.) runoff(i,j,bi,bj)=0. |
69 |
runoff(i,j,bi,bj) = exf_inscal_runoff*runoff(i,j,bi,bj) |
70 |
enddo |
71 |
enddo |
72 |
enddo |
73 |
enddo |
74 |
endif |
75 |
|
76 |
#endif |
77 |
|
78 |
end |