From 402d47410477df8d0be06d642084d330c2723743 Mon Sep 17 00:00:00 2001 From: Simon Liu Date: Wed, 14 Feb 2024 09:33:32 -0800 Subject: [PATCH 1/5] update ummt sync github action --- .github/workflows/umm_t_sync.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/umm_t_sync.yml b/.github/workflows/umm_t_sync.yml index 56b5c5d3..ad7631e1 100644 --- a/.github/workflows/umm_t_sync.yml +++ b/.github/workflows/umm_t_sync.yml @@ -17,7 +17,6 @@ jobs: name: Build, Test, Deploy # The type of runner that the job will run on runs-on: ubuntu-latest - steps: # Checkout - name: Checkout project to build and deploy @@ -32,6 +31,7 @@ jobs: - name: Run cmr_association_diff command id: cmr_association_diff + run: | update_git_message="Adding collections" @@ -51,9 +51,13 @@ jobs: cat ${{ github.workspace }}/uat_success.txt >> ${{ github.workspace }}/cmr/uat_associations.txt fi - echo "::set-output name=ops_collection::$OPS_COLLECTION" - echo "::set-output name=uat_collection::$UAT_COLLECTION" - echo "::set-output name=update_git_message::$update_git_message" + echo "ops_collection=$OPS_COLLECTION" >> "$GITHUB_OUTPUT" + echo "uat_collection=$UAT_COLLECTION" >> "$GITHUB_OUTPUT" + echo "update_git_message=$update_git_message" >> "$GITHUB_OUTPUT" + + #echo "::set-output name=ops_collection::$OPS_COLLECTION" + #echo "::set-output name=uat_collection::$UAT_COLLECTION" + #echo "::set-output name=update_git_message::$update_git_message" - name: Push Develop env: @@ -61,7 +65,7 @@ jobs: UAT_COLLECTION: ${{ steps.cmr_association_diff.outputs.uat_collection }} UPDATE_GIT_MESSAGE: ${{ steps.cmr_association_diff.outputs.update_git_message }} run: | - if [[ -z "${{ env.UAT_COLLECTIONS }}" && -z "${{ env.OPS_COLLECTIONS }}" ]]; then + if [[ -z "${{ env.UAT_COLLECTION }}" && -z "${{ env.OPS_COLLECTION }}" ]]; then echo "No collections were different." else git config --global user.name 'hitide-ui bot' From ec4bbf231ae7db6d1a6c160fde7d3e015c84520e Mon Sep 17 00:00:00 2001 From: Simon Liu Date: Wed, 14 Feb 2024 10:15:04 -0800 Subject: [PATCH 2/5] update so we run cron at 1 am pst --- .github/workflows/umm_t_sync.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/umm_t_sync.yml b/.github/workflows/umm_t_sync.yml index ad7631e1..c69f8671 100644 --- a/.github/workflows/umm_t_sync.yml +++ b/.github/workflows/umm_t_sync.yml @@ -4,7 +4,7 @@ name: Hourly Build Sync CMR Association Text Files # Controls when the workflow will run on: schedule: - - cron: '0 * * * *' + - cron: '0 1 * * *' push: branches: - develop From f686e87396682f6a3b5800b5442e44cb7a3ea609 Mon Sep 17 00:00:00 2001 From: Simon Liu Date: Wed, 14 Feb 2024 10:15:22 -0800 Subject: [PATCH 3/5] update again --- .github/workflows/umm_t_sync.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/umm_t_sync.yml b/.github/workflows/umm_t_sync.yml index c69f8671..625f65bc 100644 --- a/.github/workflows/umm_t_sync.yml +++ b/.github/workflows/umm_t_sync.yml @@ -4,7 +4,7 @@ name: Hourly Build Sync CMR Association Text Files # Controls when the workflow will run on: schedule: - - cron: '0 1 * * *' + - cron: '0 9 * * *' push: branches: - develop From 74d5766cf7c972dc33d176dc0bffb79b26e680f6 Mon Sep 17 00:00:00 2001 From: Simon Liu Date: Tue, 20 Feb 2024 13:48:30 -0800 Subject: [PATCH 4/5] add in global grid from hitide configurations to fix swot 2.0 alignment --- src/hitideConfig.js | 4 ++-- src/jpl/dijit/LayerControl.js | 30 +++++++++++++++++++++++++----- src/jpl/dijit/LegendsAndOpacity.js | 5 ++++- 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/hitideConfig.js b/src/hitideConfig.js index befd159a..43686899 100644 --- a/src/hitideConfig.js +++ b/src/hitideConfig.js @@ -1,7 +1,7 @@ var hitideProfileOrigin = "https://hitide.profile.podaac.uat.earthdatacloud.nasa.gov/hitide/api"; window.hitideConfig = { - paletteService: "https://hitide.podaac.uat.earthdatacloud.nasa.gov/palettes", + paletteService: "https://hitide.podaac.earthdatacloud.nasa.gov/palettes", cmrDatasetSearchService: hitideProfileOrigin + "/cmr/search/collections.json?tool_name=HiTIDE", cmrGranuleSearchService: hitideProfileOrigin + "/cmr/search/granules.umm_json", @@ -25,4 +25,4 @@ window.hitideConfig = { maxGranulesPerDownload: 999999999, googleTagManagerId: "GTM-M5D83V6", earthDataAppClientId: "dxpH2WeN_f8IpNLgHwplsg" -}; \ No newline at end of file +}; diff --git a/src/jpl/dijit/LayerControl.js b/src/jpl/dijit/LayerControl.js index ba592c32..bef1c596 100644 --- a/src/jpl/dijit/LayerControl.js +++ b/src/jpl/dijit/LayerControl.js @@ -23,10 +23,11 @@ define([ "dijit/form/HorizontalRule", "dijit/form/HorizontalRuleLabels", "jpl/dijit/ui/AlertDialog", - "jpl/config/Config" + "jpl/config/Config", + "esri/geometry/Extent" ], function(declare, lang, on, domConstruct, domClass, domAttr, domStyle, topic, touch, xhr, array, _WidgetBase, _TemplatedMixin, template, css, Layers, LayerEvent, MapEvent, MapUtil, AnimationUtil, - HorizontalSlider, HorizontalRule, HorizontalRuleLabels, AlertDialog, Config) { + HorizontalSlider, HorizontalRule, HorizontalRuleLabels, AlertDialog, Config, Extent) { return declare([_WidgetBase, _TemplatedMixin], { templateString: template, widgetsInTemplate: false, @@ -256,14 +257,33 @@ define([ var granuleName = obj.granuleObj["Granule-Name"]; var variableName = this.variableId; var imageFilename = calculateImageFilename(granuleName, variableName); - - var relatedUrls = obj.granuleObj.umm.RelatedUrls; var objectURL for(var i=0; i < relatedUrls.length; i++){ objectURL = relatedUrls[i]['URL']; if(objectURL.includes(imageFilename)){ - return MapUtil.prototype.createMapImage(objectURL, this.translateExtent(obj.granuleObj["Granule-Extent"])); + var currentExtent = this.translateExtent(obj.granuleObj["Granule-Extent"]) + + // Calculate the new extent properties based on the offset + var newExtent = new Extent({ + xmin: currentExtent.xmin , + ymin: currentExtent.ymin , + xmax: currentExtent.xmax , + ymax: currentExtent.ymax , + spatialReference: currentExtent.spatialReference + }); + + if(obj['global_grid'] === true){ + newExtent = new Extent({ + xmin: -180 , + ymin: -90 , + xmax: 180 , + ymax: 90 , + spatialReference: currentExtent.spatialReference + }); + } + + return MapUtil.prototype.createMapImage(objectURL, newExtent); } } } diff --git a/src/jpl/dijit/LegendsAndOpacity.js b/src/jpl/dijit/LegendsAndOpacity.js index 704386e9..d3c05cf0 100644 --- a/src/jpl/dijit/LegendsAndOpacity.js +++ b/src/jpl/dijit/LegendsAndOpacity.js @@ -93,7 +93,6 @@ define([ if (this.datasets[message.datasetId]) { this.removeDataset(message); } - var laoDataset = new LegendsAndOpacityDataset({ _id: Math.random(), datasetId: message.datasetId, @@ -159,6 +158,9 @@ define([ this.open = false; }, handleVariablesFetched: function(message) { + if('global_grid' in message){ + this.datasets[message.datasetId]['global_grid'] = message['global_grid']; + } if('multi_lon_lat' in message){ var new_variables = []; for(var i = 0; i < message.multi_groups.length; i++){ @@ -193,6 +195,7 @@ define([ }, handleAddGranulePreview: function(message) { var laoDataset = this.datasets[message.granuleObj["Granule-DatasetId"]]; + message['global_grid'] = laoDataset['global_grid']; if (laoDataset) { laoDataset.addGranulePreview(message); } From 65e70ba3648b770da66a7d956be42bfea50c9e74 Mon Sep 17 00:00:00 2001 From: Simon Liu Date: Tue, 20 Feb 2024 14:19:31 -0800 Subject: [PATCH 5/5] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1bb5b85..6c76ab50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added +- Added global_grid configuration check to make a global extent for images. ### Changed ### Removed ### Fixed