Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nshmp-haz
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
ghsc
National Seismic Hazard Model Project
nshmp-haz
Commits
65eb70ca
Commit
65eb70ca
authored
3 years ago
by
Powers, Peter M.
Browse files
Options
Downloads
Patches
Plain Diff
site-data changes from lib
parent
1df172e2
No related branches found
No related tags found
2 merge requests
!603
Production Release
,
!602
Increment lib
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/gov/usgs/earthquake/nshmp/DisaggCalc.java
+7
-2
7 additions, 2 deletions
src/main/java/gov/usgs/earthquake/nshmp/DisaggCalc.java
src/main/java/gov/usgs/earthquake/nshmp/HazardCalc.java
+7
-3
7 additions, 3 deletions
src/main/java/gov/usgs/earthquake/nshmp/HazardCalc.java
with
14 additions
and
5 deletions
src/main/java/gov/usgs/earthquake/nshmp/DisaggCalc.java
+
7
−
2
View file @
65eb70ca
...
@@ -52,6 +52,7 @@ import gov.usgs.earthquake.nshmp.data.XySequence;
...
@@ -52,6 +52,7 @@ import gov.usgs.earthquake.nshmp.data.XySequence;
import
gov.usgs.earthquake.nshmp.gmm.Imt
;
import
gov.usgs.earthquake.nshmp.gmm.Imt
;
import
gov.usgs.earthquake.nshmp.internal.Logging
;
import
gov.usgs.earthquake.nshmp.internal.Logging
;
import
gov.usgs.earthquake.nshmp.model.HazardModel
;
import
gov.usgs.earthquake.nshmp.model.HazardModel
;
import
gov.usgs.earthquake.nshmp.model.SiteData
;
/**
/**
* Disaggregate probabilistic seismic hazard at a return period of interest or
* Disaggregate probabilistic seismic hazard at a return period of interest or
...
@@ -165,7 +166,10 @@ public class DisaggCalc {
...
@@ -165,7 +166,10 @@ public class DisaggCalc {
:
OptionalDouble
.
empty
();
:
OptionalDouble
.
empty
();
/* Sites */
/* Sites */
List
<
Site
>
sites
=
Sites
.
fromCsv
(
siteFile
,
model
.
siteData
(),
vs30
);
SiteData
siteData
=
config
.
hazard
.
useSiteData
?
model
.
siteData
()
:
SiteData
.
EMPTY
;
List
<
Site
>
sites
=
Sites
.
fromCsv
(
siteFile
,
siteData
,
vs30
);
log
.
info
(
"Sites: "
+
sites
.
size
());
log
.
info
(
"Sites: "
+
sites
.
size
());
Set
<
Imt
>
modelImts
=
model
.
config
().
hazard
.
imts
;
Set
<
Imt
>
modelImts
=
model
.
config
().
hazard
.
imts
;
...
@@ -288,7 +292,8 @@ public class DisaggCalc {
...
@@ -288,7 +292,8 @@ public class DisaggCalc {
log
.
info
(
PROGRAM
+
" (return period): calculating ..."
);
log
.
info
(
PROGRAM
+
" (return period): calculating ..."
);
HazardExport
handler
=
HazardExport
.
create
(
model
,
config
,
sites
,
out
);
boolean
namedSites
=
sites
.
get
(
0
).
name
()
!=
Site
.
NO_NAME
;
HazardExport
handler
=
HazardExport
.
create
(
model
,
config
,
namedSites
,
out
);
Path
disaggDir
=
out
.
resolve
(
"disagg"
);
Path
disaggDir
=
out
.
resolve
(
"disagg"
);
Files
.
createDirectory
(
disaggDir
);
Files
.
createDirectory
(
disaggDir
);
...
...
This diff is collapsed.
Click to expand it.
src/main/java/gov/usgs/earthquake/nshmp/HazardCalc.java
+
7
−
3
View file @
65eb70ca
...
@@ -110,10 +110,13 @@ public class HazardCalc {
...
@@ -110,10 +110,13 @@ public class HazardCalc {
log
.
info
(
""
);
log
.
info
(
""
);
Path
out
=
createOutputDir
(
config
.
output
.
directory
);
Path
out
=
createOutputDir
(
config
.
output
.
directory
);
SiteData
siteData
=
config
.
hazard
.
useSiteData
?
model
.
siteData
()
:
SiteData
.
EMPTY
;
if
(
config
.
hazard
.
vs30s
.
isEmpty
())
{
if
(
config
.
hazard
.
vs30s
.
isEmpty
())
{
List
<
Site
>
sites
=
readSites
(
args
[
1
],
model
.
siteData
()
,
OptionalDouble
.
empty
(),
log
);
List
<
Site
>
sites
=
readSites
(
args
[
1
],
siteData
,
OptionalDouble
.
empty
(),
log
);
log
.
info
(
"Sites: "
+
Sites
.
toString
(
sites
));
log
.
info
(
"Sites: "
+
Sites
.
toString
(
sites
));
calc
(
model
,
config
,
sites
,
out
,
log
);
calc
(
model
,
config
,
sites
,
out
,
log
);
...
@@ -121,7 +124,7 @@ public class HazardCalc {
...
@@ -121,7 +124,7 @@ public class HazardCalc {
for
(
double
vs30
:
config
.
hazard
.
vs30s
)
{
for
(
double
vs30
:
config
.
hazard
.
vs30s
)
{
log
.
info
(
"Vs30 batch: "
+
vs30
);
log
.
info
(
"Vs30 batch: "
+
vs30
);
List
<
Site
>
sites
=
readSites
(
args
[
1
],
model
.
siteData
()
,
OptionalDouble
.
of
(
vs30
),
log
);
List
<
Site
>
sites
=
readSites
(
args
[
1
],
siteData
,
OptionalDouble
.
of
(
vs30
),
log
);
log
.
info
(
"Sites: "
+
Sites
.
toString
(
sites
));
log
.
info
(
"Sites: "
+
Sites
.
toString
(
sites
));
Path
vs30dir
=
out
.
resolve
(
"vs30-"
+
((
int
)
vs30
));
Path
vs30dir
=
out
.
resolve
(
"vs30-"
+
((
int
)
vs30
));
Files
.
createDirectory
(
vs30dir
);
Files
.
createDirectory
(
vs30dir
);
...
@@ -183,7 +186,8 @@ public class HazardCalc {
...
@@ -183,7 +186,8 @@ public class HazardCalc {
log
.
info
(
"Threads: "
+
((
ThreadPoolExecutor
)
exec
).
getCorePoolSize
());
log
.
info
(
"Threads: "
+
((
ThreadPoolExecutor
)
exec
).
getCorePoolSize
());
log
.
info
(
PROGRAM
+
": calculating ..."
);
log
.
info
(
PROGRAM
+
": calculating ..."
);
HazardExport
handler
=
HazardExport
.
create
(
model
,
config
,
sites
,
out
);
boolean
namedSites
=
sites
.
get
(
0
).
name
()
!=
Site
.
NO_NAME
;
HazardExport
handler
=
HazardExport
.
create
(
model
,
config
,
namedSites
,
out
);
Stopwatch
stopwatch
=
Stopwatch
.
createStarted
();
Stopwatch
stopwatch
=
Stopwatch
.
createStarted
();
int
logInterval
=
sites
.
size
()
<
100
?
1
:
sites
.
size
()
<
1000
?
10
:
100
;
int
logInterval
=
sites
.
size
()
<
100
?
1
:
sites
.
size
()
<
1000
?
10
:
100
;
...
...
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