Subroutine to write the cross-section tables to the model listing file.
574 class(SfrCrossSection) :: this
575 real(DP),
dimension(this%nreaches),
intent(in) :: widths
576 real(DP),
dimension(this%nreaches),
intent(in) :: roughs
577 integer(I4B),
intent(in),
optional :: kstp
578 integer(I4B),
intent(in),
optional :: kper
580 character(len=LINELENGTH) :: title
581 character(len=LINELENGTH) :: text
582 character(len=LINELENGTH) :: filename
583 character(len=10) :: cvalid
584 logical(LGP) :: transient
585 integer(I4B) :: kkstp
586 integer(I4B) :: kkper
589 integer(I4B) :: ntabcols
590 integer(I4B) :: ninvalid_reaches
592 real(DP) :: xfraction
595 integer(I4B),
dimension(this%nreaches) :: reach_fail
602 if (
present(kstp))
then
605 if (
present(kper))
then
610 if (kkstp > 0 .and. kkper > 0)
then
617 do irch = 1, this%nreaches
618 filename = this%filenames(irch)
622 if (trim(adjustl(filename)) /=
'NONE')
then
623 do n = 1, this%npoints(irch)
624 if (.not. this%cross_sections(irch)%valid(n))
then
625 reach_fail(irch) = reach_fail(irch) + 1
632 do irch = 1, this%nreaches
633 filename = this%filenames(irch)
636 if (trim(adjustl(filename)) /=
'NONE')
then
640 if (this%iprpak > 0 .or. reach_fail(irch) > 0)
then
643 if (reach_fail(irch) > 0)
then
650 write (title,
'(a,1x,i0,1x,3a)') &
651 'CROSS_SECTION DATA FOR REACH', irch,
"FROM TAB6 FILE ('", &
652 trim(adjustl(filename)),
"')"
653 call table_cr(this%inputtab, trim(adjustl(filename)), title)
654 call this%inputtab%table_df(this%npoints(irch), ntabcols, &
655 this%iout, finalize=.false., &
658 call this%inputtab%set_kstpkper(kkstp, kkper)
661 call this%inputtab%initialize_column(text, 20, alignment=
tableft)
663 call this%inputtab%initialize_column(text, 20, alignment=
tableft)
665 call this%inputtab%initialize_column(text, 20, alignment=
tableft)
667 call this%inputtab%initialize_column(text, 20, alignment=
tableft)
668 text =
"MANNING'S ROUGHNESS COEFFICIENT"
669 call this%inputtab%initialize_column(text, 20, alignment=
tableft)
670 if (reach_fail(irch) > 0)
then
671 text =
'NEEDS ADJUSTMENT'
672 call this%inputtab%initialize_column(text, 10, alignment=
tableft)
680 do n = 1, this%npoints(irch)
681 xfraction = this%cross_sections(irch)%station(n) / width
682 r = this%cross_sections(irch)%roughfraction(n) * rough
683 call this%inputtab%add_term(xfraction)
684 call this%inputtab%add_term(this%cross_sections(irch)%station(n))
685 call this%inputtab%add_term(this%cross_sections(irch)%height(n))
686 call this%inputtab%add_term(&
687 &this%cross_sections(irch)%roughfraction(n))
688 call this%inputtab%add_term(r)
689 if (reach_fail(irch) > 0)
then
690 if (this%cross_sections(irch)%valid(n))
then
695 call this%inputtab%add_term(cvalid)
700 call this%inputtab%finalize_table()
706 if (this%invalid > 0)
then
708 do irch = 1, this%nreaches
709 if (reach_fail(irch) > 0)
then
710 ninvalid_reaches = ninvalid_reaches + 1
713 write (warnmsg,
'(a,1x,i0,7(1x,a))') &
714 'Cross-section data for', ninvalid_reaches, &
715 'reaches include one or more points that result in a', &
716 'non-unique depth-conveyance relation. This occurs when', &
717 'there are horizontal sections at non-zero heights', &
718 '(for example, flat overbank sections). This can usually', &
719 'be resolved by adding a small slope to these flat', &
720 'sections. See the cross-section tables in the model', &
721 'listing file for more information.'
This module contains simulation constants.
@ tableft
left justified table column
This module contains simulation methods.
subroutine, public store_warning(msg, substring)
Store warning message.