27 logical,
intent(in) :: Lwrite
28 integer,
intent(in) :: model, inp, out
33 integer :: iTrcStr, iTrcEnd
34 integer :: i, ifield, igrid, itracer, itrc, ng, nline, status
36 logical,
dimension(Ngrids) :: Lbio
37 logical,
dimension(NBT,Ngrids) :: Ltrc
39 real(r8),
dimension(NBT,Ngrids) :: Rbio
41 real(dp),
dimension(nRval) :: Rval
43 character (len=40 ) :: KeyWord
44 character (len=256) :: line
45 character (len=256),
dimension(nCval) :: Cval
62 READ (inp,
'(a)',err=10,
END=20) line
63 status=decode_line(line, keyword, nval, cval, rval)
65 SELECT CASE (trim(keyword))
67 npts=load_l(nval, cval, ngrids, lbiology)
69 npts=load_i(nval, rval, ngrids, bioiter)
71 npts=load_r(nval, rval, ngrids, attsw)
73 npts=load_r(nval, rval, ngrids, attchl)
75 npts=load_r(nval, rval, ngrids, parfrac)
77 npts=load_r(nval, rval, ngrids, vp0)
79 npts=load_r(nval, rval, ngrids, i_thnh4)
81 npts=load_r(nval, rval, ngrids, d_p5nh4)
83 npts=load_r(nval, rval, ngrids, nitrir)
85 npts=load_r(nval, rval, ngrids, k_no3)
87 npts=load_r(nval, rval, ngrids, k_nh4)
89 npts=load_r(nval, rval, ngrids, k_po4)
91 npts=load_r(nval, rval, ngrids, k_phy)
93 npts=load_r(nval, rval, ngrids, chl2c_m)
95 npts=load_r(nval, rval, ngrids, chlmin)
97 npts=load_r(nval, rval, ngrids, phycn)
99 npts=load_r(nval, rval, ngrids, r_p2n)
101 npts=load_r(nval, rval, ngrids, phyip)
103 npts=load_r(nval, rval, ngrids, phyis)
105 npts=load_r(nval, rval, ngrids, phymin)
107 npts=load_r(nval, rval, ngrids, phymr)
109 npts=load_r(nval, rval, ngrids, zooae_n)
111 npts=load_r(nval, rval, ngrids, zoobm)
113 npts=load_r(nval, rval, ngrids, zoocn)
115 npts=load_r(nval, rval, ngrids, zooer)
117 npts=load_r(nval, rval, ngrids, zoogr)
119 npts=load_r(nval, rval, ngrids, zoomin)
121 npts=load_r(nval, rval, ngrids, zoomr)
123 npts=load_r(nval, rval, ngrids, lderrn)
125 npts=load_r(nval, rval, ngrids, lderrc)
127 npts=load_r(nval, rval, ngrids, coagr)
129 npts=load_r(nval, rval, ngrids, sderrn)
131 npts=load_r(nval, rval, ngrids, sderrc)
133 npts=load_r(nval, rval, ngrids, rderrn)
135 npts=load_r(nval, rval, ngrids, rderrc)
137 npts=load_r(nval, rval, ngrids, wphy)
139 npts=load_r(nval, rval, ngrids, wldet)
141 npts=load_r(nval, rval, ngrids, wsdet)
143 npts=load_r(nval, rval, ngrids, pco2air)
145 npts=load_r(nval, rval, nbt, ngrids, rbio)
149 nl_tnu2(i,ng)=rbio(itrc,ng)
153 npts=load_r(nval, rval, nbt, ngrids, rbio)
157 nl_tnu4(i,ng)=rbio(itrc,ng)
161 npts=load_r(nval, rval, nbt, ngrids, rbio)
165 ad_tnu2(i,ng)=rbio(itrc,ng)
166 tl_tnu2(i,ng)=rbio(itrc,ng)
170 npts=load_r(nval, rval, nbt, ngrids, rbio)
174 ad_tnu4(i,ng)=rbio(itrc,ng)
175 tl_tnu4(i,ng)=rbio(itrc,ng)
178 CASE (
'LtracerSponge')
179 npts=load_l(nval, cval, nbt, ngrids, ltrc)
183 ltracersponge(i,ng)=ltrc(itrc,ng)
187 npts=load_r(nval, rval, nbt, ngrids, rbio)
191 akt_bak(i,ng)=rbio(itrc,ng)
195 npts=load_r(nval, rval, nbt, ngrids, rbio)
199 ad_akt_fac(i,ng)=rbio(itrc,ng)
200 tl_akt_fac(i,ng)=rbio(itrc,ng)
204 npts=load_r(nval, rval, nbt, ngrids, rbio)
208 tnudg(i,ng)=rbio(itrc,ng)
212 IF (itracer.lt.nbt)
THEN
218 npts=load_tadv(nval, cval, line, nline, itrc, igrid, &
219 & itracer, idbio(itrcstr), idbio(itrcend), &
220 & vname(1,idtvar(itrc)), &
223 IF (itracer.lt.nbt)
THEN
229 npts=load_tadv(nval, cval, line, nline, itrc, igrid, &
230 & itracer, idbio(itrcstr), idbio(itrcend), &
231 & vname(1,idtvar(itrc)), &
233#if defined ADJOINT || defined TANGENT || defined TL_IOMS
234 CASE (
'ad_Hadvection')
235 IF (itracer.lt.nbt)
THEN
241 npts=load_tadv(nval, cval, line, nline, itrc, igrid, &
242 & itracer, idbio(itrcstr), idbio(itrcend), &
243 & vname(1,idtvar(itrc)), &
246 IF (itracer.lt.(nbt)
THEN
252 npts=load_tadv(nval, cval, line, nline, itrc, igrid, &
253 & itracer, idbio(itrcstr), idbio(itrcend), &
254 & vname(1,idtvar(itrc)), &
258 IF (itracer.lt.nbt)
THEN
263 ifield=istvar(idbio(itracer))
264 npts=load_lbc(nval, cval, line, nline, ifield, igrid, &
265 & idbio(itrcstr), idbio(itrcend), &
266 & vname(1,idtvar(idbio(itracer))), lbc)
267#if defined ADJOINT || defined TANGENT || defined TL_IOMS
268 CASE (
'ad_LBC(isTvar)')
269 IF (itracer.lt.nbt)
THEN
274 ifield=istvar(idbio(itracer))
275 npts=load_lbc(nval, cval, line, nline, ifield, igrid, &
276 & idbio(itrcstr), idbio(itrcend), &
277 & vname(1,idtvar(idbio(itracer))), ad_lbc)
280 npts=load_l(nval, cval, nbt, ngrids, ltrc)
284 ltracersrc(i,ng)=ltrc(itrc,ng)
288 npts=load_l(nval, cval, nbt, ngrids, ltrc)
292 ltracerclm(i,ng)=ltrc(itrc,ng)
296 npts=load_l(nval, cval, nbt, ngrids, ltrc)
300 lnudgetclm(i,ng)=ltrc(itrc,ng)
303 CASE (
'Hout(idTvar)')
304 npts=load_l(nval, cval, nbt, ngrids, ltrc)
307 i=idtvar(idbio(itrc))
309 IF (master)
WRITE (out,30) &
310 &
'idTvar(idbio(', itrc,
'))'
314 hout(i,ng)=ltrc(itrc,ng)
317 CASE (
'Hout(idTsur)')
318 npts=load_l(nval, cval, nbt, ngrids, ltrc)
321 i=idtsur(idbio(itrc))
323 IF (master)
WRITE (out,30) &
324 &
'idTsur(idbio(', itrc,
'))'
328 hout(i,ng)=ltrc(itrc,ng)
331 CASE (
'Qout(idTvar)')
332 npts=load_l(nval, cval, nbt, ngrids, ltrc)
335 i=idtvar(idbio(itrc))
336 qout(i,ng)=ltrc(itrc,ng)
339 CASE (
'Qout(idsurT)')
340 npts=load_l(nval, cval, nbt, ngrids, ltrc)
343 i=idsurt(idbio(itrc))
345 IF (master)
WRITE (out,30) &
346 &
'idsurT(idbio(', itrc,
'))'
350 qout(i,ng)=ltrc(itrc,ng)
353 CASE (
'Qout(idTsur)')
354 npts=load_l(nval, cval, nbt, ngrids, ltrc)
357 i=idtsur(idbio(itrc))
358 qout(i,ng)=ltrc(itrc,ng)
361#if defined AVERAGES || \
362 (defined ad_averages && defined adjoint) || \
363 (defined rp_averages && defined tl_ioms) || \
364 (defined tl_averages && defined tangent)
365 CASE (
'Aout(idTvar)')
366 npts=load_l(nval, cval, nbt, ngrids, ltrc)
369 i=idtvar(idbio(itrc))
370 aout(i,ng)=ltrc(itrc,ng)
373 CASE (
'Aout(idTTav)')
374 npts=load_l(nval, cval, nbt, ngrids, ltrc)
377 i=idttav(idbio(itrc))
378 aout(i,ng)=ltrc(itrc,ng)
381 CASE (
'Aout(idUTav)')
382 npts=load_l(nval, cval, nbt, ngrids, ltrc)
385 i=idutav(idbio(itrc))
386 aout(i,ng)=ltrc(itrc,ng)
389 CASE (
'Aout(idVTav)')
390 npts=load_l(nval, cval, nbt, ngrids, ltrc)
393 i=idvtav(idbio(itrc))
394 aout(i,ng)=ltrc(itrc,ng)
397 CASE (
'Aout(iHUTav)')
398 npts=load_l(nval, cval, nbt, ngrids, ltrc)
401 i=ihutav(idbio(itrc))
402 aout(i,ng)=ltrc(itrc,ng)
405 CASE (
'Aout(iHVTav)')
406 npts=load_l(nval, cval, nbt, ngrids, ltrc)
409 i=ihvtav(idbio(itrc))
410 aout(i,ng)=ltrc(itrc,ng)
415 CASE (
'Dout(iTrate)')
416 npts=load_l(nval, cval, nbt, ngrids, ltrc)
420 dout(iddtrc(itrc,itrate),ng)=ltrc(i,ng)
423 CASE (
'Dout(iThadv)')
424 npts=load_l(nval, cval, nbt, ngrids, ltrc)
428 dout(iddtrc(itrc,ithadv),ng)=ltrc(i,ng)
431 CASE (
'Dout(iTxadv)')
432 npts=load_l(nval, cval, nbt, ngrids, ltrc)
436 dout(iddtrc(itrc,itxadv),ng)=ltrc(i,ng)
439 CASE (
'Dout(iTyadv)')
440 npts=load_l(nval, cval, nbt, ngrids, ltrc)
444 dout(iddtrc(itrc,ityadv),ng)=ltrc(i,ng)
447 CASE (
'Dout(iTvadv)')
448 npts=load_l(nval, cval, nbt, ngrids, ltrc)
452 dout(iddtrc(itrc,itvadv),ng)=ltrc(i,ng)
455# if defined TS_DIF2 || defined TS_DIF4
456 CASE (
'Dout(iThdif)')
457 npts=load_l(nval, cval, nbt, ngrids, ltrc)
461 dout(iddtrc(itrc,ithdif),ng)=ltrc(i,ng)
464 CASE (
'Dout(iTxdif)')
465 npts=load_l(nval, cval, nbt, ngrids, ltrc)
469 dout(iddtrc(itrc,itxdif),ng)=ltrc(i,ng)
472 CASE (
'Dout(iTydif)')
473 npts=load_l(nval, cval, nbt, ngrids, ltrc)
477 dout(iddtrc(itrc,itydif),ng)=ltrc(i,ng)
480# if defined MIX_GEO_TS || defined MIX_ISO_TS
481 CASE (
'Dout(iTsdif)')
482 npts=load_l(nval, cval, nbt, ngrids, ltrc)
486 dout(iddtrc(itrc,itsdif),ng)=ltrc(i,ng)
491 CASE (
'Dout(iTvdif)')
492 npts=load_l(nval, cval, nbt, ngrids, ltrc)
496 dout(iddtrc(itrc,itvdif),ng)=ltrc(i,ng)
500#ifdef DIAGNOSTICS_BIO
503 IF (idbio2(icofx).eq.0)
THEN
504 IF (master)
WRITE (out,40)
'iDbio2(iCOfx)'
508 npts=load_l(nval, cval, ngrids, lbio)
514# ifdef DENITRIFICATION
516 IF (idbio2(idnit).eq.0)
THEN
517 IF (master)
WRITE (out,40)
'iDbio2(iDNIT)'
521 npts=load_l(nval, cval, ngrids, lbio)
529 IF (idbio2(ipco2).eq.0)
THEN
530 IF (master)
WRITE (out,40)
'iDbio2(ipCO2)'
534 npts=load_l(nval, cval, ngrids, lbio)
542 IF (idbio2(io2fx).eq.0)
THEN
543 IF (master)
WRITE (out,40)
'iDbio2(iO2fx)'
547 npts=load_l(nval, cval, ngrids, lbio)
554 IF (idbio3(ippro).eq.0)
THEN
555 IF (master)
WRITE (out,40)
'iDbio3(iPPro)'
559 npts=load_l(nval, cval, ngrids, lbio)
565 IF (idbio3(ino3u).eq.0)
THEN
566 IF (master)
WRITE (out,40)
'iDbio3(iNO3u)'
570 npts=load_l(nval, cval, ngrids, lbio)
576 IF (idbio3(inifx).eq.0)
THEN
577 IF (master)
WRITE (out,40)
'iDbio3(iNifx)'
581 npts=load_l(nval, cval, ngrids, lbio)
590 10
IF (master)
WRITE (out,50) line
599 IF (master.and.lwrite)
THEN
601 IF (lbiology(ng))
THEN
603 WRITE (out,70) bioiter(ng),
'BioIter', &
604 &
'Number of iterations for nonlinear convergence.'
605 WRITE (out,80) attsw(ng),
'AttSW', &
606 &
'Light attenuation of seawater (m-1).'
607 WRITE (out,80) attchl(ng),
'AttChl', &
608 &
'Light attenuation by chlorophyll (1/(mg_Chl m-2)).'
609 WRITE (out,90) parfrac(ng),
'PARfrac', &
610 &
'Fraction of shortwave radiation that is', &
611 &
'photosynthetically active (nondimensional).'
612 WRITE (out,90) vp0(ng),
'Vp0', &
613 &
'Eppley temperature-limited growth parameter', &
614 &
'(nondimensional).'
615 WRITE (out,80) i_thnh4(ng),
'I_thNH4', &
616 &
'Radiation threshold for nitrification (W/m2).'
617 WRITE (out,80) d_p5nh4(ng),
'D_p5NH4', &
618 &
'Half-saturation radiation for nitrification (W/m2).'
619 WRITE (out,80) nitrir(ng),
'NitriR', &
620 &
'Nitrification rate (day-1).'
621 WRITE (out,90) k_no3(ng),
'K_NO3', &
622 &
'Inverse half-saturation for phytoplankton NO3', &
623 &
'uptake (1/(mmol_N m-3)).'
624 WRITE (out,90) k_nh4(ng),
'K_NH4', &
625 &
'Inverse half-saturation for phytoplankton NH4', &
626 &
'uptake (1/(mmol_N m-3)).'
627 WRITE (out,90) k_po4(ng),
'K_PO4', &
628 &
'Inverse half-saturation for phytoplankton PO4', &
629 &
'uptake (1/(mmol_P m-3)).'
630 WRITE (out,90) k_phy(ng),
'K_Phy', &
631 &
'Zooplankton half-saturation constant for ingestion', &
633 WRITE (out,80) chl2c_m(ng),
'Chl2C_m', &
634 &
'Maximum chlorophyll to carbon ratio (mg_Chl/mg_C).'
635 WRITE (out,80) chlmin(ng),
'ChlMin', &
636 &
'Chlorophyll minimum threshold (mg_Chl/m3).'
637 WRITE (out,80) phycn(ng),
'PhyCN', &
638 &
'Phytoplankton Carbon:Nitrogen ratio (mol_C/mol_N).'
639 WRITE (out,80) r_p2n(ng),
'R_P2N', &
640 &
'Phytoplankton P:N ratio (mol_P/mol_N).'
641 WRITE (out,80) phyip(ng),
'PhyIP', &
642 &
'Phytoplankton NH4 inhibition parameter (1/mmol_N).'
643 WRITE (out,90) phyis(ng),
'PhyIS', &
644 &
'Phytoplankton growth, initial slope of P-I curve', &
645 &
'(mg_C/(mg_Chl Watts m-2 day)).'
646 WRITE (out,80) phymin(ng),
'PhyMin', &
647 &
'Phytoplankton minimum threshold (mmol_N/m3).'
648 WRITE (out,80) phymr(ng),
'PhyMR', &
649 &
'Phytoplankton mortality rate (day-1).'
650 WRITE (out,90) zooae_n(ng),
'ZooAE_N', &
651 &
'Zooplankton nitrogen assimilation efficiency', &
652 &
'(nondimensional).'
653 WRITE (out,80) zoobm(ng),
'ZooBM', &
654 &
'Rate for zooplankton basal metabolism (1/day).'
655 WRITE (out,80) zoocn(ng),
'ZooCN', &
656 &
'Zooplankton Carbon:Nitrogen ratio (mol_C/mol_N).'
657 WRITE (out,80) zooer(ng),
'ZooER', &
658 &
'Zooplankton specific excretion rate (day-1).'
659 WRITE (out,80) zoogr(ng),
'ZooGR', &
660 &
'Zooplankton maximum growth rate (day-1).'
661 WRITE (out,80) zoomin(ng),
'ZooMin', &
662 &
'Zooplankton minimum threshold (mmol_N/m3).'
663 WRITE (out,80) zoomr(ng),
'ZooMR', &
664 &
'Zooplankton mortality rate (day-1).'
665 WRITE (out,80) lderrn(ng),
'LDeRRN', &
666 &
'Large detritus N re-mineralization rate (day-1).'
667 WRITE (out,80) lderrc(ng),
'LDeRRC', &
668 &
'Large detritus C re-mineralization rate (day-1).'
669 WRITE (out,80) coagr(ng),
'CoagR', &
670 &
'Coagulation rate (day-1).'
671 WRITE (out,80) sderrn(ng),
'SDeRRN', &
672 &
'Remineralization rate for small detritus N (day-1).'
673 WRITE (out,80) sderrc(ng),
'SDeRRC', &
674 &
'Remineralization rate for small detritus C (day-1).'
675 WRITE (out,80) rderrn(ng),
'RDeRRN', &
676 &
'Remineralization rate for river detritus N (day-1).'
677 WRITE (out,80) rderrc(ng),
'RDeRRC', &
678 &
'Remineralization rate for river detritus C (day-1).'
679 WRITE (out,80) wphy(ng),
'wPhy', &
680 &
'Phytoplankton sinking velocity (m/day).'
681 WRITE (out,80) wldet(ng),
'wLDet', &
682 &
'Large detritus sinking velocity (m/day).'
683 WRITE (out,80) wsdet(ng),
'wSDet', &
684 &
'Small detritus sinking velocity (m/day).'
685 WRITE (out,80) pco2air(ng),
'pCO2air', &
686 &
'CO2 partial pressure in air (ppm by volume).'
690 WRITE (out,100) nl_tnu2(i,ng),
'nl_tnu2', i, &
691 &
'NLM Horizontal, harmonic mixing coefficient', &
692 &
'(m2/s) for tracer ', i, trim(vname(1,idtvar(i)))
694 WRITE (out,100) ad_tnu2(i,ng),
'ad_tnu2', i, &
695 &
'ADM Horizontal, harmonic mixing coefficient', &
696 &
'(m2/s) for tracer ', i, trim(vname(1,idtvar(i)))
698# if defined TANGENT || defined TL_IOMS
699 WRITE (out,100) tl_tnu2(i,ng),
'tl_tnu2', i, &
700 &
'TLM Horizontal, harmonic mixing coefficient', &
701 &
'(m2/s) for tracer ', i, trim(vname(1,idtvar(i)))
708 WRITE (out,100) nl_tnu4(i,ng),
'nl_tnu4', i, &
709 &
'NLM Horizontal, biharmonic mixing coefficient', &
710 &
'(m4/s) for tracer ', i, trim(vname(1,idtvar(i)))
712 WRITE (out,100) ad_tnu4(i,ng),
'ad_tnu4', i, &
713 &
'ADM Horizontal, biharmonic mixing coefficient', &
714 &
'(m4/s) for tracer ', i, trim(vname(1,idtvar(i)))
716# if defined TANGENT || defined TL_IOMS
717 WRITE (out,100) tl_tnu4(i,ng),
'tl_tnu4', i, &
718 &
'TLM Horizontal, biharmonic mixing coefficient', &
719 &
'(m4/s) for tracer ', i, trim(vname(1,idtvar(i)))
725 IF (ltracersponge(i,ng))
THEN
726 WRITE (out,110) ltracersponge(i,ng),
'LtracerSponge', &
727 & i,
'Turning ON sponge on tracer ', i, &
728 & trim(vname(1,idtvar(i)))
730 WRITE (out,110) ltracersponge(i,ng),
'LtracerSponge', &
731 & i,
'Turning OFF sponge on tracer ', i, &
732 & trim(vname(1,idtvar(i)))
737 WRITE(out,100) akt_bak(i,ng),
'Akt_bak', i, &
738 &
'Background vertical mixing coefficient (m2/s)', &
739 &
'for tracer ', i, trim(vname(1,idtvar(i)))
745 WRITE (out,100) ad_akt_fac(i,ng),
'ad_Akt_fac', i, &
746 &
'ADM basic state vertical mixing scale factor', &
747 &
'for tracer ', i, trim(vname(1,idtvar(i)))
749# if defined TANGENT || defined TL_IOMS
750 WRITE (out,100) tl_akt_fac(i,ng),
'tl_Akt_fac', i, &
751 &
'TLM basic state vertical mixing scale factor', &
752 &
'for tracer ', i, trim(vname(1,idtvar(i)))
758 WRITE (out,100) tnudg(i,ng),
'Tnudg', i, &
759 &
'Nudging/relaxation time scale (days)', &
760 &
'for tracer ', i, trim(vname(1,idtvar(i)))
764 IF (ltracersrc(i,ng))
THEN
765 WRITE (out,110) ltracersrc(i,ng),
'LtracerSrc', &
766 & i,
'Turning ON point sources/Sink on tracer ', i, &
767 & trim(vname(1,idtvar(i)))
769 WRITE (out,110) ltracersrc(i,ng),
'LtracerSrc', &
770 & i,
'Turning OFF point sources/Sink on tracer ', i, &
771 & trim(vname(1,idtvar(i)))
776 IF (ltracerclm(i,ng))
THEN
777 WRITE (out,110) ltracerclm(i,ng),
'LtracerCLM', i, &
778 &
'Turning ON processing of climatology tracer ', i, &
779 & trim(vname(1,idtvar(i)))
781 WRITE (out,110) ltracerclm(i,ng),
'LtracerCLM', i, &
782 &
'Turning OFF processing of climatology tracer ', i, &
783 & trim(vname(1,idtvar(i)))
788 IF (lnudgetclm(i,ng))
THEN
789 WRITE (out,110) lnudgetclm(i,ng),
'LnudgeTCLM', i, &
790 &
'Turning ON nudging of climatology tracer ', i, &
791 & trim(vname(1,idtvar(i)))
793 WRITE (out,110) lnudgetclm(i,ng),
'LnudgeTCLM', i, &
794 &
'Turning OFF nudging of climatology tracer ', i, &
795 & trim(vname(1,idtvar(i)))
798 IF ((nhis(ng).gt.0).and.any(hout(:,ng)))
THEN
802 IF (hout(idtvar(i),ng))
WRITE (out,120) &
803 & hout(idtvar(i),ng),
'Hout(idTvar)', &
804 &
'Write out tracer ', i, trim(vname(1,idtvar(i)))
808 IF (hout(idtsur(i),ng))
WRITE (out,120) &
809 & hout(idtsur(i),ng),
'Hout(idTsur)', &
810 &
'Write out tracer flux ', i, &
811 & trim(vname(1,idtvar(i)))
814 IF ((nqck(ng).gt.0).and.any(qout(:,ng)))
THEN
818 IF (qout(idtvar(i),ng))
WRITE (out,120) &
819 & qout(idtvar(i),ng),
'Qout(idTvar)', &
820 &
'Write out tracer ', i, trim(vname(1,idtvar(i)))
824 IF (qout(idsurt(i),ng))
WRITE (out,120) &
825 & qout(idsurt(i),ng),
'Qout(idsurT)', &
826 &
'Write out surface tracer ', i, &
827 & trim(vname(1,idtvar(i)))
831 IF (qout(idtsur(i),ng))
WRITE (out,120) &
832 & qout(idtsur(i),ng),
'Qout(idTsur)', &
833 &
'Write out tracer flux ', i, &
834 & trim(vname(1,idtvar(i)))
837#if defined AVERAGES || \
838 (defined ad_averages && defined adjoint) || \
839 (defined rp_averages && defined tl_ioms) || \
840 (defined tl_averages && defined tangent)
841 IF ((navg(ng).gt.0).and.any(aout(:,ng)))
THEN
845 IF (aout(idtvar(i),ng))
WRITE (out,120) &
846 & aout(idtvar(i),ng),
'Aout(idTvar)', &
847 &
'Write out averaged tracer ', i, &
848 & trim(vname(1,idtvar(i)))
852 IF (aout(idttav(i),ng))
WRITE (out,120) &
853 & aout(idttav(i),ng),
'Aout(idTTav)', &
854 &
'Write out averaged <t*t> for tracer ', i, &
855 & trim(vname(1,idtvar(i)))
859 IF (aout(idutav(i),ng))
WRITE (out,120) &
860 & aout(idutav(i),ng),
'Aout(idUTav)', &
861 &
'Write out averaged <u*t> for tracer ', i, &
862 & trim(vname(1,idtvar(i)))
866 IF (aout(idvtav(i),ng))
WRITE (out,120) &
867 & aout(idvtav(i),ng),
'Aout(idVTav)', &
868 &
'Write out averaged <v*t> for tracer ', i, &
869 & trim(vname(1,idtvar(i)))
873 IF (aout(ihutav(i),ng))
WRITE (out,120) &
874 & aout(ihutav(i),ng),
'Aout(iHUTav)', &
875 &
'Write out averaged <Huon*t> for tracer ', i, &
876 & trim(vname(1,idtvar(i)))
880 IF (aout(ihvtav(i),ng))
WRITE (out,120) &
881 & aout(ihvtav(i),ng),
'Aout(iHVTav)', &
882 &
'Write out averaged <Hvom*t> for tracer ', i, &
883 & trim(vname(1,idtvar(i)))
888 IF ((ndia(ng).gt.0).and.any(dout(:,ng)))
THEN
892 IF (dout(iddtrc(itrc,itrate),ng)) &
893 &
WRITE (out,120) .true.,
'Dout(iTrate)', &
894 &
'Write out rate of change of tracer ', itrc, &
895 & trim(vname(1,idtvar(itrc)))
899 IF (dout(iddtrc(itrc,ithadv),ng)) &
900 &
WRITE (out,120) .true.,
'Dout(iThadv)', &
901 &
'Write out horizontal advection, tracer ', itrc, &
902 & trim(vname(1,idtvar(itrc)))
906 IF (dout(iddtrc(itrc,itxadv),ng)) &
907 &
WRITE (out,120) .true.,
'Dout(iTxadv)', &
908 &
'Write out horizontal X-advection, tracer ', itrc, &
909 & trim(vname(1,idtvar(itrc)))
913 IF (dout(iddtrc(itrc,ityadv),ng)) &
914 &
WRITE (out,120) .true.,
'Dout(iTyadv)', &
915 &
'Write out horizontal Y-advection, tracer ', itrc, &
916 & trim(vname(1,idtvar(itrc)))
920 IF (dout(iddtrc(itrc,itvadv),ng)) &
921 &
WRITE (out,120) .true.,
'Dout(iTvadv)', &
922 &
'Write out vertical advection, tracer ', itrc, &
923 & trim(vname(1,idtvar(itrc)))
925# if defined TS_DIF2 || defined TS_DIF4
928 IF (dout(iddtrc(itrc,ithdif),ng)) &
929 &
WRITE (out,120) .true.,
'Dout(iThdif)', &
930 &
'Write out horizontal diffusion, tracer ', itrc, &
931 & trim(vname(1,idtvar(itrc)))
935 IF (dout(iddtrc(i,itxdif),ng)) &
936 &
WRITE (out,120) .true.,
'Dout(iTxdif)', &
937 &
'Write out horizontal X-diffusion, tracer ', itrc, &
938 & trim(vname(1,idtvar(itrc)))
942 IF (dout(iddtrc(itrc,itydif),ng)) &
943 &
WRITE (out,120) .true.,
'Dout(iTydif)', &
944 &
'Write out horizontal Y-diffusion, tracer ', itrc, &
945 & trim(vname(1,idtvar(itrc)))
947# if defined MIX_GEO_TS || defined MIX_ISO_TS
950 IF (dout(iddtrc(itrc,itsdif),ng)) &
951 &
WRITE (out,120) .true.,
'Dout(iTsdif)', &
952 &
'Write out horizontal S-diffusion, tracer ', itrc, &
953 & trim(vname(1,idtvar(itrc)))
959 IF (dout(iddtrc(itrc,itvdif),ng)) &
960 &
WRITE (out,120) .true.,
'Dout(iTvdif)', &
961 &
'Write out vertical diffusion, tracer ', itrc, &
962 & trim(vname(1,idtvar(itrc)))
966#ifdef DIAGNOSTICS_BIO
967 IF (ndia(ng).gt.0)
THEN
968 IF (ndbio2d.gt.0)
THEN
971 IF (dout(i,ng))
WRITE (out,130) &
972 & dout(i,ng),
'Dout(iDbio2)', &
973 &
'Write out diagnostics for', trim(vname(1,i))
978 IF (dout(i,ng))
WRITE (out,130) &
979 & dout(i,ng),
'Dout(iDbio3)', &
980 &
'Write out diagnostics for', trim(vname(1,i))
998 nl_tnu4(i,ng)=sqrt(abs(nl_tnu4(i,ng)))
1000 ad_tnu4(i,ng)=sqrt(abs(ad_tnu4(i,ng)))
1002#if defined TANGENT || defined TL_IOMS
1003 tl_tnu4(i,ng)=sqrt(abs(tl_tnu4(i,ng)))
1008 IF (tnudg(i,ng).gt.0.0_r8)
THEN
1009 tnudg(i,ng)=1.0_r8/(tnudg(i,ng)*86400.0_r8)
1016 30
FORMAT (/,
' read_BioPar - variable info not yet loaded, ', &
1018 40
FORMAT (/,
' read_BioPar - variable info not yet loaded, ',a)
1019 50
FORMAT (/,
' read_BioPar - Error while processing line: ',/,a)
1020 60
FORMAT (/,/,
' Fennel Model Parameters, Grid: ',i2.2, &
1021 & /,
' =================================',/)
1022 70
FORMAT (1x,i10,2x,a,t32,a)
1023 80
FORMAT (1p,e11.4,2x,a,t32,a)
1024 90
FORMAT (1p,e11.4,2x,a,t32,a,/,t34,a)
1025 100
FORMAT (1p,e11.4,2x,a,
'(',i2.2,
')',t32,a,/,t34,a,i2.2,
':',1x,a)
1026 110
FORMAT (10x,l1,2x,a,
'(',i2.2,
')',t32,a,i2.2,
':',1x,a)
1027 120
FORMAT (10x,l1,2x,a,t32,a,i2.2,
':',1x,a)
1028 130
FORMAT (10x,l1,2x,a,t32,a,1x,a)