You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sdap.apache.org by sk...@apache.org on 2022/10/24 21:49:12 UTC
[incubator-sdap-nexus] branch feature/SDAP-407 created (now 94451e7)
This is an automated email from the ASF dual-hosted git repository.
skperez pushed a change to branch feature/SDAP-407
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexus.git
at 94451e7 Updated changelog
This branch includes the following new commits:
new d05e278 Store depth in database along with results
new 7cad461 Fixed NetCDF converter so depth is present
new 94451e7 Updated changelog
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[incubator-sdap-nexus] 01/03: Store depth in database along with results
Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
skperez pushed a commit to branch feature/SDAP-407
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexus.git
commit d05e2780d08bdad72bcef4fb71224b07d1d818ff
Author: skorper <st...@gmail.com>
AuthorDate: Mon Oct 24 14:44:32 2022 -0700
Store depth in database along with results
---
analysis/webservice/algorithms/doms/DomsInitialization.py | 1 +
analysis/webservice/algorithms/doms/ResultsStorage.py | 13 +++++++------
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/analysis/webservice/algorithms/doms/DomsInitialization.py b/analysis/webservice/algorithms/doms/DomsInitialization.py
index d1ed5a5..591c5f6 100644
--- a/analysis/webservice/algorithms/doms/DomsInitialization.py
+++ b/analysis/webservice/algorithms/doms/DomsInitialization.py
@@ -164,6 +164,7 @@ class DomsInitializer:
platform text,
device text,
measurement_values map<text, decimal>,
+ depth decimal,
PRIMARY KEY (execution_id, is_primary, id)
);
"""
diff --git a/analysis/webservice/algorithms/doms/ResultsStorage.py b/analysis/webservice/algorithms/doms/ResultsStorage.py
index a228737..f0a18eb 100644
--- a/analysis/webservice/algorithms/doms/ResultsStorage.py
+++ b/analysis/webservice/algorithms/doms/ResultsStorage.py
@@ -156,9 +156,9 @@ class ResultsStorage(AbstractResultsContainer):
cql = """
INSERT INTO doms_data
- (id, execution_id, value_id, primary_value_id, x, y, source_dataset, measurement_time, platform, device, measurement_values, is_primary)
+ (id, execution_id, value_id, primary_value_id, x, y, source_dataset, measurement_time, platform, device, measurement_values, is_primary, depth)
VALUES
- (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+ (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
"""
insertStatement = self._session.prepare(cql)
batch = BatchStatement()
@@ -189,9 +189,9 @@ class ResultsStorage(AbstractResultsContainer):
result["platform"] if "platform" in result else None,
result["device"] if "device" in result else None,
dataMap,
- 1 if primaryId is None else 0
- )
- )
+ 1 if primaryId is None else 0,
+ result["depth"]
+ ))
n = 0
if "matches" in result:
@@ -283,7 +283,8 @@ class ResultsRetrieval(AbstractResultsContainer):
"source": row.source_dataset,
"device": row.device,
"platform": row.platform,
- "time": row.measurement_time.replace(tzinfo=UTC)
+ "time": row.measurement_time.replace(tzinfo=UTC),
+ "depth": row.depth
}
for key in row.measurement_values:
value = float(row.measurement_values[key])
[incubator-sdap-nexus] 02/03: Fixed NetCDF converter so depth is present
Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
skperez pushed a commit to branch feature/SDAP-407
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexus.git
commit 7cad4612619dfc1d458632a08eb665c95168b812
Author: skorper <st...@gmail.com>
AuthorDate: Mon Oct 24 14:48:15 2022 -0700
Fixed NetCDF converter so depth is present
---
analysis/webservice/algorithms/doms/BaseDomsHandler.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/analysis/webservice/algorithms/doms/BaseDomsHandler.py b/analysis/webservice/algorithms/doms/BaseDomsHandler.py
index 2bcb728..904732b 100644
--- a/analysis/webservice/algorithms/doms/BaseDomsHandler.py
+++ b/analysis/webservice/algorithms/doms/BaseDomsHandler.py
@@ -455,7 +455,7 @@ class DomsNetCDFValueWriter:
timeVar[:] = self.time
# Add depth variable, if present
- if self.depth:
+ if self.depth and any(self.depth):
depthVar = self.group.createVariable('depth', 'f4', ('dim',), fill_value=-32767.0)
self.__enrichDepth(depthVar, self.__calcMin(self.depth), max(self.depth))
depthVar[:] = self.depth
[incubator-sdap-nexus] 03/03: Updated changelog
Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
skperez pushed a commit to branch feature/SDAP-407
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexus.git
commit 94451e7365d91a32edbebb72a52a9ad009c9eced
Author: skorper <st...@gmail.com>
AuthorDate: Mon Oct 24 14:48:58 2022 -0700
Updated changelog
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f8306cd..0b7655a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- SDAP-405: Added SPURS AWS insitu api to matchup and new platform values to OpenAPI matchup spec
- RabbitMQ monitor script used in Docker quickstart guide
- Added new option for NCAR so either NCAR or JPL Insitu API can be specified
+- SDAP-407: Added depth to `/domsresults` endpoint
### Changed
- SDAP-390: Changed `/doms` to `/cdms` and `doms_reader.py` to `cdms_reader.py`
- domslist endpoint points to AWS insitu instead of doms insitu