cloudmetrics

Toolkit for computing 15+ metrics characterising 2D cloud patterns

https://github.com/cloudsci/cloudmetrics

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: wiley.com, zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.5%) to scientific vocabulary

Keywords

cloud-organisation python
Last synced: 6 months ago · JSON representation ·

Repository

Toolkit for computing 15+ metrics characterising 2D cloud patterns

Basic Info
  • Host: GitHub
  • Owner: cloudsci
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 267 KB
Statistics
  • Stars: 16
  • Watchers: 5
  • Forks: 9
  • Open Issues: 16
  • Releases: 3
Topics
cloud-organisation python
Created over 5 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog Citation

README.md

cloudmetrics

cloudmetrics (pip install) DOI

The cloudmetrics package contains python routines to compute metrics from 2D cloud fields to characterise cloud patterns in these fields. Most methods operate on a cloud-mask (i.e. a boolean true-false field) indicating where clouds exist, some work on individually labelled (with a unique integer ID) cloud objects (which can be produced from a cloud-mask) and finally some work on 2D cloud scalar-fields (defining for example the cloud-liquid water or cloud-top height).

NOTE: the cloudmetrics package contained in this repository is refactored from work published in Janssens et al 2021, this was done to make the routines implemented more accessible by external tools and to ensure consistency. Not all functionality has been retained or fully refactored, in particular functionality to allow for bulk-processing of input files is in the cloudmetrics-pipline package. Progress on the refactoring can be followed in issue https://github.com/cloudsci/cloudmetrics/issues/20. The version published in Janssens et al 2021 is available tagged as version v0.1.0.

Implemented metrics

The table below gives an overview over which metrics are avaiable in the cloudmetrics package and what input each metric takes.

| function within cloudmetrics | mask | object_labels | scalar_field | | ---------------------------------- | -------- | --------------- | -------------- | | mask.cloud_fraction | ✔️ | | | | mask.fractal_dimension | ✔️ | | | | mask.open_sky | ✔️ | | | | mask.orientation | ✔️ | | | | mask.network_nn_dist | TODO | | | | mask.cop | ✔️† | ✔️ | | | mask.csd | TODO | TODO | | | objects.iorg | ✔️† | ✔️ | | | objects.max_length_scale | ✔️† | ✔️ | | | objects.mean_eccentricity | ✔️† | ✔️ | | | objects.mean_length_scale | ✔️† | ✔️ | | | objects.mean_perimeter_length | ✔️† | ✔️ | | | objects.rdf | TODO | TODO | | | objects.scai | ✔️† | ✔️ | | | scalar.spectral_anisotropy #1 | | | ✔️ | | scalar.spectral_length_median#1 | | | ✔️ | | scalar.spectral_length_moment,#1 | | | ✔️ | | scalar.spectral_slope#1 | | | ✔️ | | scalar.spectral_slope_binned#1 | | | ✔️ | | scalar.woi1 | | | ✔️ | | scalar.woi2 | | | ✔️ | | scalar.woi3 | | | ✔️ | | scalar.mean | optional | | ✔️ | | scalar.var | optional | | ✔️ | | scalar.std | optional | | ✔️ | | scalar.skew | optional | | ✔️ | | scalar.kurtosis | optional | | ✔️ |

†: for convenience object-based scalars are also made avaiable to operate directly on masks, for example objects.max_length_scale(object_labels=...) can be called with a mask as mask.max_object_length_scale(mask=...) and objects.iorg(object_labels=...) can be called with mask.iorg_objects(mask=...).

1: spectral metrics currently operate on the relevant power spectral densities,

which must first be computed: wavenumbers, psd_1d_radial, psd_1d_azimuthal = scalar.compute_spectra(...) spectral_length_moment = scalar.spectral_length_moment(wavenumbers, psd_1d_radial) Alternatively, all spectral metrics can be computed simultaneously following the standard convention with spectral_metrics = scalar.compute_all_spectral(scalar_field). need refactoring to take scalar_field as input

Installation

To install the most recent version of cloudmetrics from pypi you can use pip:

bash $> pip install cloudmetrics

If you plan to add/modify cloudmetrics (contribution via pull-requests are very welcome!) you should check out the development notes for how to get set up with a local copy of the codebase.

Usage

To use the cloudmetrics package simply import cloudmetrics and use the metric function you are interested in:

```python import cloudmetrics

iorg = cloudmetrics.mask.iorgobjects(mask=dacloudmask, periodic_domain=False) ```

As you can see in the table above the metrics are organised by the input they take, either object masks, labelled-object arrays and/or 2D scalar fields you want to perform reductions on.

Note on periodic domains: internally cloudmetrics represents objects on periodic domains by doubling the xy-size of any input mask provided, and moving any objects that straddle the boundary to ensure they are spatially contiguous. This means that all functions which take 2D arrays of object-labels as input assume that all labelled objects are spatially contiguous and that the provided input is actually 2*nx x 2*ny (for an actual input domain spanning nx by nx). All metric functions that operate on masks handle the domain-doubling internally and so do not require any modification to the masks before calling.

Owner

  • Name: cloudsci
  • Login: cloudsci
  • Kind: organization

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: cloudmetrics
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Leif
    family-names: Denby
    email: leif@denby.eu
    affiliation: University of Leeds
    orcid: 'https://orcid.org/0000-0002-7611-9222'
  - given-names: Martin
    family-names: Janssens
    email: martin.janssens@wur.nl
    affiliation: Wageningen University & Research
    orcid: 'https://orcid.org/0000-0003-2905-6692'

GitHub Events

Total
Last Year

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 65
  • Total Committers: 3
  • Avg Commits per committer: 21.667
  • Development Distribution Score (DDS): 0.508
Top Committers
Name Email Commits
martinjanssens m****4@h****m 32
Leif Denby l****f@d****u 27
dependabot[bot] 4****]@u****m 6
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 24
  • Total pull requests: 60
  • Average time to close issues: 4 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 4
  • Total pull request authors: 6
  • Average comments per issue: 3.58
  • Average comments per pull request: 1.65
  • Merged pull requests: 44
  • Bot issues: 0
  • Bot pull requests: 15
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 1.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • leifdenby (15)
  • martinjanssens (6)
  • gmandorl (1)
  • observingClouds (1)
Pull Request Authors
  • leifdenby (33)
  • dependabot[bot] (15)
  • martinjanssens (8)
  • tomadror (2)
  • gmandorl (1)
  • observingClouds (1)
Top Labels
Issue Labels
enhancement (7)
Pull Request Labels
dependencies (15) bug (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 21 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 3
  • Total versions: 6
  • Total maintainers: 1
pypi.org: cloudmetrics

Cloud pattern metrics toolkit

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 3
  • Downloads: 21 Last month
Rankings
Dependent packages count: 7.4%
Dependent repos count: 9.2%
Forks count: 13.4%
Stargazers count: 16.1%
Average: 22.3%
Downloads: 65.5%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/ci-pre-commit.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • pre-commit/action v2.0.3 composite
.github/workflows/ci-pypi-deploy.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • casperdcl/deploy-pypi v2 composite
.github/workflows/python-package-pip.yml actions
  • actions/checkout v2 composite
pyproject.toml pypi
setup.py pypi