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

Contents of /MITgcm/pkg/exf/exf_set_evap.F

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


Revision 1.2.4.2 - (show annotations) (download)
Fri Feb 14 23:10:35 2003 UTC (21 years, 4 months ago) by dimitri
Branch: ecco-branch
CVS Tags: icebear3, icebear2, icebear4
Changes since 1.2.4.1: +103 -1 lines
o Added missing /* */ to CPP comments in pkg/seaice, pkg/exf,
  kpp_transport_t.F,and ecco_the_main_loop.F

1 #include "EXF_CPPOPTIONS.h"
2
3 subroutine exf_set_evap( mycurrenttime, mycurrentiter, mythid )
4
5 c ==================================================================
6 c SUBROUTINE exf_set_evap
7 c ==================================================================
8 c
9 c o set external forcing evap
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
14 c ==================================================================
15 c SUBROUTINE exf_set_evap
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_constants.h"
28 #include "exf_fields.h"
29
30 c == routine arguments ==
31
32 _RL mycurrenttime
33 integer mycurrentiter
34 integer mythid
35
36 #ifdef EXF_READ_EVAP
37 c == local variables ==
38
39 logical first, changed
40 integer count0, count1
41 _RL fac
42
43 integer bi, bj
44 integer i, j
45
46 c == end of interface ==
47
48 if ( evapfile .NE. ' ' ) then
49
50 c get record numbers and interpolation factor for evap
51 call exf_GetFFieldRec(
52 I evapstartdate, evapperiod
53 O , fac, first, changed
54 O , count0, count1
55 I , mycurrenttime, mycurrentiter, mythid
56 & )
57
58 if ( first ) then
59 call mdsreadfield( evapfile, exf_iprec, exf_yftype, 1
60 & , evap1, count0, mythid
61 & )
62 if (exf_yftype .eq. 'RL') then
63 call exf_filter_rl( evap1, evapmask, mythid )
64 else
65 call exf_filter_rs( evap1, evapmask, mythid )
66 end if
67 endif
68
69 if (( first ) .or. ( changed )) then
70 call exf_SwapFFields( evap0, evap1, mythid )
71
72 call mdsreadfield( evapfile, exf_iprec, exf_yftype, 1
73 & , evap1, count1, mythid
74 & )
75 if (exf_yftype .eq. 'RL') then
76 call exf_filter_rl( evap1, evapmask, mythid )
77 else
78 call exf_filter_rs( evap1, evapmask, mythid )
79 end if
80 endif
81
82 c Loop over tiles.
83 do bj = mybylo(mythid),mybyhi(mythid)
84 do bi = mybxlo(mythid),mybxhi(mythid)
85 do j = 1,sny
86 do i = 1,snx
87
88 c Interpolate linearly onto the current time.
89
90 evap(i,j,bi,bj) = fac * evap0(i,j,bi,bj) +
91 & (exf_one - fac) * evap1(i,j,bi,bj)
92
93 enddo
94 enddo
95 enddo
96 enddo
97
98 endif
99
100 #endif /* EXF_READ_EVAP */
101
102 end
103
104
105
106 subroutine exf_init_evap( mythid )
107
108 c ==================================================================
109 c SUBROUTINE exf_init_evap
110 c ==================================================================
111 c
112 c o
113 c
114 c started: Ralf.Giering@FastOpt.de 25-Mai-2000
115 c changed: heimbach@mit.edu 10-Jan-2002
116 c mods for pkg/seaice: menemenlis@jpl.nasa.gov 20-Dec-2002
117 c
118 c ==================================================================
119 c SUBROUTINE exf_init_evap
120 c ==================================================================
121
122 implicit none
123
124 c == global variables ==
125
126 #include "EEPARAMS.h"
127 #include "SIZE.h"
128
129 #include "exf_param.h"
130 #include "exf_fields.h"
131
132 c == routine arguments ==
133
134 integer mythid
135
136 #if defined(ALLOW_ATM_TEMP) || defined(EXF_READ_EVAP)
137 c == local variables ==
138
139 integer bi, bj
140 integer i, j
141
142 c == end of interface ==
143
144 do bj = mybylo(mythid), mybyhi(mythid)
145 do bi = mybxlo(mythid), mybxhi(mythid)
146 do j = 1, sny
147 do i = 1, snx
148 evap(i,j,bi,bj) = 0. _d 0
149 #ifdef EXF_READ_EVAP
150 evap0(i,j,bi,bj) = 0. _d 0
151 evap1(i,j,bi,bj) = 0. _d 0
152 #endif
153 enddo
154 enddo
155 enddo
156 enddo
157
158 #endif /* ALLOW_ATM_TEMP or EXF_READ_EVAP */
159
160 end

  ViewVC Help
Powered by ViewVC 1.1.22