Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some cesm build changes #267

Draft
wants to merge 26 commits into
base: cesm-coupling
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
7bea959
Change MODEL to COMP_NAME fixing #259
ekluzek Mar 18, 2022
3b7eef6
Start adding list of files to rof.input_data_list file dealing with #266
ekluzek Mar 18, 2022
839e079
Merge branch 'cesm-coupling' of https://github.com/ESCOMP/mizuRoute i…
ekluzek Mar 23, 2022
a63d6d0
Merge branch 'cesm-coupling' of https://github.com/ESCOMP/mizuRoute i…
ekluzek Mar 31, 2022
4c845c9
Mark the USGS tests as failing because of issue #273
ekluzek Mar 31, 2022
d2dfabc
Fix type in expected fail
ekluzek Apr 14, 2022
9b3f6a5
Remove all but one USGS test, since they fail
ekluzek Apr 14, 2022
7bfc0b6
Shorten some lines to remove the warning on nag, and add required len…
ekluzek Apr 14, 2022
3052156
Use shsr_sys_system call rather than system intrinsic which isn't alw…
ekluzek Apr 14, 2022
f43518c
Use shsr_sys_flush call rather than flush intrinsic which isn't alway…
ekluzek Apr 14, 2022
31b8d9c
Add required length to the X edit descriptor, addressing #275
ekluzek Apr 14, 2022
909736a
Merge remote-tracking branch 'ESCOMP_mizuRoute/cesm-coupling' into ce…
ekluzek Apr 14, 2022
bb2892d
Use case convention for mizuRoute USE statements
ekluzek Apr 14, 2022
fd99715
Update ntopo file with CDF5 version
ekluzek Apr 27, 2022
976d74e
Add PGI test to expected fails
ekluzek Apr 27, 2022
8800ae2
Merge remote-tracking branch 'ESCOMP_mizuRoute/cesm-coupling' into ce…
ekluzek May 13, 2022
326c2fc
Nag compiler complains about this line, because the deallocate was al…
ekluzek May 13, 2022
bd15154
Nag compiler pointed out that you shouldn't send the same variable to…
ekluzek May 13, 2022
97dbabb
Fix misspelling
ekluzek May 13, 2022
8bde4a2
Add expected fail
ekluzek May 14, 2022
ca94d1c
Rename user_ctl_mizuroute files to user_nl_mizuroute_ctl fixing #281
ekluzek May 15, 2022
8654f4a
Replace pgi test with nvhpc
ekluzek May 15, 2022
9f2abda
Merge remote-tracking branch 'escomp/cesm-coupling' into cesm_build_c…
ekluzek May 15, 2022
74d196d
Adjust test list, nvhpc should be only DEBUG off for now, do only one…
ekluzek May 16, 2022
29eb14f
Add to expected fails list
ekluzek May 16, 2022
2d61686
Remove two tests from expected fails that are working now
ekluzek May 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cime_config/buildlib
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def _main_func():
complib = os.path.join(libroot,"librof.a")
makefile = os.path.join(casetools, "Makefile")

cmd = "{} complib -j {} MODEL=mizuRoute COMPLIB={} -f {} {}" \
cmd = "{} complib -j {} COMP_NAME=mizuRoute COMPLIB={} -f {} {}" \
.format(gmake, gmake_j, complib, makefile, get_standard_makefile_args(case))

