================================================================= Environment Setup ================================================================= As described in :doc:`Introduction to Use of ehtramwf.py ` an environment was created by some "kind soul" so that a first time user wouldn't have to worry about the tedious details. In this document I play the role of the "kind soul" and describe the setup of that directory. The setup is unique to the installation described in these documents, all under ``/dvlscratch/ATM/morton/``, which could be readable and accessible by all (note that I am the only person who has tested any of this, though, so there could be issues). We start by assuming that the new user directory for the first part (GFS) will be in ``/dvlscratch/ATM/morton/NewUserHowTo/GFS/`` - you will obviously want to change it to something different. The setup of the ``ERA/`` directory will be similar. The Conda environment ===================== EHRATM requires a Python3 environment with a few non-standard packages. The non-standard packages are ``f90nml`` and those associated with **cartopy** and it dependencies (cartopy is only used by the **domaincheck** component). For the Conda-savvy user, a YAML file for setting up an environment is available in the repository at ``misc/conda/ehratmv1.0.yml`` and can be used to create the environment, and then fire it up .. code-block:: bash $ conda activate ehratmv1.0 If a user doesn't want to go through the creation of a Conda environment, they can probably establish the ``python3`` to my environment and then set up their PATH so that this ``python3`` is used before the others. It would look something like this Note its location and version .. code-block:: bash $ /dvlscratch/ATM/morton/anaconda3/envs/ehratmv1.0//bin/python3 --version Python 3.8.8 Then, within your run directory, make a symlink to it and ensure that you get the same version when you invoke it from the link .. code-block:: bash $ ln -sf /dvlscratch/ATM/morton/anaconda3/envs/ehratmv1.0//bin/python3 python3 $ ./python3 --version Python 3.8.8 and then adjust your PATH variable to ensure that your current directory is searched first .. code-block:: bash $ export PATH=.:$PATH $ python3 --version Python 3.8.8 The rest of the settings ========================= This demonstration makes use of my own repository, which has been set to tag ``develop-freeze-1.0-``, and should work for any other users since only read-access is needed. We set an environment variable to the repository, and then make symlinks within our run directory to three of the executables so that they can be run easily .. code-block:: bash $ export REPO=/dvlscratch/ATM/morton/git/high-res-atm $ ln -sf $REPO/packages/ehratmworkflow/src/ehratmworkflow/ehratmwf.py ehratmwf.py $ ln -sf $REPO/misc/utilities/ncview ncview $ ln -sf $REPO/misc/domaincheck/domaincheck.py domaincheck.py Then, set the ``PYTHONPATH`` as follows for the various components in the repository .. code-block:: bash $ export PYTHONPATH=$REPO/packages/ehratmworkflow/src:$REPO/packages/ehratm/src:$REPO/packages/nwpservice/src:$REPO/misc/domaincheck and then, if you haven't done so already (see the second option above on setting the Python environment - you might have set this already), put your current directory in the PATH. .. code-block:: bash $ export PATH=.:$PATH And, that's it. You should be able to get the help message as follows, indicating that you're probably in good shape, ready for the New User HOWTO .. code-block:: bash $ ehratmwf.py --help usage: ehratmwf.py [-h] -n WF_NAMELIST_PATH Enhanced High Res ATM optional arguments: -h, --help show this help message and exit -n WF_NAMELIST_PATH, --namelist WF_NAMELIST_PATH path to workflow namelist .. toctree::