ec-jrc / pyPoseidon

Framework for Hydrodynamic simulations
https://pyposeidon.readthedocs.io/
European Union Public License 1.2
20 stars 8 forks source link

pschism executable location #112

Closed TPCollings closed 2 years ago

TPCollings commented 2 years ago

Hi again,

I've install schism using conda install -c gbrey pschism.

I'm trying to validate the mesh produced using the MESH.ipynb in the tutorial, however the function cannot find the schism executable file.

I've tried to set the path environment variable using the 'epath' kwarg, but I can't find the the correct folder to point it to. Do I need to run the build_schism.sh script after installing pschism?

Example of the error below.

Cheers.

Tom

**Without setting 'epath'

m.validate(rpath='./test/val/')

INFO:pyposeidon.mesh:start mesh validation

INFO:pyposeidon.mesh:writing mesh to file ./test/val/hgrid.gr3 WARNING:pyposeidon.mesh:Schism executable path (epath) not given -> using default

DEBUG:pyposeidon.mesh:b'' INFO:pyposeidon.mesh:mesh fails.. exiting

brey commented 2 years ago

Try checking the file ./test/val/outputs/fatal.error for a hint. Let me know.

TPCollings commented 2 years ago

My ./test/val/outputs/ is empty.

brey commented 2 years ago

There is no need to run anything after installing from conda. All epath is not needed (it is there to link a locally compiled version of SCHISM).

Can you post the output of

conda list | grep schism

I assume that you've installed schism in the same env as pyposeidon. Another way to have a fully functional env is using the binder/environment.yml with the addition in the yml file of

- numpy<1.23.0

So, after adding the above, execute

conda env create -f binder/environment.yml
TPCollings commented 2 years ago

(pypos_main1) tom@uTELEMAC-VM:~$ conda list | grep schism pschism 5.9.0 mpi_openmpi_hd7ccc92_0 gbrey

I will try creating a new environment from using the binder yml and see if that solves the problem.

Cheers

brey commented 2 years ago

First you can try the following:

Check if there is a

ls $CONDA_PREFIX/bin/schism

if not then create it with

ln -s $CONDA_PREFIX/bin/pschism_TVD-VL $CONDA_PREFIX/bin/schism

Some of the original builds didn't have this included and I see you have the zero build.

Then try again your validation.

TPCollings commented 2 years ago

Ah that solves it. Thanks very much.