grdwindinversion 0.2.3.post13__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- grdwindinversion-0.2.4/.github/workflows/ci.yml +98 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/.github/workflows/publish.yml +6 -6
- {grdwindinversion-0.2.3.post13/grdwindinversion.egg-info → grdwindinversion-0.2.4}/PKG-INFO +1 -1
- grdwindinversion-0.2.4/grdwindinversion/config_prod.yaml +46 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/grdwindinversion/config_prod_recal.yaml +1 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/grdwindinversion/inversion.py +266 -110
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/grdwindinversion/main.py +1 -1
- grdwindinversion-0.2.4/grdwindinversion/streaks.py +79 -0
- grdwindinversion-0.2.4/grdwindinversion/utils.py +83 -0
- grdwindinversion-0.2.3.post13/grdwindinversion/utils.py → grdwindinversion-0.2.4/grdwindinversion/utils_memory.py +8 -4
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4/grdwindinversion.egg-info}/PKG-INFO +1 -1
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/grdwindinversion.egg-info/SOURCES.txt +6 -1
- grdwindinversion-0.2.4/recipe/meta.yaml +37 -0
- grdwindinversion-0.2.3.post13/grdwindinversion/config_prod.yaml → grdwindinversion-0.2.4/tests/config_test.yaml +18 -5
- grdwindinversion-0.2.4/tests/test_grdwindinversion_ci.py +55 -0
- grdwindinversion-0.2.3.post13/tests/test_grdwindinversion.py +0 -20
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/.editorconfig +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/.github/dependabot.yml +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/.gitignore +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/.pre-commit-config.yaml +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/AUTHORS.rst +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/CONTRIBUTING.rst +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/HISTORY.rst +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/LICENSE +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/MANIFEST.in +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/Makefile +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/README.md +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/ci/requirements/docs.yaml +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/ci/requirements/environment.yaml +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/docs/Makefile +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/docs/_static/css/grdwindinversion.css +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/docs/algorithm.rst +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/docs/authors.rst +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/docs/conf.py +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/docs/contributing.rst +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/docs/examples/wind-inversion-from-grd.ipynb +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/docs/history.rst +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/docs/index.rst +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/docs/installation.rst +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/docs/make.bat +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/docs/modules.rst +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/docs/readme.rst +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/docs/usage.rst +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/grdwindinversion/.github/ISSUE_TEMPLATE.md +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/grdwindinversion/.gitignore +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/grdwindinversion/.travis.yml +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/grdwindinversion/__init__.py +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/grdwindinversion/data_config.yaml +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/grdwindinversion/load_config.py +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/grdwindinversion.egg-info/dependency_links.txt +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/grdwindinversion.egg-info/entry_points.txt +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/grdwindinversion.egg-info/requires.txt +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/grdwindinversion.egg-info/top_level.txt +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/pyproject.toml +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/requirements_dev.txt +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/requirements_doc.txt +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/setup.cfg +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/tests/__init__.py +0 -0
- {grdwindinversion-0.2.3.post13 → grdwindinversion-0.2.4}/tox.ini +0 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
name: CI Workflow for grdwindinversion
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
test:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
timeout-minutes: 360 # 6 hours limit for the job
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
# Checkout the code
|
|
18
|
+
- name: Checkout code
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- uses: mamba-org/setup-micromamba@v1
|
|
22
|
+
with:
|
|
23
|
+
micromamba-version: "1.5.9-1" # any version from https://github.com/mamba-org/micromamba-releases
|
|
24
|
+
channels: tcevaer, conda-forge, defaults
|
|
25
|
+
init-shell: bash
|
|
26
|
+
post-cleanup: "all"
|
|
27
|
+
|
|
28
|
+
- name: Create environment and install tools
|
|
29
|
+
run: micromamba create -n grdwind_env pytest conda-build boa python=3.10 -y -c tcevaer -c conda-forge
|
|
30
|
+
|
|
31
|
+
- name: Build package
|
|
32
|
+
run: |
|
|
33
|
+
cd recipe
|
|
34
|
+
eval "$(micromamba shell hook --shell bash)"
|
|
35
|
+
micromamba activate grdwind_env
|
|
36
|
+
conda mambabuild . -c tcevaer -c conda-forge
|
|
37
|
+
|
|
38
|
+
# Install the built package into the environment
|
|
39
|
+
- name: Install the built package
|
|
40
|
+
run: |
|
|
41
|
+
eval "$(micromamba shell hook --shell bash)"
|
|
42
|
+
micromamba activate grdwind_env
|
|
43
|
+
conda install --use-local grdwindinversion -y -c tcevaer -c conda-forge
|
|
44
|
+
|
|
45
|
+
# Cache the test data if previously downloaded (up to 10 GB limit for the cache)
|
|
46
|
+
# WARNING : modify the key if the data is modified !!
|
|
47
|
+
- name: Cache test data
|
|
48
|
+
uses: actions/cache@v4
|
|
49
|
+
id: cache
|
|
50
|
+
with:
|
|
51
|
+
path: ./test_data
|
|
52
|
+
key: test-data-v3
|
|
53
|
+
restore-keys: test-data-v3
|
|
54
|
+
|
|
55
|
+
# Download test data if not already cached
|
|
56
|
+
- name: Download test data
|
|
57
|
+
if: steps.cache.outputs.cache-hit != 'true' # Only download if cache miss
|
|
58
|
+
run: |
|
|
59
|
+
mkdir -p ./test_data/
|
|
60
|
+
wget https://cloud.ifremer.fr/index.php/s/ExLQ2TnYAqozPWE/download -O /tmp/ecmwf.zip
|
|
61
|
+
unzip /tmp/ecmwf.zip -d ./test_data/
|
|
62
|
+
wget https://cloud.ifremer.fr/index.php/s/kRgdOOPsjoZieZR/download -O /tmp/l1.zip
|
|
63
|
+
unzip /tmp/l1.zip -d ./test_data/
|
|
64
|
+
timeout-minutes: 200 # Adjust depending on the size of your data
|
|
65
|
+
|
|
66
|
+
# Set up xsar configuration
|
|
67
|
+
- name: Setup xsar configuration
|
|
68
|
+
run: |
|
|
69
|
+
mkdir -p ~/.xsar
|
|
70
|
+
echo "data_dir: /tmp" > ~/.xsar/config.yaml
|
|
71
|
+
echo "auxiliary_dir: ./test_data/auxiliary" >> ~/.xsar/config.yaml
|
|
72
|
+
echo "path_dataframe_aux: ./test_data/auxiliary/active_aux.csv" >> ~/.xsar/config.yaml
|
|
73
|
+
|
|
74
|
+
# Set up grdwindinversion configuration
|
|
75
|
+
- name: Setup grdwindinversion configuration
|
|
76
|
+
run: |
|
|
77
|
+
mkdir -p ~/.grdwindinversion
|
|
78
|
+
echo "'ecmwf_0100_1h': ./test_data/ECMWF/forecast/hourly/0100deg/netcdf_light/%Y/%j/ECMWF_FORECAST_0100_%Y%m%d%H%M_10U_10V.nc" > ~/.grdwindinversion/data_config.yaml
|
|
79
|
+
echo "'ecmwf_0125_1h': ./test_data/ECMWF/0.125deg/1h/forecasts/%Y/%j/ecmwf_%Y%m%d%H%M.nc" >> ~/.grdwindinversion/data_config.yaml
|
|
80
|
+
#echo "'sarwing_luts_path': './test_data/GMFS/v1.6/'" >> ~/.grdwindinversion/data_config.yaml
|
|
81
|
+
#echo "'nc_luts_path': ./test_data/GMFS/nc_luts" >> ~/.grdwindinversion/data_config.yaml
|
|
82
|
+
#echo "'lut_cmod7_path': './test_data/GMFS/v1.6/GMF_cmod7_official/cmod7_and_python_script'" >> ~/.grdwindinversion/data_config.yaml
|
|
83
|
+
#echo "'lut_ms1ahw_path': './test_data/GMFS/v1.6/GMF_cmodms1ahw'" >> ~/.grdwindinversion/data_config.yaml
|
|
84
|
+
|
|
85
|
+
# Run the tests
|
|
86
|
+
- name: Run tests
|
|
87
|
+
run: |
|
|
88
|
+
eval "$(micromamba shell hook --shell bash)"
|
|
89
|
+
micromamba activate grdwind_env
|
|
90
|
+
pytest
|
|
91
|
+
|
|
92
|
+
# Optionally, upload test artifacts (NetCDF files or logs) if needed
|
|
93
|
+
#- name: Upload test artifacts
|
|
94
|
+
# if: failure() # Only upload on failure
|
|
95
|
+
# uses: actions/upload-artifact@v2
|
|
96
|
+
# with:
|
|
97
|
+
# name: test-output
|
|
98
|
+
# path: ./test_output/
|
|
@@ -11,9 +11,9 @@ jobs:
|
|
|
11
11
|
if: github.repository == 'umr-lops/grdwindinversion'
|
|
12
12
|
steps:
|
|
13
13
|
- name: Checkout
|
|
14
|
-
uses: actions/checkout@
|
|
14
|
+
uses: actions/checkout@v4
|
|
15
15
|
- name: Set up Python
|
|
16
|
-
uses: actions/setup-python@
|
|
16
|
+
uses: actions/setup-python@v5
|
|
17
17
|
with:
|
|
18
18
|
python-version: "3.x"
|
|
19
19
|
- name: Install dependencies
|
|
@@ -22,12 +22,12 @@ jobs:
|
|
|
22
22
|
python -m pip install build twine
|
|
23
23
|
- name: Build
|
|
24
24
|
run: |
|
|
25
|
-
python -m build --sdist --outdir dist/ .
|
|
25
|
+
python -m build --sdist --wheel --outdir dist/ .
|
|
26
26
|
- name: Check the built archives
|
|
27
27
|
run: |
|
|
28
28
|
twine check dist/*
|
|
29
29
|
- name: Upload build artifacts
|
|
30
|
-
uses: actions/upload-artifact@
|
|
30
|
+
uses: actions/upload-artifact@v4
|
|
31
31
|
with:
|
|
32
32
|
name: packages
|
|
33
33
|
path: dist/*
|
|
@@ -45,10 +45,10 @@ jobs:
|
|
|
45
45
|
|
|
46
46
|
steps:
|
|
47
47
|
- name: Download build artifacts
|
|
48
|
-
uses: actions/download-artifact@
|
|
48
|
+
uses: actions/download-artifact@v4
|
|
49
49
|
with:
|
|
50
50
|
name: packages
|
|
51
51
|
path: dist/
|
|
52
52
|
|
|
53
53
|
- name: Publish to PyPI
|
|
54
|
-
uses: pypa/gh-action-pypi-publish@
|
|
54
|
+
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
no_subdir: True
|
|
2
|
+
winddir_convention: "meteorological"
|
|
3
|
+
S1A:
|
|
4
|
+
GMF_VV_NAME: "gmf_cmod5n"
|
|
5
|
+
GMF_VH_NAME: "gmf_s1_v2"
|
|
6
|
+
dsig_VH_NAME: "gmf_s1_v2"
|
|
7
|
+
apply_flattening: True
|
|
8
|
+
recalibration: False
|
|
9
|
+
ancillary: "ecmwf"
|
|
10
|
+
inc_step: 0.1
|
|
11
|
+
wspd_step: 0.1
|
|
12
|
+
phi_step: 1.0
|
|
13
|
+
resolution: "high"
|
|
14
|
+
S1B:
|
|
15
|
+
GMF_VV_NAME: "gmf_cmod5n"
|
|
16
|
+
GMF_VH_NAME: "gmf_s1_v2"
|
|
17
|
+
dsig_VH_NAME: "gmf_s1_v2"
|
|
18
|
+
apply_flattening: True
|
|
19
|
+
recalibration: False
|
|
20
|
+
ancillary: "ecmwf"
|
|
21
|
+
inc_step: 0.1
|
|
22
|
+
wspd_step: 0.1
|
|
23
|
+
phi_step: 1.0
|
|
24
|
+
resolution: "high"
|
|
25
|
+
RS2:
|
|
26
|
+
GMF_VV_NAME: "gmf_cmod5n"
|
|
27
|
+
GMF_VH_NAME: "gmf_rs2_v2"
|
|
28
|
+
dsig_VH_NAME: "gmf_rs2_v2"
|
|
29
|
+
apply_flattening: False
|
|
30
|
+
recalibration: False
|
|
31
|
+
ancillary: "ecmwf"
|
|
32
|
+
inc_step: 0.1
|
|
33
|
+
wspd_step: 0.1
|
|
34
|
+
phi_step: 1.0
|
|
35
|
+
resolution: "high"
|
|
36
|
+
RCM:
|
|
37
|
+
GMF_VV_NAME: "gmf_cmod5n"
|
|
38
|
+
GMF_VH_NAME: "gmf_rcm_noaa"
|
|
39
|
+
dsig_VH_NAME: "gmf_s1_v2"
|
|
40
|
+
apply_flattening: True
|
|
41
|
+
recalibration: False
|
|
42
|
+
ancillary: "ecmwf"
|
|
43
|
+
inc_step: 0.1
|
|
44
|
+
wspd_step: 0.1
|
|
45
|
+
phi_step: 1.0
|
|
46
|
+
resolution: "high"
|