2
3
4
5
6
7
8
9
10
11
12
13
14
21
23
24 implicit none
25
26
27
28 logical, intent(in) :: Lwrite
29 integer, intent(in) :: model, inp, out
30
31
32
33 integer :: Npts, Nval
34 integer :: iTrcStr, iTrcEnd
35 integer :: i, ifield, igrid, is, itracer, itrc, ng, nline, status
36 integer :: ibac, iband, ifec, iphy
37
38 logical, dimension(Ngrids) :: Lbio
39 logical, dimension(NBT,Ngrids) :: Ltrc
40
41 real(r8), dimension(NBT,Ngrids) :: Rbio
42
43 real(dp), dimension(nRval) :: Rval
44
45 character (len=40 ) :: KeyWord
46 character (len=256) :: line
47 character (len=256), dimension(nCval) :: Cval
48
49
50
51
52
53 igrid=1
54 itracer=0
55 itrcstr=1
57 nline=0
58
59
60
61
62
63 DO WHILE (.true.)
64 READ (inp,'(a)',err=10,END=20) line
66 IF (status.gt.0) THEN
67 SELECT CASE (trim(keyword))
68 CASE ('Lbiology')
70 CASE ('BioIter')
72 CASE ('RtUVR_flag')
74 CASE ('NFIX_flag')
76 CASE ('Regen_flag')
78 CASE ('HsNO3')
80 CASE ('HsNH4')
82 CASE ('HsSiO')
84 CASE ('HsPO4')
86 CASE ('HsFe')
88 CASE ('GtALG_max')
90 CASE ('PhyTbase')
92 CASE ('PhyTfac')
94 CASE ('BET_')
96 CASE ('maxC2nALG')
98 CASE ('minC2nALG')
100 CASE ('C2nALGminABS')
102 CASE ('maxC2SiALG')
104 CASE ('minC2SiALG')
106 CASE ('C2SiALGminABS')
108 CASE ('maxC2pALG')
110 CASE ('minC2pALG')
112 CASE ('C2pALGminABS')
114 CASE ('maxC2FeALG')
116 CASE ('minC2FeALG')
118 CASE ('C2FeALGminABS')
120 CASE ('qu_yld')
122 CASE ('E0_comp')
124 CASE ('E0_inhib')
126 CASE ('inhib_fac')
128 CASE ('C2CHL_max')
130 CASE ('mxC2Cl')
132 CASE ('b_C2Cl')
134 CASE ('mxC2Cn')
136 CASE ('b_C2Cn')
138 CASE ('mxPacEff')
140 CASE ('b_PacEff')
142 CASE ('mxChlB')
144 CASE ('b_ChlB')
146 CASE ('mxChlC')
148 CASE ('b_ChlC')
150 CASE ('mxPSC')
152 CASE ('b_PSC')
154 CASE ('mxPPC')
156 CASE ('b_PPC')
158 CASE ('mxLPUb')
160 CASE ('b_LPUb')
162 CASE ('mxHPUb')
164 CASE ('b_HPUb')
166 CASE ('FecDOC')
168 CASE ('FecPEL')
170 CASE ('FecCYC')
172 CASE ('ExALG')
174 CASE ('WS')
176 CASE ('HsGRZ')
178 CASE ('MinRefuge')
180 CASE ('RefugeDep')
182 CASE ('Norm_Vol')
184 CASE ('Norm_Surf')
186 CASE ('HsDOP')
188 CASE ('C2pALKPHOS')
190 CASE ('HsDON')
192 CASE ('C2nNupDON')
194 CASE ('C2nBAC')
196 CASE ('C2pBAC')
198 CASE ('C2FeBAC')
200 CASE ('HsDOC_ba')
202 CASE ('GtBAC_max')
204 CASE ('BacTbase')
206 CASE ('BacTfac')
208 CASE ('BacDOC')
210 CASE ('BacPEL')
212 CASE ('BacCYC')
214 CASE ('ExBAC_c')
216 CASE ('ExBacC2N')
218 CASE ('Bac_Ceff')
220 CASE ('RtNIT')
222 CASE ('HsNIT')
224 CASE ('cDOCfrac_c')
226 CASE ('RtUVR_DIC')
228 CASE ('RtUVR_DOC')
230 CASE ('WF')
232 CASE ('RegTbase')
234 CASE ('RegTfac')
236 CASE ('RegCR')
238 CASE ('RegNR')
240 CASE ('RegSR')
242 CASE ('RegPR')
244 CASE ('RegFR')
246 CASE ('TNU2')
252 END DO
253 END DO
254 CASE ('TNU4')
260 END DO
261 END DO
262 CASE ('ad_TNU2')
269 END DO
270 END DO
271 CASE ('ad_TNU4')
278 END DO
279 END DO
280 CASE ('LtracerSponge')
286 END DO
287 END DO
288 CASE ('AKT_BAK')
294 END DO
295 END DO
296 CASE ('ad_AKT_fac')
303 END DO
304 END DO
305 CASE ('TNUDG')
310 tnudg(i,ng)=rbio(itrc,ng)
311 END DO
312 END DO
313 CASE ('Hadvection')
314 IF (itracer.lt.
nbt)
THEN
315 itracer=itracer+1
316 ELSE
317 itracer=1
318 END IF
320 npts=
load_tadv(nval, cval, line, nline, itrc, igrid, &
324 CASE ('Vadvection')
325 IF (itracer.lt.
nbt)
THEN
326 itracer=itracer+1
327 ELSE
328 itracer=1
329 END IF
331 npts=
load_tadv(nval, cval, line, nline, itrc, igrid, &
335#if defined ADJOINT || defined TANGENT || defined TL_IOMS
336 CASE ('ad_Hadvection')
337 IF (itracer.lt.
nbt)
THEN
338 itracer=itracer+1
339 ELSE
340 itracer=1
341 END IF
343 npts=
load_tadv(nval, cval, line, nline, itrc, igrid, &
347 CASE ('Vadvection')
348 IF (itracer.lt.(
nbt)
THEN
349 itracer=itracer+1
350 ELSE
351 itracer=1
352 END IF
354 npts=
load_tadv(nval, cval, line, nline, itrc, igrid, &
358#endif
359
360 CASE ('LBC(isTvar)')
361 IF (itracer.lt.
nbt)
THEN
362 itracer=itracer+1
363 ELSE
364 itracer=1
365 END IF
367 npts=
load_lbc(nval, cval, line, nline, ifield, igrid, &
370#if defined ADJOINT || defined TANGENT || defined TL_IOMS
371 CASE ('ad_LBC(isTvar)')
372 IF (itracer.lt.
nbt)
THEN
373 itracer=itracer+1
374 ELSE
375 itracer=1
376 END IF
378 npts=
load_lbc(nval, cval, line, nline, ifield, igrid, &
381#endif
382 CASE ('LtracerSrc')
388 END DO
389 END DO
390 CASE ('LtracerCLM')
396 END DO
397 END DO
398 CASE ('LnudgeTCLM')
404 END DO
405 END DO
406 CASE ('Hout(idTvar)')
411 IF (i.eq.0) THEN
412 IF (
master)
WRITE (out,30) &
413 & 'idTvar(idbio(', itrc, '))'
415 RETURN
416 END IF
417 hout(i,ng)=ltrc(itrc,ng)
418 END DO
419 END DO
420 CASE ('Hout(idTsur)')
425 IF (i.eq.0) THEN
426 IF (
master)
WRITE (out,30) &
427 & 'idTsur(idbio(', itrc, '))'
429 RETURN
430 END IF
431 hout(i,ng)=ltrc(itrc,ng)
432 END DO
433 END DO
434 CASE ('Qout(idTvar)')
439 qout(i,ng)=ltrc(itrc,ng)
440 END DO
441 END DO
442 CASE ('Qout(idsurT)')
447 IF (i.eq.0) THEN
448 IF (
master)
WRITE (out,30) &
449 & 'idsurT(idbio(', itrc, '))'
451 RETURN
452 END IF
453 qout(i,ng)=ltrc(itrc,ng)
454 END DO
455 END DO
456 CASE ('Qout(idTsur)')
461 qout(i,ng)=ltrc(itrc,ng)
462 END DO
463 END DO
464#if defined AVERAGES || \
465 (defined ad_averages && defined adjoint) || \
466 (defined rp_averages && defined tl_ioms) || \
467 (defined tl_averages && defined tangent)
468 CASE ('Aout(idTvar)')
473 aout(i,ng)=ltrc(itrc,ng)
474 END DO
475 END DO
476 CASE ('Aout(idTTav)')
481 aout(i,ng)=ltrc(itrc,ng)
482 END DO
483 END DO
484 CASE ('Aout(idUTav)')
489 aout(i,ng)=ltrc(itrc,ng)
490 END DO
491 END DO
492 CASE ('Aout(idVTav)')
497 aout(i,ng)=ltrc(itrc,ng)
498 END DO
499 END DO
500 CASE ('Aout(iHUTav)')
505 aout(i,ng)=ltrc(itrc,ng)
506 END DO
507 END DO
508 CASE ('Aout(iHVTav)')
513 aout(i,ng)=ltrc(itrc,ng)
514 END DO
515 END DO
516#endif
517#ifdef DIAGNOSTICS_TS
518 CASE ('Dout(iTrate)')
524 END DO
525 END DO
526 CASE ('Dout(iThadv)')
532 END DO
533 END DO
534 CASE ('Dout(iTxadv)')
540 END DO
541 END DO
542 CASE ('Dout(iTyadv)')
548 END DO
549 END DO
550 CASE ('Dout(iTvadv)')
556 END DO
557 END DO
558# if defined TS_DIF2 || defined TS_DIF4
559 CASE ('Dout(iThdif)')
565 END DO
566 END DO
567 CASE ('Dout(iTxdif)')
573 END DO
574 END DO
575 CASE ('Dout(iTydif)')
581 END DO
582 END DO
583# if defined MIX_GEO_TS || defined MIX_ISO_TS
584 CASE ('Dout(iTsdif)')
590 END DO
591 END DO
592# endif
593# endif
594 CASE ('Dout(iTvdif)')
600 END DO
601 END DO
602#endif
603#ifdef DIAGNOSTICS_BIO
604 CASE ('Dout(idSpIr)')
606 IF (
master)
WRITE (out,40)
'iDbio3(idSpIr)'
608 RETURN
609 END IF
614 END DO
615 CASE ('Dout(iddIrr)')
617 IF (
master)
WRITE (out,40)
'iDbio4(iddIrr)'
619 RETURN
620 END IF
625 END DO
626 CASE ('Dout(idsIrr)')
628 IF (
master)
WRITE (out,40)
'iDbio4(idsIrr)'
630 RETURN
631 END IF
636 END DO
637 CASE ('Dout(idLatt)')
639 IF (
master)
WRITE (out,40)
'iDbio4(idLatt)'
641 RETURN
642 END IF
647 END DO
648 CASE ('Dout(idaPHY)')
650 IF (
master)
WRITE (out,40)
'iDbio4(idaPHY)'
652 RETURN
653 END IF
658 END DO
659 CASE ('Dout(idaDET)')
661 IF (
master)
WRITE (out,40)
'iDbio4(idaDET)'
663 RETURN
664 END IF
669 END DO
670 CASE ('Dout(idaCDC)')
672 IF (
master)
WRITE (out,40)
'iDbio4(idaCDC)'
674 RETURN
675 END IF
680 END DO
681 CASE ('Dout(idAcos)')
683 IF (
master)
WRITE (out,40)
'iDbio4(idAcos)'
685 RETURN
686 END IF
691 END DO
692 CASE ('Dout(idbPHY)')
694 IF (
master)
WRITE (out,40)
'iDbio4(idbPHY)'
696 RETURN
697 END IF
702 END DO
703 CASE ('Dout(idsPHY)')
705 IF (
master)
WRITE (out,40)
'iDbio4(idsPHY)'
707 RETURN
708 END IF
713 END DO
714 CASE ('Dout(idbTOT)')
716 IF (
master)
WRITE (out,40)
'iDbio4(idbTOT)'
718 RETURN
719 END IF
724 END DO
725 CASE ('Dout(idsTOT)')
727 IF (
master)
WRITE (out,40)
'iDbio4(idsTOT)'
729 RETURN
730 END IF
735 END DO
736#endif
737 END SELECT
738 END IF
739 END DO
740 10
IF (
master)
WRITE (out,40) line
742 RETURN
743 20 CONTINUE
744
745
746
747
748
749
750
757 END DO
760 END DO
763 END DO
765 END DO
766
767
768
773 ELSE
775 END IF
778 ELSE
780 END IF
783 ELSE
785 END IF
788 ELSE
790 END IF
791 END DO
792 END DO
793
794
795
801 END DO
802 END DO
803
804
805
811 END DO
812
813
814
817 END DO
818
819
820
824 END DO
825
826
827
831 END DO
832
833
834
843 END DO
844 ELSE
846 regcr(ifec,ng)=0.0_r8
847 regnr(ifec,ng)=0.0_r8
848 regpr(ifec,ng)=0.0_r8
849 regfr(ifec,ng)=0.0_r8
850 regsr(ifec,ng)=0.0_r8
851 END DO
852 END IF
853 END DO
854
855
856
858 wavedp(iband)=(550.0_r8/(397.0_r8+real(iband,r8)*
dlam))
859 END DO
860
861
862
867
868#if defined DIAGNOSTICS && defined DIAGNOSTICS_BIO
869
870
871
872
876 END IF
877
880 END DO
881#endif
882
883
884
885
886
887 IF (
master.and.lwrite)
THEN
890 WRITE (out,50) ng
891 WRITE (out,60)
bioiter(ng),
'BioIter', &
892 & 'Number of iterations for nonlinear convergence.'
893 WRITE (out,70)
rtuvr_flag(ng),
'RtUVR_flag', &
894 & 'Switch to calculate CDOC UV photolysis.'
895 WRITE (out,70)
nfix_flag(ng),
'NFIX_flag', &
896 & 'Switch to calculate temperature based N fixation.'
897 WRITE (out,70)
regen_flag(ng),
'Regen_flag', &
898 & 'Switch to calculate fecal matter regeneration.'
899 WRITE (out,80) 'HsNO3', &
900 & 'Half-saturation for phytoplankton NO3 uptake', &
901 & '(micromole_NO3/liter):'
904 END DO
905 WRITE (out,80) 'HsNH4', &
906 & 'Half-saturation for phytoplankton NH4 uptake', &
907 & '(micromole_NH4/liter):'
910 END DO
911 WRITE (out,80) 'HsSiO', &
912 & 'Half-saturation for phytoplankton SiO uptake', &
913 & '(micromole_SiO/liter):'
916 END DO
917 WRITE (out,80) 'HsPO4', &
918 & 'Half-saturation for phytoplankton PO4 uptake', &
919 & '(micromole_PO4/liter):'
922 END DO
923 WRITE (out,80) 'HsFe', &
924 & 'Half-saturation for phytoplankton Fe uptake', &
925 & '(micromole_Fe/liter):'
928 END DO
929 WRITE (out,100) 'GtALG_max', &
930 & 'Maximum 24 hour growth rate (1/day):'
933 END DO
934 WRITE (out,80) 'PhyTbase', &
935 & 'Temperature base for exponential response to', &
936 & 'temperature (Celsius):'
939 END DO
940 WRITE (out,80) 'PhyTfac', &
941 & 'Phytoplankton exponential temperature factor', &
942 & '(1/Celsius):'
945 END DO
946 WRITE (out,100) 'BET_', &
947 & 'Nitrate uptake inhibition for NH4 (l/micromole):'
950 END DO
951 WRITE (out,80) 'maxC2nALG', &
952 & 'Maximum phytoplankton C:N ratio', &
953 & '(micromole_C/micromole_N):'
956 END DO
957 WRITE (out,80) 'minC2nALG', &
958 & 'Balanced phytoplankton C:N ratio', &
959 & '(micromole_C/micromole_N):'
962 END DO
963 WRITE (out,80) 'C2nALGminABS', &
964 & 'Absolute minimum phytoplankton C:N ratio', &
965 & '(micromole_C/micromole_N):'
968 END DO
969 WRITE (out,80) 'maxC2SiALG', &
970 & 'Maximum phytoplankton C:Si ratio', &
971 & '(micromole_C/micromole_Si)'
974 END DO
975 WRITE (out,80) 'minC2SiALG', &
976 & 'Balanced phytoplankton C:Si ratio', &
977 & '(micromole_C/micromole_Si):'
980 END DO
981 WRITE (out,80) 'C2SiALGminABS', &
982 & 'Absolute minimum phytoplankton C:Si ratio', &
983 & '(micromole_C/micromole_Si):'
986 END DO
987 WRITE (out,80) 'maxC2pALG', &
988 & 'Maximum phytoplankton C:P ratio', &
989 & '(micromole_C/micromole_P):'
992 END DO
993 WRITE (out,80) 'minC2pALG', &
994 & 'Balanced phytoplankton C:P ratio', &
995 & '(micromole_C/micromole_P):'
998 END DO
999 WRITE (out,80) 'C2pALGminABS', &
1000 & 'Absolute minimum phytoplankton C:P ratio', &
1001 & '(micromole_C/micromole_P)'
1004 END DO
1005 WRITE (out,80) 'maxC2FeALG', &
1006 & 'Maximum phytoplankton C:Fe ratio', &
1007 & '(micromole_C/micromole_Fe):'
1010 END DO
1011 WRITE (out,80) 'minC2FeALG', &
1012 & 'Balanced phytoplankton C:Fe ratio', &
1013 & '(micromole_C/micromole_Fe):'
1016 END DO
1017 WRITE (out,80) 'C2FeALGminABS', &
1018 & 'Absolute minimum phytoplankton C:Fe ratio', &
1019 & '(micromole_C/micromole_Fe):'
1022 END DO
1023 WRITE (out,80) 'qu_yld', &
1024 & 'Maximum quantum yield', &
1025 & '(micromole_C/micromole_quanta):'
1028 END DO
1029 WRITE (out,100) 'E0_comp', &
1030 & 'Compensation light level (micromole_quanta):'
1033 END DO
1034 WRITE (out,80) 'E0_inhib', &
1035 & 'Light level for onset of photoinhibition', &
1036 & '(micromole_quanta):'
1039 END DO
1040 WRITE (out,80) 'inhib_fac', &
1041 & 'Exponential decay factor for light limited growth', &
1042 & '(1/micromole_quanta):'
1045 END DO
1046 WRITE (out,80) 'C2CHL_max', &
1047 & 'Maximum lighted limited C:Chl ratio', &
1048 & '(microgram_C/microgram_Chl):'
1051 END DO
1052 WRITE (out,80) 'mxC2Cl', &
1053 & 'Rate of change in light limited C:Chl ratio', &
1054 & '(microgram_C/microgram_Chl/micromole_quanta):'
1057 END DO
1058 WRITE (out,80) 'b_C2Cl', &
1059 & 'Minimum lighted limited C:Chl ratio', &
1060 & '(microgram_C/microgram_Chl):'
1063 END DO
1064 WRITE (out,80) 'mxC2Cn', &
1065 & 'Rate of change in nutient limited C:Chl ratio', &
1066 & '[(ug_C/ug_Chl)/(umole_C/umole_N)]:'
1069 END DO
1070 WRITE (out,80) 'b_C2Cn', &
1071 & 'Minimum nutrient limited C:Chl ratio', &
1072 & '(microgram_C/microgram_Chl):'
1075 END DO
1076 WRITE (out,80) 'mxPacEff', &
1077 & 'Rate of change in package effect', &
1078 & '[1/(microgram_C/microgram_Chl)]:'
1081 END DO
1082 WRITE (out,80) 'b_PacEff', &
1083 & 'Maximum package effect', &
1084 & '[1/(microgram_C/microgram_Chl)]:'
1087 END DO
1088 WRITE (out,80) 'mxChlB', &
1089 & 'Rate of change in the Chl_b:Chl_a ratio', &
1090 & '[(ug_Chl_b/ug_Chl_a)/(ug_C/ug_Chl_a)]:'
1093 END DO
1094 WRITE (out,80) 'b_ChlB', &
1095 & 'Maximum Chl_b:Chl_a ratio', &
1096 & '(microgram_Chl_b/microgram_Chl_a):'
1099 END DO
1100 WRITE (out,80) 'mxChlC', &
1101 & 'Rate of change in the Chl_c:Chl_a ratio', &
1102 & '[(ug_Chl_c/ug_Chl_a)/(ug_C/ug_Chl_a)]:'
1105 END DO
1106 WRITE (out,80) 'b_ChlC', &
1107 & 'Maximum Chl_c:Chl_a ratio', &
1108 & '(microgram_Chl_c/microgram_Chl_a):'
1111 END DO
1112 WRITE (out,80) 'mxPSC', &
1113 & 'Rate of change in the PSC:Chl_a ratio', &
1114 & '[(ug_PSC/ug_Chl_a)/ug_C/ug_Chl_a)]:'
1117 END DO
1118 WRITE (out,80) 'b_PSC', &
1119 & 'Maximum PSC:Chl_a ratio', &
1120 & '(microgram_PSC/microgram_Chl_a):'
1123 END DO
1124 WRITE (out,80) 'mxPPC', &
1125 & 'Rate of change in the PPC:Chl_a ratio', &
1126 & '[(ug_PPC/ug_Chl_a)/(ug_C/ug_Chl_ a)]:'
1129 END DO
1130 WRITE (out,80) 'b_PPC', &
1131 & 'Maximum PPC:Chl_a ratio', &
1132 & '(microgram_Chl_c/microgram_Chl_a):'
1135 END DO
1136 WRITE (out,80) 'mxLPUb', &
1137 & 'Rate of change in the LPUb:Chl_a ratio', &
1138 & '[(ug_LPUb/ug_Chl_a)/(ug_C/ug_Chl_a)]:'
1141 END DO
1142 WRITE (out,80) 'b_LPUb', &
1143 & 'Maximum LPUb:Chl_a ratio', &
1144 & '(migrogram_HPUb/microgram_Chl_a):'
1147 END DO
1148 WRITE (out,80) 'mxHPUb', &
1149 & 'Rate of change in the HPUb:Chl_a ratio', &
1150 & '[(ug_HPUb/ug_Chl_a)/(ug_C/ug_Chl_a)]:'
1153 END DO
1154 WRITE (out,80)'b_HPUb', &
1155 & 'Maximum HPUb:Chl_a ratio', &
1156 & '(microgram_HPUb/microgram_Chl_a):'
1159 END DO
1160 WRITE (out,80) 'FecDOC', &
1161 & 'Proportion of grazing stress apportioned to DOM', &
1162 & '(nondimensional):'
1165 END DO
1166 WRITE (out,80) 'FecPEL', &
1167 & 'Proportion of grazing stress apportioned to fecal', &
1168 & '(nondimensional):'
1172 END DO
1173 END DO
1174 WRITE (out,80) 'FecCYC', &
1175 & 'Proportion of grazing stress that is recycled', &
1176 & '(nondimensional):'
1179 END DO
1180 WRITE (out,80) 'ExALG', &
1181 & 'Proportion of daily production lost to excretion', &
1182 & '(nondimensional):'
1185 END DO
1186 WRITE (out,100) 'WS', &
1187 & 'Phytoplankton sinking speed (meters/day):'
1189 WRITE (out,90)
ws(is,ng), trim(
phyname(is))
1190 END DO
1191 WRITE (out,100) 'HsGRZ', &
1192 & 'Phytoplankton grazing parameter (nondimensional):'
1195 END DO
1196 WRITE (out,100) 'MinRefuge', &
1197 & 'Refuge Phytoplankton population (micromole_C/liter):'
1200 END DO
1201 WRITE (out,100) 'RefugeDep', &
1202 & 'Maximum Refuge Phytoplankton depth (meters):'
1205 END DO
1206 WRITE (out,100) 'Norm_Vol', &
1207 & 'Normalized Volume factor (nondimensional):'
1210 END DO
1211 WRITE (out,100) 'Norm_Surf', &
1212 & 'Normalized Surface Area factor (nondimensional):'
1215 END DO
1216 WRITE (out,80) 'HsDOP', &
1217 & 'Half Saturation Constant for DOP uptake', &
1218 & '(micromole_DOP/liter):'
1221 END DO
1222 WRITE (out,80) 'C2pALKPHOS', &
1223 & 'C:P ratio where DOP uptake begins', &
1224 & '(micromole_C/micromole_P):'
1227 END DO
1228 WRITE (out,80) 'HsDON', &
1229 & 'Half Saturation Constant for DON uptake', &
1230 & '(micromole_DON/liter):'
1233 END DO
1234 WRITE (out,80) 'C2nNupDON', &
1235 & 'C:N ratio where DON uptake begins', &
1236 & '(micromole_C/micromole_N):'
1239 END DO
1240 WRITE (out,80) 'HsDOC_ba', &
1241 & 'Half saturation constant for bacteria DOC uptake', &
1242 & '(micromole_DOC/liter):'
1245 END DO
1246 WRITE (out,100) 'GtBAC_max', &
1247 & 'Maximum 24 hour bacterial growth rate (1/day):'
1250 END DO
1251 WRITE (out,80) 'BacTbase', &
1252 & 'Temperature base for exponetial response to', &
1253 & 'temperature (Celsius):'
1256 END DO
1257 WRITE (out,80) 'BacTfac', &
1258 & 'Bacteria exponential temperature factor', &
1259 & '(1/Celsius):'
1262 END DO
1263 WRITE (out,120)
c2nbac(ng),
'C2nBAC', &
1264 & 'Carbon to Nitrogen ratio of Bacteria', &
1265 & '(micromole_C/micromole_N).'
1266 WRITE (out,120)
c2pbac(ng),
'C2pBAC', &
1267 & 'Carbon to Phosphorus ratio of Bacteria', &
1268 & '(micromole_C/micromole_P).'
1269 WRITE (out,120)
c2febac(ng),
'C2FeBAC', &
1270 & 'Carbon to Iron ratio of Bacteria', &
1271 & '(micromole_C/micromole_Fe).'
1272 WRITE (out,120)
bacdoc(ng),
'BacDOC', &
1273 & 'Proportion of bacteria grazing stress apportioned', &
1274 & 'to DOM (nondimensional).'
1275 WRITE (out,120)
bacpel(ng),
'BacPEL', &
1276 & 'Proportion of bacteria grazing stress apportioned', &
1277 & 'to fecal (nondimensional).'
1278 WRITE (out,120)
baccyc(ng),
'BacCYC', &
1279 & 'Proportion of bacteria grazing stress recycled', &
1280 & '(nondimensional).'
1281 WRITE (out,120)
exbac_c(ng),
'ExBAC_c', &
1282 & 'Bacterial recalcitrant C excretion as proportion', &
1283 & 'of uptake (nondimensional).'
1284 WRITE (out,120)
exbacc2n(ng),
'ExBacC2N', &
1285 & 'Bacterial recalcitrant excretion carbon:nitrogen', &
1286 & 'ratio (micromole_C/micromole_N).'
1287 WRITE (out,120)
bac_ceff(ng),
'Bac_Ceff', &
1288 & 'Bacterial gross growth carbon efficiency', &
1289 & '(nondimensional).'
1290 WRITE (out,130)
rtnit(ng),
'RtNIT', &
1291 & 'Maximum nitrification rate (1/day).'
1292 WRITE (out,120)
hsnit(ng),
'HsNIT', &
1293 & 'Half saturation constant for bacteria nitrification',&
1294 & '(micromole_NH4/liter).'
1295 WRITE (out,80) 'cDOCfrac_c', &
1296 & 'Colored fraction of DOC from phytoplakton and', &
1297 & 'bacterial losses (nondimensional):'
1300 END DO
1301 WRITE (out,120)
rtuvr_dic(ng),
'RtUVR_DIC', &
1302 & 'UV degradation of DOC into DIC at 410 nm', &
1303 & '(micromole/meter/liter/hour).'
1304 WRITE (out,120)
rtuvr_doc(ng),
'RtUVR_DOC', &
1305 & 'UV degradation of DOC to colorless labile DOC', &
1306 & 'at 410 nm (micromole/meter/liter/hour).'
1307 WRITE (out,100) 'WF', &
1308 & 'Fecal sinking flux (meters/day):'
1310 WRITE (out,90)
wf(is,ng), trim(
fecname(is))
1311 END DO
1312 WRITE (out,80) 'RegTbase', &
1313 & 'Fecal regeneration temperature base for exponential',&
1314 & 'response to temperature (Celsius):'
1317 END DO
1318 WRITE (out,80) 'RegTfac', &
1319 & 'Fecal regeneration exponential temperature factor', &
1320 & '(1/Celsius):'
1323 END DO
1324 WRITE (out,100) 'RegCR', &
1325 & 'Fecal carbon regeneration rate (1/day):'
1328 END DO
1329 WRITE (out,100) 'RegNR', &
1330 & 'Fecal nitrogen regeneration rate (1/day)'
1333 END DO
1334 WRITE (out,100) 'RegSR', &
1335 & 'Fecal silica regeneration rate (1/day):'
1338 END DO
1339 WRITE (out,100) 'RegPR', &
1340 & 'Fecal phosphorus regeneration rate (1/day):'
1343 END DO
1344 WRITE (out,100) 'RegFR', &
1345 & 'Fecal iron regeneration rate (1/day)'
1348 END DO
1349#ifdef TS_DIF2
1352 WRITE (out,140)
nl_tnu2(i,ng),
'nl_tnu2', i, &
1353 & 'NLM Horizontal, harmonic mixing coefficient', &
1354 &
'(m2/s) for tracer ', i, trim(
vname(1,
idtvar(i)))
1355# ifdef ADJOINT
1356 WRITE (out,140)
ad_tnu2(i,ng),
'ad_tnu2', i, &
1357 & 'ADM Horizontal, harmonic mixing coefficient', &
1358 &
'(m2/s) for tracer ', i, trim(
vname(1,
idtvar(i)))
1359# endif
1360# if defined TANGENT || defined TL_IOMS
1361 WRITE (out,140)
tl_tnu2(i,ng),
'tl_tnu2', i, &
1362 & 'TLM Horizontal, harmonic mixing coefficient', &
1363 &
'(m2/s) for tracer ', i, trim(
vname(1,
idtvar(i)))
1364# endif
1365 END DO
1366#endif
1367#ifdef TS_DIF4
1370 WRITE (out,140)
nl_tnu4(i,ng),
'nl_tnu4', i, &
1371 & 'NLM Horizontal, biharmonic mixing coefficient', &
1372 &
'(m4/s) for tracer ', i, trim(
vname(1,
idtvar(i)))
1373# ifdef ADJOINT
1374 WRITE (out,140)
ad_tnu4(i,ng),
'ad_tnu4', i, &
1375 & 'ADM Horizontal, biharmonic mixing coefficient', &
1376 &
'(m4/s) for tracer ', i, trim(
vname(1,
idtvar(i)))
1377# endif
1378# if defined TANGENT || defined TL_IOMS
1379 WRITE (out,140)
tl_tnu4(i,ng),
'tl_tnu4', i, &
1380 & 'TLM Horizontal, biharmonic mixing coefficient', &
1381 &
'(m4/s) for tracer ', i, trim(
vname(1,
idtvar(i)))
1382# endif
1383 END DO
1384#endif
1389 & i, 'Turning ON sponge on tracer ', i, &
1391 ELSE
1393 & i, 'Turning OFF sponge on tracer ', i, &
1395 END IF
1396 END DO
1399 WRITE (out,140)
akt_bak(i,ng),
'Akt_bak', i, &
1400 & 'Background vertical mixing coefficient (m2/s)', &
1402 END DO
1403#ifdef FORWARD_MIXING
1406# ifdef ADJOINT
1407 WRITE (out,140)
ad_akt_fac(i,ng),
'ad_Akt_fac', i, &
1408 & 'ADM basic state vertical mixing scale factor', &
1410# endif
1411# if defined TANGENT || defined TL_IOMS
1412 WRITE (out,140)
tl_akt_fac(i,ng),
'tl_Akt_fac', i, &
1413 & 'TLM basic state vertical mixing scale factor', &
1415# endif
1416 END DO
1417#endif
1420 WRITE (out,140)
tnudg(i,ng),
'Tnudg', i, &
1421 & 'Nudging/relaxation time scale (days)', &
1423 END DO
1427 WRITE (out,150)
ltracersrc(i,ng),
'LtracerSrc', &
1428 & i, 'Turning ON point sources/Sink on tracer ', i, &
1430 ELSE
1431 WRITE (out,150)
ltracersrc(i,ng),
'LtracerSrc', &
1432 & i, 'Turning OFF point sources/Sink on tracer ', i, &
1434 END IF
1435 END DO
1439 WRITE (out,150)
ltracerclm(i,ng),
'LtracerCLM', i, &
1440 & 'Turning ON processing of climatology tracer ', i, &
1442 ELSE
1443 WRITE (out,150)
ltracerclm(i,ng),
'LtracerCLM', i, &
1444 & 'Turning OFF processing of climatology tracer ', i, &
1446 END IF
1447 END DO
1451 WRITE (out,150)
lnudgetclm(i,ng),
'LnudgeTCLM', i, &
1452 & 'Turning ON nudging of climatology tracer ', i, &
1454 ELSE
1455 WRITE (out,150)
lnudgetclm(i,ng),
'LnudgeTCLM', i, &
1456 & 'Turning OFF nudging of climatology tracer ', i, &
1458 END IF
1459 END DO
1460 IF ((
nhis(ng).gt.0).and.any(
hout(:,ng)))
THEN
1461 WRITE (out,'(1x)')
1466 &
'Write out tracer ', i, trim(
vname(1,
idtvar(i)))
1467 END DO
1472 & 'Write out tracer flux ', i, &
1474 END DO
1475 END IF
1476 IF ((
nqck(ng).gt.0).and.any(
qout(:,ng)))
THEN
1477 WRITE (out,'(1x)')
1482 &
'Write out tracer ', i, trim(
vname(1,
idtvar(i)))
1483 END DO
1488 & 'Write out surface tracer ', i, &
1490 END DO
1495 & 'Write out tracer flux ', i, &
1497 END DO
1498 END IF
1499#if defined AVERAGES || \
1500 (defined ad_averages && defined adjoint) || \
1501 (defined rp_averages && defined tl_ioms) || \
1502 (defined tl_averages && defined tangent)
1503 IF ((
navg(ng).gt.0).and.any(
aout(:,ng)))
THEN
1504 WRITE (out,'(1x)')
1509 & 'Write out averaged tracer ', i, &
1511 END DO
1516 & 'Write out averaged <t*t> for tracer ', i, &
1518 END DO
1523 & 'Write out averaged <u*t> for tracer ', i, &
1525 END DO
1530 & 'Write out averaged <v*t> for tracer ', i, &
1532 END DO
1537 & 'Write out averaged <Huon*t> for tracer ', i, &
1539 END DO
1544 & 'Write out averaged <Hvom*t> for tracer ', i, &
1546 END DO
1547 END IF
1548#endif
1549#ifdef DIAGNOSTICS_TS
1550 IF ((
ndia(ng).gt.0).and.any(
dout(:,ng)))
THEN
1551 WRITE (out,'(1x)')
1555 & WRITE (out,160) .true., 'Dout(iTrate)', &
1556 & 'Write out rate of change of tracer ', itrc, &
1558 END DO
1562 & WRITE (out,160) .true., 'Dout(iThadv)', &
1563 & 'Write out horizontal advection, tracer ', itrc, &
1565 END DO
1569 & WRITE (out,160) .true., 'Dout(iTxadv)', &
1570 & 'Write out horizontal X-advection, tracer ', itrc, &
1572 END DO
1576 & WRITE (out,160) .true., 'Dout(iTyadv)', &
1577 & 'Write out horizontal Y-advection, tracer ', itrc, &
1579 END DO
1583 & WRITE (out,160) .true., 'Dout(iTvadv)', &
1584 & 'Write out vertical advection, tracer ', itrc, &
1586 END DO
1587# if defined TS_DIF2 || defined TS_DIF4
1591 & WRITE (out,160) .true., 'Dout(iThdif)', &
1592 & 'Write out horizontal diffusion, tracer ', itrc, &
1594 END DO
1598 & WRITE (out,160) .true., 'Dout(iTxdif)', &
1599 & 'Write out horizontal X-diffusion, tracer ', itrc, &
1601 END DO
1605 & WRITE (out,160) .true., 'Dout(iTydif)', &
1606 & 'Write out horizontal Y-diffusion, tracer ', itrc, &
1608 END DO
1609# if defined MIX_GEO_TS || defined MIX_ISO_TS
1613 & WRITE (out,160) .true., 'Dout(iTsdif)', &
1614 & 'Write out horizontal S-diffusion, tracer ', itrc, &
1616 END DO
1617# endif
1618# endif
1622 & WRITE (out,160) .true., 'Dout(iTvdif)', &
1623 & 'Write out vertical diffusion, tracer ', itrc, &
1625 END DO
1626 END IF
1627#endif
1628#ifdef DIAGNOSTICS_BIO
1629 IF (
ndia(ng).gt.0)
THEN
1632 IF (
dout(i,ng))
WRITE (out,170) &
1633 &
dout(i,ng),
'Dout(iDbio3)', &
1634 &
'Write out diagnostics for', trim(
vname(1,i))
1635 END DO
1638 IF (
dout(i,ng))
WRITE (out,170) &
1639 &
dout(i,ng),
'Dout(iDbio4)', &
1640 &
'Write out diagnostics for', trim(
vname(1,i))
1641 END DO
1642 END IF
1643#endif
1644 END IF
1645 END DO
1646 END IF
1647
1648
1649
1650
1651
1652
1653
1654
1659#ifdef ADJOINT
1661#endif
1662#if defined TANGENT || defined TL_IOMS
1664#endif
1665
1666
1667
1668 IF (
tnudg(i,ng).gt.0.0_r8)
THEN
1670 ELSE
1672 END IF
1673 END DO
1674 END DO
1675
1676 30 FORMAT (/,' read_BioPar - variable info not yet loaded, ', &
1677 & a,i2.2,a)
1678 40 FORMAT (/,' read_BioPar - Error while processing line: ',/,a)
1679 50 FORMAT (/,/,' EcoSim Parameters, Grid: ',i2.2, &
1680 & /, ' ===========================',/)
1681 60 FORMAT (1x,i10,2x,a,t32,a)
1682 70 FORMAT (10x,l1,2x,a,t32,a)
1683 80 FORMAT ('...........',2x,a,t32,a,/,t34,a)
1684 90 FORMAT (1p,e11.4,t33,a)
1685 100 FORMAT ('...........',2x,a,t32,a)
1686 110 FORMAT (1p,e11.4,t33,'Fecal Group ',i1,', ',a)
1687 120 FORMAT (1p,e11.4,2x,a,t32,a,/,t34,a)
1688 130 FORMAT (1p,e11.4,2x,a,t32,a)
1689 140 FORMAT (1p,e11.4,2x,a,'(',i2.2,')',t32,a,/,t34,a,i2.2,':',1x,a)
1690 150 FORMAT (10x,l1,2x,a,'(',i2.2,')',t32,a,i2.2,':',1x,a)
1691 160 FORMAT (10x,l1,2x,a,t32,a,i2.2,':',1x,a)
1692 170 FORMAT (10x,l1,2x,a,t32,a,1x,a)
1693
1694 RETURN
integer function decode_line(line_text, keyword, nval, cval, rval)
integer function load_lbc(ninp, vinp, line, nline, ifield, igrid, itrcstr, itrcend, svname, s)
integer function load_tadv(ninp, vinp, line, nline, itrc, igrid, itracer, itrcstr, itrcend, svname, s)
logical, dimension(:), allocatable rtuvr_flag
real(r8), dimension(:), allocatable rtnit
real(r8), dimension(:,:), allocatable b_c2cl
real(r8), dimension(:,:), allocatable e0_comp
real(r8), dimension(:,:), allocatable inhib_fac
real(r8), dimension(:,:), allocatable mxpaceff
real(r8), dimension(:,:), allocatable mxppc
real(r8), dimension(:,:), allocatable hspo4
real(r8), dimension(:,:), allocatable regcr
real(r8), dimension(:), allocatable frac_exbac_n
real(r8), dimension(:,:), allocatable mxchlc
integer, dimension(:), allocatable idbio4
real(r8), dimension(:), allocatable bacpel
real(r8), dimension(:,:), allocatable mxpsc
real(r8), dimension(:,:), allocatable mxc2cl
real(r8), dimension(:,:), allocatable b_chlc
real(r8), dimension(:,:), allocatable hsfe
real(r8), dimension(:,:), allocatable maxc2sialg
real(r8), dimension(:), allocatable r_exbac_c
logical, dimension(:), allocatable nfix_flag
real(r8), dimension(:,:), allocatable bactbase
real(r8), dimension(:,:), allocatable hspo4_ba
real(r8), dimension(nbands) wavedp
real(r8), dimension(:,:), allocatable hsfe_ba
real(r8), dimension(:,:), allocatable hsdon
real(r8), dimension(:,:), allocatable mxchlb
real(r8), dimension(:,:), allocatable regpr
real(r8), dimension(:,:), allocatable b_psc
integer, dimension(:), allocatable bioiter
real(r8), dimension(:,:), allocatable regtbase
real(r8), dimension(:,:,:), allocatable fecpel
real(r8), dimension(:), allocatable bac_ceff
real(r8), dimension(:,:), allocatable hsnh4_ba
real(r8), dimension(:,:), allocatable qu_yld
real(r8), dimension(:,:), allocatable hsno3
real(r8), dimension(:), allocatable rtuvr_dic
real(r8), dimension(:,:), allocatable exalg
real(r8), dimension(:,:), allocatable b_c2cn
real(r8), dimension(:,:), allocatable mxc2cn
real(r8), dimension(:), allocatable p2cbac
integer, parameter nbands
real(r8), dimension(:,:), allocatable maxc2fealg
real(r8), dimension(:,:), allocatable minc2sialg
real(r8), dimension(:,:), allocatable hsdoc_ba
real(r8), dimension(:,:), allocatable regsr
real(r8), dimension(:,:), allocatable phytbase
real(r8), dimension(:,:), allocatable fecdoc
real(r8), dimension(:,:), allocatable imaxc2palg
real(r8), dimension(:,:), allocatable b_hpub
real(r8), dimension(:,:), allocatable bet_
real(r8), dimension(:), allocatable n2cbac
real(r8), dimension(:,:), allocatable imaxc2sialg
real(r8), dimension(:,:), allocatable mxlpub
real(r8), dimension(:,:), allocatable b_chlb
real(r8), dimension(:), allocatable baccyc
real(r8), dimension(:,:), allocatable maxc2nalg
real(r8), dimension(:,:), allocatable wf
real(r8), dimension(:,:), allocatable mxhpub
real(r8), dimension(:,:), allocatable c2nalgminabs
logical, dimension(:), allocatable regen_flag
real(r8), dimension(:,:), allocatable hsnh4
real(r8), dimension(:,:), allocatable feccyc
real(r8), dimension(:,:), allocatable b_ppc
real(r8), dimension(:), allocatable bacdoc
real(r8), dimension(:,:), allocatable b_paceff
real(r8), dimension(:,:), allocatable minrefuge
real(r8), dimension(:,:), allocatable c2nnupdon
real(r8), dimension(:,:), allocatable minc2nalg
real(r8), dimension(:), allocatable c2febac
real(r8), dimension(:,:), allocatable refugedep
integer, dimension(:), allocatable idbio3
real(r8), dimension(:,:), allocatable imaxc2fealg
real(r8), dimension(:,:), allocatable norm_vol
real(r8), dimension(:,:), allocatable maxc2palg
real(r8), dimension(:,:), allocatable regtfac
real(r8), dimension(:,:), allocatable c2fealgminabs
real(r8), dimension(:), allocatable c2pbac
character(len=13), dimension(nfec) fecname
real(r8), dimension(:,:), allocatable phytfac
integer, dimension(:), allocatable idbio
real(r8), dimension(:,:), allocatable ws
character(len=11), dimension(ndom) domname
real(r8), dimension(:,:), allocatable cdocfrac_c
real(r8), dimension(:,:), allocatable hsdop
real(r8), dimension(:,:), allocatable regnr
real(r8), parameter small
real(r8), dimension(:,:), allocatable imaxc2nalg
real(r8), dimension(:), allocatable exbac_c
real(r8), dimension(:,:), allocatable hssio
real(r8), dimension(ndom) adoc410
real(r8), dimension(:,:), allocatable b_lpub
real(r8), dimension(:), allocatable rtuvr_doc
real(r8), dimension(:,:), allocatable gtbac_max
character(len=21), dimension(nphy) phyname
character(len=16), dimension(nbac) bacname
real(r8), dimension(:,:), allocatable c2sialgminabs
real(r8), dimension(:), allocatable exbacc2n
real(r8), dimension(:), allocatable exbac_n
real(r8), dimension(:), allocatable i_bac_ceff
real(r8), dimension(:,:), allocatable norm_surf
real(r8), dimension(:,:), allocatable minc2palg
real(r8), dimension(:,:), allocatable minc2fealg
real(r8), dimension(:), allocatable c2nbac
real(r8), dimension(:,:), allocatable hsgrz
real(r8), dimension(:,:), allocatable gtalg_max
real(r8), dimension(:,:), allocatable bactfac
real(r8), dimension(:), allocatable fe2cbac
real(r8), dimension(:,:), allocatable c2chl_max
real(r8), dimension(ndom) adoc300
real(r8), dimension(:,:), allocatable e0_inhib
real(r8), dimension(:), allocatable dia_light
real(r8), dimension(:), allocatable hsnit
real(r8), dimension(:,:), allocatable regfr
real(r8), dimension(:,:), allocatable c2palkphos
real(r8), dimension(:,:), allocatable c2palgminabs
integer, dimension(:), allocatable idttav
logical, dimension(:,:), allocatable hout
integer, dimension(:), allocatable ihvtav
integer, dimension(:), allocatable ihutav
integer, dimension(:), allocatable idutav
integer, dimension(:), allocatable idsurt
integer, dimension(:), allocatable idtsur
integer, dimension(:), allocatable idtvar
integer, dimension(:), allocatable istvar
logical, dimension(:,:), allocatable qout
character(len=maxlen), dimension(6, 0:nv) vname
integer, dimension(:), allocatable idvtav
logical, dimension(:,:), allocatable dout
logical, dimension(:,:), allocatable aout
integer, dimension(:,:), allocatable iddtrc
type(t_adv), dimension(:,:), allocatable hadvection
type(t_lbc), dimension(:,:,:), allocatable ad_lbc
type(t_adv), dimension(:,:), allocatable ad_hadvection
real(r8), dimension(:), allocatable dmem
type(t_lbc), dimension(:,:,:), allocatable lbc
type(t_adv), dimension(:,:), allocatable vadvection
type(t_adv), dimension(:,:), allocatable ad_vadvection
real(r8), dimension(:,:), allocatable tl_tnu2
logical, dimension(:,:), allocatable ltracersrc
real(r8), dimension(:,:), allocatable nl_tnu2
integer, dimension(:), allocatable nqck
real(dp), dimension(:,:), allocatable tnudg
logical, dimension(:,:), allocatable ltracersponge
real(r8), dimension(:,:), allocatable tl_tnu4
integer, dimension(:), allocatable navg
real(r8), dimension(:,:), allocatable ad_akt_fac
real(dp), parameter sec2day
real(r8), dimension(:,:), allocatable ad_tnu2
real(r8), dimension(:,:), allocatable akt_bak
integer, dimension(:), allocatable nhis
real(r8), dimension(:,:), allocatable ad_tnu4
real(r8), dimension(:,:), allocatable nl_tnu4
logical, dimension(:), allocatable lbiology
logical, dimension(:,:), allocatable ltracerclm
integer, dimension(:), allocatable ndia
logical, dimension(:,:), allocatable lnudgetclm
real(r8), dimension(:,:), allocatable tl_akt_fac