rc, out, err = run_cmd(cmd)
Expand Down
25 changes: 20 additions & 5 deletions cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ def _create_control_files(case, caseroot, srcroot, confdir, inst_string, infile,
logger.debug(" mizuRoute lnd grid is %s ", config['lnd_grid'])
logger.debug(" mizuRoute rof grid is %s ", config['rof_grid'])
#----------------------------------------------------
# Create dictionary of files that will be read in
#----------------------------------------------------
files = {}
#----------------------------------------------------
# Settings that depend on the resolution
#----------------------------------------------------
if ( config['rof_grid'] == "HDMAmz" ):
Expand Down Expand Up @@ -175,6 +179,8 @@ def _create_control_files(case, caseroot, srcroot, confdir, inst_string, infile,
ctl.set( "varname_downSegId", varname_downSegId )
ctl.set( "varname_pfafCode", varname_pfafCode )

files['fname_ntopold'] = os.path.join( ctl.get('ancil_dir'), ctl.get('fname_ntopOld') )

#----------------------------------------------------
# Set the restart file depending on start type
#----------------------------------------------------
Expand All @@ -189,6 +195,7 @@ def _create_control_files(case, caseroot, srcroot, confdir, inst_string, infile,
filename = "%s.mizuRoute.r.%s-%s.nc" %(run_refcase, run_refdate, run_tod)

ctl.set( "fname_state_in", filename )
files['fname_state_in'] = ctl.get('fname_state_in')

elif fname_state_in.strip() == '':
fname_state_in = "empty"
Expand All @@ -215,15 +222,23 @@ def _create_control_files(case, caseroot, srcroot, confdir, inst_string, infile,
#----------------------------------------------------
control_file = os.path.join(confdir, "mizuRoute.control")
nml_file = os.path.join(confdir, "mizuRoute_in")
write_nml_in_file(case, nmlgen, confdir, nml_file)
write_nml_in_file(case, nmlgen, confdir, nml_file, data_list_path)
ctl.write( control_file )
#----------------------------------------------------
# Append list of files needed to file list file
#----------------------------------------------------
print( data_list_path )
fileslist = open( data_list_path, "a" )
print( files )
for datafile in files:
print( datafile )
fileslist.write( datafile + " = " + files[datafile] + "\n" )

fileslist.close()

###############################################################################
def write_nml_in_file(case, nmlgen, confdir, nml_file):
def write_nml_in_file(case, nmlgen, confdir, nml_file, data_list_path):
###############################################################################
data_list_path = os.path.join(case.get_case_root(), "Buildconf", "rof.input_data_list")
if os.path.exists(data_list_path):
os.remove(data_list_path)
namelist_file = os.path.join(confdir, nml_file)
nmlgen.write_output_file(namelist_file, data_list_path )

Expand Down
2 changes: 1 addition & 1 deletion cime_config/testdefs/ExpectedTestFails.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<test name="SMS_D.nldas2_rUSGS_mnldas2.I2000Clm50SpMizGs.cheyenne_intel.mizuroute-default">
<phase name="RUN">
<status>FAIL</status>
<issue>ESMCI/cime#143</issue>
<issue>#273</issue>
</phase>
</test>
<test name="SMS.f19_f19_mg17_rMERIT.I2000Clm50SpMizGs.cheyenne_gnu.mizuroute-default">
Expand Down
15 changes: 2 additions & 13 deletions cime_config/testdefs/testlist_mizuRoute.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<!-- NOTE: ERP tests are known NOT to work since the MPI task count must remain the same on restart -->
<!-- ERP tests with only threads can work hoeever -->
<!-- PEM tests seem to need to be at least 10 days in length (see #239) -->
<!-- USFS grid fails currently (see #273) -->
<!-- MPI: mpi-serial and regular as well as some threaded -->
<!-- Short tests: minimum 1-day Longer tests: a year to two, good to do past year boundary -->
<!-- compsets: I2000Clm50SpMizGs -->
Expand Down Expand Up @@ -116,19 +117,7 @@
</machines>
<options>
<option name="wallclock">00:20:00</option>
<option name="comment" >Smoke test on CONUS regional grid with DEBUG on</option>
</options>
</test>
<test name="ERS" grid="nldas2_rUSGS_mnldas2" compset="I2000Clm50SpMizGs" testmods="mizuroute/default">
<machines>
<machine name="cheyenne" compiler="intel" category="mizu"></machine>
<machine name="cheyenne" compiler="gnu" category="mizu"></machine>
<machine name="izumi" compiler="intel" category="mizu"></machine>
<machine name="izumi" compiler="nag" category="mizu"></machine>
</machines>
<options>
<option name="wallclock">00:20:00</option>
<option name="comment" >Exact restart test on CONUS regional grid with DEBUG off</option>
<option name="comment" >Smoke test on CONUS regional grid with DEBUG on (only one test since this fails)</option>
</options>
</test>
<test name="ERI" grid="nldas2_rHDMA_mnldas2" compset="I2000Clm50SpMizGs" testmods="mizuroute/default">
Expand Down
18 changes: 13 additions & 5 deletions route/build/cpl/RtmTimeManager.F90
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ SUBROUTINE init_time(ierr, message)
case('hours','hour','hr','h'); secPerTime=3600._r8; timePerDay=24._r8
case('days','day','d'); secPerTime=86400._r8; timePerDay=1._r8
case default
ierr=20; message=trim(message)//'<time_units>= '//trim(time_units)//': <time_units> must be seconds, minutes, hours or days.'; return
ierr=20
message=trim(message)//'<time_units>= '//trim(time_units)//': <time_units> must be seconds, minutes, hours or days.'
return
end select

dt_day = dt/secprday ! dt [sec] -> dt_day
Expand Down Expand Up @@ -122,7 +124,11 @@ SUBROUTINE init_time(ierr, message)
end if

! check that the dates are aligned
if(endDatetime < begDatetime) then; ierr=20; message=trim(message)//'simulation end is before simulation start'; return; endif
if(endDatetime < begDatetime) then
ierr=20
message=trim(message)//'simulation end is before simulation start'
return
endif

! initialize model time at first time step (1) and previous time step (0)
iTime = 1
Expand All @@ -132,8 +138,10 @@ SUBROUTINE init_time(ierr, message)
if (masterproc .and. debug_write) then
write(iulog,*) 'simStart datetime = ', trim(simStart)
write(iulog,*) 'simEnd datetime = ', trim(simEnd)
write(iulog,*) 'reference datetime = ', refDatetime%year(), refDatetime%month(), refDatetime%day(), refDatetime%hour(), refDatetime%minute(), refDatetime%sec()
write(iulog,*) 'simDatetime = ', simDatetime(1)%year(), simDatetime(1)%month(), simDatetime(1)%day(), simDatetime(1)%hour(), simDatetime(1)%minute(), simDatetime(1)%sec()
write(iulog,*) 'reference datetime = ', refDatetime%year(), refDatetime%month(), refDatetime%day() &
, refDatetime%hour(), refDatetime%minute(), refDatetime%sec()
write(iulog,*) 'simDatetime = ', simDatetime(1)%year(), simDatetime(1)%month(), simDatetime(1)%day() &
, simDatetime(1)%hour(), simDatetime(1)%minute(), simDatetime(1)%sec()
write(iulog,*) 'dt [sec] = ', dt
write(iulog,*) 'nTime = ', nTime
write(iulog,*) 'iTime, timeVar(iTime) = ', iTime, timeVar(iTime)
Expand All @@ -158,7 +166,7 @@ SUBROUTINE shr_timeStr(esmfTime, timeStr)

call ESMF_TimeGet(esmfTime , yy=yy, mm=mm, dd=dd, h=hr, m=mn, s=sec, rc=rc )

write(timeStr,'(i4.4,a,i2.2,a,i2.2,a,i2.2,a,i2.2,a,i2.2)'), yy,'-',mm,'-',dd,' ',hr,':',mn,':',sec
write(timeStr,'(i4.4,a,i2.2,a,i2.2,a,i2.2,a,i2.2,a,i2.2)') yy,'-',mm,'-',dd,' ',hr,':',mn,':',sec

END SUBROUTINE shr_timeStr

Expand Down
6 changes: 3 additions & 3 deletions route/build/src/accum_runoff.f90
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,13 @@ SUBROUTINE accum_qupstream(iEns, & ! input: index of runoff ensemble to
write(fmt1,'(A,I5,A)') '(A,1X',nUps,'(1X,I10))'
write(fmt2,'(A,I5,A)') '(A,1X',nUps,'(1X,F20.7))'
write(*,'(2a)') new_line('a'),'** Check upstream discharge accumulation **'
write(*,'(a,x,I10,x,I10)') ' Reach index & ID =', segIndex, NETOPO_in(segIndex)%REACHID
write(*,'(a,1x,I10,1x,I10)') ' Reach index & ID =', segIndex, NETOPO_in(segIndex)%REACHID
write(*,'(a)') ' * upstream reach index (NETOPO_in%UREACH) and discharge (uprflux) [m3/s] :'
write(*,fmt1) ' UREACHK =', (NETOPO_in(segIndex)%UREACHK(iUps), iUps=1,nUps)
write(*,fmt2) ' prflux =', (RCHFLX_out(iens,NETOPO_in(segIndex)%UREACHI(iUps))%ROUTE(idxSUM)%REACH_Q, iUps=1,nUps)
write(*,'(a)') ' * local area discharge (RCHFLX_out%BASIN_QR(1)) and final discharge (RCHFLX_out%ROUTE(idxSUM)%REACH_Q) [m3/s] :'
write(*,'(a,x,F15.7)') ' RCHFLX_out%BASIN_QR(1) =', RCHFLX_out(iEns,segIndex)%BASIN_QR(1)
write(*,'(a,x,F15.7)') ' RCHFLX_out%ROUTE(idxSUM)%REACH_Q =', RCHFLX_out(iens,segIndex)%ROUTE(idxSUM)%REACH_Q
write(*,'(a,1x,F15.7)') ' RCHFLX_out%BASIN_QR(1) =', RCHFLX_out(iEns,segIndex)%BASIN_QR(1)
write(*,'(a,1x,F15.7)') ' RCHFLX_out%ROUTE(idxSUM)%REACH_Q =', RCHFLX_out(iens,segIndex)%ROUTE(idxSUM)%REACH_Q
endif

END SUBROUTINE accum_qupstream
Expand Down
14 changes: 7 additions & 7 deletions route/build/src/dfw_route.f90
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,10 @@ SUBROUTINE dfw_rch(iEns, segIndex, & ! input: index of runoff ensemble to be pro
if (nUps>0) then
do iUps = 1,nUps
iRch_ups = NETOPO_in(segIndex)%UREACHI(iUps) ! index of upstream of segIndex-th reach
write(iulog,'(A,X,I12,X,G15.4)') ' UREACHK, uprflux=',NETOPO_in(segIndex)%UREACHK(iUps),RCHFLX_out(iens, iRch_ups)%ROUTE(idxDW)%REACH_Q
write(iulog,'(A,1X,I12,1X,G15.4)') ' UREACHK, uprflux=',NETOPO_in(segIndex)%UREACHK(iUps),RCHFLX_out(iens, iRch_ups)%ROUTE(idxDW)%REACH_Q
enddo
end if
write(iulog,'(A,X,G15.4)') ' RCHFLX_out(iEns,segIndex)%BASIN_QR(1)=',RCHFLX_out(iEns,segIndex)%BASIN_QR(1)
write(iulog,'(A,1X,G15.4)') ' RCHFLX_out(iEns,segIndex)%BASIN_QR(1)=',RCHFLX_out(iEns,segIndex)%BASIN_QR(1)
endif

! solve diffusive wave equation
Expand All @@ -208,12 +208,12 @@ SUBROUTINE dfw_rch(iEns, segIndex, & ! input: index of runoff ensemble to be pro
doCheck, & ! input: reach index to be examined
ierr, cmessage) ! output: error control
if(ierr/=0)then
write(message, '(A,X,I12,X,A)') trim(message)//'/segment=', NETOPO_in(segIndex)%REACHID, '/'//trim(cmessage)
write(message, '(A,1X,I12,1X,A)') trim(message)//'/segment=', NETOPO_in(segIndex)%REACHID, '/'//trim(cmessage)
return
endif

if(doCheck)then
write(iulog,'(A,X,G15.4)') ' RCHFLX_out(iens,segIndex)%REACH_Q=', RCHFLX_out(iens,segIndex)%ROUTE(idxDW)%REACH_Q
write(iulog,'(A,1X,G15.4)') ' RCHFLX_out(iens,segIndex)%REACH_Q=', RCHFLX_out(iens,segIndex)%ROUTE(idxDW)%REACH_Q
endif

END SUBROUTINE dfw_rch
Expand Down Expand Up @@ -333,14 +333,14 @@ SUBROUTINE diffusive_wave(rch_param, & ! input: river parameter data structu
dt = T1-T0

if (doCheck) then
write(iulog,'(4(A,X,G15.4))') ' length [m] =',rch_param%RLENGTH,'slope [-] =',rch_param%R_SLOPE,'channel width [m] =',rch_param%R_WIDTH,'manning coef =',rch_param%R_MAN_N
write(iulog,'(4(A,1X,G15.4))') ' length [m] =',rch_param%RLENGTH,'slope [-] =',rch_param%R_SLOPE,'channel width [m] =',rch_param%R_WIDTH,'manning coef =',rch_param%R_MAN_N
end if

! time-step adjustment so Courant number is less than 1
dTsub = dt/ntSub

if (doCheck) then
write(iulog,'(A,X,I3,A,X,G12.5)') ' No. sub timestep=',nTsub,' sub time-step [sec]=',dTsub
write(iulog,'(A,1X,I3,A,1X,G12.5)') ' No. sub timestep=',nTsub,' sub time-step [sec]=',dTsub
end if

allocate(Qlocal(1:nMolecule%DW_ROUTE, 0:1), stat=ierr, errmsg=cmessage)
Expand Down Expand Up @@ -453,7 +453,7 @@ SUBROUTINE diffusive_wave(rch_param, & ! input: river parameter data structu
endif

if (doCheck) then
write(iulog,'(A,X,G12.5)') ' Qout(t) =', rflux%ROUTE(idxDW)%REACH_Q
write(iulog,'(A,1X,G12.5)') ' Qout(t) =', rflux%ROUTE(idxDW)%REACH_Q
endif

END SUBROUTINE diffusive_wave
Expand Down
4 changes: 2 additions & 2 deletions route/build/src/domain_decomposition.f90
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ SUBROUTINE print_screen()
associate (segIndexSub => domains_mpi(ix)%segIndex, nSubSeg => size(domains_mpi(ix)%segIndex))
do iSeg = 1,size(segIndexSub)
if (downIndex(segIndexSub(iSeg)) > 0) then
write(iulog, "(I9,x,I12,x,I9,x,I12,x,I5,x,I3)") segIndexSub(iSeg),segId(segIndexSub(iSeg)), &
write(iulog, "(I9,1x,I12,1x,I9,1x,I12,1x,I5,1x,I3)") segIndexSub(iSeg),segId(segIndexSub(iSeg)), &
downIndex(segIndexSub(iSeg)),segId(downIndex(segIndexSub(iSeg))), &
ix, domains_mpi(ix)%idNode
else
write(iulog, "(I9,x,I12,x,I9,x,I12,x,I5,x,I3)") segIndexSub(iSeg),segId(segIndexSub(iSeg)), &
write(iulog, "(I9,1x,I12,1x,I9,1x,I12,1x,I5,1x,I3)") segIndexSub(iSeg),segId(segIndexSub(iSeg)), &
downIndex(segIndexSub(iSeg)),-999, &
ix, domains_mpi(ix)%idNode
endif
Expand Down
4 changes: 3 additions & 1 deletion route/build/src/init_model_data.f90
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ SUBROUTINE init_ntopo(nHRU_out, nRch_out,
USE process_ntopo, ONLY: check_river_properties ! check if river network data is physically valid
USE ncio_utils, ONLY: get_var_dims
USE process_ntopo, ONLY: augment_ntopo ! compute all the additional network topology (only compute option = on)
USE shr_sys_mod, ONLY: shr_sys_system ! share system call

implicit none
! input: None
Expand Down Expand Up @@ -597,7 +598,8 @@ SUBROUTINE init_ntopo(nHRU_out, nRch_out,
! --> users can modify the hard-coded parameter "maxUpstreamFile" if desired
if(tot_upstream > maxUpstreamFile) tot_upstream=0

call system('rm -f '//trim(ancil_dir)//trim(fname_ntopNew))
call shr_sys_system('rm -f '//trim(ancil_dir)//trim(fname_ntopNew), ierr)
if(ierr/=0)then; message=trim(message)//' problem deleting fname_ntopNew'; return; endif

call writeData(&
! input
Expand Down
8 changes: 4 additions & 4 deletions route/build/src/irf_route.f90
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,12 @@ subroutine segment_irf(iEns, & ! input: index of runoff ensemble to be p
ntdh = size(NETOPO_in(segIndex)%UH)
write(fmt1,'(A,I5,A)') '(A, 1X',ntdh,'(1X,F20.7))'
write(*,'(2a)') new_line('a'),'** Check Impulse Response Function routing **'
write(*,'(a,x,I10,x,I10)') ' Reach index & ID =', segIndex, NETOPO_in(segIndex)%REACHID
write(*,'(a,1x,I10,1x,I10)') ' Reach index & ID =', segIndex, NETOPO_in(segIndex)%REACHID
write(*,fmt1) ' Unit-Hydrograph =', (NETOPO_in(segIndex)%UH(itdh), itdh=1,ntdh)
write(*,'(a)') ' * total discharge from upstream(q_upstream) [m3/s], local area discharge [m3/s], and Final discharge [m3/s]:'
write(*,'(a,x,F15.7)') ' q_upstream =', q_upstream
write(*,'(a,x,F15.7)') ' RCHFLX_out%BASIN_QR(1) =', RCHFLX_out(iens,segIndex)%BASIN_QR(1)
write(*,'(a,x,F15.7)') ' RCHFLX_out%REACH_Q =', RCHFLX_out(iens,segIndex)%ROUTE(idxIRF)%REACH_Q
write(*,'(a,1x,F15.7)') ' q_upstream =', q_upstream
write(*,'(a,1x,F15.7)') ' RCHFLX_out%BASIN_QR(1) =', RCHFLX_out(iens,segIndex)%BASIN_QR(1)
write(*,'(a,1x,F15.7)') ' RCHFLX_out%REACH_Q =', RCHFLX_out(iens,segIndex)%ROUTE(idxIRF)%REACH_Q
endif

end subroutine segment_irf
Expand Down
16 changes: 8 additions & 8 deletions route/build/src/kwe_route.f90
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,10 @@ SUBROUTINE kw_rch(iEns, segIndex, & ! input: index of runoff ensemble to be proc
if (nUps>0) then
do iUps = 1,nUps
iRch_ups = NETOPO_in(segIndex)%UREACHI(iUps) ! index of upstream of segIndex-th reach
write(iulog,'(A,X,I12,X,G15.4)') ' UREACHK, uprflux=',NETOPO_in(segIndex)%UREACHK(iUps),RCHFLX_out(iens, iRch_ups)%ROUTE(idxKW)%REACH_Q
write(iulog,'(A,1X,I12,1X,G15.4)') ' UREACHK, uprflux=',NETOPO_in(segIndex)%UREACHK(iUps),RCHFLX_out(iens, iRch_ups)%ROUTE(idxKW)%REACH_Q
enddo
end if
write(iulog,'(A,X,G15.4)') ' RCHFLX_out(iEns,segIndex)%BASIN_QR(1)=',RCHFLX_out(iEns,segIndex)%BASIN_QR(1)
write(iulog,'(A,1X,G15.4)') ' RCHFLX_out(iEns,segIndex)%BASIN_QR(1)=',RCHFLX_out(iEns,segIndex)%BASIN_QR(1)
endif

! perform river network KW routing
Expand All @@ -208,11 +208,11 @@ SUBROUTINE kw_rch(iEns, segIndex, & ! input: index of runoff ensemble to be proc
doCheck, & ! input: reach index to be examined
ierr, cmessage) ! output: error control
if(ierr/=0)then
write(message, '(A,X,I12,X,A)') trim(message)//'/segment=', NETOPO_in(segIndex)%REACHID, '/'//trim(cmessage); return
write(message, '(A,1X,I12,1X,A)') trim(message)//'/segment=', NETOPO_in(segIndex)%REACHID, '/'//trim(cmessage); return
endif

if(doCheck)then
write(iulog,'(A,X,G15.4)') ' RCHFLX_out(iens,segIndex)%REACH_Q=', RCHFLX_out(iens,segIndex)%ROUTE(idxKW)%REACH_Q
write(iulog,'(A,1X,G15.4)') ' RCHFLX_out(iens,segIndex)%REACH_Q=', RCHFLX_out(iens,segIndex)%ROUTE(idxKW)%REACH_Q
endif

END SUBROUTINE kw_rch
Expand Down Expand Up @@ -298,8 +298,8 @@ SUBROUTINE kinematic_wave(rch_param, & ! input: river parameter data structu
Q(1,0) = q_upstream

if (doCheck) then
write(iulog,'(3(A,X,G12.5))') ' R_SLOPE=',rch_param%R_SLOPE,' R_WIDTH=',rch_param%R_WIDTH,' R_MANN=',rch_param%R_MAN_N
write(iulog,'(3(A,X,G12.5))') ' Q(0,0)=',Q(0,0),' Q(0,1)=',Q(0,1),' Q(1,0)=',Q(1,0)
write(iulog,'(3(A,1X,G12.5))') ' R_SLOPE=',rch_param%R_SLOPE,' R_WIDTH=',rch_param%R_WIDTH,' R_MANN=',rch_param%R_MAN_N
write(iulog,'(3(A,1X,G12.5))') ' Q(0,0)=',Q(0,0),' Q(0,1)=',Q(0,1),' Q(1,0)=',Q(1,0)
end if

! ----------
Expand Down Expand Up @@ -340,7 +340,7 @@ SUBROUTINE kinematic_wave(rch_param, & ! input: river parameter data structu
endif

if (doCheck) then
write(iulog,'(1(A,X,G15.4))') ' Q(1,1)=',Q(1,1)
write(iulog,'(1(A,1X,G15.4))') ' Q(1,1)=',Q(1,1)
end if

else ! if head-water
Expand All @@ -350,7 +350,7 @@ SUBROUTINE kinematic_wave(rch_param, & ! input: river parameter data structu

if (doCheck) then
write(iulog,'(A)') ' This is headwater '
write(iulog,'(1(A,X,G15.4))') ' Q(1,1)=',Q(1,1)
write(iulog,'(1(A,1X,G15.4))') ' Q(1,1)=',Q(1,1)
endif

endif
Expand Down
Loading