Author Topic: Running classical PSHA in R2D  (Read 4018 times)

Anne Hulsey

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
Running classical PSHA in R2D
« on: September 16, 2021, 10:54:06 PM »
Thanks to Kuanshi for fixing the Z1.0 and Z2.5 conversion from the SiteFile.csv to the OpenQuakeSiteModel.csv!

The new file looks good but OpenQuake crashes when it tries to run it. Here's a link to the working directory, accessible by Kuanshi and Adam: https://drive.google.com/drive/folders/17H0H3Xe-yV-EW1N9O3b6xVzPqgstskOR?usp=sharing

I reran it all in PowerShell (see the uploaded .txt file in the linked folder), using:

python "C:/Users/ahul697/Desktop/R2D/build_date\\applications\\performRegionalEventSimulation\\regionalGroundMotion\\HazardSimulation.py"   --hazard_config   "C:/Users/ahul697/Documents/R2D/LocalWorkDir\\HazardSimulation\\GroundMotions\\Input\\EQHazardConfiguration.json"

The 09_15 build gets to the same spot and crashes at :

FetchOpenQuake: OpenQuake configured.
ERROR 1: PROJ: proj_create_from_database: Cannot find proj.db
PROJ: proj_create_from_database: Cannot find proj.db
INFO:root:Upgrade completed in 0.000997304916381836 seconds
WARNING:root:DB server started with C:\Users\ahul697\Anaconda3\python.exe on tcp://127.0.0.1:1908, pid 23532
[2021-09-15 16:12:08 #4 WARNING] The parameter 'trucation_level' is unknown, ignoring
FetchOpenQuake: Classical PSHA failed.


I then reran the files in the LocalWorkDir using the 08/23 build (also in the .txt file), hoping that it would retrieve the correct OpenQuakeSiteModel.csv file. It was able to run and produce results, however, it recreated the .csv file, using the old scripts that didn’t correctly include Z1.0 and Z2.5.

Note that both the 09/15 and 08/23 builds include the line:
[2021-09-15 16:12:08 #4 WARNING] The parameter 'trucation_level' is unknown, ignoring.
I’m curious about what that means. But, regardless, the unique issue for the 09/15 build seems to be the missing proj.db file.

Thanks,
Anne

kuanshi

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
Re: Running classical PSHA in R2D
« Reply #1 on: September 17, 2021, 04:48:24 AM »
Hi Anne,

Thanks for identifying this error!  The first warning message about "trucation_level" was caused by an typo error in the backend and has been fixed in the 210916 build: https://drive.google.com/file/d/1T84xXse06K2O3IztKP_crRuPMbUa8HpG/view?usp=sharing.  While testing the scripts directly via the openquake, I could not replicate the "proj.db" error but received error messages that the user-provided GMPE names 'AbrahamsonEtAl2014LHC' is unknown GSIM.  This is mostly like caused by the OpenQuake version - maybe we could meet to see which release of OpenQuake you are using and to resolve the issue together.

Regards,
Kuanshi

Anne Hulsey

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
Re: Running classical PSHA in R2D
« Reply #2 on: September 17, 2021, 08:44:59 PM »
Thanks, Kuanshi!

The error message you got make me realize that I had forgotten to add the custom gsims. Where could I have found this error message, as it could have led me to the problem directly?

I am adding the folder of additional gsims at this link for future troubleshooting (only shared with you and Adam, as these belong to GNS): https://drive.google.com/drive/folders/19R36dbRIWTANFSkK8GYJsOtpia1reSxs?usp=sharing

Even after adding the gsims, I got exit code 1 in R2D. Then I ran it in PowerShell and it worked fine.
Here is a folder for the R2D output and the PowerShell.text:
https://drive.google.com/drive/folders/1jV8Wq4AWZeGs5O1GCd25hQH5VjITmceZ?usp=sharing

Would it be possible to add a radio button for saving the calc_x.h5 file in the output folder as well? I like to keep it as a reference but I currently have to go to the oq_data folder, so it would be nice if it were automatically included in the output as well.

Thanks,
Anne

kuanshi

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
Re: Running classical PSHA in R2D
« Reply #3 on: September 17, 2021, 09:03:22 PM »
Hi Anne,

Thanks for sharing the GSIM folder - yes, the running message in the PowerShell looks ok and the run completed successfully while there might be an issue in post-processing - let me try to replicate this with the shared GSIM folder to debug.

Yes, I can copy the calc_x.h5 from the oq default directory to the /LocalWorkDir/HazardSimulation/GroundMotions/Output/.  I'm also working to allow user to choose different version of oq (or local instance, if this is needed) in UI to run (this may also help get rid of the GSIM related issue...) - will update a build with the saving calc.h5 feature and get you back.

Kuanshi