Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Summa Actors
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Numerical_Simulations_Lab
Actors
Summa Actors
Commits
54ba85dd
Commit
54ba85dd
authored
2 years ago
by
Kyle Klenk
Browse files
Options
Downloads
Patches
Plain Diff
starting hrus in parallel passes laugh test but they are only one GRU each
parent
fe3b3dc4
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
build/source/actors/job_actor/job_actor.cpp
+12
-13
12 additions, 13 deletions
build/source/actors/job_actor/job_actor.cpp
build/source/driver/SummaActors_setup.f90
+0
-23
0 additions, 23 deletions
build/source/driver/SummaActors_setup.f90
with
12 additions
and
36 deletions
build/source/actors/job_actor/job_actor.cpp
+
12
−
13
View file @
54ba85dd
...
...
@@ -90,9 +90,6 @@ behavior job_actor(stateful_actor<job_state>* self, int start_gru, int num_gru,
initCsvOutputFile
(
self
);
// Spawn the file_access_actor. This will return the number of forcing files we are working with
self
->
state
.
file_access_actor
=
self
->
spawn
(
file_access_actor
,
self
->
state
.
start_gru
,
self
->
state
.
num_gru
,
self
->
state
.
output_struct_size
,
self
->
state
.
config_path
,
self
);
...
...
@@ -112,9 +109,7 @@ behavior job_actor(stateful_actor<job_state>* self, int start_gru, int num_gru,
}
// aout(self) << "Done init\n";
self
->
state
.
gru_init
++
;
if
(
self
->
state
.
gru_init
<
self
->
state
.
num_gru
)
{
self
->
send
(
self
,
init_hru_v
);
}
else
{
if
(
self
->
state
.
gru_init
>=
self
->
state
.
num_gru
)
{
aout
(
self
)
<<
"All GRUs are initalized
\n
"
;
self
->
state
.
gru_init
=
0
;
// reset counter in case we have failures
runGRUs
(
self
);
...
...
@@ -258,13 +253,17 @@ void initCsvOutputFile(stateful_actor<job_state>* self) {
}
void
initalizeGRU
(
stateful_actor
<
job_state
>*
self
)
{
int
start_gru
=
self
->
state
.
gru_list
.
size
()
+
self
->
state
.
start_gru
;
int
index_gru
=
self
->
state
.
gru_list
.
size
()
+
1
;
// Fortran reference starts at 1
auto
gru
=
self
->
spawn
(
hru_actor
,
start_gru
,
index_gru
,
self
->
state
.
config_path
,
self
->
state
.
file_access_actor
,
self
->
state
.
output_struct_size
,
self
);
self
->
state
.
gru_list
.
push_back
(
new
GRUinfo
(
start_gru
,
index_gru
,
gru
,
self
->
state
.
dt_init_start_factor
,
self
->
state
.
max_run_attempts
));
for
(
int
i
=
0
;
i
<
self
->
state
.
num_gru
;
i
++
)
{
int
start_gru
=
self
->
state
.
gru_list
.
size
()
+
self
->
state
.
start_gru
;
int
index_gru
=
self
->
state
.
gru_list
.
size
()
+
1
;
// Fortran reference starts at 1
auto
gru
=
self
->
spawn
(
hru_actor
,
start_gru
,
index_gru
,
self
->
state
.
config_path
,
self
->
state
.
file_access_actor
,
self
->
state
.
output_struct_size
,
self
);
self
->
state
.
gru_list
.
push_back
(
new
GRUinfo
(
start_gru
,
index_gru
,
gru
,
self
->
state
.
dt_init_start_factor
,
self
->
state
.
max_run_attempts
));
}
}
void
runGRUs
(
stateful_actor
<
job_state
>*
self
)
{
...
...
This diff is collapsed.
Click to expand it.
build/source/driver/SummaActors_setup.f90
+
0
−
23
View file @
54ba85dd
...
...
@@ -214,29 +214,6 @@ subroutine setupHRUParam(&
return
end
select
! set default model parameters
! ! set parmameters to their default value
! dparStruct%var(:) = localParFallback(:)%default_val ! x%var(:)
! ! overwrite default model parameters with information from the Noah-MP tables
! call pOverwrite(typeStruct%var(iLookTYPE%vegTypeIndex), & ! vegetation category
! typeStruct%var(iLookTYPE%soilTypeIndex), & ! soil category
! dparStruct%var, & ! default model parameters
! err,cmessage) ! error control
! if(err/=0)then
! message=trim(message)//trim(cmessage)
! print*, message
! return
! endif
! ! copy over to the parameter structure
! ! NOTE: constant for the dat(:) dimension (normally depth)
! do ivar=1,size(localParFallback)
! mparStruct%var(ivar)%dat(:) = dparStruct%var(ivar)
! end do ! looping through variables
! set default for basin-average parameters
! bparStruct%var(:) = basinParFallback(:)%default_val ! moved to read_param
! *****************************************************************************
! *** read trial model parameter values for each HRU, and populate initial data structures
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment