diff --git a/code-notes/salishsea-nemo/quickstart/nibi.rst b/code-notes/salishsea-nemo/quickstart/nibi.rst index 61f2e1c..de3fce2 100644 --- a/code-notes/salishsea-nemo/quickstart/nibi.rst +++ b/code-notes/salishsea-nemo/quickstart/nibi.rst @@ -87,7 +87,6 @@ Clone the repos needed to run the model: cd $HOME/MEOPAR git clone git@github.com:SalishSeaCast/grid.git - git clone git@github.com:SalishSeaCast/NEMO-Cmd.git git clone git@github.com:SalishSeaCast/SalishSeaCmd.git git clone git@github.com:SalishSeaCast/SS-run-sets.git git clone git@github.com:SalishSeaCast/tides.git @@ -100,53 +99,34 @@ Clone the repos needed to run the model: .. _InstallCommandProcessorPackages: -Install the Command Processor Packages -====================================== +Install the :py:obj:`SalishSeaCmd` Command Processor Package +============================================================ -Download and install the Miniforge distribution of :program:`conda`: +If you have not already done so, +please install the Pixi_ package and environments manager +(`installation instructions`_) -.. code-block:: bash - - wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" - bash Miniforge3-$(uname)-$(uname -m).sh - -Accept the defaults offered for all of the settings. -Exit your terminal session on ``nibi`` with :command:`exit` and start a new session to ensure that -the Miniforge configuration takes effect and the :command:`mamba` and :command:`conda` commands are available. - -Configure Miniforge to *not* activate the base environment on startup: - -.. code-block:: bash - - conda config --set auto_activate_base false - -Exit your terminal session on ``nibi`` with :command:`exit` and start a new session to ensure that -configuration setting takes effect. - -Create a ``salishsea-cmd`` conda environment: + .. _Pixi: https://pixi.prefix.dev/latest/ + .. _`installation instructions`: https://pixi.prefix.dev/latest/installation/ .. code-block:: bash - cd $HOME/MEOPAR/ - mamba env create -f SalishSeaCmd/envs/environment-hpc.yaml + curl -fsSL https://pixi.sh/install.sh | sh -Install the :ref:`NEMO-CommandProcessor` and :ref:`SalishSeaCmdProcessor` Python packages: - -.. code-block:: bash +Exit your terminal session on ``nibi`` with :command:`exit` and start a new session to ensure that the Pixi setup takes effect. - mamba activate salishsea-cmd - python -m pip install --user --editable NEMO-Cmd - python -m pip install --user --editable SalishSeaCmd - -Confirm that the :ref:`SalishSeaCmdProcessor` works in your base environment -(i.e. without the ``salishsea-cmd`` environment activated): +The packages that are required by :py:obj:`SalishSeaCmd` will be downloaded and linked into +a working environment the first time that you use a `Pixi`_ command in the :file:`SalishSeaCmd/` directory +(or a sub-directory). +Install the :ref:`SalishSeaCmdProcessor` and confirm that it works with: .. code-block:: bash - mamba deactivate - salishsea --help + cd SalishSeaCmd + pixi run salishsea help -You should see output like: +After some output from Pixi, +you should see output like: .. code-block:: text @@ -173,6 +153,10 @@ You should see output like: run Prepare, execute, and gather results from a SalishSeaCast NEMO model run. split-results Split the results of a multi-day SalishSeaCast NEMO model run (e.g. a hindcast run) +You will always precede :command:`salishsea` commands with :command:`pixi run` +to ensure that you are running :command:`salishsea` in the environment where the required +packages are installed. + Compile XIOS-2 ============== @@ -230,7 +214,7 @@ replace ``SalishSeaCast`` with the name of the configuration. Prepare and Execute Runs ======================== -The :file:`SS-run-sets/v202111/` directory in the :ref:`SS-run-sets-SalishSea` repo contains +The :file:`SS-run-sets/SalishSea/djl/v202111/` directory in the :ref:`SS-run-sets` repo contains version controlled sample run description files and namelist segment files. In your own directory in that repo copy, edit, and version control those files to define the runs that you want to execute. @@ -251,7 +235,11 @@ and gather the results for a run: .. code-block:: bash - salishsea run SalishSea.yaml $SCRATCH/MEOPAR/my_excellent_results + pixi run -m $HOME/MEOPAR/SalishSeaCmd salishsea run nibi-example.yaml \ + $SCRATCH/MEOPAR/my_excellent_results + +The ``-m $HOME/MEOPAR/SalishSeaCmd`` option tells Pixi where to find the :file:`SalishSeaCmd/` +directory so that it can use the correct environment. :command:`salishsea run` returns the path and name of the temporary run directory, and the job identifier assigned by the queue manager,