Metadata-Version: 2.1
Name: pysurfex
Version: 0.0.3
Summary: Python API to SURFEX
Home-page: https://github.com/metno/pysurfex
License: MIT
Author: Trygve Aspelien
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: cfunits (>=3.3.5,<4.0.0)
Requires-Dist: dateutils (>=0.6.12,<0.7.0)
Requires-Dist: eccodes (>=1.5.1,<2.0.0)
Requires-Dist: f90nml (>=1.4.3,<2.0.0)
Requires-Dist: fastjsonschema (==2.16.2)
Requires-Dist: gridpp (>=0.6.0,<0.7.0)
Requires-Dist: humanize (>=3.14.0,<4.0.0)
Requires-Dist: matplotlib (>=3.7.1,<4.0.0)
Requires-Dist: netcdf4 (>=1.6.3,<2.0.0)
Requires-Dist: numexpr (>=2.8.4,<3.0.0)
Requires-Dist: numpy (>=1.22.4,<2.0.0)
Requires-Dist: pandas (>=1.4.0,<2.0.0)
Requires-Dist: pyproj (>=3.3.0,<4.0.0)
Requires-Dist: pyyaml (>=6.0,<7.0)
Requires-Dist: requests (>=2.28.2,<3.0.0)
Requires-Dist: titanlib (>=0.3.3,<0.4.0)
Requires-Dist: toml (>=0.10.2,<0.11.0)
Project-URL: Documentation, https://metno.github.io/pysurfex/
Project-URL: Repository, https://github.com/metno/pysurfex
Description-Content-Type: text/x-rst

.. _README:

.. image:: https://coveralls.io/repos/github/metno/pysurfex/badge.svg?branch=master

https://coveralls.io/github/metno/pysurfex

Python API to SURFEX (pysurfex)
=======================================================

An API in python to the external surface model SURFEX.
    - Prepare input and namelists to a SURFEX binary
    - Create atmospheric forcing for offline SURFEX runs
    - Read SURFEX output
    - A scheduler setup to run offline SURFEX experiments
    - Quality control of observations with titanlib
    - Optimal interpolation with gridpp
    - Monitor the observations usage

See online documentation in https://metno.github.io/pysurfex/

Installation of pregenerated packages from pypi (pip)
---------------------------------------------------------

.. code-block:: bash

    pip3 install pysurfex

User installation:

.. code-block:: bash

    pip3 install pysurfex --user




Installation on debian based Linux system
--------------------------------------------

Install the required pacakges (some might be obsolete if the pip packages contain the needed depedencies):

.. code-block:: bash

  sudo apt-get update
  sudo apt-get install -y libudunits2-dev libproj-dev libeccodes0 libeccodes-dev libnetcdf-dev netcdf-bin

The following depencies are needed. Install the non-standard ones e.g. with pip or your system installation system.

General dependencies (from pypi)
---------------------------------

.. code-block:: bash

  numpy
  netCDF4
  cfunits
  pyproj
  pyyaml
  toml
  netCDF4
  f90nml
  requests

To read NetCDF files:

.. code-block:: bash

  NetCDF4

To read grib files:

.. code-block:: bash

  eccodes

from ECMWF https://software.ecmwf.int/wiki/display/ECC/Releases installed with ENABLE_PYTHON=ON

To plot:

.. code-block:: bash

  matplotlib

To get observations from frost.met.no API:

.. code-block:: bash

  requests

For Quality control of observations

.. code-block:: bash

  titanlib
  db-sqlite3

For optimal interpolation and observation operators

.. code-block:: bash

  gridpp

For testing:

.. code-block:: bash

  pytest

Download the source code, then install ``pysurfex`` by executing the following inside the extracted
folder:

Install pysurfex
-------------------------------------------
.. code-block:: bash

  poetry install

Create documentation
---------------------------------------------

.. code-block:: bash

  cd docs
  # Create html documentation
  make html


Examples
-----------------------

See https://metno.github.io/pysurfex/#examples

