grdwindinversion 0.2.5__tar.gz → 0.2.7__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.7/.github/workflows/build.yml +40 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/.github/workflows/ci.yml +27 -23
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/PKG-INFO +4 -1
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/grdwindinversion/inversion.py +13 -13
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/grdwindinversion/utils.py +1 -1
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/grdwindinversion.egg-info/PKG-INFO +4 -1
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/grdwindinversion.egg-info/SOURCES.txt +1 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/grdwindinversion.egg-info/requires.txt +3 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/pyproject.toml +3 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/recipe/meta.yaml +4 -5
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/.editorconfig +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/.github/dependabot.yml +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/.github/workflows/publish.yml +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/.gitignore +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/.pre-commit-config.yaml +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/AUTHORS.rst +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/CONTRIBUTING.rst +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/HISTORY.rst +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/LICENSE +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/MANIFEST.in +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/Makefile +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/README.md +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/ci/requirements/docs.yaml +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/ci/requirements/environment.yaml +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/docs/Makefile +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/docs/_static/css/grdwindinversion.css +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/docs/algorithm.rst +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/docs/authors.rst +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/docs/conf.py +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/docs/contributing.rst +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/docs/examples/wind-inversion-from-grd.ipynb +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/docs/history.rst +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/docs/index.rst +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/docs/installation.rst +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/docs/make.bat +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/docs/modules.rst +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/docs/readme.rst +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/docs/usage.rst +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/grdwindinversion/.github/ISSUE_TEMPLATE.md +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/grdwindinversion/.gitignore +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/grdwindinversion/__init__.py +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/grdwindinversion/config_prod.yaml +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/grdwindinversion/config_prod_recal.yaml +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/grdwindinversion/data_config.yaml +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/grdwindinversion/load_config.py +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/grdwindinversion/main.py +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/grdwindinversion/streaks.py +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/grdwindinversion/utils_memory.py +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/grdwindinversion.egg-info/dependency_links.txt +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/grdwindinversion.egg-info/entry_points.txt +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/grdwindinversion.egg-info/top_level.txt +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/requirements_dev.txt +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/requirements_doc.txt +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/setup.cfg +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/tests/__init__.py +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/tests/config_test.yaml +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/tests/test_grdwindinversion_ci.py +0 -0
- {grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/tox.ini +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: Build and Upload Conda Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types:
|
|
6
|
+
- created
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build-and-upload-conda-package:
|
|
10
|
+
if: true
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
#${{ github.event.workflow_run.conclusion == 'success' }}
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout repository
|
|
15
|
+
uses: actions/checkout@v3
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 0
|
|
18
|
+
|
|
19
|
+
- name: Set up Miniconda
|
|
20
|
+
uses: conda-incubator/setup-miniconda@v2
|
|
21
|
+
with:
|
|
22
|
+
auto-update-conda: true
|
|
23
|
+
python-version: 3.9
|
|
24
|
+
|
|
25
|
+
- name: Install conda-build
|
|
26
|
+
run: |
|
|
27
|
+
conda init
|
|
28
|
+
source ~/.bashrc
|
|
29
|
+
conda activate base
|
|
30
|
+
conda install -y -c conda-forge conda-build anaconda-client
|
|
31
|
+
|
|
32
|
+
- name: Build and Upload Conda package
|
|
33
|
+
env:
|
|
34
|
+
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
|
|
35
|
+
run: |
|
|
36
|
+
cd recipe
|
|
37
|
+
conda init
|
|
38
|
+
source ~/.bashrc
|
|
39
|
+
conda activate base
|
|
40
|
+
conda-build . --token $ANACONDA_TOKEN --user tcevaer -c tcevaer -c conda-forge
|
|
@@ -15,65 +15,69 @@ jobs:
|
|
|
15
15
|
|
|
16
16
|
steps:
|
|
17
17
|
# Checkout the code
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
- name: Checkout code
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
20
|
|
|
21
21
|
- uses: mamba-org/setup-micromamba@v1
|
|
22
22
|
with:
|
|
23
23
|
micromamba-version: "1.5.9-1" # any version from https://github.com/mamba-org/micromamba-releases
|
|
24
|
-
channels: tcevaer, conda-forge
|
|
24
|
+
channels: tcevaer, conda-forge
|
|
25
25
|
init-shell: bash
|
|
26
26
|
post-cleanup: "all"
|
|
27
27
|
|
|
28
|
+
- name: Configure Conda channel priority to disabled
|
|
29
|
+
run: |
|
|
30
|
+
conda config --set channel_priority disabled
|
|
31
|
+
|
|
28
32
|
- name: Create environment and install tools
|
|
29
|
-
run: micromamba create -n grdwind_env pytest conda-build boa python=3.10 -y
|
|
33
|
+
run: micromamba create -n grdwind_env pytest conda-build boa python=3.10 -y
|
|
30
34
|
|
|
31
35
|
- name: Build package
|
|
32
36
|
run: |
|
|
33
37
|
cd recipe
|
|
34
38
|
eval "$(micromamba shell hook --shell bash)"
|
|
35
39
|
micromamba activate grdwind_env
|
|
36
|
-
conda mambabuild .
|
|
40
|
+
conda mambabuild .
|
|
37
41
|
|
|
38
42
|
# Install the built package into the environment
|
|
39
43
|
- name: Install the built package
|
|
40
44
|
run: |
|
|
41
45
|
eval "$(micromamba shell hook --shell bash)"
|
|
42
46
|
micromamba activate grdwind_env
|
|
43
|
-
conda install --use-local grdwindinversion -y
|
|
47
|
+
conda install --use-local grdwindinversion -y
|
|
44
48
|
|
|
45
49
|
# Cache the test data if previously downloaded (up to 10 GB limit for the cache)
|
|
46
50
|
# WARNING : modify the key if the data is modified !!
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
- name: Cache test data
|
|
52
|
+
uses: actions/cache@v4
|
|
53
|
+
id: cache
|
|
54
|
+
with:
|
|
55
|
+
path: ./test_data
|
|
56
|
+
key: test-data-v3
|
|
57
|
+
restore-keys: test-data-v3
|
|
54
58
|
|
|
55
59
|
# Download test data if not already cached
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
- name: Download test data
|
|
61
|
+
if: steps.cache.outputs.cache-hit != 'true' # Only download if cache miss
|
|
62
|
+
run: |
|
|
59
63
|
mkdir -p ./test_data/
|
|
60
64
|
wget https://cloud.ifremer.fr/index.php/s/ExLQ2TnYAqozPWE/download -O /tmp/ecmwf.zip
|
|
61
65
|
unzip /tmp/ecmwf.zip -d ./test_data/
|
|
62
66
|
wget https://cloud.ifremer.fr/index.php/s/kRgdOOPsjoZieZR/download -O /tmp/l1.zip
|
|
63
67
|
unzip /tmp/l1.zip -d ./test_data/
|
|
64
|
-
|
|
68
|
+
timeout-minutes: 200 # Adjust depending on the size of your data
|
|
65
69
|
|
|
66
70
|
# Set up xsar configuration
|
|
67
|
-
|
|
68
|
-
|
|
71
|
+
- name: Setup xsar configuration
|
|
72
|
+
run: |
|
|
69
73
|
mkdir -p ~/.xsar
|
|
70
74
|
echo "data_dir: /tmp" > ~/.xsar/config.yaml
|
|
71
75
|
echo "auxiliary_dir: ./test_data/auxiliary" >> ~/.xsar/config.yaml
|
|
72
76
|
echo "path_dataframe_aux: ./test_data/auxiliary/active_aux.csv" >> ~/.xsar/config.yaml
|
|
73
77
|
|
|
74
78
|
# Set up grdwindinversion configuration
|
|
75
|
-
|
|
76
|
-
|
|
79
|
+
- name: Setup grdwindinversion configuration
|
|
80
|
+
run: |
|
|
77
81
|
mkdir -p ~/.grdwindinversion
|
|
78
82
|
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
83
|
echo "'ecmwf_0125_1h': ./test_data/ECMWF/0.125deg/1h/forecasts/%Y/%j/ecmwf_%Y%m%d%H%M.nc" >> ~/.grdwindinversion/data_config.yaml
|
|
@@ -82,8 +86,8 @@ jobs:
|
|
|
82
86
|
#echo "'lut_ms1ahw_path': './test_data/GMFS/v1.6/GMF_cmodms1ahw'" >> ~/.grdwindinversion/data_config.yaml
|
|
83
87
|
|
|
84
88
|
# Run the tests
|
|
85
|
-
|
|
86
|
-
|
|
89
|
+
- name: Run tests
|
|
90
|
+
run: |
|
|
87
91
|
eval "$(micromamba shell hook --shell bash)"
|
|
88
92
|
micromamba activate grdwind_env
|
|
89
93
|
pytest
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: grdwindinversion
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7
|
|
4
4
|
Summary: Package to perform Wind inversion from GRD Level-1 SAR images
|
|
5
5
|
License: MIT
|
|
6
6
|
Classifier: Development Status :: 2 - Pre-Alpha
|
|
@@ -27,6 +27,9 @@ Requires-Dist: numpy
|
|
|
27
27
|
Requires-Dist: scipy
|
|
28
28
|
Requires-Dist: fsspec
|
|
29
29
|
Requires-Dist: aiohttp
|
|
30
|
+
Requires-Dist: xarray-safe-s1
|
|
31
|
+
Requires-Dist: xradarsat2
|
|
32
|
+
Requires-Dist: xarray-safe-rcm
|
|
30
33
|
|
|
31
34
|
|
|
32
35
|
# grdwindinversion
|
|
@@ -101,7 +101,7 @@ def getOutputName2(input_file, outdir, sensor, meta, subdir=True):
|
|
|
101
101
|
"${MISSIONID}_OK${DATA1}_PK${DATA2}_${DATA3}_${BEAM}_${DATE}_${TIME}_${POLARIZATION1}_${POLARIZATION2}_${PRODUCT}")
|
|
102
102
|
match = regex.match(basename_match)
|
|
103
103
|
MISSIONID, DATA1, DATA2, DATA3, BEAM_MODE, DATE, TIME, POLARIZATION1, POLARIZATION2, LAST = match.groups()
|
|
104
|
-
new_format = f"{MISSIONID.lower()}-{
|
|
104
|
+
new_format = f"{MISSIONID.lower()}-{BEAM_MODE.lower()}-owi-xx-{meta_start_date.lower()}-{meta_stop_date.lower()}-_____-_____.nc"
|
|
105
105
|
else:
|
|
106
106
|
raise ValueError(
|
|
107
107
|
"sensor must be S1A|S1B|RS2|RCM, got sensor %s" % sensor)
|
|
@@ -607,6 +607,9 @@ def preprocess(filename, outdir, config_path, overwrite=False, add_streaks=False
|
|
|
607
607
|
logging.error(e)
|
|
608
608
|
sys.exit(-1)
|
|
609
609
|
|
|
610
|
+
# load
|
|
611
|
+
xr_dataset = xr_dataset.load()
|
|
612
|
+
|
|
610
613
|
# defining dual_pol, and gmfs by channel
|
|
611
614
|
if len(xr_dataset.pol.values) == 2:
|
|
612
615
|
dual_pol = True
|
|
@@ -707,7 +710,7 @@ def preprocess(filename, outdir, config_path, overwrite=False, add_streaks=False
|
|
|
707
710
|
90. - np.rad2deg(np.arctan2(xr_dataset.model_V10, xr_dataset.model_U10)) + 180) % 360
|
|
708
711
|
|
|
709
712
|
xr_dataset['ancillary_wind_direction'] = xr.where(xr_dataset['mask'], np.nan,
|
|
710
|
-
xr_dataset['ancillary_wind_direction']
|
|
713
|
+
xr_dataset['ancillary_wind_direction']).transpose(
|
|
711
714
|
*xr_dataset['ancillary_wind_direction'].dims)
|
|
712
715
|
xr_dataset['ancillary_wind_direction'].attrs = {}
|
|
713
716
|
xr_dataset['ancillary_wind_direction'].attrs['units'] = 'degrees_north'
|
|
@@ -718,7 +721,7 @@ def preprocess(filename, outdir, config_path, overwrite=False, add_streaks=False
|
|
|
718
721
|
xr_dataset['ancillary_wind_speed'] = np.sqrt(
|
|
719
722
|
xr_dataset['model_U10']**2+xr_dataset['model_V10']**2)
|
|
720
723
|
xr_dataset['ancillary_wind_speed'] = xr.where(xr_dataset['mask'], np.nan,
|
|
721
|
-
xr_dataset['ancillary_wind_speed']
|
|
724
|
+
xr_dataset['ancillary_wind_speed']).transpose(
|
|
722
725
|
*xr_dataset['ancillary_wind_speed'].dims)
|
|
723
726
|
xr_dataset['ancillary_wind_speed'].attrs = {}
|
|
724
727
|
xr_dataset['ancillary_wind_speed'].attrs['units'] = 'm s^-1'
|
|
@@ -727,7 +730,7 @@ def preprocess(filename, outdir, config_path, overwrite=False, add_streaks=False
|
|
|
727
730
|
xr_dataset['ancillary_wind_speed'].attrs['standart_name'] = 'wind_speed'
|
|
728
731
|
|
|
729
732
|
xr_dataset['ancillary_wind'] = xr.where(xr_dataset['mask'], np.nan,
|
|
730
|
-
(xr_dataset.ancillary_wind_speed * np.exp(1j * xsarsea.dir_meteo_to_sample(xr_dataset.ancillary_wind_direction, xr_dataset.ground_heading)))
|
|
733
|
+
(xr_dataset.ancillary_wind_speed * np.exp(1j * xsarsea.dir_meteo_to_sample(xr_dataset.ancillary_wind_direction, xr_dataset.ground_heading)))).transpose(
|
|
731
734
|
*xr_dataset['ancillary_wind_speed'].dims)
|
|
732
735
|
|
|
733
736
|
xr_dataset.attrs['ancillary_source'] = xr_dataset['model_U10'].attrs['history'].split('decoded: ')[
|
|
@@ -736,7 +739,7 @@ def preprocess(filename, outdir, config_path, overwrite=False, add_streaks=False
|
|
|
736
739
|
|
|
737
740
|
# nrcs processing
|
|
738
741
|
xr_dataset['sigma0_ocean'] = xr.where(xr_dataset['mask'], np.nan,
|
|
739
|
-
xr_dataset['sigma0']
|
|
742
|
+
xr_dataset['sigma0']).transpose(*xr_dataset['sigma0'].dims)
|
|
740
743
|
xr_dataset['sigma0_ocean'].attrs = xr_dataset['sigma0'].attrs
|
|
741
744
|
# we forced it to 1e-15
|
|
742
745
|
xr_dataset['sigma0_ocean'].attrs['comment'] = "clipped, no values <=0 ; 1e-15 instread"
|
|
@@ -751,7 +754,7 @@ def preprocess(filename, outdir, config_path, overwrite=False, add_streaks=False
|
|
|
751
754
|
xr_dataset['sigma0_ocean'] <= 0, 1e-15, xr_dataset['sigma0_ocean'])
|
|
752
755
|
|
|
753
756
|
xr_dataset['sigma0_ocean_raw'] = xr.where(xr_dataset['mask'], np.nan,
|
|
754
|
-
xr_dataset['sigma0_raw']
|
|
757
|
+
xr_dataset['sigma0_raw']).transpose(*xr_dataset['sigma0_raw'].dims)
|
|
755
758
|
|
|
756
759
|
xr_dataset['sigma0_ocean_raw'].attrs = xr_dataset['sigma0_raw'].attrs
|
|
757
760
|
|
|
@@ -765,7 +768,7 @@ def preprocess(filename, outdir, config_path, overwrite=False, add_streaks=False
|
|
|
765
768
|
xr_dataset.sigma0.sel(pol=crosspol), xr_dataset.incidence, model=model_cross)
|
|
766
769
|
if config["apply_flattening"]:
|
|
767
770
|
xr_dataset = xr_dataset.assign(nesz_cross_flattened=(
|
|
768
|
-
['line', 'sample'], windspeed.nesz_flattening(xr_dataset.nesz.sel(pol=crosspol), xr_dataset.incidence)))
|
|
771
|
+
['line', 'sample'], windspeed.nesz_flattening(xr_dataset.nesz.sel(pol=crosspol), xr_dataset.incidence).data))
|
|
769
772
|
xr_dataset['nesz_cross_flattened'].attrs[
|
|
770
773
|
"comment"] = 'nesz has been flattened using windspeed.nesz_flattening'
|
|
771
774
|
# dsig
|
|
@@ -774,7 +777,7 @@ def preprocess(filename, outdir, config_path, overwrite=False, add_streaks=False
|
|
|
774
777
|
else:
|
|
775
778
|
# dsig
|
|
776
779
|
xr_dataset["dsig_cross"] = windspeed.get_dsig(config["dsig_"+crosspol_gmf+"_NAME"], xr_dataset.incidence,
|
|
777
|
-
xr_dataset['sigma0_ocean'].sel(pol=crosspol), xr_dataset
|
|
780
|
+
xr_dataset['sigma0_ocean'].sel(pol=crosspol), xr_dataset.nesz.sel(pol=crosspol))
|
|
778
781
|
|
|
779
782
|
xr_dataset.dsig_cross.attrs['comment'] = 'variable used to ponderate copol and crosspol'
|
|
780
783
|
xr_dataset.dsig_cross.attrs['formula_used'] = config["dsig_" +
|
|
@@ -819,7 +822,7 @@ def preprocess(filename, outdir, config_path, overwrite=False, add_streaks=False
|
|
|
819
822
|
xr_dataset_100.land_mask.values = binary_dilation(xr_dataset_100['land_mask'].values.astype('uint8'),
|
|
820
823
|
structure=np.ones((3, 3), np.uint8), iterations=3)
|
|
821
824
|
xr_dataset_100['sigma0_detrend'] = xr.where(
|
|
822
|
-
xr_dataset_100['land_mask'], np.nan, xr_dataset_100['sigma0']
|
|
825
|
+
xr_dataset_100['land_mask'], np.nan, xr_dataset_100['sigma0']).transpose(*xr_dataset_100['sigma0'].dims)
|
|
823
826
|
|
|
824
827
|
xr_dataset['streaks_direction'] = get_streaks(
|
|
825
828
|
xr_dataset, xr_dataset_100)
|
|
@@ -899,8 +902,6 @@ def makeL2(filename, outdir, config_path, overwrite=False, generateCSV=True, add
|
|
|
899
902
|
model_co=model_co,
|
|
900
903
|
model_cross=model_cross,
|
|
901
904
|
** kwargs)
|
|
902
|
-
wind_co.compute()
|
|
903
|
-
|
|
904
905
|
# windspeed_co
|
|
905
906
|
xr_dataset['windspeed_co'] = np.abs(wind_co)
|
|
906
907
|
xr_dataset["windspeed_co"].attrs["units"] = "m.s⁻1"
|
|
@@ -917,7 +918,6 @@ def makeL2(filename, outdir, config_path, overwrite=False, generateCSV=True, add
|
|
|
917
918
|
|
|
918
919
|
# windspeed_dual / windspeed_cr / /winddir_dual / winddir_cr
|
|
919
920
|
if dual_pol and wind_dual is not None:
|
|
920
|
-
wind_dual.compute()
|
|
921
921
|
xr_dataset['windspeed_dual'] = np.abs(wind_dual)
|
|
922
922
|
xr_dataset["windspeed_dual"].attrs["units"] = "m.s⁻1"
|
|
923
923
|
xr_dataset["windspeed_dual"].attrs["long_name"] = "Wind speed inverted from model %s (%s) & %s (%s)" % (
|
|
@@ -931,7 +931,7 @@ def makeL2(filename, outdir, config_path, overwrite=False, generateCSV=True, add
|
|
|
931
931
|
xr_dataset["winddir_dual"].attrs["model"] = "winddir_dual is a copy of copol wind direction"
|
|
932
932
|
|
|
933
933
|
xr_dataset = xr_dataset.assign(
|
|
934
|
-
windspeed_cross=(['line', 'sample'], windspeed_cr))
|
|
934
|
+
windspeed_cross=(['line', 'sample'], windspeed_cr.data))
|
|
935
935
|
xr_dataset["windspeed_cross"].attrs["units"] = "m.s⁻1"
|
|
936
936
|
xr_dataset["windspeed_cross"].attrs["long_name"] = "Wind Speed inverted from model %s (%s)" % (
|
|
937
937
|
model_cross, crosspol)
|
|
@@ -34,7 +34,7 @@ def check_incidence_range(incidence, models, **kwargs):
|
|
|
34
34
|
f"GMF {model_name} inc_range will be changed by kwargs to {kwargs['inc_range']}")
|
|
35
35
|
lut_range = kwargs['inc_range']
|
|
36
36
|
|
|
37
|
-
inc_range = [incidence.
|
|
37
|
+
inc_range = [incidence.min(), incidence.max()]
|
|
38
38
|
if (inc_range[0] >= lut_range[0] and inc_range[1] <= lut_range[1]):
|
|
39
39
|
rets.append(True)
|
|
40
40
|
else:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: grdwindinversion
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7
|
|
4
4
|
Summary: Package to perform Wind inversion from GRD Level-1 SAR images
|
|
5
5
|
License: MIT
|
|
6
6
|
Classifier: Development Status :: 2 - Pre-Alpha
|
|
@@ -27,6 +27,9 @@ Requires-Dist: numpy
|
|
|
27
27
|
Requires-Dist: scipy
|
|
28
28
|
Requires-Dist: fsspec
|
|
29
29
|
Requires-Dist: aiohttp
|
|
30
|
+
Requires-Dist: xarray-safe-s1
|
|
31
|
+
Requires-Dist: xradarsat2
|
|
32
|
+
Requires-Dist: xarray-safe-rcm
|
|
30
33
|
|
|
31
34
|
|
|
32
35
|
# grdwindinversion
|
|
@@ -20,10 +20,9 @@ requirements:
|
|
|
20
20
|
- python >=3.9,<3.11
|
|
21
21
|
- xsar
|
|
22
22
|
- xsarsea
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
- "numpy<=1.26"
|
|
23
|
+
- xarray
|
|
24
|
+
- rioxarray
|
|
25
|
+
- numpy
|
|
27
26
|
- pyyaml
|
|
28
27
|
- scipy
|
|
29
28
|
- fsspec
|
|
@@ -34,4 +33,4 @@ requirements:
|
|
|
34
33
|
|
|
35
34
|
about:
|
|
36
35
|
home: https://github.com/umr-lops/grdwindinversion
|
|
37
|
-
summary: 'python library to compute wind speed from GRD SAR images'
|
|
36
|
+
summary: 'python library to compute wind speed from GRD SAR images'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/docs/examples/wind-inversion-from-grd.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/grdwindinversion/.github/ISSUE_TEMPLATE.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/grdwindinversion.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{grdwindinversion-0.2.5 → grdwindinversion-0.2.7}/grdwindinversion.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|