Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Commit

Permalink
Fix issue ingesting data sets from griddap ERDDAP with periods of sli…
Browse files Browse the repository at this point in the history
…ghtly longer than a month.
  • Loading branch information
noaaroland committed Apr 22, 2022
1 parent 40225fa commit 56f61c7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
}
}

version "9.7.4"
version "9.7.5"
group "las"

apply plugin:"eclipse"
Expand Down
12 changes: 8 additions & 4 deletions grails-app/services/pmel/sdig/las/IngestService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -923,13 +923,15 @@ class IngestService {
inst_dataset.setHash(getDigest(inst_title))
List<String> inst_url_list = collected_datasets.get(inst_title)
log.info("Adding data sets for " + inst_title)
inst_url_list.each { String ds_url ->
int size_of_list = inst_url_list.size()
for (int iterIDX = 0; iterIDX < size_of_list; iterIDX++) {
String ds_url = inst_url_list.get(iterIDX)
Dataset end_point = datasetFromGriddapInfo(ds_url, use_source_url)
if (end_point != null)
inst_dataset.addToDatasets(end_point)
}
if ( inst_dataset.getDatasets() && inst_dataset.getDatasets().size() > 0) {
if ( parent instanceof Site) {
if (inst_dataset.getDatasets() && inst_dataset.getDatasets().size() > 0) {
if (parent instanceof Site) {
Site site = parent;
Site.withTransaction {
site.addToDatasets(inst_dataset)
Expand All @@ -939,7 +941,7 @@ class IngestService {
Dataset dp = parent
Dataset.withTransaction {
dp.addToDatasets(inst_dataset)
dp.save(flush:true)
dp.save(flush: true)
}
}
}
Expand Down Expand Up @@ -1053,6 +1055,8 @@ class IngestService {
timeAxis.setUnits("year");
// Period(int years, int months, int weeks, int days, int hours, int minutes, int seconds, int millis)
p0 = new Period(1, 0, 0, 0, 0, 0, 0, 0)
} else {
p0 = new Period(0, 0, 0, days, 0, 0, 0, 0)
}

} else if (timeParts[0].contains("h")) {
Expand Down
2 changes: 1 addition & 1 deletion gwtui/pmel/sdig/las/client/main/Layout.ui.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

</m:MaterialNavSection>
<m:MaterialNavBrand marginLeft="8" ui:field="brand" text="LAS title will go here." fontSize="1.3em"/>
<m:MaterialLink text="LAS v9.7.4" float="RIGHT" marginRight="16" href="https://github.com/NOAA-PMEL/las9/wiki" target="_blank"></m:MaterialLink>
<m:MaterialLink text="LAS v9.7.5" float="RIGHT" marginRight="16" href="https://github.com/NOAA-PMEL/las9/wiki" target="_blank"></m:MaterialLink>
<!-- <m:MaterialPanel addStyleNames="valign-vertical">-->
<!-- <m:MaterialLink ui:field="btnSearch" iconType="SEARCH" iconColor="WHITE" float="RIGHT"/>-->
<!--&lt;!&ndash; <m:MaterialButton marginTop="14" ui:field="openAdvancedSearch" text="Advanced Search" float="RIGHT" marginRight="16"></m:MaterialButton>&ndash;&gt;-->
Expand Down

0 comments on commit 56f61c7

Please sign in to comment.