Skip to main content

An algorithm to compute sea surface reflectance using the Cox-Munk approach.

Project description

PyCoxMunk Tests codecov

PyCoxMunk

A python library for simulating satellite-viewed sea surface reflectances.

The pycoxmunk library computes the sea surface reflectance, using the Cox-Munk method, as expected to be seen from space based on the satellite and weather conditions at the sea surface.

The main purpose of this library is to enable an easy method for computing sea surface reflectance that is applicable to a wide variety of low-earth and geostationary orbit satellites and sensors. The library is closely linked to the satpy library that loads, calibrates and produces projection information for many satellites. Under the hood, pycoxmunk uses dask and xarray to store and process data. Results are made available via the same satpy scene used to provide the input satellite images.

As well as computing the sea surface reflectance, pycoxmunk can also compute the four BRDF terms, which can be useful in radiative transfer, cloud and aerosol properties retrieval codes, and other uses such as cloud or sea ice detection.

Installation

pycoxmunk can be installed from PyPI with pip:

    pip install pycoxmunk

It is also available from conda-forge for conda installations:

    conda install -c conda-forge pycoxmunk

Tests

pycoxmunk comes with a set of scripts for testing the functionality of the library. These are located in the ./Tests/ subdirectory and can be run using pytest:


cd Tests
pytest .

This will run all tests. You can also run just a single test script with, for example, pytest test_CMCalcs.py. You may first need to install pytest via: conda install pytest.

Once testing is complete, a summary will be displayed. This should indicate that all tests have passed, as well as potentially listing some warnings depending on your environment and the current status of pycoxmunk's dependencies.

Credits

This code was written by Simon Proud and is based on a fortran implementation of the Cox-Munk algorithm written by Greg McGarragh as part of the ORAC algorithm.

Feedback and Contribution

Feedback, suggestions, bug reports or any other type of contribution is welcome.

If you encounter any problems with this code or the documentation then please file an issue. It may help in debugging any problems to enable satpy's debug mode:

    from satpy import debug_on
    debug_on()

This will print additional log and diagnostic information.

Suggestions for new features are welcome, but may not always be possible for me to code due to limited time. You can also submit your own pull requests that add features of fix bugs. This is the recommended way to change the library code, rather than emailing me your updates. By submitting a pull request please ensure that your code changes and additions are documented and, where appropriate, covered by tests.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycoxmunk-1.1.0.tar.gz (42.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycoxmunk-1.1.0-py3-none-any.whl (51.3 kB view details)

Uploaded Python 3

File details

Details for the file pycoxmunk-1.1.0.tar.gz.

File metadata

  • Download URL: pycoxmunk-1.1.0.tar.gz
  • Upload date:
  • Size: 42.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pycoxmunk-1.1.0.tar.gz
Algorithm Hash digest
SHA256 8860d47c5bb0e8524e646d65a64527bc60cda27158efe083708a2a4ef4c1a41f
MD5 cfe4202e90be7173c2a3eb99bbd9102d
BLAKE2b-256 574b1914b788ea6ffa5696814bb874696b465fc1d92edcd7cead6bb2bef72086

See more details on using hashes here.

File details

Details for the file pycoxmunk-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pycoxmunk-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 51.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pycoxmunk-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd56f193319c6ded3aee2bd8254fc37fd23eb53437891f07d9a1395e1eb05510
MD5 98dae958c6baeba5c557b025ab57f77e
BLAKE2b-256 ae74a9799380700aaa5b345279fec41f4eba69183c859366db82dc23708448a8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page