geodels / gospl Goto Github PK
View Code? Open in Web Editor NEWGlobal Scalable Paleo Landscape Evolution Model
Home Page: https://gospl.readthedocs.io
License: GNU General Public License v3.0
Global Scalable Paleo Landscape Evolution Model
Home Page: https://gospl.readthedocs.io
License: GNU General Public License v3.0
Describe the bug
gospl package fails to install on Windows 10
To Reproduce
remove petsc4py from conda environment yml
try creating environment
Expected behavior
package installs
Desktop (please complete the following information):
Collecting gospl (from -r C:\Users\rscott\OneDrive - BHP\Exploration2024\condaenv.ofn7_qzu.requirements.txt (line 1))
Downloading gospl-1.1.1.tar.gz (79.0 MB)
---------------------------------------- 79.0/79.0 MB 3.7 MB/s eta 0:00:00
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Installing backend dependencies: started
Installing backend dependencies: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'error'
Pip subprocess error:
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
+ meson setup C:\Users\rscott\AppData\Local\Temp\pip-install-rtc58ov6\gospl_6e74fe112a1e455f925592173173b032 C:\Users\rscott\AppData\Local\Temp\pip-install-rtc58ov6\gospl_6e74fe112a1e455f925592173173b032\.mesonpy-kwr4rhds -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\rscott\AppData\Local\Temp\pip-install-rtc58ov6\gospl_6e74fe112a1e455f925592173173b032\.mesonpy-kwr4rhds\meson-python-native-file.ini
The Meson build system
Version: 1.4.1
Source dir: C:\Users\rscott\AppData\Local\Temp\pip-install-rtc58ov6\gospl_6e74fe112a1e455f925592173173b032
Build dir: C:\Users\rscott\AppData\Local\Temp\pip-install-rtc58ov6\gospl_6e74fe112a1e455f925592173173b032\.mesonpy-kwr4rhds
Build type: native build
Project name: gospl
Project version: 1.1.1
..\meson.build:1:0: ERROR: Unknown compiler(s): [['cl.exe']]
The following exception(s) were encountered:
Running `cl.exe /?` gave "[WinError 2] The system cannot find the file specified"
A full log can be found at C:\Users\rscott\AppData\Local\Temp\pip-install-rtc58ov6\gospl_6e74fe112a1e455f925592173173b032\.mesonpy-kwr4rhds\meson-logs\meson-log.txt
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
failed
CondaEnvException: Pip failed
Hi @tristan-salles, I am testing your notebook example bfModel.ipynb
as part of the review process for JOSS. I have installed gospl
using mamba
(its a wee bit faster, and developed locally here in Paris):
mamba env create -f conda-env.yml
mamba install jupyterlab
and then,
mamba install -c conda-forge pyvista
pip install stripy
The notebook however falls over with an error on the second cell:
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-3-4e10a22dcc17> in <module>
30 a = np.sort(Gmesh.idx_hierarchy.reshape(s[0], -1).T)
31 Gmesh.edges = {"nodes": np.unique(a, axis=0)}
---> 32 ngbNbs, ngbID = definegtin(len(coords), Gmesh.cells['nodes'],
33 Gmesh.edges['nodes'])
34
KeyError: 'nodes'
Do you have any ideas what is causing this error? I am probably missing a dependency, I guess.
Describe the bug
non-existent flowAcc data
To Reproduce
run bfModel notebook udpated
Expected behavior
vtk output
Desktop (please complete the following information):
Additional context
EDrate
elev
erodep
fillFA
hdisp
rain
sedLoad
waterFill
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
Cell In[9], line 2
1 # Reading the final output generated by gospl
----> 2 output = rout.readOutput(filename='forward.yml',step=15)
4 # Exporting the final output as a VTK mesh
5 output.exportVTK('step15.vtk')
File /mnt/c/users/rscott/OneDrive - BHP/exploration2024/gospl/notebooks/bfModel/scripts/readOutput.py:33, in readOutput.__init__(self, filename, step)
29 self._inputParser()
31 self.nbCPUs = len(glob.glob1(self.outputDir + "/h5/", "topology.p*"))
---> 33 self._readElevationData(step)
35 return
File /mnt/c/users/rscott/OneDrive - BHP/exploration2024/gospl/notebooks/bfModel/scripts/readOutput.py:298, in readOutput._readElevationData(self, step)
296 def _readElevationData(self, step):
--> 298 self._getCoordinates(step)
300 return
File /mnt/c/users/rscott/OneDrive - BHP/exploration2024/gospl/notebooks/bfModel/scripts/readOutput.py:105, in readOutput._getCoordinates(self, step)
103 erodep = np.array((df2["/erodep"]))
104 sedLoad = np.array((df2["/sedLoad"]))
--> 105 flowAcc = np.array((df2["/flowAcc"]))
106 uplift = np.array((df2["/uplift"]))
107 hdisp = np.array((df2["/hdisp"]))
File h5py/_objects.pyx:54, in h5py._objects.with_phil.wrapper()
File h5py/_objects.pyx:55, in h5py._objects.with_phil.wrapper()
File ~/miniconda3/envs/gospl-package/lib/python3.9/site-packages/h5py/_hl/group.py:357, in Group.__getitem__(self, name)
355 raise ValueError("Invalid HDF5 object reference")
356 elif isinstance(name, (bytes, str)):
--> 357 oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
358 else:
359 raise TypeError("Accessing a group is done with bytes or str, "
360 "not {}".format(type(name)))
File h5py/_objects.pyx:54, in h5py._objects.with_phil.wrapper()
File h5py/_objects.pyx:55, in h5py._objects.with_phil.wrapper()
File h5py/h5o.pyx:241, in h5py.h5o.open()
KeyError: "Unable to synchronously open object (object 'flowAcc' doesn't exist)"
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Install an environment, try and run bfModel notebook
Expected behavior
runs
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[2], line 18
14 grid = stripy.spherical_meshes.octahedral_mesh(include_face_points=False,
15 refinement_levels=ref_lvl)
17 str_fmt = "{:25} {:9}"
---> 18 print(str_fmt.format('Number of points', grid.lpoints))
19 print(str_fmt.format('Number of cells', grid.simplices.shape[0]))
21 # Take the unit sphere mesh and assign the Earth radius to the coordinates
AttributeError: 'icosahedral_mesh' object has no attribute 'lpoints'
This issue is part of my JOSS review: openjournals/joss-reviews#2804.
Hi @tristan-salles, congratulations on a really nice piece of software! I have used it through Docker and run the example notebooks without trouble (except for occasionally running out of memory on my machine, but that's my problem not yours).
I also find the technical guide very thorough after the changes suggested by John. I have just a couple of small reference additions to request for the paper (they may also be relevant to the technical guide). These are very minor:
I wish I had more to offer in this review, but the software is working well and the technical guide is very thorough. gospl
will be a big asset to the community.
Describe the bug
AttributeError: 'Model' object has no attribute 'platedata' despite not having inserted any plate or tectonic data into the model in the first place.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No error considering there is no tectonic data inputted
Desktop:
Additional context
This is all from worldbuildingpasta's tutorial on the matter, in case reference is necessary.
Describe the bug
need to pick activate scalrs
To Reproduce
run bfModel notebook
Expected behavior
countour chosen
Desktop (please complete the following information):
---------------------------------------------------------------------------
AmbiguousDataError Traceback (most recent call last)
Cell In[14], line 23
21 mesh.points[:, 1] *= factor
22 mesh.points[:, 2] *= factor
---> 23 contour = mesh.contour([0])
24 plot = pv.PlotterITK()
25 plot.add_mesh(mesh, scalars="vTec")
File ~/miniconda3/envs/gospl-package/lib/python3.9/site-packages/pyvista/core/filters/data_set.py:1860, in DataSetFilters.contour(self, isosurfaces, scalars, compute_normals, compute_gradients, compute_scalars, rng, preference, method, progress_bar)
1858 # set the array to contour on
1859 if scalars is None:
-> 1860 set_default_active_scalars(self)
1861 field, scalars_name = self.active_scalars_info
1862 else:
File ~/miniconda3/envs/gospl-package/lib/python3.9/site-packages/pyvista/core/utilities/arrays.py:748, in set_default_active_scalars(mesh)
746 raise MissingDataError("No data available.")
747 elif n_possible_scalars > 1:
--> 748 raise AmbiguousDataError(
749 "Multiple data available\n"
750 f"cell data: {possible_scalars_cell}.\n"
751 f"point data: {possible_scalars_point}.\n"
752 "Set one as active using DataSet.set_active_scalars(name, preference=type)"
753 )
AmbiguousDataError: Multiple data available
cell data: [].
point data: ['Z', 'vTec'].
Set one as active using DataSet.set_active_scalars(name, preference=type)
To Reproduce
Try installing environment yml in Windows 10
Expected behavior
Environment installed
Screenshots
PackagesNotFoundError: The following packages are not available from current channels:
- petsc4py
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
Describe the bug
yaml error in bfModel notebook
To Reproduce
run bfModel notebook
Expected behavior
it works
Desktop (please complete the following information):
Additional context
Traceback (most recent call last):
File "/mnt/c/users/rscott/OneDrive - BHP/exploration2024/gospl/notebooks/bfModel/runBF.py", line 23, in <module>
merger.mergeBackModels(backin, backout)
File "/mnt/c/users/rscott/OneDrive - BHP/exploration2024/gospl/notebooks/bfModel/scripts/mergeBack.py", line 237, in mergeBackModels
tStart, tEnd, tOut, outputDir, nbCPUs = readOutputs(inputs[k])
File "/mnt/c/users/rscott/OneDrive - BHP/exploration2024/gospl/notebooks/bfModel/scripts/mergeBack.py", line 43, in readOutputs
input = yaml.load(finput, Loader=yaml.Loader)
File "/home/richard/miniconda3/envs/gospl-package/lib/python3.9/site-packages/ruamel/yaml/main.py", line 1085, in load
error_deprecation('load', 'load', arg=_error_dep_arg, comment=_error_dep_comment)
File "/home/richard/miniconda3/envs/gospl-package/lib/python3.9/site-packages/ruamel/yaml/main.py", line 1037, in error_deprecation
raise AttributeError(s)
AttributeError:
"load()" has been removed, use
yaml = YAML(typ='rt')
yaml.load(...)
and register any classes that you use, or check the tag attribute on the loaded data,
instead of file "/mnt/c/users/rscott/OneDrive - BHP/exploration2024/gospl/notebooks/bfModel/scripts/mergeBack.py", line 43
input = yaml.load(finput, Loader=yaml.Loader)```
As part of the JOSS review (openjournals/joss-reviews#2804), I am thinking that a description of how plate tectonics is included might be a great addition to the page https://gospl.readthedocs.io/en/latest/tech_guide/index.html#tech-guide. The erosion, deposition, and compaction algorithms are described, but I don't see a description of the methods used to:
Or if all of the above is wrong, then maybe some text explaining what is done, because it is possible I am assuming a complexity that does not exist.
Describe the bug
petsc4py installation fails
To Reproduce
pip install petsc4py
Expected behavior
package installs
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
>pip install petsc4py
Collecting petsc4py
Downloading petsc4py-3.21.2.tar.gz (420 kB)
---------------------------------------- 420.2/420.2 kB 1.9 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install backend dependencies did not run successfully.
│ exit code: 1
╰─> [85 lines of output]
Collecting petsc<3.22,>=3.21
Downloading petsc-3.21.2.tar.gz (17.3 MB)
---------------------------------------- 17.3/17.3 MB 4.0 MB/s eta 0:00:00
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Collecting wheel
Using cached wheel-0.43.0-py3-none-any.whl.metadata (2.2 kB)
Using cached wheel-0.43.0-py3-none-any.whl (65 kB)
Building wheels for collected packages: petsc
Building wheel for petsc (pyproject.toml): started
Building wheel for petsc (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
Building wheel for petsc (pyproject.toml) did not run successfully.
exit code: 1
[58 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib
creating build\lib\petsc
copying config\pypi\__init__.py -> build\lib\petsc
copying config\pypi\__main__.py -> build\lib\petsc
installing to build\bdist.win-amd64\wheel
running install
PETSc: configure
configure options:
--prefix=C:\Users\rscott\AppData\Local\Temp\pip-install-dm5mv7gc\petsc_0c2c11fd351d45a899e55d6d6eaccad5\build\bdist.win-amd64\wheel\petsc
PETSC_ARCH=arch-python
--with-shared-libraries=1
--with-debugging=0
--with-c2html=0
--with-mpi=0
===============================================================================
*** Windows python detected. Please rerun ./configure with cygwin-python. ***
===============================================================================
Traceback (most recent call last):
File "C:\Users\rscott\AppData\Local\miniconda3\envs\gospl-package\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "C:\Users\rscott\AppData\Local\miniconda3\envs\gospl-package\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\rscott\AppData\Local\miniconda3\envs\gospl-package\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\setuptools\build_meta.py", line 410, in build_wheel
return self._build_with_temp_dir(
File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\setuptools\build_meta.py", line 395, in _build_with_temp_dir
self.run_setup()
File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 363, in <module>
File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\setuptools\__init__.py", line 103, in setup
return distutils.core.setup(**attrs)
File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 184, in setup
return run_commands(dist)
File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 200, in run_commands
dist.run_commands()
File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\setuptools\dist.py", line 968, in run_command
super().run_command(command)
File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 403, in run
self.run_command("install")
File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\setuptools\dist.py", line 968, in run_command
super().run_command(command)
File "C:\Users\rscott\AppData\Local\Temp\pip-build-env-ct0yw5my\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "<string>", line 286, in run
File "<string>", line 189, in config
RuntimeError: 3
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for petsc
Failed to build petsc
ERROR: Could not build wheels for petsc, which is required to install pyproject.toml-based projects
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install backend dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.