Skip to content

Commit

Permalink
updated NSHM23 FM enum
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmilner committed Feb 20, 2024
1 parent 32a41e3 commit fb83b54
Show file tree
Hide file tree
Showing 22 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion src/main/java/scratch/kevin/miscFigures/SCECStatewide.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static void main(String[] args) throws IOException {
File outputDir = new File("/home/kevin/SCEC/2023_statewide_announcement");
Preconditions.checkState(outputDir.exists() || outputDir.mkdir());

NSHM23_FaultModels fm = NSHM23_FaultModels.NSHM23_v2;
NSHM23_FaultModels fm = NSHM23_FaultModels.WUS_FM_v2;
boolean subSects = faultProbs;
List<? extends FaultSection> sects;
FaultSystemSolution sol = null;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/scratch/kevin/nshm23/DevinSlipRateCSV.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static void main(String[] args) throws IOException {
header.add("Start Longitude");
header.add("End Latitude");
header.add("End Longitude");
NSHM23_FaultModels fm = NSHM23_FaultModels.NSHM23_v2;
NSHM23_FaultModels fm = NSHM23_FaultModels.WUS_FM_v2;
for (NSHM23_DeformationModels dm : NSHM23_DeformationModels.values()) {
if (dm.getNodeWeight(null) > 0) {
dmSubSectsList.add(dm.build(fm));
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/scratch/kevin/nshm23/FakeBALogicTreeGen.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public static void main(String[] args) throws IOException {
File inputDir = new File("/home/kevin/OpenSHA/UCERF4/batch_inversions/"
+ "2024_02_02-nshm23_branches-NSHM23_v3");
LogicTreeLevel<? extends LogicTreeNode> level = NSHM23_LogicTreeBranch.FM;
nodes.add(NSHM23_FaultModels.NSHM23_v3);
nodes.add(NSHM23_FaultModels.WUS_FM_v3);
// nodeSols.add(FaultSystemSolution.load(new File(inputDir, "results_NSHM23_v3_branch_averaged_gridded.zip")));
nodeSols.add(FaultSystemSolution.load(new File(inputDir, "true_mean_solution.zip")));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static void main(String[] args) throws IOException {

LogicTreeNode[] required = {
// FAULT MODELS
NSHM23_FaultModels.NSHM23_v2,
NSHM23_FaultModels.WUS_FM_v2,

// // SINGLE STATE
NSHM23_SingleStates.CA,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ public static void main(String[] args) throws IOException {
List<RandomlySampledLevel<?>> individualRandomLevels = new ArrayList<>();
int samplingBranchCountMultiplier = 1;

// String dirName = new SimpleDateFormat("yyyy_MM_dd").format(new Date());
String dirName = "2024_02_02";
String dirName = new SimpleDateFormat("yyyy_MM_dd").format(new Date());
// String dirName = "2024_02_02";

/*
* UCERF3 logic tree
Expand Down Expand Up @@ -487,9 +487,9 @@ public static void main(String[] args) throws IOException {
// FaultModels.FM3_2,
// NSHM18_FaultModels.NSHM18_WUS_NoCA,
// NSHM18_FaultModels.NSHM18_WUS_PlusU3_FM_3p1,
// NSHM23_FaultModels.NSHM23_v1p4,
// NSHM23_FaultModels.NSHM23_v2,
NSHM23_FaultModels.NSHM23_v3,
// NSHM23_FaultModels.FM_v1p4,
// NSHM23_FaultModels.FM_v2,
NSHM23_FaultModels.WUS_FM_v3,

// // SINGLE STATE
// NSHM23_SingleStates.NM,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
public class MiniSubSectionCSVWriter {

public static void main(String[] args) throws IOException {
NSHM23_FaultModels fm = NSHM23_FaultModels.NSHM23_v1p4;
NSHM23_FaultModels fm = NSHM23_FaultModels.WUS_FM_v1p4;

List<? extends FaultSection> fullSects = fm.getFaultSections();

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/scratch/kevin/nshm23/MomentRateCompNSHM18.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public static void main(String[] args) throws IOException {
GriddedGeoDataSet nshm23 = new GriddedGeoDataSet(gridReg, false);

NSHM23_DeformationModels dm23 = GEO_ONLY ? NSHM23_DeformationModels.GEOLOGIC : NSHM23_DeformationModels.AVERAGE;
List<? extends FaultSection> nshm23sects = dm23.build(NSHM23_FaultModels.NSHM23_v2);
List<? extends FaultSection> nshm23sects = dm23.build(NSHM23_FaultModels.WUS_FM_v2);

addFaultMoRates(nshm23, cgr, nshm23sects, 1d);

Expand Down Expand Up @@ -390,7 +390,7 @@ public static GriddedGeoDataSet getMomentRatesNSHM23(GriddedRegion gridReg, Cube
GriddedGeoDataSet nshm23 = new GriddedGeoDataSet(gridReg, false);

NSHM23_DeformationModels dm23 = GEO_ONLY ? NSHM23_DeformationModels.GEOLOGIC : NSHM23_DeformationModels.AVERAGE;
List<? extends FaultSection> nshm23sects = dm23.build(NSHM23_FaultModels.NSHM23_v2);
List<? extends FaultSection> nshm23sects = dm23.build(NSHM23_FaultModels.WUS_FM_v2);

addFaultMoRates(nshm23, cgr, nshm23sects, 1d);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static void main(String[] args) throws IOException {

DecimalFormat oDF = new DecimalFormat("0.##");

NSHM23_FaultModels fm = NSHM23_FaultModels.NSHM23_v2;
NSHM23_FaultModels fm = NSHM23_FaultModels.WUS_FM_v2;

NSHM23_DeformationModels[] defModels = {
NSHM23_DeformationModels.GEOLOGIC,
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/scratch/kevin/nshm23/ScalingRelCSVGen.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static void main(String[] args) throws IOException {
}
csv.addLine(header);

for (FaultSection sect : NSHM23_FaultModels.NSHM23_v1p4.getFaultSections()) {
for (FaultSection sect : NSHM23_FaultModels.WUS_FM_v1p4.getFaultSections()) {
List<String> line = new ArrayList<>();

line.add(sect.getSectionId()+"");
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/scratch/kevin/nshm23/SeisGridPlotter.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static void main(String[] args) throws IOException {
List<String> lines = new ArrayList<>();

double maxMagOff = NSHM23_MaxMagOffFault.MAG_7p6.getMaxMagOffFault();
List<? extends FaultSection> subSects = NSHM23_DeformationModels.GEOLOGIC.build(NSHM23_FaultModels.NSHM23_v2);
List<? extends FaultSection> subSects = NSHM23_DeformationModels.GEOLOGIC.build(NSHM23_FaultModels.WUS_FM_v2);

// Region region = NSHM23_RegionLoader.loadFullConterminousWUS();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
class DecompBenchmark {

public static void main(String[] args) throws IOException {
NSHM23_FaultModels fm = NSHM23_FaultModels.NSHM23_v2;
NSHM23_FaultModels fm = NSHM23_FaultModels.WUS_FM_v2;
NSHM23_DeformationModels dm = NSHM23_DeformationModels.GEOLOGIC;

// disable the upper bound
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ private double[] logRatio(double[] orig, double[] mod) {
}

public static void main(String[] args) throws IOException {
NSHM23_FaultModels fm = NSHM23_FaultModels.NSHM23_v2;
NSHM23_FaultModels fm = NSHM23_FaultModels.WUS_FM_v2;
// NSHM23_DeformationModels dm = NSHM23_DeformationModels.GEOLOGIC;
// NSHM23_DeformationModels dm = NSHM23_DeformationModels.ZENG;
NSHM23_DeformationModels dm = NSHM23_DeformationModels.POLLITZ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class TestInversion {
public static void main(String[] args) throws IOException {
List<double[]> dms = new ArrayList<>();
List<String> names = new ArrayList<>();
NSHM23_FaultModels fm = NSHM23_FaultModels.NSHM23_v2;
NSHM23_FaultModels fm = NSHM23_FaultModels.WUS_FM_v2;
double[] median = null;
for (NSHM23_DeformationModels dm : NSHM23_DeformationModels.values()) {
if (dm == NSHM23_DeformationModels.MEDIAN) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static void main(String[] args) throws IOException {
CPT logRatioCPT = GMT_CPT_Files.DIVERGING_VIK_UNIFORM.instance().rescale(-1d, 1d);
CPT diffCPT = GMT_CPT_Files.DIVERGING_BAM_UNIFORM.instance().reverse().rescale(-5d, 5d);

NSHM23_FaultModels fm = NSHM23_FaultModels.NSHM23_v2;
NSHM23_FaultModels fm = NSHM23_FaultModels.WUS_FM_v2;

List<? extends FaultSection> fullSects = fm.getFaultSections();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public static void main(String[] args) throws IOException {
sectsWithIndexes18.add(sect);
}

GeographicMapMaker mapMaker = new RupSetMapMaker(NSHM23_DeformationModels.GEOLOGIC.build(NSHM23_FaultModels.NSHM23_v2), gridReg);
GeographicMapMaker mapMaker = new RupSetMapMaker(NSHM23_DeformationModels.GEOLOGIC.build(NSHM23_FaultModels.WUS_FM_v2), gridReg);
GeographicMapMaker mapMaker18 = new RupSetMapMaker(sectsWithIndexes18, gridReg);

for (GeographicMapMaker map : new GeographicMapMaker[] {mapMaker, mapMaker18}) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public static void main(String[] args) throws IOException {
List<DefaultXY_DataSet> zScoreScatters = new ArrayList<>();
NSHM23_DeformationModels.HARDCODED_FRACTIONAL_STD_DEV = Double.NaN;
NSHM23_DeformationModels.HARDCODED_FRACTIONAL_STD_DEV_UPPER_BOUND = Double.NaN;
List<? extends FaultSection> sectsFullSD = NSHM23_DeformationModels.AVERAGE.build(NSHM23_FaultModels.NSHM23_v2);
List<? extends FaultSection> sectsFullSD = NSHM23_DeformationModels.AVERAGE.build(NSHM23_FaultModels.WUS_FM_v2);

for (int i=0; i<prefixes.size(); i++) {
String prefix = prefixes.get(i);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static void main(String[] args) throws IOException {
NSHM23_DeformationModels.SHEN_BIRD,
NSHM23_DeformationModels.ZENG
};
NSHM23_FaultModels fm = NSHM23_FaultModels.NSHM23_v2;
NSHM23_FaultModels fm = NSHM23_FaultModels.WUS_FM_v2;

double[] origUncertZs = new double[dms.length];
double[] origUncertMoWeightedZs = new double[dms.length];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ public static void main(String[] args) throws IOException {
sectsWithIndexes18.add(sect);
}

GeographicMapMaker mapMaker = new RupSetMapMaker(NSHM23_DeformationModels.GEOLOGIC.build(NSHM23_FaultModels.NSHM23_v2), gridReg);
GeographicMapMaker mapMaker = new RupSetMapMaker(NSHM23_DeformationModels.GEOLOGIC.build(NSHM23_FaultModels.WUS_FM_v2), gridReg);
GeographicMapMaker mapMaker18 = new RupSetMapMaker(sectsWithIndexes18, gridReg);

for (GeographicMapMaker map : new GeographicMapMaker[] {mapMaker, mapMaker18}) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public static void main(String[] args) throws IOException {
File outputDir = new File("/home/kevin/Documents/papers/2023_NSHM23_Inversion/figures/west_cache_conn_mfds");
Preconditions.checkState(outputDir.exists() || outputDir.mkdir());

NSHM23_FaultModels fm = NSHM23_FaultModels.NSHM23_v2;
NSHM23_FaultModels fm = NSHM23_FaultModels.WUS_FM_v2;
NSHM23_DeformationModels dm = NSHM23_DeformationModels.GEOLOGIC;
NSHM23_SingleStates state = NSHM23_SingleStates.UT;
SupraSeisBValues bVal = SupraSeisBValues.B_0p5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static void main(String[] args) throws IOException {
ZipFile wrapperZip = new ZipFile(new File(wrapperCalcDir, "results_hazard.zip"));

GeographicMapMaker mapMaker = new GeographicMapMaker(gridReg);
mapMaker.setFaultSections(NSHM23_DeformationModels.GEOLOGIC.build(NSHM23_FaultModels.NSHM23_v3));
mapMaker.setFaultSections(NSHM23_DeformationModels.GEOLOGIC.build(NSHM23_FaultModels.WUS_FM_v3));
mapMaker.setSectOutlineChar(null);
mapMaker.setSectTraceChar(new PlotCurveCharacterstics(PlotLineType.SOLID, 1f, Color.GRAY));

Expand Down
Loading

0 comments on commit fb83b54

Please sign in to comment.