27 logical,
intent(in) :: Lwrite
28 integer,
intent(in) :: model, inp, out
33 integer :: i, j, igrid, mc, nc, ng, status
38 real(dp),
dimension(nRval) :: Rval
40 character (len=35) :: frmt
41 character (len=40) :: KeyWord
42 character (len=256) :: line
43 character (len=256),
dimension(nCval) :: Cval
45 character (len=1 ),
parameter :: blank =
' '
60 READ (inp,
'(a)',
err=10,
END=30) line
61 status=decode_line(line, keyword, nval, cval, rval)
63 SELECT CASE (trim(keyword))
65 npts=load_r(nval, rval, ngrids, larvae_size0)
67 npts=load_r(nval, rval, ngrids, larvae_gr0)
69 npts=load_r(nval, rval, ngrids, settle_size)
71 npts=load_r(nval, rval, ngrids, food_supply)
73 npts=load_r(nval, rval, ngrids, turb_ambi)
75 npts=load_r(nval, rval, ngrids, turb_crit)
77 npts=load_r(nval, rval, ngrids, turb_slop)
79 npts=load_r(nval, rval, ngrids, turb_axis)
81 npts=load_r(nval, rval, ngrids, turb_base)
83 npts=load_r(nval, rval, ngrids, turb_rate)
85 npts=load_r(nval, rval, ngrids, turb_mean)
87 npts=load_r(nval, rval, ngrids, turb_size)
89 npts=load_r(nval, rval, ngrids, swim_tmin)
91 npts=load_r(nval, rval, ngrids, swim_tmax)
93 npts=load_r(nval, rval, ngrids, swim_sinc)
95 npts=load_r(nval, rval, ngrids, swim_sdec)
97 npts=load_r(nval, rval, ngrids, slope_sinc)
99 npts=load_r(nval, rval, ngrids, slope_sdec)
101 npts=load_r(nval, rval, ngrids, sink_base)
103 npts=load_r(nval, rval, ngrids, sink_rate)
105 npts=load_r(nval, rval, ngrids, sink_size)
107 npts=load_i(nval, rval, 1, ivalue)
110 npts=load_i(nval, rval, 1, ivalue)
113 npts=load_r(nval, rval, 1, rvalue)
116 npts=load_r(nval, rval, 1, rvalue)
119 npts=load_r(nval, rval, 1, rvalue)
122 npts=load_r(nval, rval, 1, rvalue)
125 IF (.not.
allocated(swim_table))
THEN
126 allocate ( swim_table(swim_im,swim_jm) )
128 dmem(1)=dmem(1)+real(swim_im*swim_jm,r8)
130 READ (inp,*,err=20,
END=30) &
131 ((swim_table(i,j),i=1,swim_im),j=1,swim_jm)
133 npts=load_i(nval, rval, 1, ivalue)
136 npts=load_i(nval, rval, 1, ivalue)
139 npts=load_r(nval, rval, 1, rvalue)
142 npts=load_r(nval, rval, 1, rvalue)
145 npts=load_r(nval, rval, 1, rvalue)
148 npts=load_r(nval, rval, 1, rvalue)
150 CASE (
'Gfactor_table')
151 IF (.not.
allocated(gfactor_table))
THEN
152 allocate ( gfactor_table(gfactor_im,gfactor_jm) )
154 dmem(1)=dmem(1)+real(gfactor_im*gfactor_jm)
156 READ (inp,*,err=20,
END=30) &
157 ((gfactor_table(i,j),i=1,gfactor_im),j=1,gfactor_jm)
159 npts=load_i(nval, rval, 1, ivalue)
162 npts=load_i(nval, rval, 1, ivalue)
165 npts=load_r(nval, rval, 1, rvalue)
168 npts=load_r(nval, rval, 1, rvalue)
171 npts=load_r(nval, rval, 1, rvalue)
174 npts=load_r(nval, rval, 1, rvalue)
177 IF (.not.
allocated(grate_table))
THEN
178 allocate ( grate_table(grate_im,grate_jm) )
180 dmem(1)=dmem(1)+real(grate_im*grate_jm,r8)
182 READ (inp,*,err=20,
END=30) &
183 ((grate_table(i,j),i=1,grate_im),j=1,grate_jm)
187 10
IF (master)
WRITE (out,40) line
190 20
IF (master)
WRITE (out,50) trim(keyword)
199 IF (master.and.lwrite)
THEN
202 WRITE (out,70) larvae_size0(ng),
'Larvae_size0', &
203 &
'Initial larvae size (um).'
204 WRITE (out,70) larvae_gr0(ng),
'Larvae_GR0', &
205 &
'Initial larvae growth rate (um/day).'
206 WRITE (out,70) settle_size(ng),
'settle_size', &
207 &
'Larvae settlement size (um).'
208 WRITE (out,70) food_supply(ng),
'food_supply', &
209 &
'Food supply (mg Carbon/l).'
210 WRITE (out,70) turb_ambi(ng),
'turb_ambi', &
211 &
'Ambient turbidity level (g/l).'
212 WRITE (out,70) turb_crit(ng),
'turb_crit', &
213 &
'Critical turbidity value (g/l).'
214 WRITE (out,70) turb_slop(ng),
'turb_slop', &
215 &
'Turbidity linear slope (l/g).'
216 WRITE (out,70) turb_axis(ng),
'turb_axis', &
217 &
'Turbidity linear axis crossing (g/l).'
218 WRITE (out,70) turb_base(ng),
'turb_base', &
219 &
'Turbidity exponential base factor (g/l).'
220 WRITE (out,70) turb_rate(ng),
'turb_rate', &
221 &
'Turbidity exponential rate (l/g).'
222 WRITE (out,70) turb_mean(ng),
'turb_mean', &
223 &
'Turbidity exponential mean (g/l).'
224 WRITE (out,70) turb_size(ng),
'turb_size', &
225 &
'Minimum larvae size (um) affected by turbidity.'
226 WRITE (out,70) swim_tmin(ng),
'swim_Tmin', &
227 &
'Minimum swimming time fraction.'
228 WRITE (out,70) swim_tmax(ng),
'swim_Tmax', &
229 &
'Maximum swimming time fraction.'
230 WRITE (out,70) swim_sinc(ng),
'swim_Sinc', &
231 &
'Swimming, active fraction due to increasing salinity.'
232 WRITE (out,70) swim_sdec(ng),
'swim_Sdec', &
233 &
'Swimming, active fraction due to decreasing salinity.'
234 WRITE (out,70) slope_sinc(ng),
'slope_Sinc', &
235 &
'Swimming, coefficient due to increasing salinity.'
236 WRITE (out,70) slope_sdec(ng),
'slope_Sdec', &
237 &
'Swimming, coefficient due to increasing salinity.'
238 WRITE (out,70) sink_base(ng),
'sink_base', &
239 &
'Sinking, exponential base factor (mm/s).'
240 WRITE (out,70) sink_rate(ng),
'sink_rate', &
241 &
'Sinking, exponential rate factor (1/um).'
242 WRITE (out,70) sink_size(ng),
'sink_mean', &
243 &
'Sinking, exponential mean size (um).'
244 WRITE (out,80) swim_im,
'swim_Im', &
245 &
'Swim table, number of values in larval size I-axis.'
246 WRITE (out,80) swim_jm,
'swim_Jm', &
247 &
'Swim table, number of values in temperature J-axis.'
248 WRITE (out,70) swim_l0,
'swim_L0', &
249 &
'Swim table, starting value for larval size I-axis.'
250 WRITE (out,70) swim_t0,
'swim_T0', &
251 &
'Swim table, starting value for temperature J-axis.'
252 WRITE (out,70) swim_dl,
'swim_DL', &
253 &
'Swim table, larval size I-axis increment.'
254 WRITE (out,70) swim_dt,
'swim_DT', &
255 &
'Swim table, temperature J-axis increment.'
256 WRITE (out,80) gfactor_im,
'Gfactor_Im', &
257 &
'Gfactor table, number of values in salinity I-axis.'
258 WRITE (out,80) gfactor_jm,
'Gfactor_Jm', &
259 &
'Gfactor table, number of values in temperature J-axis.'
260 WRITE (out,70) gfactor_s0,
'Gfactor_S0', &
261 &
'Gfactor table, starting value for salinity I-axis.'
262 WRITE (out,70) gfactor_t0,
'Gfactor_T0', &
263 &
'Gfactor table, starting value for temperature J-axis.'
264 WRITE (out,70) gfactor_ds,
'Gfactor_DS', &
265 &
'Gfactor table, starting value for salinity I-axis.'
266 WRITE (out,70) gfactor_dt,
'Gfactor_DT', &
267 &
'Gfactor table, starting value for temperature J-axis.'
268 WRITE (out,80) grate_im,
'Grate_Im', &
269 &
'Grate table, number of values in food supply I-axis.'
270 WRITE (out,80) grate_jm,
'Grate_Jm', &
271 &
'Grate table, number of values in larval size J-axis.'
272 WRITE (out,70) grate_f0,
'Grate_F0', &
273 &
'Grate table, starting value for food supply I-axis.'
274 WRITE (out,70) grate_l0,
'Grate_L0', &
275 &
'Grate table, starting value for larval size J-axis.'
276 WRITE (out,70) grate_df,
'Grate_DF', &
277 &
'Grate table, food supply I-axis increment.'
278 WRITE (out,70) grate_dl,
'Grate_DL', &
279 &
'Grate table, larval size J-axis increment.'
283 40
FORMAT (/,
' READ_FloatsBioPar - Error while processing line: ',/, &
285 50
FORMAT (/,
' READ_FloatsBioPar - Error reading look table: ',a)
286 60
FORMAT (/,/,
' Biological Floats Behavior Parameters, Grid: ',i2.2,&
287 & /,
' ===============================================',/)
288 70
FORMAT (1p,e11.4,2x,a,t32,a)
289 80
FORMAT (1x,i10,2x,a,t32,a)