diff --git a/src/main/java/scratch/kevin/simulators/RSQSimCatalog.java b/src/main/java/scratch/kevin/simulators/RSQSimCatalog.java index 1f5c2788..4a37a158 100644 --- a/src/main/java/scratch/kevin/simulators/RSQSimCatalog.java +++ b/src/main/java/scratch/kevin/simulators/RSQSimCatalog.java @@ -705,7 +705,70 @@ public enum Catalogs { FaultModels.FM3_1, DeformationModels.GEOLOGIC), BRUCE_5672("rundir5672", "Bruce 5672", "Bruce Shaw", cal(2023, 11, 6), "CA high res; dynamic, bdeep=.014, bshallow=.003, alpha=0.25, hload=hst=3.0, fractionLow=.10, blow=.003", - FaultModels.FM3_1, DeformationModels.GEOLOGIC); + FaultModels.FM3_1, DeformationModels.GEOLOGIC), + BRUCE_5684("rundir5684", "Bruce 5684", "Bruce Shaw", cal(2023, 12, 7), + "NZ dynamic, bdeep=.010, bshallow=.003, alpha=0.25, hload=hst=3.0", + 59, 'G'), + BRUCE_5684_SUB("rundir5684_subduction", "Bruce 5684 (Subduction Only)", "Bruce Shaw", cal(2023, 12, 7), + "NZ dynamic, bdeep=.010, bshallow=.003, alpha=0.25, hload=hst=3.0; Filtered for slip on subduction patches only;", + 59, 'G'), + BRUCE_5684_CRUSTAL("rundir5684_crustal", "Bruce 5684 (Crustal Only)", "Bruce Shaw", cal(2023, 12, 7), + "NZ dynamic, bdeep=.010, bshallow=.003, alpha=0.25, hload=hst=3.0; Filtered for slip on crustal patches only;", + 59, 'G'), + BRUCE_5685("rundir5685", "Bruce 5685", "Bruce Shaw", cal(2023, 12, 7), + "NZ dynamic, bdeep=.010, bshallow=.003, alpha=0.25, hload=hst=3.0, fractionLow=.10, bhigh=.015", + 59, 'G'), + BRUCE_5685_SUB("rundir5685_subduction", "Bruce 5685 (Subduction Only)", "Bruce Shaw", cal(2023, 12, 7), + "NZ dynamic, bdeep=.010, bshallow=.003, alpha=0.25, hload=hst=3.0, fractionLow=.10, bhigh=.015; Filtered for slip on subduction patches only;", + 59, 'G'), + BRUCE_5685_CRUSTAL("rundir5685_crustal", "Bruce 5685 (Crustal Only)", "Bruce Shaw", cal(2023, 12, 7), + "NZ dynamic, bdeep=.010, bshallow=.003, alpha=0.25, hload=hst=3.0, fractionLow=.10, bhigh=.015; Filtered for slip on crustal patches only;", + 59, 'G'), + BRUCE_5687("rundir5687", "Bruce 5687", "Bruce Shaw", cal(2023, 12, 26), + "NZ dynamic, bdeep=.009, bshallow=.003, alpha=0.25, hload=hst=3.0, fractionLow=.10, bhigh=.018", + 59, 'G'), + BRUCE_5687_SUB("rundir5687_subduction", "Bruce 5687 (Subduction Only)", "Bruce Shaw", cal(2023, 12, 26), + "NZ dynamic, bdeep=.009, bshallow=.003, alpha=0.25, hload=hst=3.0, fractionLow=.10, bhigh=.018; Filtered for slip on subduction patches only;", + 59, 'G'), + BRUCE_5687_CRUSTAL("rundir5687_crustal", "Bruce 5687 (Crustal Only)", "Bruce Shaw", cal(2023, 12, 26), + "NZ dynamic, bdeep=.009, bshallow=.003, alpha=0.25, hload=hst=3.0, fractionLow=.10, bhigh=.018; Filtered for slip on crustal patches only;", + 59, 'G'), + BRUCE_5689("rundir5689", "Bruce 5689", "Bruce Shaw", cal(2023, 12, 26), + "NZ dynamic, bdeep=.009, bshallow=.002, alpha=0.25, hload=hst=3.0, fractionLow=.10, bhigh=.018", + 59, 'G'), + BRUCE_5689_SUB("rundir5689_subduction", "Bruce 5689 (Subduction Only)", "Bruce Shaw", cal(2023, 12, 26), + "NZ dynamic, bdeep=.009, bshallow=.002, alpha=0.25, hload=hst=3.0, fractionLow=.10, bhigh=.018; Filtered for slip on subduction patches only;", + 59, 'G'), + BRUCE_5689_CRUSTAL("rundir5689_crustal", "Bruce 5689 (Crustal Only)", "Bruce Shaw", cal(2023, 12, 26), + "NZ dynamic, bdeep=.009, bshallow=.002, alpha=0.25, hload=hst=3.0, fractionLow=.10, bhigh=.018; Filtered for slip on crustal patches only;", + 59, 'G'), + BRUCE_5691("rundir5691", "Bruce 5691", "Bruce Shaw", cal(2024, 1, 5), + "NZ dynamic, bdeep=.009, bshallow=.002, alpha=0.25, hload=hst=3.0, fractionLow=.10, bhigh=.019", + 59, 'G'), + BRUCE_5691_SUB("rundir5691_subduction", "Bruce 5691 (Subduction Only)", "Bruce Shaw", cal(2024, 1, 5), + "5691, but filtered for slip on subduction patches only;", + 59, 'G'), + BRUCE_5691_CRUSTAL("rundir5691_crustal", "Bruce 5691 (Crustal Only)", "Bruce Shaw", cal(2024, 1, 5), + "5691, but filtered for slip on crustal patches only;", + 59, 'G'), + BRUCE_5696("rundir5696", "Bruce 5696", "Bruce Shaw", cal(2024, 1, 19), + "NZ dynamic, bdeep=.010, bshallow=.002, alpha=0.25, hload=hst=3.0, fractionLow=.10, bhigh=.018", + 59, 'G'), + BRUCE_5696_SUB("rundir5696_subduction", "Bruce 5696 (Subduction Only)", "Bruce Shaw", cal(2024, 1, 19), + "5696, but filtered for slip on subduction patches only;", + 59, 'G'), + BRUCE_5696_CRUSTAL("rundir5696_crustal", "Bruce 5696 (Crustal Only)", "Bruce Shaw", cal(2024, 1, 19), + "5696, but filtered for slip on crustal patches only;", + 59, 'G'), + BRUCE_5697("rundir5697", "Bruce 5697", "Bruce Shaw", cal(2024, 1, 19), + "NZ dynamic, bdeep=.010, bshallow=.0015, alpha=0.25, hload=hst=3.0, fractionLow=.10, bhigh=.018", + 59, 'G'), + BRUCE_5697_SUB("rundir5697_subduction", "Bruce 5697 (Subduction Only)", "Bruce Shaw", cal(2024, 1, 19), + "5697, but filtered for slip on subduction patches only;", + 59, 'G'), + BRUCE_5697_CRUSTAL("rundir5697_crustal", "Bruce 5697 (Crustal Only)", "Bruce Shaw", cal(2024, 1, 19), + "5697, but filtered for slip on crustal patches only;", + 59, 'G'); private String dirName; private RSQSimCatalog catalog; @@ -1066,6 +1129,7 @@ public void writeMarkdownSummary(File dir, boolean plots, boolean replot, double List multiFaultNames = new ArrayList<>(); String partBSummaryLink = null; + String crustalSubductionGMsLink = null; String vmCompareRotRupLink = null; String extremeEventLink = null; String parentMFDLink = null; @@ -1146,6 +1210,8 @@ public void writeMarkdownSummary(File dir, boolean plots, boolean replot, double vmCompareRotRupLink = name; } else if (name.equals("bbp_part_b_summary")) { partBSummaryLink = name; + } else if (name.equals("crustal_subduction_gms")) { + crustalSubductionGMsLink = name; } else if (name.equals("parent_sect_mfds")) { parentMFDLink = name; } else if (name.equals("dist_method_comparisons")) { @@ -1498,6 +1564,14 @@ public void writeMarkdownSummary(File dir, boolean plots, boolean replot, double lines.add("[BBP PartB Summary Here]("+partBSummaryLink+"/)"); } + if (crustalSubductionGMsLink != null) { + lines.add(""); + lines.add("## BBP Crustal + Subduction Combined GMs"); + lines.add(topLink); + lines.add(""); + lines.add("[BBP Crustal + Subduction Combined GMs Here]("+crustalSubductionGMsLink+"/)"); + } + if (vmCompareRotRupLink != null) { lines.add(""); lines.add("## BBP Velocity Model Comparisons"); @@ -3306,7 +3380,7 @@ public static void main(String args[]) throws IOException, DocumentException { Arrays.sort(cats, new CatEnumDateComparator()); // new catalogs // GregorianCalendar minDate = cal(2021, 10, 1); - GregorianCalendar minDate = cal(2023, 1, 1); + GregorianCalendar minDate = cal(2024, 1, 1); for (Catalogs cat : cats) { // specific catalog // GregorianCalendar minDate = cal(2000, 1, 1); diff --git a/src/main/java/scratch/kevin/simulators/nz/NZ_CompModels.java b/src/main/java/scratch/kevin/simulators/nz/NZ_CompModels.java index 9e2773fc..5b157302 100644 --- a/src/main/java/scratch/kevin/simulators/nz/NZ_CompModels.java +++ b/src/main/java/scratch/kevin/simulators/nz/NZ_CompModels.java @@ -94,6 +94,21 @@ public synchronized List build(RupSetFaultModel faultMod } return subSects; } + + @Override + public List build(RupSetFaultModel faultModel, int minPerFault, double ddwFract, + double fixedLen) throws IOException { + Preconditions.checkState(minPerFault == 2, "minPerFault must be 2 for this NZ Test"); + Preconditions.checkState(ddwFract == 0.5, "ddwFract must be 0.5 for this NZ Test"); + Preconditions.checkState(!(fixedLen > 0d), "fixedLen must be NaN for this NZ Test"); + return build(faultModel); + } + + @Override + public List buildForSubsects(RupSetFaultModel faultModel, + List subSects) throws IOException { + throw new UnsupportedOperationException("Not supported, NZ must build the subsections"); + } } diff --git a/src/main/java/scratch/kevin/simulators/ruptures/CatalogGMPE_Compare.java b/src/main/java/scratch/kevin/simulators/ruptures/CatalogGMPE_Compare.java index 38fbfc06..c332688b 100644 --- a/src/main/java/scratch/kevin/simulators/ruptures/CatalogGMPE_Compare.java +++ b/src/main/java/scratch/kevin/simulators/ruptures/CatalogGMPE_Compare.java @@ -572,8 +572,8 @@ public static void main(String[] args) throws ZipException, IOException { // RSQSimCatalog catalog = Catalogs.BRUCE_4983_STITCHED.instance(); // RSQSimCatalog catalog = Catalogs.BRUCE_5413.instance(); // RSQSimCatalog catalog = Catalogs.BRUCE_5652.instance(); - RSQSimCatalog catalog = Catalogs.BRUCE_5597_CRUSTAL.instance(); -// RSQSimCatalog catalog = Catalogs.BRUCE_5597_SUB.instance(); + RSQSimCatalog catalog = Catalogs.BRUCE_5566_CRUSTAL.instance(); +// RSQSimCatalog catalog = Catalogs.BRUCE_5566_SUB.instance(); boolean doGMPE = true; boolean doRotD = false; diff --git a/src/main/java/scratch/kevin/simulators/ruptures/EventDurationSearch.java b/src/main/java/scratch/kevin/simulators/ruptures/EventDurationSearch.java new file mode 100644 index 00000000..fabf4a58 --- /dev/null +++ b/src/main/java/scratch/kevin/simulators/ruptures/EventDurationSearch.java @@ -0,0 +1,92 @@ +package scratch.kevin.simulators.ruptures; + +import java.io.IOException; +import java.text.DecimalFormat; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.opensha.commons.calc.FaultMomentCalc; +import org.opensha.sha.simulators.RSQSimEvent; +import org.opensha.sha.simulators.SimulatorElement; +import org.opensha.sha.simulators.srf.RSQSimEventSlipTimeFunc; + +import scratch.kevin.simulators.RSQSimCatalog; +import scratch.kevin.simulators.RSQSimCatalog.Catalogs; + +public class EventDurationSearch { + + public static void main(String[] args) throws IOException { + RSQSimCatalog catalog = Catalogs.BRUCE_5685_SUB.instance(); + double minMag = 8.5; + + double minPrintSecs = 400; + + List events = catalog.loader().skipYears(2000).minMag(minMag).load(); + + catalog.getTransitions().setQuiet(true); + + RSQSimEvent longest = null; + double longestDuration = 0d; + RSQSimEventSlipTimeFunc longestSlipTime = null; + + double[] thresholds = {100, 200, 300, 400, 500, 600, 700, 800, 900, 1000}; + int[] threshCounts = new int[thresholds.length]; + + for (RSQSimEvent event : events) { + RSQSimEventSlipTimeFunc slipTimeFunc = catalog.getSlipTimeFunc(event); + + double firstSlip = slipTimeFunc.getStartTime(); + double lastSlip = slipTimeFunc.getEndTime(); + double duration = lastSlip - firstSlip; + if (duration > minPrintSecs) + System.out.println(eventDurStr(event, duration, slipTimeFunc)); + for (int i=0; i thresholds[i]) + threshCounts[i]++; + if (duration > longestDuration) { + longestDuration = duration; + longest = event; + longestSlipTime = slipTimeFunc; + } + } + System.out.println("Longest event:\n"+eventDurStr(longest, longestDuration, longestSlipTime)); + for (int i=0; i longestDuration) + break; + System.out.println("Events over "+(int)thresholds[i]+" s ("+twoDigits.format(thresholds[i]/60d)+" m):\t"+threshCounts[i]); + } + } + + private static final DecimalFormat twoDigits = new DecimalFormat("0.00"); + private static String eventDurStr(RSQSimEvent event, double duration, RSQSimEventSlipTimeFunc slipTimeFunc) { + String str = "event "+event.getID()+", M"+twoDigits.format(event.getMagnitude())+", " + +twoDigits.format(duration)+" s = "+twoDigits.format(duration/60d)+" m"; + + Set patches = slipTimeFunc.getPatchIDs(); + Map areas = new HashMap<>(patches.size()); + for (SimulatorElement elem : event.getAllElements()) + areas.put(elem.getID(), elem.getArea()); + double totMoment = 0d; + double minTime = slipTimeFunc.getStartTime(); + double maxTime = slipTimeFunc.getEndTime(); + for (int patchID : patches) + totMoment += FaultMomentCalc.getMoment(areas.get(patchID), slipTimeFunc.getCumulativeEventSlip(patchID, maxTime)); + + String timeLine = ""; + String fractLine = ""; + for (double thresh=50d; thresh patchIDs = new ArrayList<>(slipTimeFunc.getPatchIDs()); + patchIDs.sort(new Comparator() { + + @Override + public int compare(Integer p1, Integer p2) { + return Double.compare(slipTimeFunc.getTimeOfFirstSlip(p1), slipTimeFunc.getTimeOfFirstSlip(p2)); + } + }); + + int maxSlipPatch = -1; + double overallMaxSlip = 0d; + boolean firstDebug = true; + + for (int p=0; p= patchIDs.size()-52; + if (p == 50 && patchIDs.size() > 200) { + int newP = patchIDs.size()-52; + System.out.println("(...skipping "+(newP-(p+1))+" patches...)"); + p = newP; + } + int patchID = patchIDs.get(p); + double timeFirst = slipTimeFunc.getTimeOfFirstSlip(patchID); + double timeLast = slipTimeFunc.getTimeOfLastSlip(patchID); + double maxSlip = slipTimeFunc.getCumulativeEventSlip(patchID, timeLast); + if (maxSlip > overallMaxSlip) { + overallMaxSlip = maxSlip; + maxSlipPatch = patchID; + } + if (print) { + double duration = timeLast - timeFirst; + List states = slipTimeFunc.getTransitions(patchID); + int numSlipStates = 0; + for (RSQSimStateTime state : states) + if (state.state == RSQSimState.EARTHQUAKE_SLIP) + numSlipStates++; + System.out.println("Patch "+patchID+" at "+(float)+timeFirst+"s => "+(float)timeLast+"s"); + System.out.println("\t"+(float)maxSlip+" m in "+(float)duration+" s"); + System.out.println("\t"+states.size()+" states, "+numSlipStates+" eq slip"); + if (maxSlip == 0d && numSlipStates > 0 && firstDebug) { + System.out.println("\tDebugging zero slip with "+numSlipStates+" slip states"); + firstDebug = false; + for (RSQSimStateTime state : states) { + if (state.state == RSQSimState.EARTHQUAKE_SLIP) { + System.out.println("\t\t"+state); + } + } + DiscretizedFunc slipTime = slipTimeFunc.getSlipFunc(patchID); + System.out.println(slipTime); + } + } + } + if (maxSlipPatch == -1) { + System.out.println("No slip!"); + } else { + System.out.println("Max slip was on "+maxSlipPatch+": "+(float)overallMaxSlip + +" m starting at "+(float)slipTimeFunc.getTimeOfFirstSlip(maxSlipPatch)+" s"); + } + } + +} diff --git a/src/main/java/scratch/kevin/simulators/ruptures/subduction/BruceSubductionFilter.java b/src/main/java/scratch/kevin/simulators/ruptures/subduction/BruceSubductionFilter.java index ef135771..1484cb8e 100644 --- a/src/main/java/scratch/kevin/simulators/ruptures/subduction/BruceSubductionFilter.java +++ b/src/main/java/scratch/kevin/simulators/ruptures/subduction/BruceSubductionFilter.java @@ -25,8 +25,25 @@ public class BruceSubductionFilter { public static void main(String[] args) throws IOException { -// RSQSimCatalog catalog = Catalogs.BRUCE_5566.instance(); - RSQSimCatalog catalog = Catalogs.BRUCE_5597.instance(); + RSQSimCatalog catalog; + + // if true, all patches will be included for matching events + // if false, only crustal patches for crustal and subduction patches for subduction are retained + boolean includeOtherCorupturingElems; + + // if true, only process events that rupture both crustal and subduction sources + boolean onlyCorupturing; + + if (args.length > 0) { + Preconditions.checkState(args.length == 3, "USAGE: "); + catalog = Catalogs.valueOf(args[0]).instance(); + includeOtherCorupturingElems = Boolean.parseBoolean(args[1]); + onlyCorupturing = Boolean.parseBoolean(args[2]); + } else { + catalog = Catalogs.BRUCE_5597.instance(); + includeOtherCorupturingElems = false; + onlyCorupturing = false; + } File catalogDir = catalog.getCatalogDir(); HashSet subductionPatchIDs = new HashSet<>(); @@ -41,12 +58,11 @@ public static void main(String[] args) throws IOException { System.out.println("Found "+subductionPatchIDs.size()+" subduction elements"); System.out.println("Found "+crustalPatchIDs.size()+" crustal elements"); - boolean includeOtherCorupturing = false; - RuptureIdentifier coruptureIden = null; -// RuptureIdentifier coruptureIden = new LogicalAndRupIden( -// new ElementIden("Subduction", new ArrayList<>(subductionPatchIDs)), -// new ElementIden("Crustal", new ArrayList<>(crustalPatchIDs))); + if (onlyCorupturing) + coruptureIden = new LogicalAndRupIden( + new ElementIden("Subduction", new ArrayList<>(subductionPatchIDs)), + new ElementIden("Crustal", new ArrayList<>(crustalPatchIDs))); List events = catalog.loader().magRange(6.5, 11d).load(); System.out.println("Loaded "+events.size()+" events"); @@ -93,7 +109,7 @@ public static void main(String[] args) throws IOException { File outputDir = new File(catalogDir.getParentFile(), dirName); Preconditions.checkState(outputDir.exists() || outputDir.mkdir()); - RSQSimFileWriter.patchFilterCatalog(events, catalog.getElements(), includePatches, includeOtherCorupturing, + RSQSimFileWriter.patchFilterCatalog(events, catalog.getElements(), includePatches, includeOtherCorupturingElems, coruptureIden, outputDir, prefix, false, trans); Files.copy(paramFile, new File(outputDir, paramFile.getName())); diff --git a/src/main/java/scratch/kevin/simulators/ruptures/subduction/CrustalAndSubductionPageGen.java b/src/main/java/scratch/kevin/simulators/ruptures/subduction/CrustalAndSubductionPageGen.java index d64ba885..7cc7b5a0 100644 --- a/src/main/java/scratch/kevin/simulators/ruptures/subduction/CrustalAndSubductionPageGen.java +++ b/src/main/java/scratch/kevin/simulators/ruptures/subduction/CrustalAndSubductionPageGen.java @@ -150,23 +150,52 @@ private Quantity(String name, String axisLabel) { private static final int DEBUG_EVENT_ID = 152653; public static void main(String[] args) throws IOException { - RSQSimCatalog fullCatalog = Catalogs.BRUCE_5597.instance(); - RSQSimCatalog crustalCatalog = Catalogs.BRUCE_5597_CRUSTAL.instance(); - RSQSimCatalog subductionCatalog = Catalogs.BRUCE_5597_SUB.instance(); + RSQSimCatalog fullCatalog = Catalogs.BRUCE_5566.instance(); + RSQSimCatalog crustalCatalog = Catalogs.BRUCE_5566_CRUSTAL.instance(); + RSQSimCatalog subductionCatalog = Catalogs.BRUCE_5566_SUB.instance(); + String bbpDate = "2024_01_24"; + +// RSQSimCatalog fullCatalog = Catalogs.BRUCE_5597.instance(); +// RSQSimCatalog crustalCatalog = Catalogs.BRUCE_5597_CRUSTAL.instance(); +// RSQSimCatalog subductionCatalog = Catalogs.BRUCE_5597_SUB.instance(); + +// RSQSimCatalog fullCatalog = Catalogs.BRUCE_5684.instance(); +// RSQSimCatalog crustalCatalog = Catalogs.BRUCE_5684_CRUSTAL.instance(); +// RSQSimCatalog subductionCatalog = Catalogs.BRUCE_5684_SUB.instance(); + +// RSQSimCatalog fullCatalog = Catalogs.BRUCE_5685.instance(); +// RSQSimCatalog crustalCatalog = Catalogs.BRUCE_5685_CRUSTAL.instance(); +// RSQSimCatalog subductionCatalog = Catalogs.BRUCE_5685_SUB.instance(); + +// RSQSimCatalog fullCatalog = Catalogs.BRUCE_5691.instance(); +// RSQSimCatalog crustalCatalog = Catalogs.BRUCE_5691_CRUSTAL.instance(); +// RSQSimCatalog subductionCatalog = Catalogs.BRUCE_5691_SUB.instance(); +// String bbpDate = "2024_01_05"; + +// RSQSimCatalog fullCatalog = Catalogs.BRUCE_5696.instance(); +// RSQSimCatalog crustalCatalog = Catalogs.BRUCE_5696_CRUSTAL.instance(); +// RSQSimCatalog subductionCatalog = Catalogs.BRUCE_5696_SUB.instance(); +// String bbpDate = "2024_01_22"; + +// VelocityModel vm = VelocityModel.LA_BASIN_500; + VelocityModel vm = VelocityModel.CENTRAL_JAPAN; + +// int skipYears = 5000; + int skipYears = 2000; File bbpBaseDir = new File("/data/kevin/bbp/parallel"); + String suffix = "-all-m6.5-skipYears"+skipYears+"-noHF-vm"+vm.name()+"-standardSitesNZ-griddedSitesNZ"; + File fullBBPdir = new File(bbpBaseDir, // "2023_03_30-rundir5566-all-m6.5-skipYears5000-noHF-vmLA_BASIN_500-standardSitesNZ-griddedSitesNZ"); - "2023_11_29-rundir5597-all-m6.5-skipYears2000-noHF-vmCENTRAL_JAPAN-standardSitesNZ-griddedSitesNZ"); + bbpDate+"-"+fullCatalog.getCatalogDir().getName()+suffix); File crustalBBPdir = new File(bbpBaseDir, // "2023_06_27-rundir5566_crustal-all-m6.5-skipYears5000-noHF-vmLA_BASIN_500-standardSitesNZ-griddedSitesNZ"); -// "2023_06_27-rundir5566_crustal_corupture-all-m5.0-skipYears5000-noHF-vmLA_BASIN_500-standardSitesNZ-griddedSitesNZ"); - "2023_11_29-rundir5597_crustal_corupture-all-m6.5-skipYears2000-noHF-vmCENTRAL_JAPAN-standardSitesNZ-griddedSitesNZ"); + bbpDate+"-"+crustalCatalog.getCatalogDir().getName()+suffix); File subductionBBPdir = new File(bbpBaseDir, // "2023_06_27-rundir5566_subduction-all-m6.5-skipYears5000-maxDist500-noHF-vmLA_BASIN_500-standardSitesNZ-griddedSitesNZ"); -// "2023_06_27-rundir5566_subduction_corupture-all-m5.0-skipYears5000-noHF-vmLA_BASIN_500-standardSitesNZ-griddedSitesNZ"); - "2023_11_29-rundir5597_subduction_corupture-all-m6.5-skipYears2000-noHF-vmCENTRAL_JAPAN-standardSitesNZ-griddedSitesNZ"); + bbpDate+"-"+subductionCatalog.getCatalogDir().getName()+suffix); // AttenRelSupplier subductionGMM = AttenRelRef.ZHAO_2006; AttenRelSupplier subductionGMM = new NSHMP_AttenRelSupplier( @@ -190,7 +219,6 @@ public static void main(String[] args) throws IOException { File resourcesDir = new File(outputDir, "resources"); Preconditions.checkState(resourcesDir.exists() || resourcesDir.mkdir()); - VelocityModel vm = VelocityModel.LA_BASIN_500; double minMag = 6.5; File fullZip = new File(fullBBPdir, "results_rotD.zip"); @@ -680,6 +708,12 @@ public static void main(String[] args) throws IOException { MarkdownUtils.writeReadmeAndHTML(lines, outputDir); exec.shutdown(); + + File gitDir = new File("/home/kevin/markdown/rsqsim-analysis/catalogs"); + File catGitDir = new File(gitDir, fullCatalog.getCatalogDir().getName()); + Preconditions.checkState(catGitDir.exists() || catGitDir.mkdir()); + System.out.println("\twriting summary"); + fullCatalog.writeMarkdownSummary(catGitDir, true, false); } private static DefaultXY_DataSet union(DefaultXY_DataSet[] datas) {