/[MITgcm]/MITgcm/pkg/exf/exf_init_runoff.F
ViewVC logotype

Annotation of /MITgcm/pkg/exf/exf_init_runoff.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.10 - (hide annotations) (download)
Mon Nov 22 20:47:34 2004 UTC (19 years, 7 months ago) by heimbach
Branch: MAIN
Changes since 1.9: +5 -0 lines
exf_check_range:
* default changed to .TRUE.
* will check values for niter0 if debLevA, every timestep if debLevB
* STOP in exf_check_range if 'out of range'
* range chosen generous to allow for potential extema
TBD: a version with stricter range
     permitted range would be runtime parameters

1 edhill 1.8 #include "EXF_OPTIONS.h"
2 heimbach 1.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 dimitri 1.4 c mods for pkg/seaice: menemenlis@jpl.nasa.gov 20-Dec-2002
13 heimbach 1.2 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 dimitri 1.4 #if (defined (ALLOW_RUNOFF) || defined (ALLOW_SEAICE))
35 dimitri 1.3
36 heimbach 1.2 c == local variables ==
37    
38 dimitri 1.7 integer bi, bj, i, j, interp_method
39 heimbach 1.2
40     c == end of interface ==
41    
42     do bj = mybylo(mythid), mybyhi(mythid)
43     do bi = mybxlo(mythid), mybxhi(mythid)
44     do j = 1, sny
45     do i = 1, snx
46     runoff(i,j,bi,bj) = 0. _d 0
47     enddo
48     enddo
49     enddo
50     enddo
51    
52 dimitri 1.3 if ( runofffile .NE. ' ' ) then
53 dimitri 1.5 #ifdef USE_EXF_INTERPOLATION
54 dimitri 1.7 interp_method = 2
55 dimitri 1.6 call exf_interp(
56 dimitri 1.5 & runofffile, exf_iprec
57     & , runoff, 1, xC, yC
58     & ,runoff_lon0,runoff_lon_inc
59     & ,runoff_lat0,runoff_lat_inc
60 dimitri 1.7 & ,runoff_nlon,runoff_nlat,interp_method,mythid )
61 dimitri 1.5 #else
62 dimitri 1.3 call mdsreadfield( runofffile, exf_iprec, exf_yftype, 1
63     & , runoff, 1, mythid
64     & )
65 dimitri 1.5 #endif
66 dimitri 1.3 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 dimitri 1.4 c-- scale runoff array
73 dimitri 1.3 do bj = mybylo(mythid), mybyhi(mythid)
74 dimitri 1.4 do bi = mybxlo(mythid), mybxhi(mythid)
75     do j = 1, sny
76     do i = 1, snx
77 heimbach 1.9 if (ABS(runoff(i,j,bi,bj)).gt.20.) runoff(i,j,bi,bj)=0.
78     runoff(i,j,bi,bj) = exf_inscal_runoff/year2sec
79     & *runoff(i,j,bi,bj)
80 dimitri 1.4 enddo
81 heimbach 1.2 enddo
82 dimitri 1.4 enddo
83     enddo
84 dimitri 1.3 endif
85 heimbach 1.2
86 heimbach 1.10 print *, 'WARNING: runoff raw file cut off at values > 20!'
87     CALL PLOT_FIELD_XYRL( runoff,
88     & 'Runoff after rescaling and exf_inscal_runoff' ,
89     & 0, myThid )
90    
91 dimitri 1.4 #endif
92 heimbach 1.2
93     end

  ViewVC Help
Powered by ViewVC 1.1.22