From b09f950dace8bbc98492cebee7b719e07d9e55a5 Mon Sep 17 00:00:00 2001 From: Thomas Prime <thopri@noc.ac.uk> Date: Mon, 28 Oct 2019 13:33:47 +0000 Subject: [PATCH] added recipe to install PyNEMO --- README.md | 42 ++++++++++ environment_pynemo.yml | 185 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 227 insertions(+) create mode 100644 environment_pynemo.yml diff --git a/README.md b/README.md index 771a32d..b39b0d3 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,48 @@ To be udated soon. This work springboards from the [PyNEMO](http://pynemo.readth ## How do I get set up? ## +Steps to take to install PyNEMO, creating a specific conda virtual environment is highly recommended. [click here for more about virtual enviroments] (https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) + +- Install Conda, either Anaconda or Miniconda (outside of this readme) +- Create conda environment for PyNEMO + - $ cd to/PyNEMO/directory + - $ conda env create -f environment_pynemo.yml +- Activate the new virtual environment + - $ source activate pynemo_env +- Install Jave JRE (outside this readme) and link libjvm.dylib to LD_LIBRARY_PATH variable + - $ export LD_LIBRARY_PATH=/path/to/java/library/folder/containing/libjvm.dylib:$LD_LIBARY_PATH **SEE NOTES** +- Install Git (outside this readme) + - $ git clone https://github.com/NOC-MSM/PyNEMO.git +- Install PyNEMO + - $ cd /location/of/pynemo/repo + - $ python setup.py build + - $ python setup.py install + +This should result in PyNEMO being installed in the virtual environment, and can be checked by entering: + $ pynemo -v + +Resulting in a help usage prompt: + $ usage: pynemo -g -s <namelist.bdy> + +The virtual environment can be deactivated to return you to the normal prompt by typing: + $ conda deactivate + +To reactivate, the following needs to be typed + $ source activate pynemo_env + +To use PyNEMO, the following command is entered: (the example will run an benchmarking lest) + $ pynemo -s /path/to/namelist/file (e.g. PyNEMO/inputs/namelist_remote.bdy) + +**NOTES** + +for MacOs and Java SDK 13 and JRE 8 the following path should be correct: + - /Library/Java/JavaVirtualMachines/jdk-13.0.1.jdk/Contents/Home/lib/server + +Resulting in the following command: (this will be different for different java versions and operating systems) + $ export LD_LIBRARY_PATH=/Library/Java/JavaVirtualMachines/jdk-13.0.1.jdk/Contents/Home/lib/server:$LD_LIBRARY_PATH + +The conda environment creation command has not yet been tested. The yml document (can be opened using text editor) gives a list of all the modules and their versions that are required for PyNEMO so a environment can be constructed using this document as reference (or if you use pip!) + ## Contribution guidelines ## ## Bench Marking Tests ## diff --git a/environment_pynemo.yml b/environment_pynemo.yml new file mode 100644 index 0000000..dfe9fb4 --- /dev/null +++ b/environment_pynemo.yml @@ -0,0 +1,185 @@ +name: pynemo_env +channels: + - conda-forge + - anaconda + - srikanthnagella + - defaults +dependencies: + - alabaster=0.7.12=py27_0 + - appnope=0.1.0=py27hb466136_0 + - asn1crypto=1.0.1=py27_0 + - astroid=1.6.5=py27_0 + - attrs=19.2.0=py_0 + - babel=2.7.0=py_0 + - backports=1.0=py_2 + - backports.functools_lru_cache=1.5=py_2 + - backports.shutil_get_terminal_size=1.0.0=py27_2 + - backports_abc=0.5=py27h6972548_0 + - basemap=1.2.0=py27h0acbc05_0 + - blas=1.0=mkl + - bleach=3.1.0=py27_0 + - bzip2=1.0.8=h1de35cc_0 + - ca-certificates=2019.10.16=0 + - cartopy=0.16.0=py27h9263bd1_0 + - certifi=2019.9.11=py27_0 + - cffi=1.12.3=py27hb5b8e2f_0 + - cftime=1.0.3.4=py27h1d22016_1001 + - chardet=3.0.4=py27_1003 + - cloudpickle=1.2.2=py_0 + - configparser=4.0.2=py27_0 + - cryptography=2.7=py27ha12b0ac_0 + - curl=7.65.3=ha441bb4_0 + - cycler=0.10.0=py27hfc73c78_0 + - cython=0.29.13=py27h0a44026_0 + - dbus=1.13.6=h90a0687_0 + - decorator=4.4.0=py27_1 + - defusedxml=0.6.0=py_0 + - docutils=0.15.2=py27_0 + - entrypoints=0.3=py27_0 + - enum34=1.1.6=py27_1 + - expat=2.2.6=h0a44026_0 + - freetype=2.9.1=hb4e5f40_0 + - functools32=3.2.3.2=py27_1 + - futures=3.3.0=py27_0 + - geos=3.6.2=h5470d99_2 + - gettext=0.19.8.1=h15daf44_3 + - glib=2.56.2=hd9629dc_0 + - hdf4=4.2.13=h39711bb_2 + - hdf5=1.10.1=ha036c08_1 + - icu=58.2=h4b95b61_1 + - idna=2.8=py27_0 + - imagesize=1.1.0=py27_0 + - intel-openmp=2019.4=233 + - ipaddress=1.0.22=py27_0 + - ipykernel=4.10.0=py27_0 + - ipython=5.8.0=py27_0 + - ipython_genutils=0.2.0=py27h8b9a179_0 + - ipywidgets=7.5.1=py_0 + - isort=4.3.21=py27_0 + - jedi=0.15.1=py27_0 + - jinja2=2.10.3=py_0 + - jpeg=9b=he5867d9_2 + - jsonschema=3.0.2=py27_0 + - jupyter=1.0.0=py27_7 + - jupyter_client=5.3.3=py27_1 + - jupyter_console=5.2.0=py27_1 + - jupyter_core=4.5.0=py_0 + - keyring=18.0.0=py27_0 + - kiwisolver=1.1.0=py27h0a44026_0 + - krb5=1.16.1=hddcf347_7 + - lazy-object-proxy=1.4.2=py27h1de35cc_0 + - libcurl=7.65.3=h051b688_0 + - libcxx=4.0.1=hcfea43d_1 + - libcxxabi=4.0.1=hcfea43d_1 + - libedit=3.1.20181209=hb402a30_0 + - libffi=3.2.1=h475c297_4 + - libgfortran=3.0.1=h93005f0_2 + - libiconv=1.15=hdd342a3_7 + - libnetcdf=4.5.0=h42fd751_7 + - libpng=1.6.37=ha441bb4_0 + - libsodium=1.0.16=h3efe00b_0 + - libssh2=1.8.2=ha12b0ac_0 + - libtiff=4.0.10=hcb84e12_2 + - libxml2=2.9.9=hf6e021a_1 + - libxslt=1.1.33=h33a18ac_0 + - lxml=4.4.1=py27hef8c89e_0 + - markupsafe=1.1.1=py27h1de35cc_0 + - matplotlib=2.2.3=py27h54f8f79_0 + - mccabe=0.6.1=py27_1 + - mistune=0.8.4=py27h1de35cc_0 + - mkl=2019.4=233 + - mkl-service=2.3.0=py27hfbe908c_0 + - mkl_fft=1.0.14=py27h5e564d8_0 + - mkl_random=1.1.0=py27ha771720_0 + - nbconvert=5.6.0=py27_1 + - nbformat=4.4.0=py27hddc86d0_0 + - ncurses=6.1=h0a44026_1 + - netcdf4=1.3.1=py27he3ffdca_2 + - notebook=5.7.8=py27_0 + - numpy=1.16.5=py27hacdab7b_0 + - numpy-base=1.16.5=py27h6575580_0 + - numpydoc=0.9.1=py_0 + - olefile=0.46=py27_0 + - openssl=1.1.1d=h1de35cc_3 + - owslib=0.18.0=py_0 + - packaging=19.2=py_0 + - pandoc=2.2.3.2=0 + - pandocfilters=1.4.2=py27_1 + - parso=0.5.1=py_0 + - pathlib2=2.3.5=py27_0 + - pcre=8.43=h0a44026_0 + - pexpect=4.7.0=py27_0 + - pickleshare=0.7.5=py27_0 + - pillow=6.2.0=py27hb68e598_0 + - pip=19.2.3=py27_0 + - proj4=5.0.1=h1de35cc_0 + - prometheus_client=0.7.1=py_0 + - prompt_toolkit=1.0.15=py27h4a7b9c2_0 + - psutil=5.6.3=py27h1de35cc_0 + - ptyprocess=0.6.0=py27_0 + - pycodestyle=2.5.0=py27_0 + - pycparser=2.19=py27_0 + - pyepsg=0.4.0=py27_0 + - pyflakes=2.1.1=py27_0 + - pygments=2.4.2=py_0 + - pyjnius=1.4=py27_0 + - pylint=1.9.2=py27_0 + - pyopenssl=19.0.0=py27_0 + - pyparsing=2.4.2=py_0 + - pyproj=1.9.5.1=py27h833a5d7_1 + - pyqt=4.11.4=py27_4 + - pyrsistent=0.15.4=py27h1de35cc_0 + - pyshp=2.1.0=py_0 + - pysocks=1.7.1=py27_0 + - python=2.7.16=h97142e2_7 + - python-dateutil=2.8.0=py27_0 + - python.app=2=py27_9 + - pytz=2019.3=py_0 + - pyzmq=18.1.0=py27h0a44026_0 + - qt=4.8.7=1 + - qtawesome=0.6.0=py_0 + - qtconsole=4.5.5=py_0 + - qtpy=1.9.0=py_0 + - readline=7.0=h1de35cc_5 + - requests=2.22.0=py27_0 + - rope=0.14.0=py_0 + - scandir=1.10.0=py27h1de35cc_0 + - scipy=1.2.1=py27h1410ff5_0 + - seawater=3.3.4=py_1 + - send2trash=1.5.0=py27_0 + - setuptools=41.4.0=py27_0 + - shapely=1.6.4=py27h20de77a_0 + - simplegeneric=0.8.1=py27_2 + - singledispatch=3.4.0.3=py27he22c18d_0 + - sip=4.18=py27_0 + - six=1.12.0=py27_0 + - snowballstemmer=2.0.0=py_0 + - sphinx=1.8.5=py27_0 + - sphinxcontrib=1.0=py27_1 + - sphinxcontrib-websupport=1.1.2=py_0 + - spyder=3.2.8=py27_0 + - spyder-kernels=1.4.0=py27_0 + - sqlite=3.30.0=ha441bb4_0 + - subprocess32=3.5.4=py27h1de35cc_0 + - terminado=0.8.2=py27_0 + - testpath=0.4.2=py27_0 + - thredds_crawler=1.0.0=py27_0 + - tk=8.6.8=ha441bb4_0 + - tornado=5.1.1=py27h1de35cc_0 + - traitlets=4.3.3=py27_0 + - typing=3.7.4.1=py27_0 + - urllib3=1.24.2=py27_0 + - wcwidth=0.1.7=py27h817c265_0 + - webencodings=0.5.1=py27_1 + - wheel=0.33.6=py27_0 + - widgetsnbextension=3.5.1=py27_0 + - wrapt=1.11.2=py27h1de35cc_0 + - wurlitzer=1.0.3=py27_0 + - xz=5.2.4=h1de35cc_4 + - zeromq=4.3.1=h0a44026_3 + - zlib=1.2.11=h1de35cc_3 + - zstd=1.3.7=h5bba6e5_0 + - pip: + - pynemo==0.1.0 +prefix: /Users/thopri/anaconda3/envs/pynemo_env + -- GitLab