3*************************************************** hernan g. arango ***
4** copyright(c) 2002-2025 the roms group **
5** licensed under a mit/x style license **
6** see license_roms.md **
7************************************************************************
9** writes ecosim bio-optical model input parameters into
output **
10** netcdf files. it is included in routine
"wrt_info.F". **
12************************************************************************
18 CALL pio_netcdf_put_ivar (ng, model, ncname,
'BioIter', &
19 & bioiter(ng), (/0/), (/0/), &
21 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
23 CALL pio_netcdf_put_lvar (ng, model, ncname,
'RtUVR_flag', &
24 & rtuvr_flag(ng), (/0/), (/0/), &
26 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
28 CALL pio_netcdf_put_lvar (ng, model, ncname,
'NFIX_flag', &
29 & nfix_flag(ng), (/0/), (/0/), &
31 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
33 CALL pio_netcdf_put_lvar (ng, model, ncname,
'Regen_flag', &
34 & regen_flag(ng), (/0/), (/0/), &
36 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
38 IF (fileh.ne.dia(ng)%pioFile%fh)
THEN
39 CALL pio_netcdf_put_fvar (ng, model, ncname,
'light', &
40 & ec_wave_ab, (/1/), (/nbands/), &
44 CALL pio_netcdf_put_fvar (ng, model, ncname,
'light', &
45 & dia_light, (/1/), (/ndbands/), &
49 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
51 CALL pio_netcdf_put_fvar (ng, model, ncname,
'HsNO3', &
52 & hsno3(:,ng), (/1/), (/nphy/), &
54 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
56 CALL pio_netcdf_put_fvar (ng, model, ncname,
'HsNH4', &
57 & hsnh4(:,ng), (/1/), (/nphy/), &
59 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
61 CALL pio_netcdf_put_fvar (ng, model, ncname,
'HsSiO', &
62 & hssio(:,ng), (/1/), (/nphy/), &
64 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
66 CALL pio_netcdf_put_fvar (ng, model, ncname,
'HsPO4', &
67 & hspo4(:,ng), (/1/), (/nphy/), &
69 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
71 CALL pio_netcdf_put_fvar (ng, model, ncname,
'HsFe', &
72 & hsfe(:,ng), (/1/), (/nphy/), &
74 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
76 CALL pio_netcdf_put_fvar (ng, model, ncname,
'GtALG_max', &
77 & gtalg_max(:,ng), (/1/), (/nphy/), &
79 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
81 CALL pio_netcdf_put_fvar (ng, model, ncname,
'PhyTbase', &
82 & phytbase(:,ng), (/1/), (/nphy/), &
84 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
86 CALL pio_netcdf_put_fvar (ng, model, ncname,
'PhyTfac', &
87 & phytfac(:,ng), (/1/), (/nphy/), &
89 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
91 CALL pio_netcdf_put_fvar (ng, model, ncname,
'BET_', &
92 & bet_(:,ng), (/1/), (/nphy/), &
94 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
96 CALL pio_netcdf_put_fvar (ng, model, ncname,
'maxC2nALG', &
97 & maxc2nalg(:,ng), (/1/), (/nphy/), &
99 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
101 CALL pio_netcdf_put_fvar (ng, model, ncname,
'minC2nALG', &
102 & minc2nalg(:,ng), (/1/), (/nphy/), &
104 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
106 CALL pio_netcdf_put_fvar (ng, model, ncname,
'C2nALGminABS', &
107 & c2nalgminabs(:,ng), (/1/), (/nphy/), &
109 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
111 CALL pio_netcdf_put_fvar (ng, model, ncname,
'maxC2SiALG', &
112 & maxc2sialg(:,ng), (/1/), (/nphy/), &
114 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
116 CALL pio_netcdf_put_fvar (ng, model, ncname,
'minC2SiALG', &
117 & minc2sialg(:,ng), (/1/), (/nphy/), &
119 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
121 CALL pio_netcdf_put_fvar (ng, model, ncname,
'C2SiALGminABS', &
122 & c2sialgminabs(:,ng), (/1/), (/nphy/), &
124 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
126 CALL pio_netcdf_put_fvar (ng, model, ncname,
'maxC2pALG', &
127 & maxc2palg(:,ng), (/1/), (/nphy/), &
129 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
131 CALL pio_netcdf_put_fvar (ng, model, ncname,
'minC2pALG', &
132 & minc2palg(:,ng), (/1/), (/nphy/), &
134 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
136 CALL pio_netcdf_put_fvar (ng, model, ncname,
'C2pALGminABS', &
137 & c2palgminabs(:,ng), (/1/), (/nphy/), &
139 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
141 CALL pio_netcdf_put_fvar (ng, model, ncname,
'maxC2FeALG', &
142 & maxc2fealg(:,ng), (/1/), (/nphy/), &
144 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
146 CALL pio_netcdf_put_fvar (ng, model, ncname,
'minC2FeALG', &
147 & minc2fealg(:,ng), (/1/), (/nphy/), &
149 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
151 CALL pio_netcdf_put_fvar (ng, model, ncname,
'C2FeALGminABS', &
152 & c2fealgminabs(:,ng), (/1/), (/nphy/), &
154 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
156 CALL pio_netcdf_put_fvar (ng, model, ncname,
'qu_yld', &
157 & qu_yld(:,ng), (/1/), (/nphy/), &
159 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
161 CALL pio_netcdf_put_fvar (ng, model, ncname,
'E0_comp', &
162 & e0_comp(:,ng), (/1/), (/nphy/), &
164 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
166 CALL pio_netcdf_put_fvar (ng, model, ncname,
'E0_inhib', &
167 & e0_inhib(:,ng), (/1/), (/nphy/), &
169 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
171 CALL pio_netcdf_put_fvar (ng, model, ncname,
'inhib_fac', &
172 & inhib_fac(:,ng), (/1/), (/nphy/), &
174 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
176 CALL pio_netcdf_put_fvar (ng, model, ncname,
'C2CHL_max', &
177 & c2chl_max(:,ng), (/1/), (/nphy/), &
179 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
181 CALL pio_netcdf_put_fvar (ng, model, ncname,
'mxC2Cl', &
182 & mxc2cl(:,ng), (/1/), (/nphy/), &
184 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
186 CALL pio_netcdf_put_fvar (ng, model, ncname,
'b_C2Cl', &
187 & b_c2cl(:,ng), (/1/), (/nphy/), &
189 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
191 CALL pio_netcdf_put_fvar (ng, model, ncname,
'mxC2Cn', &
192 & mxc2cn(:,ng), (/1/), (/nphy/), &
194 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
196 CALL pio_netcdf_put_fvar (ng, model, ncname,
'b_C2Cn', &
197 & b_c2cn(:,ng), (/1/), (/nphy/), &
199 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
201 CALL pio_netcdf_put_fvar (ng, model, ncname,
'mxPacEff', &
202 & mxpaceff(:,ng), (/1/), (/nphy/), &
204 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
206 CALL pio_netcdf_put_fvar (ng, model, ncname,
'b_PacEff', &
207 & b_paceff(:,ng), (/1/), (/nphy/), &
209 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
211 CALL pio_netcdf_put_fvar (ng, model, ncname,
'mxChlB', &
212 & mxchlb(:,ng), (/1/), (/nphy/), &
214 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
216 CALL pio_netcdf_put_fvar (ng, model, ncname,
'b_ChlB', &
217 & b_chlb(:,ng), (/1/), (/nphy/), &
219 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
221 CALL pio_netcdf_put_fvar (ng, model, ncname,
'mxChlC', &
222 & mxchlc(:,ng), (/1/), (/nphy/), &
224 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
226 CALL pio_netcdf_put_fvar (ng, model, ncname,
'b_ChlC', &
227 & b_chlc(:,ng), (/1/), (/nphy/), &
229 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
231 CALL pio_netcdf_put_fvar (ng, model, ncname,
'mxPSC', &
232 & mxpsc(:,ng), (/1/), (/nphy/), &
234 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
236 CALL pio_netcdf_put_fvar (ng, model, ncname,
'b_PSC', &
237 & b_psc(:,ng), (/1/), (/nphy/), &
239 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
241 CALL pio_netcdf_put_fvar (ng, model, ncname,
'mxPPC', &
242 & mxppc(:,ng), (/1/), (/nphy/), &
244 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
246 CALL pio_netcdf_put_fvar (ng, model, ncname,
'b_PPC', &
247 & b_ppc(:,ng), (/1/), (/nphy/), &
249 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
251 CALL pio_netcdf_put_fvar (ng, model, ncname,
'mxLPUb', &
252 & mxlpub(:,ng), (/1/), (/nphy/), &
254 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
256 CALL pio_netcdf_put_fvar (ng, model, ncname,
'b_LPUb', &
257 & b_lpub(:,ng), (/1/), (/nphy/), &
259 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
261 CALL pio_netcdf_put_fvar (ng, model, ncname,
'mxHPUb', &
262 & mxhpub(:,ng), (/1/), (/nphy/), &
264 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
266 CALL pio_netcdf_put_fvar (ng, model, ncname,
'b_HPUb', &
267 & b_hpub(:,ng), (/1/), (/nphy/), &
269 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
271 CALL pio_netcdf_put_fvar (ng, model, ncname,
'FecDOC', &
272 & fecdoc(:,ng), (/1/), (/nphy/), &
274 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
276 CALL pio_netcdf_put_fvar (ng, model, ncname,
'FecPEL', &
277 & fecpel(:,:,ng), (/1,1/), (/nphy,nfec/), &
279 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
281 CALL pio_netcdf_put_fvar (ng, model, ncname,
'FecCYC', &
282 & feccyc(:,ng), (/1/), (/nphy/), &
284 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
286 CALL pio_netcdf_put_fvar (ng, model, ncname,
'ExALG', &
287 & exalg(:,ng), (/1/), (/nphy/), &
289 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
291 CALL pio_netcdf_put_fvar (ng, model, ncname,
'WS', &
292 & ws(:,ng), (/1/), (/nphy/), &
294 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
296 CALL pio_netcdf_put_fvar (ng, model, ncname,
'HsGRZ', &
297 & hsgrz(:,ng), (/1/), (/nphy/), &
299 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
301 CALL pio_netcdf_put_fvar (ng, model, ncname,
'MinRefuge', &
302 & minrefuge(:,ng), (/1/), (/nphy/), &
304 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
306 CALL pio_netcdf_put_fvar (ng, model, ncname,
'RefugeDep', &
307 & refugedep(:,ng), (/1/), (/nphy/), &
309 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
311 CALL pio_netcdf_put_fvar (ng, model, ncname,
'Norm_Vol', &
312 & norm_vol(:,ng), (/1/), (/nphy/), &
314 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
316 CALL pio_netcdf_put_fvar (ng, model, ncname,
'Norm_Surf', &
317 & norm_surf(:,ng), (/1/), (/nphy/), &
319 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
321 CALL pio_netcdf_put_fvar (ng, model, ncname,
'HsDOP', &
322 & hsdop(:,ng), (/1/), (/nphy/), &
324 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
326 CALL pio_netcdf_put_fvar (ng, model, ncname,
'C2pALKPHOS', &
327 & c2palkphos(:,ng), (/1/), (/nphy/), &
329 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
331 CALL pio_netcdf_put_fvar (ng, model, ncname,
'HsDON', &
332 & hsdon(:,ng), (/1/), (/nphy/), &
334 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
336 CALL pio_netcdf_put_fvar (ng, model, ncname,
'C2nNupDON', &
337 & c2nnupdon(:,ng), (/1/), (/nphy/), &
339 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
341 CALL pio_netcdf_put_fvar (ng, model, ncname,
'HsDOC_ba', &
342 & hsdoc_ba(:,ng), (/1/), (/nbac/), &
344 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
346 CALL pio_netcdf_put_fvar (ng, model, ncname,
'GtBAC_max', &
347 & gtbac_max(:,ng), (/1/), (/nbac/), &
349 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
351 CALL pio_netcdf_put_fvar (ng, model, ncname,
'BacTbase', &
352 & bactbase(:,ng), (/1/), (/nbac/), &
354 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
356 CALL pio_netcdf_put_fvar (ng, model, ncname,
'BacTfac', &
357 & bactfac(:,ng), (/1/), (/nbac/), &
359 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
361 CALL pio_netcdf_put_fvar (ng, model, ncname,
'C2nBAC', &
362 & c2nbac(ng), (/0/), (/0/), &
364 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
366 CALL pio_netcdf_put_fvar (ng, model, ncname,
'C2pBAC', &
367 & c2pbac(ng), (/0/), (/0/), &
369 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
371 CALL pio_netcdf_put_fvar (ng, model, ncname,
'C2FeBAC', &
372 & c2febac(ng), (/0/), (/0/), &
374 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
376 CALL pio_netcdf_put_fvar (ng, model, ncname,
'BacDOC', &
377 & bacdoc(ng), (/0/), (/0/), &
379 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
381 CALL pio_netcdf_put_fvar (ng, model, ncname,
'BacPEL', &
382 & bacpel(ng), (/0/), (/0/), &
384 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
386 CALL pio_netcdf_put_fvar (ng, model, ncname,
'BacCYC', &
387 & baccyc(ng), (/0/), (/0/), &
389 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
391 CALL pio_netcdf_put_fvar (ng, model, ncname,
'ExBAC_c', &
392 & exbac_c(ng), (/0/), (/0/), &
394 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
396 CALL pio_netcdf_put_fvar (ng, model, ncname,
'ExBacC2N', &
397 & exbacc2n(ng), (/0/), (/0/), &
399 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
401 CALL pio_netcdf_put_fvar (ng, model, ncname,
'Bac_Ceff', &
402 & bac_ceff(ng), (/0/), (/0/), &
404 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
406 CALL pio_netcdf_put_fvar (ng, model, ncname,
'RtNIT', &
407 & rtnit(ng), (/0/), (/0/), &
409 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
411 CALL pio_netcdf_put_fvar (ng, model, ncname,
'HsNIT', &
412 & hsnit(ng), (/0/), (/0/), &
414 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
416 CALL pio_netcdf_put_fvar (ng, model, ncname,
'cDOCfrac_c', &
417 & cdocfrac_c(:,ng), (/1/), (/ndom/), &
419 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
421 CALL pio_netcdf_put_fvar (ng, model, ncname,
'RtUVR_DIC', &
422 & rtuvr_dic(ng), (/0/), (/0/), &
424 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
426 CALL pio_netcdf_put_fvar (ng, model, ncname,
'RtUVR_DOC', &
427 & rtuvr_dic(ng), (/0/), (/0/), &
429 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
431 CALL pio_netcdf_put_fvar (ng, model, ncname,
'WF', &
432 & wf(:,ng), (/1/), (/nfec/), &
434 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
436 CALL pio_netcdf_put_fvar (ng, model, ncname,
'RegTbase', &
437 & regtbase(:,ng), (/1/), (/nfec/), &
439 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
441 CALL pio_netcdf_put_fvar (ng, model, ncname,
'RegTfac', &
442 & regtfac(:,ng), (/1/), (/nfec/), &
444 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
446 CALL pio_netcdf_put_fvar (ng, model, ncname,
'RegCR', &
447 & regcr(:,ng), (/1/), (/nfec/), &
449 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
451 CALL pio_netcdf_put_fvar (ng, model, ncname,
'RegNR', &
452 & regnr(:,ng), (/1/), (/nfec/), &
454 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
456 CALL pio_netcdf_put_fvar (ng, model, ncname,
'RegSR', &
457 & regsr(:,ng), (/1/), (/nfec/), &
459 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
461 CALL pio_netcdf_put_fvar (ng, model, ncname,
'RegPR', &
462 & regpr(:,ng), (/1/), (/nfec/), &
464 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN
466 CALL pio_netcdf_put_fvar (ng, model, ncname,
'RegFR', &
467 & regfr(:,ng), (/1/), (/nfec/), &
469 IF (founderror(exit_flag, noerror, __line__, myfile))
RETURN