aerobulk-python

A python wrapper for aerobulk (https://github.com/brodeau/aerobulk)

https://github.com/xgcm/aerobulk-python

Science Score: 77.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: zenodo.org
  • Committers with academic emails
    2 of 3 committers (66.7%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.4%) to scientific vocabulary

Keywords from Contributors

climate-models xgcm geoscience energy-system-model
Last synced: 6 months ago · JSON representation ·

Repository

A python wrapper for aerobulk (https://github.com/brodeau/aerobulk)

Basic Info
  • Host: GitHub
  • Owner: xgcm
  • License: gpl-3.0
  • Language: Python
  • Default Branch: main
  • Size: 167 KB
Statistics
  • Stars: 21
  • Watchers: 4
  • Forks: 5
  • Open Issues: 15
  • Releases: 21
Created almost 4 years ago · Last pushed 6 months ago
Metadata Files
Readme License Citation

README.md

pre-commit.ci status DOI

aerobulk-python

A python wrapper for aerobulk (https://github.com/brodeau/aerobulk)

Installation

Due to the heavy dependencies in this package we recommend installing the package from conda-forge with mamba/conda

mamba install -c conda-forge aerobulk-python or conda install -c conda-forge aerobulk-python

aerobulk-python developer guide

These are the steps to install and develop the package locally

  1. Set up a development environment. mamba create -n aerobulk-python-dev python=3.9 dask numpy gfortran xarray pytest ipython conda activate aerobulk-python-dev

  2. Clone the repository

Make sure to clone the repo with --recursive to also pull the git submodule!

git clone --recursive git@github.com:xgcm/aerobulk-python.git

  1. Compile/Install aerobulk-python (this has to be rerun after every change to the fortran code/wrapper/signature file) Run these commands from within the aerobulk-python folder.

    a. Use pip to install aerobulk locally (this will install the python package and compile). pip install -e . b. Manual version (you will have to install the python module separately) python -m numpy.f2py --verbose -c --f90flags="-fdefault-real-8 -ffree-line-length-200 --std=gnu" ./source/fortran/aerobulk/src/mod_const.f90 ./source/fortran/aerobulk/src/mod_phymbl.f90 ./source/fortran/aerobulk/src/mod_skin_coare.f90 ./source/fortran/aerobulk/src/mod_skin_ecmwf.f90 ./source/fortran/aerobulk/src/mod_blk_andreas.f90 ./source/fortran/aerobulk/src/mod_common_coare.f90 ./source/fortran/aerobulk/src/mod_blk_coare3p0.f90 ./source/fortran/aerobulk/src/mod_blk_coare3p6.f90 ./source/fortran/aerobulk/src/mod_blk_ecmwf.f90 ./source/fortran/aerobulk/src/mod_blk_ncar.f90 ./source/fortran/aerobulk/src/mod_blk_neutral_10m.f90 ./source/fortran/aerobulk/src/mod_aerobulk_compute.f90 ./source/fortran/aerobulk/src/mod_aerobulk.f90 ./source/fortran/mod_aerobulk_wrap_skin.f90 ./source/fortran/mod_aerobulk_wrap_skin.pyf and

    python -m numpy.f2py --verbose -c --f90flags="-fdefault-real-8 -ffree-line-length-200 --std=gnu" ./source/fortran/aerobulk/src/mod_const.f90 ./source/fortran/aerobulk/src/mod_phymbl.f90 ./source/fortran/aerobulk/src/mod_skin_coare.f90 ./source/fortran/aerobulk/src/mod_skin_ecmwf.f90 ./source/fortran/aerobulk/src/mod_blk_andreas.f90 ./source/fortran/aerobulk/src/mod_common_coare.f90 ./source/fortran/aerobulk/src/mod_blk_coare3p0.f90 ./source/fortran/aerobulk/src/mod_blk_coare3p6.f90 ./source/fortran/aerobulk/src/mod_blk_ecmwf.f90 ./source/fortran/aerobulk/src/mod_blk_ncar.f90 ./source/fortran/aerobulk/src/mod_blk_neutral_10m.f90 ./source/fortran/aerobulk/src/mod_aerobulk_compute.f90 ./source/fortran/aerobulk/src/mod_aerobulk.f90 ./source/fortran/mod_aerobulk_wrap_noskin.f90 ./source/fortran/mod_aerobulk_wrap_noskin.pyf

  2. Make sure things work pytest tests/test_fortran.py 🎉

Local Aerobulk compilation guide

Assumes that you have an environment with a gfortran compiler set up, have aerobulk cloned and that you are in the root aerobulk (not aerobulk-python) directory.

  1. Build the aerobulk source

First copy the appropriate macro file to the source directory: cp arch/make.macro_GnuLinux make.macro

those of us on mac needed to edit make.macro make this change ```diff

These are needed for the C/C++ interface

  • FF += -std=gnu -lstdc++
  • FF += -std=gnu ```

Then you should be able to run make

This will build: - Object files src/*.o - Mode files mod/*.mod - Library file lib/libaerobulk.a - Binary executables bin/*x

I was able to run one of the binaries with bin/example_call_aerobulk.x

Output ``` *********** COARE 3.0 ***************** =================================================================== ----- AeroBulk_init ----- *** Bulk parameterization to be used => "coare3p0" ==> will use the Cool-skin & Warm-ayer scheme of `coare3p0` ! *** Computational domain shape: Ni x Nj = 00002 x 00001 *** Number of time records that will be treated: 1 *** Number of iterations in bulk algos: nb_iter = 10 *** Filling the `mask` array... ==> no points need to be masked! :) *** Type of prescribed air humidity `specific humidity [kg/kg]` =================================================================== =================================================================== ----- AeroBulk_bye ----- =================================================================== --------------------------------------------------------------------- Parameter | Unstable ASL | Stable ASL | units --------------------------------------------------------------------- Wind speed at zu = 5.00000000 5.00000000 m/s SST = 22.0000000 22.0000000 deg.C Abs. temperature at zt = 20.0000000 25.0000000 deg.C Pot. temperature at zt = 20.0134144 25.0150242 deg.C Sensible heat flux: QH = -15.1545086 17.8423691 W/m**2 Latent heat flux: QL = -81.3846741 -50.8408585 W/m**2 Evaporation: Evap = -2.87061906 -1.79333246 mm/day Skin temperature: SSST = 21.7219677 21.7576351 deg.C Tau_x = 3.57834995E-02 1.73626728E-02 N/m**2 Tau_y = 0.00000000 0.00000000 N/m**2 Tau = 3.57834995E-02 1.73626728E-02 N/m**2 *********** COARE 3.6 ***************** =================================================================== ----- AeroBulk_init ----- *** Bulk parameterization to be used => "coare3p6" ==> will use the Cool-skin & Warm-ayer scheme of `coare3p6` ! *** Computational domain shape: Ni x Nj = 00002 x 00001 *** Number of time records that will be treated: 1 *** Number of iterations in bulk algos: nb_iter = 10 *** Filling the `mask` array... ==> no points need to be masked! :) *** Type of prescribed air humidity `specific humidity [kg/kg]` =================================================================== =================================================================== ----- AeroBulk_bye ----- =================================================================== --------------------------------------------------------------------- Parameter | Unstable ASL | Stable ASL | units --------------------------------------------------------------------- Wind speed at zu = 5.00000000 5.00000000 m/s SST = 22.0000000 22.0000000 deg.C Abs. temperature at zt = 20.0000000 25.0000000 deg.C Pot. temperature at zt = 20.0134144 25.0150242 deg.C Sensible heat flux: QH = -15.3865499 17.0818920 W/m**2 Latent heat flux: QL = -83.0788422 -48.4459152 W/m**2 Evaporation: Evap = -2.93033028 -1.70883954 mm/day Skin temperature: SSST = 21.7057972 21.7485600 deg.C Tau_x = 3.21817845E-02 1.51577257E-02 N/m**2 Tau_y = 0.00000000 0.00000000 N/m**2 Tau = 3.21817845E-02 1.51577257E-02 N/m**2 *********** ECMWF ***************** =================================================================== ----- AeroBulk_init ----- *** Bulk parameterization to be used => "ecmwf" ==> will use the Cool-skin & Warm-ayer scheme of `ecmwf` ! *** Computational domain shape: Ni x Nj = 00002 x 00001 *** Number of time records that will be treated: 1 *** Number of iterations in bulk algos: nb_iter = 10 *** Filling the `mask` array... ==> no points need to be masked! :) *** Type of prescribed air humidity `specific humidity [kg/kg]` =================================================================== =================================================================== ----- AeroBulk_bye ----- =================================================================== --------------------------------------------------------------------- Parameter | Unstable ASL | Stable ASL | units --------------------------------------------------------------------- Wind speed at zu = 5.00000000 5.00000000 m/s SST = 22.0000000 22.0000000 deg.C Abs. temperature at zt = 20.0000000 25.0000000 deg.C Pot. temperature at zt = 20.0134144 25.0150242 deg.C Sensible heat flux: QH = -14.3822346 17.6531811 W/m**2 Latent heat flux: QL = -80.2958984 -52.4623947 W/m**2 Evaporation: Evap = -2.83224440 -1.85053933 mm/day Skin temperature: SSST = 21.7325401 21.7630310 deg.C Tau_x = 3.84389125E-02 1.93256922E-02 N/m**2 Tau_y = 0.00000000 0.00000000 N/m**2 Tau = 3.84389125E-02 1.93256922E-02 N/m**2 *********** NCAR ***************** =================================================================== ----- AeroBulk_init ----- *** Bulk parameterization to be used => "ncar" *** Cool-skin & Warm-layer schemes will NOT be used! *** Computational domain shape: Ni x Nj = 00002 x 00001 *** Number of time records that will be treated: 1 *** Number of iterations in bulk algos: nb_iter = 10 *** Filling the `mask` array... ==> no points need to be masked! :) *** Type of prescribed air humidity `specific humidity [kg/kg]` =================================================================== =================================================================== ----- AeroBulk_bye ----- =================================================================== --------------------------------------------------------------------- Parameter | Unstable ASL | Stable ASL | units --------------------------------------------------------------------- Wind speed at zu = 5.00000000 5.00000000 m/s SST = 22.0000000 22.0000000 deg.C Abs. temperature at zt = 20.0000000 25.0000000 deg.C Pot. temperature at zt = 20.0134144 25.0150242 deg.C Sensible heat flux: QH = -16.6969528 10.7261686 W/m**2 Latent heat flux: QL = -88.4781876 -71.9012222 W/m**2 Evaporation: Evap = -3.12166286 -2.53679895 mm/day Tau_x = 3.58519591E-02 2.77329944E-02 N/m**2 Tau_y = 0.00000000 0.00000000 N/m**2 Tau = 3.58519591E-02 2.77329944E-02 N/m**2 *********** ANDREAS ***************** =================================================================== ----- AeroBulk_init ----- *** Bulk parameterization to be used => "andreas" *** Cool-skin & Warm-layer schemes will NOT be used! *** Computational domain shape: Ni x Nj = 00002 x 00001 *** Number of time records that will be treated: 1 *** Number of iterations in bulk algos: nb_iter = 10 *** Filling the `mask` array... ==> no points need to be masked! :) *** Type of prescribed air humidity `specific humidity [kg/kg]` =================================================================== =================================================================== ----- AeroBulk_bye ----- =================================================================== --------------------------------------------------------------------- Parameter | Unstable ASL | Stable ASL | units --------------------------------------------------------------------- Wind speed at zu = 5.00000000 5.00000000 m/s SST = 22.0000000 22.0000000 deg.C Abs. temperature at zt = 20.0000000 25.0000000 deg.C Pot. temperature at zt = 20.0134144 25.0150242 deg.C Sensible heat flux: QH = -14.4129944 15.1970539 W/m**2 Latent heat flux: QL = -74.4637756 -51.7018318 W/m**2 Evaporation: Evap = -2.62721038 -1.82412970 mm/day Tau_x = 3.02770734E-02 1.79436151E-02 N/m**2 Tau_y = 0.00000000 0.00000000 N/m**2 Tau = 3.02770734E-02 1.79436151E-02 N/m**2 ```

Owner

  • Name: xgcm
  • Login: xgcm
  • Kind: organization

xarray-based tools for general circulation model analysis

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Busecke"
  given-names: "Julius J. M."
  orcid: "https://orcid.org/0000-0001-8571-865X"
- family-names: "Martin"
  given-names: "Paige E."
- family-names: "Abernathey"
  given-names: "Ryan P."
  orcid: "https://orcid.org/0000-0001-5999-4917"
title: "aerobulk-python"
url: "https://github.com/xgcm/aerobulk-python"
# version and doi are completed by Zenodo automatically, do not provide here.

GitHub Events

Total
  • Watch event: 5
  • Delete event: 1
  • Issue comment event: 1
  • Push event: 17
  • Pull request event: 3
  • Create event: 1
Last Year
  • Watch event: 5
  • Delete event: 1
  • Issue comment event: 1
  • Push event: 17
  • Pull request event: 3
  • Create event: 1

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 118
  • Total Committers: 3
  • Avg Commits per committer: 39.333
  • Development Distribution Score (DDS): 0.271
Past Year
  • Commits: 10
  • Committers: 2
  • Avg Commits per committer: 5.0
  • Development Distribution Score (DDS): 0.2
Top Committers
Name Email Commits
Julius Busecke j****s@l****u 86
pre-commit-ci[bot] 6****] 21
Paige Martin p****r@u****u 11
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 29
  • Total pull requests: 61
  • Average time to close issues: 19 days
  • Average time to close pull requests: 9 days
  • Total issue authors: 5
  • Total pull request authors: 4
  • Average comments per issue: 2.59
  • Average comments per pull request: 1.05
  • Merged pull requests: 51
  • Bot issues: 0
  • Bot pull requests: 26
Past Year
  • Issues: 0
  • Pull requests: 4
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 day
  • Issue authors: 0
  • Pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 3
Top Authors
Issue Authors
  • jbusecke (23)
  • paigem (3)
  • juliasimpson97 (1)
  • chiaweh2 (1)
  • hhweiCT (1)
  • pre-commit-ci[bot] (1)
Pull Request Authors
  • jbusecke (36)
  • pre-commit-ci[bot] (34)
  • paigem (5)
  • wienkers (1)
Top Labels
Issue Labels
bug (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 61 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 1
    (may contain duplicates)
  • Total versions: 23
  • Total maintainers: 1
pypi.org: aerobulk-python

General Circulation Model Postprocessing with xarray

  • Versions: 17
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 61 Last month
Rankings
Dependent packages count: 10.1%
Forks count: 15.4%
Stargazers count: 16.1%
Average: 16.7%
Downloads: 20.5%
Dependent repos count: 21.5%
Maintainers (1)
Last synced: 6 months ago
conda-forge.org: aerobulk-python
  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 34.0%
Average: 46.7%
Forks count: 49.6%
Dependent packages count: 51.2%
Stargazers count: 51.9%
Last synced: 6 months ago

Dependencies

setup.py pypi
  • numpy *
.github/workflows/ci.yaml actions
  • actions/cache v3.0.1 composite
  • actions/checkout v3 composite
  • codecov/codecov-action v3.1.0 composite
  • conda-incubator/setup-miniconda v2 composite
.github/workflows/publish.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
  • pypa/gh-action-pypi-publish v1.5.0 composite
ci/environment.yml pypi