3. Constants
############


.. toctree::
    :maxdepth: 1

Then, all the static files used  by the vortex tasks have to be in cache.
Use the subcommand ``put`` of the :doc:`cli.sloop.constants` command.
``sloop constants put`` will collect the namelists by topic depending on the
model and build a tarfile by topic (pack). Two kinds of packages are defined: 
the geographical dependant ones and the non-dependant ones.
The tarfile names are given in sloop/templates/conf/{vapp}_uconf.ini.

Example
=======

    For `hycom3d`, the available packages are:

    .. ipython:: python

        from sloop.models.hycom3d import(
            HYCOM3D_NOT_GEO_CONSTANT_PATTERNS,
            HYCOM3D_GEO_CONSTANT_PATTERNS
        )
        for patt in [HYCOM3D_NOT_GEO_CONSTANT_PATTERNS, 
                    HYCOM3D_GEO_CONSTANT_PATTERNS]:
            for p, fs in patt.items():
                print(f"pack: {p}")
                print("files:")
                for f in fs:
                    print(f"        {f}")
                
.. warning::
    
    ``sloop constants`` has to be executed in the directory of the experiment
    created by ``sloop init``.