PermafrostExecutorSiwenna: Difference between revisions

From CSDMS
First draft
 
m Directions for installing stack
Line 4: Line 4:


<div>{{TOC limit|3}}</div>
<div>{{TOC limit|3}}</div>
--[[User:Mpiper|Mpiper]] ([[User talk:Mpiper|talk]]) 14:52, 22 February 2018 (MST)




Line 23: Line 25:
==Install the CSDMS software stack==
==Install the CSDMS software stack==


Using the ''csdms-stack'' conda channel (the [https://anaconda.org/csdms-stack/ Bakery])
A limiting factor in setting up this executor
install the CSDMS software stack,
is that the componentized version of ILAMB can only be run with `pymt=0.2`;
including several pre-built components,
in particular,
with the `csdms-stack` metapackage.
the BMI I wrote for ILAMB is incompatible
 
with the `model_metadata` package in newer versions of PyMT.
conda install csdms-stack -c csdms-stack -c defaults -c conda-forge


This metapackage currently includes
Using the ''csdms-stack'' conda channel (the [https://anaconda.org/csdms-stack/ Bakery]),
simultaneously install the `pymt=0.2` and `cca-tools` packages.


* pymt
conda install cca-tools pymt=0.2 -c csdms-stack -c defaults -c conda-forge
* cca-tools
* csdms-child
* csdms-sedflux-3d
* csdms-hydrotrend
* csdms-permamodel-ku
* csdms-permamodel-frostnumber
* csdms-permamodel-kugeo
* csdms-permamodel-frostnumbergeo
* csdms-brake
* csdms-pydeltarcm


Next, install `wmt-exe` from source.
Next, install `wmt-exe` from source.
Line 71: Line 63:
describes how to install and test a particular CSDMS component.
describes how to install and test a particular CSDMS component.


Note that the [https://github.com/csdms-stack/ilamb-csdms-recipe ILAMB component] from the Bakery
won't work because it's built against `pymt=0.2`;
in particular,
my BMI for ILAMB is incompatible
with the `model_metadata` package in newer versions of PyMT.


===Permamodel===


===HydroTrend===
Install the `permamodel` components from the Bakery.


Hydrotrend is included in the `csdms-stack` metapackage.
conda install *permamodel* -c csdms-stack
Test it by starting a Python session
in '''$root/test'''
and executing the setup and IRF methods.
 
from pymt.components import Hydrotrend
comp = Hydrotrend()
comp.get_component_name()
# args = comp.setup('.')
# comp.initialize(*args)
comp.setup('.')
comp.initialize(None)
comp.get_start_time()
comp.get_end_time()
comp.get_current_time()
comp.update()
comp.finalize()
 
 
===Permamodel===


Permamodel is included in the `csdms-stack` metapackage.
Test a component by starting a Python session
Test a component by starting a Python session
in '''$root/test'''
in '''$root/test'''

Revision as of 15:53, 22 February 2018

Siwenna: wmt-permafrost

Instructions for installing and configuring a WMT executor on siwenna.

--Mpiper (talk) 14:52, 22 February 2018 (MST)


Install Python

Install a Python distribution to be used locally by the executor. We like to use Miniconda.

mkdir -p /home/csdms/wmt/_testing && cd /home/csdms/wmt/_testing
curl https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -o miniconda.sh
bash ./miniconda.sh -f -b -p $(pwd)/conda
export PATH=$(pwd)/conda/bin:$PATH
root=$(pwd)

If working with an existing Python install, be sure to update everything before continuing:

conda update --all

Install the CSDMS software stack

A limiting factor in setting up this executor is that the componentized version of ILAMB can only be run with `pymt=0.2`; in particular, the BMI I wrote for ILAMB is incompatible with the `model_metadata` package in newer versions of PyMT.

Using the csdms-stack conda channel (the Bakery), simultaneously install the `pymt=0.2` and `cca-tools` packages.

conda install cca-tools pymt=0.2 -c csdms-stack -c defaults -c conda-forge

Next, install `wmt-exe` from source.

mkdir -p $root/opt && cd $root/opt
git clone https://github.com/csdms/wmt-exe
cd wmt-exe
python setup.py develop

Optionally install the `babelizer`, in case a component needs to be built from source.

conda install -c csdms-stack babelizer

Optionally install IPython for testing.

conda install ipython

When running IPython remotely on siwenna, it's helpful to set

export MPLBACKEND=Agg


Install and test CSDMS components

Each section below describes how to install and test a particular CSDMS component.


Permamodel

Install the `permamodel` components from the Bakery.

conda install *permamodel* -c csdms-stack

Test a component by starting a Python session in $root/test and executing the setup and IRF methods.

from pymt.components import FrostNumberModel

comp = FrostNumberModel()
comp.get_component_name()
# args = comp.setup('.')
# comp.initialize(*args)
comp.setup('.')
comp.initialize('frostnumber_model.cfg')
comp.get_start_time()
comp.get_end_time()
comp.get_current_time()
comp.update()
comp.finalize()