Skip to content

Commit 2eef01d

Browse files
authored
Merge pull request #15 from jbusecke/xarray_wrapper2
Adding an xarray wrapper with apply_ufunc
2 parents 744bb50 + b68d51f commit 2eef01d

13 files changed

+534
-185
lines changed

.github/workflows/ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ jobs:
5050
conda list
5151
- name: Run Tests
5252
run: |
53-
pytest test/test.py #Generalize this later?
53+
pytest -vv

.gitignore

+10-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ _version.py
77
.eggs/
88
build/
99
__pycache__
10+
dist/
11+
12+
# files built by f2py
13+
source/fortran/*f2pywrappers*
14+
source/fortran/*.c
15+
source/aerobulk/aerobulk/
1016
mod_aerobulk_wrap.*.so
11-
source/fortran/mod_aerobulk_wrap-f2pywrappers2.f90
12-
source/fortran/mod_aerobulk_wrapmodule.c
17+
18+
# should we ignore submodules
19+
.DS_Store
20+
.vscode/

setup.cfg

+2
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ ignore =
1212
W503
1313
E265
1414
F811
15+
[tool:pytest]
16+
testpaths = tests

setup.py

+26-4
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
# for this API we will only expose a single extension?
4141
ext_modules = [
4242
Extension(
43-
name="mod_aerobulk_wrap",
43+
name="mod_aerobulk_wrap_noskin",
4444
sources=[
4545
"./source/fortran/aerobulk/src/mod_const.f90",
4646
"./source/fortran/aerobulk/src/mod_phymbl.f90",
@@ -55,12 +55,34 @@
5555
"./source/fortran/aerobulk/src/mod_blk_neutral_10m.f90",
5656
"./source/fortran/aerobulk/src/mod_aerobulk_compute.f90",
5757
"./source/fortran/aerobulk/src/mod_aerobulk.f90",
58-
"./source/fortran/mod_aerobulk_wrap.f90",
59-
"./source/fortran/mod_aerobulk_wrap.pyf",
58+
"./source/fortran/mod_aerobulk_wrap_noskin.f90",
59+
"./source/fortran/mod_aerobulk_wrap_noskin.pyf",
6060
],
6161
extra_f90_compile_args=f90flags,
6262
# f2py_options=['--quiet'],
63-
)
63+
),
64+
Extension(
65+
name="mod_aerobulk_wrap_skin",
66+
sources=[
67+
"./source/fortran/aerobulk/src/mod_const.f90",
68+
"./source/fortran/aerobulk/src/mod_phymbl.f90",
69+
"./source/fortran/aerobulk/src/mod_skin_coare.f90",
70+
"./source/fortran/aerobulk/src/mod_skin_ecmwf.f90",
71+
"./source/fortran/aerobulk/src/mod_blk_andreas.f90",
72+
"./source/fortran/aerobulk/src/mod_common_coare.f90",
73+
"./source/fortran/aerobulk/src/mod_blk_coare3p0.f90",
74+
"./source/fortran/aerobulk/src/mod_blk_coare3p6.f90",
75+
"./source/fortran/aerobulk/src/mod_blk_ecmwf.f90",
76+
"./source/fortran/aerobulk/src/mod_blk_ncar.f90",
77+
"./source/fortran/aerobulk/src/mod_blk_neutral_10m.f90",
78+
"./source/fortran/aerobulk/src/mod_aerobulk_compute.f90",
79+
"./source/fortran/aerobulk/src/mod_aerobulk.f90",
80+
"./source/fortran/mod_aerobulk_wrap_skin.f90",
81+
"./source/fortran/mod_aerobulk_wrap_skin.pyf",
82+
],
83+
extra_f90_compile_args=f90flags,
84+
f2py_options=["--quiet"],
85+
),
6486
]
6587

6688
setup(

source/aerobulk/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
__version__ = "unknown"
77
pass
88

9-
from .flux import flux_noskin, flux_skin
9+
from .flux import noskin, skin

0 commit comments

Comments
 (0)