From 8911f9c54c5457d8ca4223a070a5f68fe561d099 Mon Sep 17 00:00:00 2001 From: sxu123 Date: Wed, 15 Mar 2023 16:15:01 -0400 Subject: [PATCH] CMR-8935: Fixed the 500 error when updating dif10 collection with missing platform shortname. (#1870) Co-authored-by: siwei xu --- .../Dif10-Coll-Missing-Plat-ShortName.xml | 160 ++++++++++++++++++ .../ingest/validation/platform_validation.clj | 2 +- .../ingest/collection_update_test.clj | 18 ++ 3 files changed, 179 insertions(+), 1 deletion(-) create mode 100644 ingest-app/resources/CMR-8935/Dif10-Coll-Missing-Plat-ShortName.xml diff --git a/ingest-app/resources/CMR-8935/Dif10-Coll-Missing-Plat-ShortName.xml b/ingest-app/resources/CMR-8935/Dif10-Coll-Missing-Plat-ShortName.xml new file mode 100644 index 0000000000..3174f32ef2 --- /dev/null +++ b/ingest-app/resources/CMR-8935/Dif10-Coll-Missing-Plat-ShortName.xml @@ -0,0 +1,160 @@ + + + + USAP-1543530 + 1 + + Collaborative Research: Stability and Dynamics of Antarctic Marine Outlet Glaciers + + INVESTIGATOR + + Cornelis + van der Veen +
+ University of Kansas Center for Research Inc +
+ cjvdv@ku.edu +
+
+ + INVESTIGATOR + + Leigh + University of Kansas + stearns@ku.edu + + + + INVESTIGATOR + + John + Paden + paden@ku.edu + + + + EARTH SCIENCE + CRYOSPHERE + GLACIERS/ICE SHEETS + + GEOSCIENTIFIC INFORMATION + CLIMATOLOGY/METEOROLOGY/ATMOSPHERE + OCEANS + BIOTA + numerical glacier modeling + Antarctica + GLACIERS/ICE SHEETS + ice sheet dynamics + basal sliding + iceberg calving + + Models/Analyses + + + + Not provided + + + + + 2016-06-01 + 2019-05-31 + + + COMPLETE + + Horizontal + CARTESIAN + + CARTESIAN + + -90 + -60 + -180 + 180 + + + + + CONTINENT + ANTARCTICA + + + NSF/OPP + Office of Polar Programs, National Science Foundation + + English + + ARCHIVER + DISTRIBUTOR + + USAP-DC + United States Polar Program - Data Center + + https://www.usap-dc.org/ + + DATA CENTER CONTACT + + Data + Manager +
+ Lamont-Doherty Earth Observatory + 61 Route 9W + Palisades + NY + 10964 + USA +
+ info@usap-dc.org +
+
+
+ + Van der Veen/1543530 + + + +The objective of this research is to gain better understanding of the West Antarctic ice flow in the transition region from grounded ice to floating ice shelves and investigate the conditions that can initiate and sustain major retreat of these glaciers. Several major Antarctic outlet glaciers and ice streams will be investigated using a suite of observational techniques and modeling tools. Glaciers include Thwaites Glacier, which has become a focal point in the discussion of West Antarctic retreat, Whillans Ice Stream as an example of the archetype ice stream, and Byrd Glacier, a major outlet glacier draining East Antarctica through the Transantarctic Mountains into the Ross Ice Shelf. This study will investigate whether the ongoing changes in these glaciers will lead to long-term mass loss (the onset of ice sheet collapse), or whether these glaciers will quickly stabilize with a new geometry. + + + +To adequately incorporate the dynamic behavior of outlet glaciers and ice streams requires inclusion of the relevant physical processes, and the development of regional models that employ a numerical grid with a horizontal grid spacing sufficiently refined to capture smaller-scale bed topographic features that may control the flow of these glaciers. This award revisits the issue of stability of marine-terminating glaciers whose grounding line is located on a retrograded bed slope. In particular, an attempt will be made to resolve the question whether observed rapid changes are the result of perturbations at the terminus or grounding line, or whether these changes reflect ice-dynamical forcing over the grounded reaches. High-resolution satellite imagery will be used to investigate ice-flow perturbations on smaller spatial scales than has been done before, to evaluate the importance of localized sites of high basal resistance on grounding-line stability. This collaborative project involves a range of modeling strategies including force-budget analysis, flow-band modeling, Full Stokes modeling for local studies, and using the Ice Sheet System Model developed at JPL for regional modeling. Broader Impacts include training two graduate students in computer simulations and ice sheet modeling algorithms. The work will also expand on a web-based interactive flowline model, so that it includes more realistic grounding line dynamics. + + + + VIEW RELATED INFORMATION + + http://www.nsf.gov/awardsearch/showAward.do?AwardNumber=1543530 + NSF Award Abstract + + + + VIEW RELATED INFORMATION + + http://www.nsf.gov/awardsearch/showAward.do?AwardNumber=1543533 + NSF Award Abstract + + + AMD + + + AMD/US + + + CEOS + + + USA/NSF + + GCMD + CEOS IDN DIF + VERSION 10.2 + + 2022-10-19 + 2022-10-19 + 2022-10-19 + 2022-10-19 + + NA + SCIENCE_QUALITY +
\ No newline at end of file diff --git a/ingest-app/src/cmr/ingest/validation/platform_validation.clj b/ingest-app/src/cmr/ingest/validation/platform_validation.clj index a97e6901b2..ac2bfa3963 100644 --- a/ingest-app/src/cmr/ingest/validation/platform_validation.clj +++ b/ingest-app/src/cmr/ingest/validation/platform_validation.clj @@ -14,7 +14,7 @@ (let [platform-alias-map (get (humanizer-alias-cache/get-humanizer-alias-map context) "platform") current-platforms (map :ShortName (:Platforms concept)) previous-platforms (map :ShortName (:Platforms prev-concept)) - platform-aliases (mapcat #(get platform-alias-map %) (map str/upper-case current-platforms)) + platform-aliases (mapcat #(get platform-alias-map %) (map util/safe-uppercase current-platforms)) ;; Only the deleted ones that are not part of the platform-aliases need to be validated. deleted-platform-names (s/difference (set (map util/safe-lowercase previous-platforms)) diff --git a/system-int-test/test/cmr/system_int_test/ingest/collection_update_test.clj b/system-int-test/test/cmr/system_int_test/ingest/collection_update_test.clj index 2c47c96c8e..d437820634 100644 --- a/system-int-test/test/cmr/system_int_test/ingest/collection_update_test.clj +++ b/system-int-test/test/cmr/system_int_test/ingest/collection_update_test.clj @@ -747,6 +747,24 @@ coll2 "2000-05-01T12:00:00Z" "2000-07-01T12:00:00Z" ["Found granules later than collection end date [2000-07-01T12:00:00.000Z]. Found 1 granules."])))) +(deftest collection-update-platform-missing-shortname-test + ;; CMR-8935 Verify after a collection ingested, update it with a missing platform + ;; shortname will not throw 500 error. + (let [dif10-coll (d/ingest-concept-with-metadata-file + "CMR-8935/Dif10-Coll-Missing-Plat-ShortName.xml" + {:provider-id "PROV1" + :concept-type :collection + :format-key :dif10 + :native-id "dif10-8935"}) + dif10-coll-update (d/ingest-concept-with-metadata-file + "CMR-8935/Dif10-Coll-Missing-Plat-ShortName.xml" + {:provider-id "PROV1" + :concept-type :collection + :format-key :dif10 + :native-id "dif10-8935"})] + (is (= 201 (:status dif10-coll))) + (is (= 200 (:status dif10-coll-update))))) + (deftest collection-update-platform-test (let [;; Platform Terra is the humanized alias of AM-1 coll (d/ingest-umm-spec-collection "PROV1" (data-umm-c/collection