Skip to content

Commit

Permalink
minor PRVI
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Milner committed Nov 5, 2024
1 parent af3e6e4 commit ee413ad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
import org.opensha.sha.earthquake.faultSysSolution.modules.GridSourceList;
import org.opensha.sha.earthquake.faultSysSolution.modules.GridSourceProvider;
import org.opensha.sha.earthquake.faultSysSolution.modules.MFDGridSourceProvider;
import org.opensha.sha.earthquake.faultSysSolution.modules.ProxyFaultSectionInstances;
import org.opensha.sha.earthquake.faultSysSolution.modules.RupSetTectonicRegimes;
import org.opensha.sha.earthquake.faultSysSolution.util.SolModuleStripper;
import org.opensha.sha.earthquake.faultSysSolution.util.TrueMeanSolutionCreator;
import org.opensha.sha.earthquake.rupForecastImpl.nshm23.gridded.NSHM23_SingleRegionGridSourceProvider;
import org.opensha.sha.earthquake.rupForecastImpl.prvi25.gridded.PRVI25_GridSourceBuilder;
Expand Down Expand Up @@ -47,9 +49,12 @@ public static void main(String[] args) throws IOException {

for (PRVI25_CrustalFaultModels fm : PRVI25_CrustalFaultModels.values()) {
File crustalBA = new File(crustalDir, "results_"+fm.getFilePrefix()+simplifiedSuffix);
if (!crustalBA.exists())
boolean simplify = false;
if (!crustalBA.exists()) {
// try non-simplified
crustalBA = new File(crustalDir, "results_"+fm.getFilePrefix()+suffix);
simplify = true;
}
if (crustalBA.exists()) {
FaultSystemSolution sol = FaultSystemSolution.load(crustalBA);
if (gridded) {
Expand All @@ -68,6 +73,9 @@ public static void main(String[] args) throws IOException {
sol.setGridSourceProvider(gridProv);
}
}
if (simplify)
// simplify it (removes proxies)
sol = SolModuleStripper.stripModules(sol, 5d, true, false);
crustalBASols.put(fm, sol);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public static void main(String[] args) throws IOException {
prefixes.add("smaller_map_region");

FaultSystemSolution sol = FaultSystemSolution.load(new File("/home/kevin/OpenSHA/nshm23/batch_inversions/"
+ "2024_08_16-prvi25_crustal_branches-dmSample5x/results_PRVI_CRUSTAL_FM_V1p1_branch_averaged_gridded.zip"));
+ "2024_10_24-prvi25_crustal_branches-dmSample5x/results_PRVI_CRUSTAL_FM_V1p1_branch_averaged_gridded.zip"));

EvenlyDiscretizedFunc refMFD = FaultSysTools.initEmptyMFD(sol.getRupSet());
EvenlyDiscretizedFunc refMFD = FaultSysTools.initEmptyMFD(2.55, sol.getRupSet().getMaxMag());

NSHM23_MaxMagOffFault mMax = NSHM23_MaxMagOffFault.MAG_7p6;

Expand Down

0 comments on commit ee413ad

Please sign in to comment.