Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
e42041b
include capabilities for buffered read of input data
Oct 26, 2025
61c26d5
add capabilities for a buffered write
Nov 4, 2025
af7c532
nrtype to nr_type and move into dshare, nr_utility to nr_utils
ashleymedin Feb 12, 2026
ac91351
comput and updat
ashleymedin Feb 12, 2026
0bc34c7
snowDepth
ashleymedin Feb 12, 2026
0c321ea
solve to solv, remove some outdated directions
ashleymedin Feb 12, 2026
bcbe950
arth function
ashleymedin Feb 13, 2026
d74d53e
verySmall and clean up of convert_funcs, others
ashleymedin Feb 13, 2026
f151b48
surfaceFlx to surfaceFlux
ashleymedin Feb 13, 2026
6737dc6
flxMapping to fluxMapping
ashleymedin Feb 13, 2026
78b6f53
flxMapping to fluxMapping
ashleymedin Feb 13, 2026
88a7712
clarifications
ashleymedin Feb 13, 2026
9b10c79
combining thermconductivity routines
ashleymedin Feb 13, 2026
4466d0a
typos
ashleymedin Feb 13, 2026
e4d8c46
name change heatCap routines
ashleymedin Feb 13, 2026
180ecd0
space
ashleymedin Feb 13, 2026
d2f5288
do not call thermConductivity for all layers all the time
ashleymedin Feb 14, 2026
c464975
docs
ashleymedin Feb 14, 2026
4dddde5
docs
ashleymedin Feb 14, 2026
8dc912f
some spaces, small things
ashleymedin Feb 14, 2026
4e64b9c
spaces
ashleymedin Feb 14, 2026
d7fab39
small typo
ashleymedin Feb 14, 2026
bec03fc
switch order
ashleymedin Feb 14, 2026
920541b
input output therm conductivity
ashleymedin Feb 14, 2026
3b2e095
Merge commit bufferedRead 'e42041b98b3462050db62164dfaf00f6f39b7471' …
ashleymedin Feb 18, 2026
c1872fe
Merge commit buffered write '61c26d54b96852c9b888147167be8fd80ebad8fe…
ashleymedin Feb 19, 2026
c538156
spaces
ashleymedin Feb 19, 2026
d0c314f
variable name change only
ashleymedin Feb 19, 2026
349179f
fixing up the buffered write
ashleymedin Feb 23, 2026
5d79bfb
remove unnecessary variable
ashleymedin Feb 23, 2026
9e06c27
comments, spaces
ashleymedin Feb 23, 2026
6ae0975
error in ixTop vs ibeg
ashleymedin Feb 23, 2026
dfe8107
patch for outputing routing variables
ashleymedin Feb 24, 2026
cb64de6
bvar doubleVec still not writing correctly
ashleymedin Feb 25, 2026
c62e5ea
bvar double vec (routing) writes correctly now
ashleymedin Feb 25, 2026
9114127
remove all int8Vec types
ashleymedin Feb 25, 2026
0ae5814
name consistency
ashleymedin Feb 25, 2026
7cefe56
remove comment
ashleymedin Feb 25, 2026
e4e1b20
name consistency, param vs parm
ashleymedin Feb 25, 2026
177686b
modelwrite cleanup
ashleymedin Feb 25, 2026
fd375cf
cleaning up hruId read
ashleymedin Feb 26, 2026
f15cd38
fixing icond read incase hrus in different order than attributes
ashleymedin Feb 26, 2026
e5cb914
Merge branch 'name_changes' of https://github.com/ashleymedin/summa i…
ashleymedin Feb 26, 2026
3cac388
comments
ashleymedin Feb 26, 2026
b6a7d61
ook for hru_id in icond and add backwards compatible default if not t…
ashleymedin Feb 26, 2026
523c26e
clean up of read_attrb
ashleymedin Feb 26, 2026
e9a343d
clean up of read_force and read_param
ashleymedin Feb 26, 2026
2783104
move numrec into own directory
ashleymedin Feb 27, 2026
7c39aed
fix initial
ashleymedin Mar 2, 2026
4cb3cde
spaces
ashleymedin Mar 2, 2026
6e1dc17
spaces
ashleymedin Mar 2, 2026
8f40388
making a few clarifications, no code changes
ashleymedin Mar 2, 2026
cafa846
fix name, no code changes
ashleymedin Mar 3, 2026
51e2d78
fix global print flag
ashleymedin Mar 3, 2026
1392fd9
space
ashleymedin Mar 3, 2026
ae5c2c4
fix global print flag again
ashleymedin Mar 3, 2026
2eab46b
global print flag more fix
ashleymedin Mar 3, 2026
3f567dd
cutting off derivative in soil_utils dHydCond_dPsi, might not want to…
ashleymedin Mar 4, 2026
3e65806
comment typos
ashleymedin Mar 10, 2026
946b611
smooth hydCond_psi
ashleymedin Mar 10, 2026
010b336
fixing write
ashleymedin Mar 10, 2026
7601c6a
fixing non-buffered write so does not write routing vars with flag on
ashleymedin Mar 10, 2026
ce35f14
release build
ashleymedin Mar 10, 2026
652f0e1
error messages, removing vars that point to nothing
ashleymedin Mar 10, 2026
231732a
need iTime
ashleymedin Mar 10, 2026
e9e62be
Release build
ashleymedin Mar 10, 2026
4c0960e
remove another variable not used, and make it so scalar variables jus…
ashleymedin Mar 10, 2026
6df5399
comment typo
ashleymedin Mar 10, 2026
e3692e0
fix comment
ashleymedin Mar 10, 2026
4572ee8
comment only
ashleymedin Mar 10, 2026
efedfd7
adding warnings for variables we do not output
ashleymedin Mar 12, 2026
951c245
clean up of names in capitalization, removing unnecessary trims
ashleymedin Mar 13, 2026
cb6c41b
putting trim back in for safety
ashleymedin Mar 13, 2026
092936c
last of warning messages and a few more trims
ashleymedin Mar 13, 2026
f71df94
typo
ashleymedin Mar 13, 2026
6441b8a
typos
ashleymedin Mar 16, 2026
7280837
fixing warnings and documentation for non-scalar vars
ashleymedin Mar 16, 2026
29e3f61
removing mode from stats since does not work
ashleymedin Mar 16, 2026
2b4c521
update output docs
ashleymedin Mar 16, 2026
bc75970
more output doc changes
ashleymedin Mar 16, 2026
4ad2352
scalar to scalarv
ashleymedin Mar 16, 2026
43e7704
more doc updates
ashleymedin Mar 16, 2026
a2da123
a few more
ashleymedin Mar 16, 2026
6aa40ec
making read old output input
ashleymedin Mar 16, 2026
5b407f5
fixing input output docs and writing
ashleymedin Mar 17, 2026
da28b82
keep dim names same in all output
ashleymedin Mar 17, 2026
5ec8070
don't write var if dim length is 0
ashleymedin Mar 17, 2026
81d7aa2
Merge branch 'develop' of https://github.com/ashleymedin/summa into d…
ashleymedin Mar 17, 2026
0bef2bd
no code changes
ashleymedin Mar 17, 2026
71ecc38
fixing start GRU
ashleymedin Mar 18, 2026
4193718
fixing mapping
ashleymedin Mar 18, 2026
6094799
fixing if hruId gruId not in icond
ashleymedin Mar 18, 2026
c3d4398
a few more warnings
ashleymedin Mar 19, 2026
dd4d815
fix build
ashleymedin Mar 19, 2026
b0c99d1
just spaces
ashleymedin Mar 19, 2026
2f2d8ee
should be inside loop
ashleymedin Mar 19, 2026
efe66cb
do not make non-timestep files if buffered write
ashleymedin Mar 19, 2026
8225798
fix variable name
ashleymedin Mar 19, 2026
bf68b86
fix model decisions so enthalpyForm is standard
ashleymedin Mar 20, 2026
ad0115a
fix default
ashleymedin Mar 20, 2026
f21272a
just some spaces
ashleymedin Mar 20, 2026
d5d9a82
fixing an error message
ashleymedin Mar 21, 2026
0d7676c
typo
ashleymedin Mar 21, 2026
7beb60e
typo in comments
ashleymedin Mar 21, 2026
adecd69
fix modelwrite
ashleymedin Mar 23, 2026
8ffb19e
fix summa_writeOutput
ashleymedin Mar 23, 2026
af24598
no code changes
ashleymedin Mar 23, 2026
a99af61
remove unused
ashleymedin Mar 24, 2026
eeb800a
making it so nSoil does not have to be the same in every HRU
ashleymedin Mar 24, 2026
141bde0
fixing last commit
ashleymedin Mar 24, 2026
1f1a9a6
a few small typos
ashleymedin Mar 24, 2026
9ee428b
sending in hruInfo directly
ashleymedin Mar 24, 2026
0cfdc97
remove unused
ashleymedin Mar 24, 2026
da8d60f
just spaces
ashleymedin Mar 26, 2026
3a49958
clean up writeData
ashleymedin Mar 26, 2026
c37a6ac
clean up data write
ashleymedin Mar 26, 2026
27a70d3
remove int8 from time changing write
ashleymedin Mar 27, 2026
7638f83
Replace varSubstep with seantrim/SUMMA-ROO-NN-OS version (build failu…
seantrim Apr 2, 2026
73f972e
Adjustments to varSubstep for compatibility with ashelymedin/develop …
seantrim Apr 2, 2026
49710fc
don't allocate realArray over and over again
ashleymedin Apr 2, 2026
366e12e
fixing soil layers
ashleymedin Apr 2, 2026
4bd142b
fix maxSoil
ashleymedin Apr 7, 2026
6d41cb5
realArray allocation
ashleymedin Apr 7, 2026
45d8e75
Merge branch 'fix_allocate' into develop
ashleymedin Apr 7, 2026
2ec5df1
Merge pull request #73 from seantrim/varSubstep_PR
ashleymedin Apr 7, 2026
7eddfd6
spaces
ashleymedin Apr 7, 2026
bb58119
separating buffer and non buffer write so not passing datt as array
ashleymedin Apr 8, 2026
df473a3
remove maxWrite check
ashleymedin Apr 8, 2026
7aeb0ce
spaces only
ashleymedin Apr 9, 2026
f813d8d
soil fix should be times 4 m
ashleymedin Apr 10, 2026
fc3a868
Merge branch 'develop' of https://github.com/ashleymedin/summa into d…
ashleymedin Apr 10, 2026
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
1 change: 1 addition & 0 deletions build/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ set(ENGINE_DIR ${F_MASTER}/build/source/engine)
set(HOOKUP_DIR ${F_MASTER}/build/source/hookup)
set(NETCDF_DIR ${F_MASTER}/build/source/netcdf)
set(NOAHMP_DIR ${F_MASTER}/build/source/noah-mp)
set(NUMREC_DIR ${F_MASTER}/build/source/numrec)

#=========================================================================================
# COMPILE PART 2: Assemble all of the SUMMA sub-routines
Expand Down
42 changes: 20 additions & 22 deletions build/source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ set(NOAHMP

# Free versions of numerical recipes utilities for NOAH-MP modules
set(NRUTIL
${ENGINE_DIR}/f2008funcs.f90
${ENGINE_DIR}/nr_utility.f90
${ENGINE_DIR}/nrtype.f90
${NUMREC_DIR}/f2008funcs.f90
${NUMREC_DIR}/nr_utils.f90
${NUMREC_DIR}/nr_type.f90
CACHE INTERNAL "NRUTIL")

# Free versions of numerical recipes procedures for SUMMA modules
set(NRPROC
${ENGINE_DIR}/expIntegral.f90
${ENGINE_DIR}/spline_int.f90
${ENGINE_DIR}/hyp_2F1.f90
${NUMREC_DIR}/expIntegral.f90
${NUMREC_DIR}/spline_int.f90
${NUMREC_DIR}/hyp_2F1.f90
CACHE INTERNAL "NRPROC")

# Hook-up modules
Expand All @@ -34,7 +34,7 @@ set(HOOKUP
# Data modules
set(DATAMS
${DSHARE_DIR}/data_types.f90
${DSHARE_DIR}/flxMapping.f90
${DSHARE_DIR}/fluxMapping.f90
${DSHARE_DIR}/get_ixname.f90
${DSHARE_DIR}/globalData.f90
${DSHARE_DIR}/multiconst.f90
Expand Down Expand Up @@ -75,7 +75,7 @@ set(PRELIM
${ENGINE_DIR}/check_icond.f90
${ENGINE_DIR}/checkStruc.f90
${ENGINE_DIR}/childStruc.f90
${ENGINE_DIR}/conv_funcs.f90
${ENGINE_DIR}/convert_funcs.f90
${ENGINE_DIR}/ffile_info.f90
${ENGINE_DIR}/read_pinit.f90
${ENGINE_DIR}/read_attrb.f90
Expand All @@ -89,46 +89,44 @@ set(PRELIM
set(MODRUN
${ENGINE_DIR}/canopySnow.f90
${ENGINE_DIR}/derivforce.f90
${ENGINE_DIR}/enthalpyTemp.f90
${ENGINE_DIR}/convertEnthalpyTemp.f90
${ENGINE_DIR}/getVectorz.f90
${ENGINE_DIR}/indexState.f90
${ENGINE_DIR}/layerMerge.f90
${ENGINE_DIR}/layerDivide.f90
${ENGINE_DIR}/qTimeDelay.f90
${ENGINE_DIR}/read_force.f90
${ENGINE_DIR}/snowAlbedo.f90
${ENGINE_DIR}/snwCompact.f90
${ENGINE_DIR}/tempAdjust.f90
${ENGINE_DIR}/updateVars.f90
${ENGINE_DIR}/updatDiagn.f90
${ENGINE_DIR}/var_derive.f90
${ENGINE_DIR}/volicePack.f90
CACHE INTERNAL "MODRUN")
set(MODRUN_SUNDIALS
${ENGINE_DIR}/tol4ida.f90
${ENGINE_DIR}/updateVarsWithPrime.f90
${ENGINE_DIR}/updatDiagnWithPrime.f90
CACHE INTERNAL "MODRUN_SUNDIALS")

# Solver main modules
set(SOLVER
${ENGINE_DIR}/bigAquifer.f90
${ENGINE_DIR}/computFlux.f90
${ENGINE_DIR}/computHeatCap.f90
${ENGINE_DIR}/heat_Cp_Cm.f90
${ENGINE_DIR}/computJacob.f90
${ENGINE_DIR}/computResid.f90
${ENGINE_DIR}/computSnowDepth.f90
${ENGINE_DIR}/computThermConduct.f90
${ENGINE_DIR}/snowDepth.f90
${ENGINE_DIR}/thermConductivity.f90
${ENGINE_DIR}/coupled_em.f90
${ENGINE_DIR}/diagn_evar.f90
${ENGINE_DIR}/eval8summa.f90
${ENGINE_DIR}/groundwatr.f90
${ENGINE_DIR}/opSplittin.f90
${ENGINE_DIR}/run_oneGRU.f90
${ENGINE_DIR}/run_oneHRU.f90
${ENGINE_DIR}/snowLiqFlx.f90
${ENGINE_DIR}/soilLiqFlx.f90
${ENGINE_DIR}/ssdNrgFlux.f90
${ENGINE_DIR}/snowLiqFlux.f90
${ENGINE_DIR}/soilLiqFlux.f90
${ENGINE_DIR}/snowSoilNrgFlux.f90
${ENGINE_DIR}/stomResist.f90
${ENGINE_DIR}/summaSolve4homegrown.f90
${ENGINE_DIR}/summaSolv4homegrown.f90
${ENGINE_DIR}/systemSolv.f90
${ENGINE_DIR}/varSubstep.f90
${ENGINE_DIR}/vegLiqFlux.f90
Expand All @@ -140,8 +138,8 @@ set(SOLVER_SUNDIALS
${ENGINE_DIR}/computJacobWithPrime.f90
${ENGINE_DIR}/computResidWithPrime.f90
${ENGINE_DIR}/eval8summaWithPrime.f90
${ENGINE_DIR}/summaSolve4ida.f90
${ENGINE_DIR}/summaSolve4kinsol.f90
${ENGINE_DIR}/summaSolv4ida.f90
${ENGINE_DIR}/summaSolv4kinsol.f90
CACHE INTERNAL "SOLVER_SUNDIALS")

# Driver support modules
Expand Down
34 changes: 24 additions & 10 deletions build/source/driver/summa_alarms.f90
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
module summa_alarms
! used to set alarms to write model output

! named variables for time information
USE globalData, only: numtim ! number of model time steps

! named variables to define new output files
USE globalData, only: noNewFiles ! no new output files
USE globalData, only: newFileEveryOct1 ! create a new file on Oct 1 every year (start of the USA water year)
Expand Down Expand Up @@ -53,19 +56,21 @@ module summa_alarms
contains

! used to set alarms to write model output
subroutine summa_setWriteAlarms(oldTime, newTime, endTime, & ! time vectors
newOutputFile, defNewOutputFile, & ! flag to define new output file
ixRestart, printRestart, & ! flag to print the restart file
ixProgress, printProgress, & ! flag to print simulation progress
resetStats, finalizeStats, & ! flags to reset and finalize stats
statCounter, & ! statistics counter
err,message) ! error control
subroutine summa_setWriteAlarms(modelTimeStep, & ! time index
oldTime, newTime, endTime, & ! time vectors
newOutputFile, defNewOutputFile, & ! flag to define new output file
ixRestart, printRestart, & ! flag to print the restart file
ixProgress, printProgress, & ! flag to print simulation progress
resetStats, finalizeStats, & ! flags to reset and finalize stats
statCounter, & ! statistics counter
err,message) ! error control
! ---------------------------------------------------------------------------------------
! data types
USE nrtype ! variable types, etc.
USE nr_type ! variable types, etc.
! ---------------------------------------------------------------------------------------
implicit none
! dummy variables: time vectors
integer(i4b),intent(in) :: modelTimeStep ! index of model time step
integer(i4b),intent(in) :: oldTime(:) ! time vector from the previous time step
integer(i4b),intent(in) :: newTime(:) ! time vector from the current time step
integer(i4b),intent(in) :: endTime(:) ! time vector at the end of the simulation
Expand Down Expand Up @@ -111,6 +116,12 @@ subroutine summa_setWriteAlarms(oldTime, newTime, endTime, & ! time vector

end select

! check that we do not have multiple files for the buffered write
if(defNewOutputFile .and. modelTimeStep>1)then
err=10
message=trim(message)//'cannot have multiple output files when using the buffered write decision (check the -n option)'; return
endif

! *****************************************************************************
! *** define the need to create a restart file
! *****************************************************************************
Expand Down Expand Up @@ -145,7 +156,7 @@ subroutine summa_setWriteAlarms(oldTime, newTime, endTime, & ! time vector
! *****************************************************************************

! reset output counters/flags
do iFreq=1,maxVarFreq ! loop through output frequencies
do iFreq=1,maxvarFreq ! loop through output frequencies

! define the need to finalize statistics
! NOTE: time vector is configured so that ih=0 at the start of the day, hence day in oldTime and timeStruct%var differ
Expand All @@ -157,11 +168,14 @@ subroutine summa_setWriteAlarms(oldTime, newTime, endTime, & ! time vector
case default; err=20; message=trim(message)//'unable to identify output frequency'; return
end select

! force finalize the stats if the last model time step
if(modelTimeStep == numtim) finalizeStats(iFreq)=.true.

! reset ouput timestep
if(resetStats(iFreq)) statCounter(iFreq)=1

end do ! looping through output frequencies

end subroutine summa_setWriteAlarms

end module summa_alarms
end module summa_alarms
8 changes: 5 additions & 3 deletions build/source/driver/summa_bmi.f90
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module summabmi
! *****************************************************************************
! data types
USE,intrinsic :: iso_c_binding, only: c_ptr, c_loc, c_f_pointer
USE nrtype ! variable types, etc.
USE nr_type ! variable types, etc.
! NGEN_ACTIVE is to be set when running in the Nextgen framework
! https://github.com/NOAA-OWP/ngen
#ifdef NGEN_ACTIVE
Expand Down Expand Up @@ -66,7 +66,7 @@ module summabmi
USE globalData, only: fileout, output_fileSuffix ! output filename and suffix
USE globalData, only: outFreq ! output frequency flags
USE globalData, only: ncid ! netcdf output file id
USE globalData, only: maxLayers, maxSnowLayers ! maximum number of layers and snow layers
USE globalData, only: maxLayers,maxSnowLayers,maxSoilLayers ! maximum number of layers and snow soil layers
USE globalData, only: ixProgress ! define frequency to write progress
USE globalData, only: ixRestart ! define frequency to write restart files
USE globalData, only: newOutputFile ! define option for new output files
Expand Down Expand Up @@ -112,7 +112,7 @@ module summabmi
character(len=256) :: fileout, output_fileSuffix ! output filename and suffix
logical(lgt),dimension(maxvarFreq) :: outFreq ! true if the output frequency is desired
integer(i4b),dimension(maxvarFreq) :: ncid ! netcdf output file id
integer(i4b) :: maxLayers, maxSnowLayers ! maximum number of layers and snow layers, could be different for different GRUs
integer(i4b) :: maxLayers,maxSnowLayers,maxSoilLayers ! maximum number of layers and snow soil layers, could be different for different GRUs
integer(i4b) :: ixProgress ! define frequency to write progress
integer(i4b) :: ixRestart ! define frequency to write restart files
integer(i4b) :: newOutputFile ! define option for new output files
Expand Down Expand Up @@ -317,6 +317,7 @@ function summa_bmi_initialize(this, config_file) result (bmi_status)
this%model%output_fileSuffix = output_fileSuffix
this%model%maxLayers = maxLayers
this%model%maxSnowLayers = maxSnowLayers
this%model%maxSoilLayers = maxSoilLayers
this%model%urbanVegCategory = urbanVegCategory
this%model%ixProgress = ixProgress
this%model%ixRestart = ixRestart
Expand Down Expand Up @@ -359,6 +360,7 @@ function summa_update(this) result (bmi_status)
outFreq = this%model%outFreq
maxLayers = this%model%maxLayers
maxSnowLayers = this%model%maxSnowLayers
maxSoilLayers = this%model%maxSoilLayers
urbanVegCategory = this%model%urbanVegCategory
ixProgress = this%model%ixProgress
ixRestart = this%model%ixRestart
Expand Down
36 changes: 18 additions & 18 deletions build/source/driver/summa_defineOutput.f90
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@

module summa_defineOutput ! used to define model output files

! access missing values
USE globalData,only:integerMissing ! missing integer
USE globalData,only:realMissing ! missing real number

! named variables to define new output files
USE globalData, only: noNewFiles ! no new output files
USE globalData, only: newFileEveryOct1 ! create a new file on Oct 1 every year (start of the USA water year)
Expand All @@ -36,7 +32,6 @@ module summa_defineOutput ! used to define model output file
USE globalData,only:bpar_meta ! basin parameter metadata structure

! named variables
USE var_lookup,only:maxvarFreq ! maximum number of output files
USE var_lookup,only:iLookTIME ! named variables for time data structure
USE var_lookup,only:iLookFREQ ! named variables for the frequency structure

Expand All @@ -47,16 +42,16 @@ module summa_defineOutput ! used to define model output file
contains

! used to define model output files
subroutine summa_defineOutputFiles(modelTimeStep, summa1_struc, err, message)
subroutine summa_defineOutputFiles(modelTimeStep, using_buffer, summa1_struc, err, message)
! ---------------------------------------------------------------------------------------
! * desired modules
! ---------------------------------------------------------------------------------------
! data types
USE nrtype ! variable types, etc.
USE nr_type ! variable types, etc.
USE summa_type, only:summa1_type_dec ! master summa data type
! functions and subroutines
USE def_output_module,only:def_output ! module to define model output
USE modelwrite_module,only:writeParm ! module to write model parameters
USE modelwrite_module,only:writeParam ! module to write model parameters
! global data structures
USE globalData,only:gru_struc ! gru-hru mapping structures
USE globalData,only:structInfo ! information on the data structures
Expand All @@ -71,6 +66,7 @@ subroutine summa_defineOutputFiles(modelTimeStep, summa1_struc, err, message)
implicit none
! dummy variables
integer(i4b),intent(in) :: modelTimeStep ! time step index
logical(lgt),intent(in) :: using_buffer ! flag for will do buffered write
type(summa1_type_dec),intent(inout) :: summa1_struc ! master summa data structure
integer(i4b),intent(out) :: err ! error code
character(*),intent(out) :: message ! error message
Expand Down Expand Up @@ -122,28 +118,32 @@ subroutine summa_defineOutputFiles(modelTimeStep, summa1_struc, err, message)
! *****************************************************************************

! define the file
call def_output(summaVersion,buildTime,gitBranch,gitHash,nGRU,nHRU,gru_struc(1)%hruInfo(1)%nSoil,fileout,err,cmessage)
call def_output(using_buffer,summaVersion,buildTime,gitBranch,gitHash,nGRU,nHRU,fileout,err,cmessage)
if(err/=0)then; message=trim(message)//trim(cmessage); return; endif

! write parameters for each HRU
! write parameters with no time dimension
do iGRU=1,nGRU

! write HRU parameters
! write HRU parameters, all written to timestep frequency file
do iHRU=1,gru_struc(iGRU)%hruCount
do iStruct=1,size(structInfo)
select case(trim(structInfo(iStruct)%structName))
case('attr'); call writeParm(gru_struc(iGRU)%hruInfo(iHRU)%hru_ix,attrStruct%gru(iGRU)%hru(iHRU),attr_meta,err,cmessage)
case('type'); call writeParm(gru_struc(iGRU)%hruInfo(iHRU)%hru_ix,typeStruct%gru(iGRU)%hru(iHRU),type_meta,err,cmessage)
case('mpar'); call writeParm(gru_struc(iGRU)%hruInfo(iHRU)%hru_ix,mparStruct%gru(iGRU)%hru(iHRU),mpar_meta,err,cmessage)
case('attr'); call writeParam(gru_struc(iGRU)%hruInfo(iHRU)%hru_ix,attrStruct%gru(iGRU)%hru(iHRU),attr_meta,err,cmessage)
case('type'); call writeParam(gru_struc(iGRU)%hruInfo(iHRU)%hru_ix,typeStruct%gru(iGRU)%hru(iHRU),type_meta,err,cmessage)
case('mpar'); call writeParam(gru_struc(iGRU)%hruInfo(iHRU)%hru_ix,mparStruct%gru(iGRU)%hru(iHRU),mpar_meta,err,cmessage)
end select
if(err/=0)then; message=trim(message)//trim(cmessage)//'['//trim(structInfo(iStruct)%structName)//']'; return; endif
end do ! (looping through structures)
end do ! (looping through HRUs)

! write GRU parameters
call writeParm(iGRU,bparStruct%gru(iGRU),bpar_meta,err,cmessage)
if(err/=0)then; message=trim(message)//trim(cmessage); return; endif

! write GRU parameters, all written to timestep frequency file
do iStruct=1,size(structInfo)
select case(trim(structInfo(iStruct)%structName))
case('bpar'); call writeParam(iGRU,bparStruct%gru(iGRU),bpar_meta,err,cmessage)
end select
if(err/=0)then; message=trim(message)//trim(cmessage)//'['//trim(structInfo(iStruct)%structName)//']'; return; endif
end do ! (looping through structures)

end do ! (looping through GRUs)

! end associate statements
Expand Down
2 changes: 1 addition & 1 deletion build/source/driver/summa_driver.f90
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ program summa_driver

! * module access *
! data types
USE nrtype ! variable types, etc.
USE nr_type ! variable types, etc.
USE summa_type, only: summa1_type_dec ! master summa data type
! subroutines and functions: model setup
USE summa_init, only: summa_initialize ! used to allocate/initialize summa data structures
Expand Down
56 changes: 0 additions & 56 deletions build/source/driver/summa_driver4bmi.f90

This file was deleted.

Loading