Giter Site home page Giter Site logo

usgs / slab2 Goto Github PK

View Code? Open in Web Editor NEW
69.0 23.0 40.0 351.8 MB

Slab2.0 is a three-dimensional compilation of global subduction geometries, separated into regional models for each major subduction zone.

License: Other

Python 93.23% Perl 0.27% Shell 0.91% Jupyter Notebook 5.59%

slab2's Issues

trouble installing slab2

Hi,

So I m trying to get slab 2.0 running on my desktop (on which Linux debian is running).

  1. First trying to run 'slab2env.sh' I got an error when running the script because $_CONDA_ROOT was an empty string (within the script).
    I first tried changing source ~/.bash_profile against source ~/.bashrc but it did not help.
    the 2 last lines of my ~/.bashrc are:

. /export/data/ulrich/MyLibs/anaconda3/etc/profile.d/conda.sh
conda activate base

I finally came up a solution for that:
using '. /export/data/ulrich/MyLibs/anaconda3/etc/profile.d/conda.sh' instead of 'source ~/.bash_profile' in your script and the install script then runs.

  1. let's first comment the 3 pip install. I then get this error:

ResolvePackageNotFound:

  • gdal==2.1.3=py35_7
  • bcrypt==3.1.4=py35h7e31480_0
  • qt==5.6.2=h9e3eb04_4
  • appnope==0.1.0=py35_0
  • webencodings==0.5.1=py35_0
  1. getting over this error, if I then uncomment the last 3 pip install, I get the following error:

creating /usr/local/lib/python2.7/dist-packages/impactutils
error: could not create '/usr/local/lib/python2.7/dist-packages/impactutils': Permission denied
Probably because I m not root. This is fixed by adding '--user' to the last pip.

So I m almost done, but 2) is not fixed.

Thx in advance,

Thomas.

KeyError: "['D1', 'mlon', 'time', 'R1', 'D2', 'mlat', 'S1', 'S2', 'mdep', 'mag', 'R2'] not in index" in slab2.py main line 413 resulting from incomplete input file

This error occurs while creating a slab model for Cascadia. The following is the process to recreate the issue.

Copy all CSVs from the /slab2_master/MasterDB directories beginning with 'cas' to a new /slab2_master/0521database directory

cd to /slab2_master/slab2code
Replace occurrences of vincenty with geodesic from geodis.distance

conda activate slab2env

python s2d.py -p cas -d ../0521database -f cas_05-21_input.csv

mv cas_05-21_input.csv Input/

python slab2.py -p library/parameterfiles/casinput.par

See full output below:

Start Section 1 of 7: Setup
Loading inputs...
.DS_Store
exp_04-18_input.csv
cas_05-21_input.csv
.gitignore
using input file: Input/cas_05-21_input.csv
mkdir: Output/cas_slab2_05.08.21: File exists
/usr/local/anaconda3/envs/slab2env/lib/python3.7/site-packages/numpy/core/_asarray.py:102: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.
return array(a, dtype, copy=False, order=order)
slab guide for this model: <GMTGrid Object:
ny: 281
nx: 241
xmin: -130.0000
xmax: -118.0000
ymin: 37.0000
ymax: 51.0000
dx: 0.0500
dy: 0.0500
zmin: -417.520630
zmax: -2.823972>
Traceback (most recent call last):
File "slab2.py", line 1833, in
main(pargs)
File "slab2.py", line 413, in main
eventlist = eventlistALL[kagancols]
File "/usr/local/anaconda3/envs/slab2env/lib/python3.7/site-packages/pandas/core/frame.py", line 3030, in getitem
indexer = self.loc._get_listlike_indexer(key, axis=1, raise_missing=True)[1]
File "/usr/local/anaconda3/envs/slab2env/lib/python3.7/site-packages/pandas/core/indexing.py", line 1266, in _get_listlike_indexer
self._validate_read_indexer(keyarr, indexer, axis, raise_missing=raise_missing)
File "/usr/local/anaconda3/envs/slab2env/lib/python3.7/site-packages/pandas/core/indexing.py", line 1316, in _validate_read_indexer
raise KeyError(f"{not_found} not in index")
KeyError: "['D1', 'mlon', 'time', 'R1', 'D2', 'mlat', 'S1', 'S2', 'mdep', 'mag', 'R2'] not in index"

Explanation:
This error was replicated for the 'alu' region.
Input files made with s2d.py do not contain the columns corresponding to the above key errors, hence they are not indexed. This error does not occur when using the 'cas' input file made by makeallinputs.py (I have not checked other regions).

ImportError: cannot import name 'vincenty' from 'geopy.distance'

Hello!

I am trying to create an input file but the following error appears while typing
python s2d.py -p alu -d ~/Escritorio/slab2-master/1219database -f alu_12-19_input.csv
in [slab2folder]/slab2code:

Traceback (most recent call last):
File "s2d.py", line 12, in
from s2d_fnctns import *
File "/home/benjamin/Escritorio/slab2-master/slab2code/s2d_fnctns.py", line 11, in
from geopy.distance import vincenty
ImportError: cannot import name 'vincenty' from 'geopy.distance' (/home/benjamin/anaconda3/envs/slab2env/lib/python3.7/site-packages/geopy/distance.py)

Typing python s2d.py -h or python s2d_fnctns.py -h throws a similar error.

Cheers,
Benjamín

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.