├── .gitignore ├── CHANGE_LOG.md ├── CITATION.cff ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── LICENSE.md ├── README.md ├── data ├── City_of_Boulder_City_Limits.zip ├── landcover.geojson └── tower_data.csv ├── guides ├── appeears_ecostress.md └── earthdata_search_ecostress.md ├── img ├── AppEEARS_Explore.png ├── AppEEARS_downloadSample.png ├── AppEEARS_point_area.png ├── AppEEARS_signIn.png ├── AppEEARS_viewSample.png ├── cloud_access_documentation.png ├── eds_cloud_access_info_ecostress.png ├── eds_cloud_product_search_ECOSTRESS.png ├── eds_collection_search_ECOSTRESS.png ├── eds_ecov002_l2t_lste_http_download.png ├── eds_ecov002_l2t_lste_multi_granule_download.png ├── eds_ecov002_l2t_lste_multi_granule_download_https_links_src.png ├── eds_ecov002_l2t_lste_multi_granule_download_s3_links_src.png ├── eds_ecov002_l2t_lste_multi_granule_selection.png └── eds_ecov002_l2t_lste_s3_access.png └── python ├── how-tos ├── how_to_direct_access_http_ecostress_cog.ipynb └── how_to_direct_access_s3_ecostress_cog.ipynb ├── scripts ├── ecostress_swath2grid │ ├── ECOSTRESS_swath2grid.py │ └── README.md └── extract_geolocation_flag │ ├── ECOSTRESS_geolocation.py │ └── README.md └── tutorials ├── ECOSTRESS_Tutorial.ipynb └── Work_with_ECOSTRESS_L2T_LSTE_data.ipynb /.gitignore: -------------------------------------------------------------------------------- 1 | *.h5 2 | *.tif 3 | _MACOSX* 4 | __MACOSX/ 5 | tutorial_aj_notes/ 6 | tutorial_aj_notes.zip 7 | .ipynb_checkpoints/ 8 | img/ -------------------------------------------------------------------------------- /CHANGE_LOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to this project will be documented in this file. 4 | The format is based on [Keep a Changelog](http://keepachangelog.com/) 5 | and this project adheres to [Semantic Versioning](http://semver.org/). 6 | _________________________________________________________________________ 7 | ## 2025-03-28 8 | 9 | > ### Added 10 | > 11 | > - How to direct access notebooks 12 | > - Working with ECOSTRESS L2T LSTE Data Tutorial 13 | 14 | ## 2023-09-27 15 | 16 | > ### Added 17 | > 18 | > - Added the extract_geolocation script 19 | 20 | ## 2023-09-27 21 | 22 | > ### Added 23 | > 24 | > - Existing ECOSTRESS resources 25 | > - Updated README -------------------------------------------------------------------------------- /CITATION.cff: -------------------------------------------------------------------------------- 1 | cff-version: 1.2.0 2 | title: ECOSTRESS Data Resources 3 | message: >- 4 | If you use this collection of resources in your research 5 | we would appreciate an appropriate citation. 6 | type: software 7 | authors: 8 | - given-names: Mahsa 9 | family-names: Jami 10 | affiliation: >- 11 | KBR, Inc., Contractor to the U.S. Geological Survey, 12 | Earth Resources Observation and Science Center, 13 | National Aeronautics and Space Administration Land 14 | Processes Distributed Active Archive Center 15 | orcid: 'https://orcid.org/0000-0002-3594-3004' 16 | - given-names: Erik A 17 | family-names: Bolch 18 | affiliation: >- 19 | KBR, Inc., Contractor to the U.S. Geological Survey, 20 | Earth Resources Observation and Science Center, 21 | National Aeronautics and Space Administration Land 22 | Processes Distributed Active Archive Center 23 | orcid: 'https://orcid.org/0000-0003-2470-4048' 24 | - given-names: Cole K 25 | family-names: Krehbiel 26 | affiliation: >- 27 | National Aeronautics and Space Administration Land 28 | Processes Distributed Active Archive Center, 29 | U.S. Geological Survey, Earth Resources 30 | Observation and Science Center 31 | orcid: 'https://orcid.org/0000-0003-2645-3449' 32 | - given-names: Aaron M 33 | family-names: Friesz 34 | affiliation: >- 35 | KBR, Inc., Contractor to the U.S. Geological Survey, 36 | Earth Resources Observation and Science Center, 37 | National Aeronautics and Space Administration Land 38 | Processes Distributed Active Archive Center 39 | orcid: 'https://orcid.org/0000-0003-4096-3824' 40 | repository-code: 'https://github.com/nasa/EMIT-Data-Resources' 41 | abstract: >- 42 | This repository contains guides and Jupyter Notebooks to 43 | help users access and work with data from the Ecosystem 44 | Spaceborne Thermal Radiometer Experiment on Space Station 45 | (ECOSTRESS) mission. 46 | license: Apache-2.0 47 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | ## 1. Our Commitment 4 | 5 | We are dedicated to fostering a respectful environment for everyone contributing to this project. We expect all participants to treat each other with respect, professionalism, and kindness. 6 | 7 | ## 2. Expected Behavior 8 | 9 | - Be respectful and considerate of others. 10 | - Engage in constructive discussions and offer helpful feedback. 11 | - Gracefully accept constructive criticism. 12 | 13 | ## 3. Unacceptable Behavior 14 | 15 | The following behaviors will not be tolerated: 16 | 17 | - Harassment, discrimination, or intimidation of any kind. 18 | - Offensive, abusive, or derogatory language and actions. 19 | - Personal attacks or insults. 20 | - Trolling or disruptive conduct. 21 | - Sharing inappropriate content. 22 | 23 | ## 4. Reporting Violations 24 | If you experience or witness any behavior that violates this Code of Conduct, please report it by contacting the project maintainers. All reports will be reviewed confidentially. 25 | 26 | ## 5. Enforcement 27 | Violations of this Code of Conduct may result in actions such as warnings, temporary bans, or permanent exclusion from participation at the discretion of the maintainers. 28 | 29 | ## Contact Info 30 | Email: 31 | Voice: +1-866-573-3222 32 | Organization: Land Processes Distributed Active Archive Center (LP DAAC)¹ 33 | Website: 34 | Date last modified: 01-22-2025 35 | 36 | ¹Work performed under USGS contract G15PD00467 for NASA contract NNG14HH33I. 37 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Our GitHub 2 | 3 | This page is your one-stop shop for uncovering how to contribute to our Github! 4 | 5 | ## We Want Your Help! 6 | 7 | No, really, we do! Please come and participate in our community and lets do science together! Depending on your level of interaction with the Land Processes Data Active Archive Center (LP DAAC) and the LP DAAC GitHub, visitors to the site can be described as: 8 | - A **community member**: anyone in the open science community who visits a LP DAAC site, utilizes LP DAAC online tools, or attends a LP DAAC event. 9 | - A **participant**: anyone who posts a comment or poses a question in the *GitHub Discussion Space*, reports a site bug or requests a new resource in *GitHub Issues*, or attends a LP DAAC event and utilizes any virtual chat features during that event. 10 | - A **contributor**: anyone who forks this GitHub repository and submits pull requests to make additions or changes to the posted content. 11 | 12 | Everyone reading this page is a community member, and we hope everyone will post comments and join discussions as a participant. Contributors are welcome, particularly to help find and point to other open science resources. 13 | 14 | ## Ways to Contribute to the GitHub 15 | There are two main ways to contribute to the LP DAAC GitHub. 16 | - **Suggest a change, addition, or deletion to what is already on the GitHub using [Issues](https://github.com/nasa/Transform-to-Open-Science/issues).** Issues can be about any LP DAAC plans, timelines, and content. 17 | - Before submitting a new [issue](https://github.com/nasa/LPDAAC-Data-Resources/issues), check to make sure [a similar issue isn't already open](https://github.com/nasa/LPDAAC-Data-Resources/issues). If one is, contribute to that issue thread with your feedback. 18 | - When submitting a bug report, please try to provide as much detail as possible, i.e. a screenshot or [gist](https://gist.github.com/) that demonstrates the problem, the technology you are using, and any relevant links. 19 | - Issues labeled :sparkles:[`help wanted`](https://github.com/nasa/LPDAAC-Data-Resources/labels/help%20wanted):sparkles: make it easy for you to find ways you can contribute today. 20 | - **Become a contributor!** [Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the repository and [make commits](https://docs.github.com/en/get-started/quickstart/contributing-to-projects#making-and-pushing-changes) to add resources and additional materials. Here are some ways you can contribute: 21 | - by reporting bugs 22 | - by suggesting new features 23 | - by translating content to a new language 24 | - by writing or editing documentation 25 | - by writing specifications 26 | - by writing code and documentation (**no pull request is too small**: fix typos, add code comments, clean up inconsistent whitespace) 27 | - by closing [issues](https://github.com/nasa/LPDAAC-Data-Resources/issues) 28 | 29 | In the spirit of open source software, everyone is encouraged to help improve this project! 30 | 31 | ## New to GitHub? Start here! 32 | You can [sign up for GitHub here](https://github.com/)! The NASA Transform to Open Science Team has made a short video demonstrating how to make an easy pull request [here](https://youtu.be/PHoScPeMWHI). 33 | 34 | For a more in-depth start, we suggest *[Getting Started with Git and GitHub: The Complete Beginner’s Guide](https://towardsdatascience.com/getting-started-with-git-and-github-6fcd0f2d4ac6)* and *[The Beginners Guide to Git and GitHub](https://www.freecodecamp.org/news/the-beginners-guide-to-git-github/)*. We've summarized some of the most important points below. 35 | 36 | ### Making a Change 37 | *This section is attributed to [NumFOCUS](https://github.com/numfocus/getting-started-with-open-source/blob/master/CONTRIBUTING.md) and [Adrienne Friend](https://github.com/adriennefriend/imposter-syndrome-disclaimer).* 38 | 39 | Once you've identified something you'd like to help with you're ready to make a change to the project repository! 40 | 41 | 1. First, describe what you're planning to do as a comment to the issue, (and this might mean making a new issue). 42 | 43 | [This blog](https://www.igvita.com/2011/12/19/dont-push-your-pull-requests/) is a nice explanation of why putting this work in up front is so useful to everyone involved. 44 | 45 | 2. Fork this repository to your profile. 46 | 47 | You can now do whatever you want with this copy of the project. You won't mess up anyone else's work so you're super safe. 48 | 49 | Make sure to [keep your fork up to date]( https://github.com/KirstieJane/STEMMRoleModels/wiki/Syncing-your-fork-to-the-original-repository-via-the-browser) with the master repository. 50 | 51 | 3. Make the changes you've discussed. 52 | 53 | Try to keep the changes focused rather than changing lots of things at once. If you feel tempted to branch out then please *literally* branch out: create separate branches for different updates to make the next step much easier! 54 | 55 | 4. Submit a pull request. 56 | 57 | A member of the executive team will review your changes, have a bit of discussion and hopefully merge them in! 58 | 59 | N.B. you don't have to be ready to merge to make a pull request! We encourage you to submit a pull request as early as you want to. They help us to keep track of progress and help you to get earlier feedback. 60 | 61 | ## Development Model 62 | 63 | For accepting new contributions, TOPS uses the [forking workflow](https://guides.github.com/activities/forking/). As the first step of your contribution, you'll want to fork this repository, make a local clone of it, add your contribution, and then create a pull request back to the LP DAAC repository. 64 | 65 | All documentation should be written using Markdown and Github Markdown-supported HTML. 66 | 67 | ## Attribution 68 | These contributing guidelines are adapted from the NASA Transform to Open Science github, available at https://github.com/nasa/Transform-to-Open-Science/blob/main/CONTRIBUTING.md. 69 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ECOSTRESS-Data-Resources 2 | 3 | Welcome! This repository provides guides, short how-tos, and tutorials to help users access and work with data from the Ecosystem Spaceborne Thermal Radiometer Experiment on Space Station ([ECOSTRESS](https://ecostress.jpl.nasa.gov/)) mission distributed by the Land Processes Distributed Active Archive Center ([LP DAAC](https://lpdaac.usgs.gov/)). In the interest of open science this repository has been made public but is still under active development. All jupyter notebooks and scripts should be functional, however, changes or additions may be made. Contributions from all parties are welcome. 4 | 5 | --- 6 | 7 | ## ECOSTRESS Background 8 | 9 | The ECOsystem Spaceborne Thermal Radiometer Experiment on Space Station ([ECOSTRESS](https://lpdaac.usgs.gov/data/get-started-data/collection-overview/#ECOSTRESS_anchor)) is aboard the International Space Station (ISS) and measures the temperature of plants to better understand how much water plants need and how they respond to stress. ECOSTRESS was launched to the ISS on June 29, 2018. It has a viewing swath width of around 384 km and views the surface of the Earth from 53.6° N latitude to 53.6° S latitude with variable revisit times, dependent on the orbit of the ISS. 10 | 11 | ECOSTRESS addresses three overarching science questions: How is the terrestrial biosphere responding to changes in water availability? How do changes in diurnal vegetation water stress impact the global carbon cycle? Can agricultural vulnerability be reduced through advanced monitoring of agricultural water consumptive use and improved drought estimation? ECOSTRESS uses a multispectral thermal infrared radiometer to measure the surface temperature. The radiometer obtains detailed images of the Earth’s surface at ~70 m spatial resolution that can provide information on the temperature of an individual farmer’s field. Learn more on the [ECOSTRESS website](https://ecostress.jpl.nasa.gov/). 12 | 13 | ECOSTRESS Data Products are distributed by the [LP DAAC](https://lpdaac.usgs.gov/). Learn more about ECOSTRESS data products from [ECOSTRESS Product Pages](https://lpdaac.usgs.gov/product_search/?query=ECOSTRESS&status=Operational&view=cards&sort=title&page=1&per_page=30) and search for and download ECOSTRESS data products using [NASA EarthData Search](https://search.earthdata.nasa.gov/search?q=ECOSTRESS) or programmatically using NASA's [Common Metadata Repository](https://cmr.earthdata.nasa.gov/search)(CMR). 14 | 15 | --- 16 | 17 | ## Prerequisites/Setup Instructions 18 | 19 | Instructions for setting up a compatible environment for working with ECOSTRESS data is linked below. 20 | - [`Python` set up instructions](https://github.com/nasa/LPDAAC-Data-Resources/tree/main/setup/setup_instructions_python.md) 21 | 22 | --- 23 | ## Getting Started 24 | 25 | Clone or download the [ECOSTRESS-Data-Resources repository](https://github.com/nasa/ECOSTRESS-Data-Resources). 26 | 27 | - [Download](https://github.com/nasa/ECOSTRESS-Data-Resources/archive/refs/heads/main.zip) 28 | - To clone the repository, type `git clone https://github.com/nasa/ECOSTRESS-Data-Resources.git` in the command line. 29 | 30 | --- 31 | ## Repository Contents 32 | 33 | Content in this repository includes Python tutorials, how-tos, scripts, defined modules that will be called from the Python resources, and setup instructions. The supporting files for use cases are stored in `Data` folder. 34 | > Resources stored in this repository are listed below: 35 | 36 | | Repository Contents | Type | Summary | 37 | |----|-----|----| 38 | | **[earthdata_search_ecostress.md](/guides/earthdata_search_ecostress.md)** | Markdown Guide | Demonstrates how to work with Earthdata Search to access ECOSTRESS data| 39 | | **[appeears_ecostress.md](/guides/appeears_ecostress.md)** | Markdown Guide | Demonstrates how to work with AppEEARS to access and transform ECOSTRESS data| 40 | | **[how_to_direct_access_http_ecostress_cog.ipynb](/python/how-tos/how_to_direct_access_http_ecostress_cog.ipynb)** | Jupyter Notebook | Demonstrates how to stream ECOSTRESS COG data from the Earthdata Cloud using HTTP links| 41 | | **[how_to_direct_access_s3_ecostress_cog.ipynb](/python/how-tos/how_to_direct_access_s3_ecostress_cog.ipynb)** | Jupyter Notebook | Demonstrates how to directly access ECOSTRESS COG data from the Earthdata Cloud using S3 links| 42 | | **[ECOSTRESS_Tutorial.ipynb](/python/tutorials/ECOSTRESS_Tutorial.ipynb)** | Jupyter Notebook | Demonstrates how to work with the ECOSTRESS Evapotranspiration PT-JPL Daily L3| 43 | | **[ECOSTRESS_swath2grid.py](/python/scripts/ecostress_swath2grid)** | Command line executable | Demonstrates how to convert ECOSTRESS swath data products into projected GeoTIFFs| 44 | | **[ECOSTRESS_geolocation.py](/python/scripts/extract_geolocation_flag)** | Command line executable | Demonstrates how to extract `GeolocationAccuracyQA` flag for ECOSTRESS version 2 data| 45 | 46 | --- 47 | 48 | ## Helpful Links 49 | 50 | + [ECOSTRESS Collection Overview](https://lpdaac.usgs.gov/data/get-started-data/collection-overview/missions/ecostress-overview/) 51 | + [NASA JPL ECOSTRESS Tutorials](https://ecostress.jpl.nasa.gov/tutorials) 52 | + [2023 ECOSTRESS Science and Applications Team Meeting Workshop Recording](https://ecostress.jpl.nasa.gov/downloads/science_team_meetings/2023/workshopvid.mp4) 53 | + [ECOSTRESS Website](https://ecostress.jpl.nasa.gov/) 54 | + [AppEEARS Website](https://appeears.earthdatacloud.nasa.gov/) 55 | + [LP DAAC Website](https://lpdaac.usgs.gov/) 56 | + [LP DAAC GitHub](https://github.com/nasa/LPDAAC-Data-Resources) 57 | 58 | --- 59 | 60 | ## Contact Info: 61 | 62 | Email: LPDAAC@usgs.gov 63 | Voice: +1-866-573-3222 64 | Organization: Land Processes Distributed Active Archive Center (LP DAAC)¹ 65 | Website: 66 | Date last modified: 04-15-2025 67 | 68 | ¹Work performed under USGS contract G15PD00467 for NASA contract NNG14HH33I. 69 | -------------------------------------------------------------------------------- /data/City_of_Boulder_City_Limits.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasa/ECOSTRESS-Data-Resources/d3d743e5cf7d70db5005306c529519de631264c3/data/City_of_Boulder_City_Limits.zip -------------------------------------------------------------------------------- /data/tower_data.csv: -------------------------------------------------------------------------------- 1 | Time,LE 2 | , 3 | 8/5/2018 9:30,18.0277515 4 | , 5 | 8/5/2018 10:00,68.49596979 6 | , 7 | 8/5/2018 10:30,89.05003071 8 | , 9 | 8/5/2018 11:00,154.5641991 10 | , 11 | 8/5/2018 11:30,118.6850899 12 | , 13 | 8/5/2018 12:00,107.0718696 14 | , 15 | 8/5/2018 12:30,189.5512486 16 | , 17 | 8/5/2018 13:00,129.9851118 18 | , 19 | 8/5/2018 13:30, 20 | , 21 | 8/5/2018 14:00,139.6517454 22 | , 23 | 8/5/2018 14:30,155.4161125 24 | , 25 | 8/5/2018 15:00,124.5119356 26 | , 27 | 8/5/2018 15:30,106.666146 28 | , 29 | 8/5/2018 16:00,176.3211116 30 | , 31 | 8/5/2018 16:30,203.3630579 32 | , 33 | 8/5/2018 17:00,166.7149037 34 | , 35 | 8/5/2018 17:30,124.2360275 36 | , 37 | 8/5/2018 18:00,96.23245004 38 | , 39 | 8/5/2018 18:30,133.1213652 40 | , 41 | 8/5/2018 19:00,44.66026575 42 | , 43 | 8/5/2018 19:30,11.61805179 44 | , 45 | 8/5/2018 20:00,44.20149188 46 | -------------------------------------------------------------------------------- /guides/appeears_ecostress.md: -------------------------------------------------------------------------------- 1 | 2 | # Application for Extracting and Exploring Analysis Ready Samples (AρρEEARS) 3 | 4 | 5 | The Application for Extracting and Exploring Analysis Ready Samples ([AppEEARS](https://appeears.earthdatacloud.nasa.gov/)) offers a simple and efficient way to access and transform geospatial data from a variety of federal data archives in an easy-to-use web application interface. AppEEARS enables users to subset geospatial data spatially, temporally, and by band/layer for point and area samples. AppEEARS returns not only the requested data, but also the associated quality values, and offers interactive visualizations with summary statistics in the web interface. This tutorial shows how to use AppEEARS to access ECOSTRESS version 2 data hosted in the cloud. 6 | 7 | ### Step 1. Sign in 8 | 9 | Sign in using your Earthdata login credentials. If you do not have an Earthdata account, Create an Earthdata Login account at https://urs.earthdata.nasa.gov. 10 | ![*Figure caption: AppEEARS Sign In*](../img/AppEEARS_signIn.png) 11 | 12 | ### Step 2. Extract the Sample 13 | 14 | Select the Point or Area sample using Extract dropdown. You will be directed to Extract Area or Point Sample page. 15 | 1. Enter your sample name. 16 | 2. Upload your **area of interest** or draw a polygon on the leaflet map for area sample. For point sample, provide the CSV file including the latitude and longitude coordinates. You can also use the map to manually select your locations or type them directly. 17 | 3. Select your **time period of interest**. 18 | 4. Add **datasets** you are interested in to your Selected Layers. You can choose from various [data collections available in AppEEARS](https://appeears.earthdatacloud.nasa.gov/products). You can click on the (i) icon for the dataset to see more details. 19 | In this example we are interested in the [ECOSTRESS LSTE](https://doi.org/10.5067/ECOSTRESS/ECO_L2_LSTE.002) which is managed by the LP DAAC and made available from the NASA Earthdata Cloud archive hosted in the AWS cloud. 20 | 21 | 5. For area sample, you can select your **output file format**. You also have an option to **reproject** all your layers to another coordinate reference system. 22 | 6. Now you can **submit**. 23 | 24 | ![*Figure caption: Extract area and point sample for ECOSTRESS data available in AWS cloud in AppEEARS*](../img/AppEEARS_point_area.png) 25 | 26 | Once your request is complete, you can **View** and **Download** your results from the Explore Requets page. 27 | 28 | ![*Figure caption: Refine search*](../img/AppEEARS_Explore.png) 29 | 30 | ### Step 3. Explore the outputs 31 | From the Explore Requests page, click the View icon in order to view and interact with your results. This will take you to the View Area Sample page. 32 | ![*Figure caption: View Sample Results*](../img/AppEEARS_viewSample.png) 33 | 34 | 35 | ### Step 4. Download the outputs 36 | 37 | Finally navigate to Download Sample page by clicking the Download icon on the Explore Requests page or from View Sample page to download your results. Besides your actual outputs, you will have access to supporting files including a text file with URLs to source data, a JSON file you can use to recreate the same sample, decoded quality information, and CSV file with the layer statistics. 38 | 39 | ![*Figure caption: Download Sample Results*](../img/AppEEARS_downloadSample.png) 40 | 41 | 42 | Check out AppEEARS [help documentation](https://appeears.earthdatacloud.nasa.gov/help) for more details. If you wish to access AppEEARS programatically check out [AppEEARS API documenation](https://appeears.earthdatacloud.nasa.gov/api/). 43 | -------------------------------------------------------------------------------- /guides/earthdata_search_ecostress.md: -------------------------------------------------------------------------------- 1 | # Earthdata Search 2 | 3 | This tutorial guides you through how to use [Earthdata Search](https://search.earthdata.nasa.gov/) for NASA Earth observations search and discovery, and how to connect the search output (e.g. download or access links) to a programmatic workflow (locally or from within the cloud). 4 | 5 | ### Step 1. Go to Earthdata Search and Login 6 | 7 | Go to Earthdata Search and use your Earthdata login credentials to log in. If you do not have an Earthdata account, please see the [Workshop Prerequisites](https://nasa-openscapes.github.io/2022-Fall-ECOSTRESS-Cloud-Workshop/prerequisites/) for guidance. 8 | 9 | ### Step 2. Search for dataset of interest 10 | 11 | Use the search box in the upper left to type key words. In this example we are interested in the [ECOSTRESS LSTE](https://search.earthdata.nasa.gov/search/granules?p=C2076090826-LPCLOUD&pg[0][v]=f&pg[0][gsk]=-start_date&q=ECOSTRESS&ff=Available%20from%20AWS%20Cloud&tl=1666964694.567!3!!&lat=20.601562500000004&long=-71.3671875) which is managed by the LP DAAC and made available from the NASA Earthdata Cloud archive hosted in AWS cloud. 12 | 13 | Type **ECOSTRESS** in the search bar, then click on the **"Available from AWS Cloud"** filter option on the left. 14 | 15 | ![*Figure caption: Search for ECOSTRESS data available in AWS cloud in Earthdata Search portal*](../img/eds_collection_search_ECOSTRESS.png) 16 | 17 | Let's refine our search further. Now, let's search for `ECOSTRESS ECO_L2T_LSTE` in the search box. A single Earthdata Search Collection is returned. 18 | 19 | Click on the (i) icon for the dataset to read more details, including the **dataset shortname** (helpful for programmatic workflows) just below the dataset name; here `ECO_L2T_LSTE`. 20 | 21 | ![*Figure caption: Refine search*](../img/eds_cloud_product_search_ECOSTRESS.png) 22 | 23 | ### Step 3. Explore the dataset details, including Cloud Access information 24 | 25 | Once we click the (i), scrolling down the info page for the dataset we will see Cloud Access information, such as: 26 | 27 | - whether the dataset is available in the cloud 28 | - the cloud **Region** (all NASA Earthdata Cloud data is/will be in `us-west-2` region) 29 | - the S3 storage **bucket** and **object prefix** where this data is located 30 | - link that generates **AWS S3 Credentials** for in-cloud data access (we will cover this in the Direct Data Access Tutorials) 31 | - link to **documentation** describing the In-region Direct S3 Access to Buckets. *Note*: these will be unique depending on the DAAC where the data is archived. (We will show examples of direct in-region access in Tutorial 3.) 32 | 33 | ![*Figure caption: Cloud access info in EDS*](../img/eds_cloud_access_info_ecostress.png) 34 | 35 | ![*Figure caption: Documentation describing the In-region Direct S3 Access to Buckets*](../img/cloud_access_documentation.png) 36 | 37 | **Note**: Clicking on "For Developers" to expand will provide programmatic endpoints such as those for the CMR API, and more. 38 | 39 | For now, let's say we are interested in getting download link(s) or access link(s) for specific data files (granules) within this collection. 40 | 41 | At the top of the dataset info section, click on *Search Results*, which will take us back to the list of datasets matching our search parameters. Clicking on the dataset (`ECOSTRESS ECO_L2T_LSTE`) displaying a list of files (granules) that are part of the dataset (collection). 42 | 43 | ### Step 4a. Download or data access for a single granule 44 | 45 | To download files for a granule click the download arrow on the card (or list row) 46 | 47 | ![*Figure caption: Download granules*](../img/eds_ecov002_l2t_lste_http_download.png) 48 | 49 | You can also get the S3 information (e.g., AWS region, bucket, temperary credentials for S3 access, and file names) by selecting the **AWS S3 Access** tab. 50 | 51 | ![*Figure caption: S3 access for granules*](../img/eds_ecov002_l2t_lste_s3_access.png) 52 | 53 | #### Step 4b. Download or data access for multiple granule 54 | 55 | To download multiple granules, click on the green **+** symbol to add files to our project. Click on the green button towards the bottom that says "Download". This will take us to another page with options to customize our download or access link(s). 56 | 57 | ![*Figure caption: Select granules and click download*](../img/eds_ecov002_l2t_lste_multi_granule_selection.png) 58 | 59 | On the next page click the **Direct Download** option and click the green **Download Data** on the bottom left side of the page. 60 | 61 | ![*Figure caption: Direct download multiple granules*](../img/eds_ecov002_l2t_lste_multi_granule_download.png) 62 | 63 | We're now taken to the final page for instructions to download and links for data access in the cloud. You should see three tabs: `Download Files`, `AWS S3 Access`, `Download Script`: 64 | 65 | ![*Figure caption: Download to local*](../img/eds_ecov002_l2t_lste_multi_granule_download_https_links_src.png) 66 | 67 | ![*Figure caption: Direct S3 access*](../img/eds_ecov002_l2t_lste_multi_granule_download_s3_links_src.png) 68 | 69 | The *Download Files* tab provides the `https://` links for downloading the files locally 70 | 71 | The *AWS S3 Access* tab provides the `S3://` links, which is what we would use to access the data directly in-region (us-west-2) within the AWS cloud. 72 | -------------------------------------------------------------------------------- /img/AppEEARS_Explore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasa/ECOSTRESS-Data-Resources/d3d743e5cf7d70db5005306c529519de631264c3/img/AppEEARS_Explore.png -------------------------------------------------------------------------------- /img/AppEEARS_downloadSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasa/ECOSTRESS-Data-Resources/d3d743e5cf7d70db5005306c529519de631264c3/img/AppEEARS_downloadSample.png -------------------------------------------------------------------------------- /img/AppEEARS_point_area.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasa/ECOSTRESS-Data-Resources/d3d743e5cf7d70db5005306c529519de631264c3/img/AppEEARS_point_area.png -------------------------------------------------------------------------------- /img/AppEEARS_signIn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasa/ECOSTRESS-Data-Resources/d3d743e5cf7d70db5005306c529519de631264c3/img/AppEEARS_signIn.png -------------------------------------------------------------------------------- /img/AppEEARS_viewSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasa/ECOSTRESS-Data-Resources/d3d743e5cf7d70db5005306c529519de631264c3/img/AppEEARS_viewSample.png -------------------------------------------------------------------------------- /img/cloud_access_documentation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasa/ECOSTRESS-Data-Resources/d3d743e5cf7d70db5005306c529519de631264c3/img/cloud_access_documentation.png -------------------------------------------------------------------------------- /img/eds_cloud_access_info_ecostress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasa/ECOSTRESS-Data-Resources/d3d743e5cf7d70db5005306c529519de631264c3/img/eds_cloud_access_info_ecostress.png -------------------------------------------------------------------------------- /img/eds_cloud_product_search_ECOSTRESS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasa/ECOSTRESS-Data-Resources/d3d743e5cf7d70db5005306c529519de631264c3/img/eds_cloud_product_search_ECOSTRESS.png -------------------------------------------------------------------------------- /img/eds_collection_search_ECOSTRESS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasa/ECOSTRESS-Data-Resources/d3d743e5cf7d70db5005306c529519de631264c3/img/eds_collection_search_ECOSTRESS.png -------------------------------------------------------------------------------- /img/eds_ecov002_l2t_lste_http_download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasa/ECOSTRESS-Data-Resources/d3d743e5cf7d70db5005306c529519de631264c3/img/eds_ecov002_l2t_lste_http_download.png -------------------------------------------------------------------------------- /img/eds_ecov002_l2t_lste_multi_granule_download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasa/ECOSTRESS-Data-Resources/d3d743e5cf7d70db5005306c529519de631264c3/img/eds_ecov002_l2t_lste_multi_granule_download.png -------------------------------------------------------------------------------- /img/eds_ecov002_l2t_lste_multi_granule_download_https_links_src.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasa/ECOSTRESS-Data-Resources/d3d743e5cf7d70db5005306c529519de631264c3/img/eds_ecov002_l2t_lste_multi_granule_download_https_links_src.png -------------------------------------------------------------------------------- /img/eds_ecov002_l2t_lste_multi_granule_download_s3_links_src.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasa/ECOSTRESS-Data-Resources/d3d743e5cf7d70db5005306c529519de631264c3/img/eds_ecov002_l2t_lste_multi_granule_download_s3_links_src.png -------------------------------------------------------------------------------- /img/eds_ecov002_l2t_lste_multi_granule_selection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasa/ECOSTRESS-Data-Resources/d3d743e5cf7d70db5005306c529519de631264c3/img/eds_ecov002_l2t_lste_multi_granule_selection.png -------------------------------------------------------------------------------- /img/eds_ecov002_l2t_lste_s3_access.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nasa/ECOSTRESS-Data-Resources/d3d743e5cf7d70db5005306c529519de631264c3/img/eds_ecov002_l2t_lste_s3_access.png -------------------------------------------------------------------------------- /python/scripts/ecostress_swath2grid/ECOSTRESS_swath2grid.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | --------------------------------------------------------------------------------------------------- 4 | ECOSTRESS Swath to Grid Conversion Script with Brightness Temperature Conversion Option 5 | Author: LP DAAC 6 | Last Updated: 11/21/2022 7 | See README for additional information: 8 | https://git.earthdata.nasa.gov/projects/LPDUR/repos/ecostress_swath2grid/browse 9 | --------------------------------------------------------------------------------------------------- 10 | """ 11 | # Load necessary packages into Python 12 | import h5py 13 | import os 14 | import pyproj 15 | import sys 16 | import argparse 17 | import math 18 | import numpy as np 19 | import warnings 20 | #from pyproj import CRS 21 | warnings.simplefilter(action='ignore', category=UserWarning) 22 | from pyresample import geometry as geom 23 | from pyresample import kd_tree as kdt 24 | from osgeo import gdal, gdal_array, gdalconst, osr 25 | warnings.simplefilter(action='ignore', category=FutureWarning) 26 | 27 | # --------------------------COMMAND LINE ARGUMENTS AND ERROR HANDLING---------------------------- # 28 | # Set up argument and error handling 29 | parser = argparse.ArgumentParser(description='Performs ECOSTRESS Swath to Grid Conversion') 30 | parser.add_argument('--proj', required=True, choices=['UTM', 'GEO'], help='Projection desired for output GeoTIFFs') 31 | parser.add_argument('--dir', required=True, help='Local directory containing ECOSTRESS Swath files to be processed') 32 | parser.add_argument('--sds', required=False, help='Specific science datasets (SDS) to extract from ECOSTRESS Granules \ 33 | (see README for a list of available SDS)') 34 | parser.add_argument('--utmzone', required=False, help='UTM zone (EPSG Code) desired for all outputs--only required if needed to \ 35 | override default UTM zone which is assigned based on the center location for each ECOSTRESS granule') 36 | parser.add_argument('--bt', required=False, help='Optional argument to convert radiance to brightness temperature \ 37 | for the L1B products', action='store_true') 38 | args = parser.parse_args() 39 | 40 | # --------------------------------SET ARGUMENTS TO VARIABLES------------------------------------- # 41 | # Format and set input/working directory from user-defined arg 42 | if args.dir[-1] != '/' and args.dir[-1] != '\\': 43 | inDir = args.dir.strip("'").strip('"') + os.sep 44 | else: 45 | inDir = args.dir 46 | 47 | scriptDir = os.getcwd() + os.sep 48 | # Find input directory 49 | try: 50 | os.chdir(inDir) 51 | except FileNotFoundError: 52 | print('error: input directory (--dir) provided does not exist or was not found') 53 | sys.exit(2) 54 | 55 | crsIN = args.proj # Options include 'UTM' or 'GEO' 56 | 57 | # -------------------------------------SET UP WORKSPACE------------------------------------------ # 58 | # Create and set output directory 59 | outDir = os.path.normpath((os.path.split(inDir)[0] + os.sep + 'output')) + os.sep 60 | if not os.path.exists(outDir): 61 | os.makedirs(outDir) 62 | 63 | # Create lists of ECOSTRESS HDF-EOS5 files (geo, data) in the directory 64 | geoList = [f for f in os.listdir() if f.startswith('ECO') and f.endswith('.h5') and 'GEO' in f] 65 | ecoList = [f for f in os.listdir() if f.startswith('ECO') and f.endswith('.h5')] 66 | 67 | # Check to verify if any ECOSTRESS files are in the directory provided 68 | if len(ecoList) == 0: 69 | print(f'No ECOSTRESS files found in {inDir}') 70 | sys.exit(2) 71 | # -------------------------------------DEFINE FUNCTIONS------------------------------------------ # 72 | # Write function to determine which UTM zone to use: 73 | def utmLookup(lat, lon): 74 | utm = str((math.floor((lon + 180) / 6) % 60) + 1) 75 | if len(utm) == 1: 76 | utm = '0' + utm 77 | if lat >= 0: 78 | epsg_code = '326' + utm 79 | else: 80 | epsg_code = '327' + utm 81 | return epsg_code 82 | 83 | 84 | # If brightness temperature is requested, define a function to convert radiance to BT 85 | if args.bt: 86 | def btConversion(s, ecoSD): 87 | try: 88 | # Look up table containing brightness temperature conversions coefficients 89 | lutFile = h5py.File('EcostressBrightnessTemperatureV01.h5', "r") 90 | except: 91 | try: 92 | lutFile = h5py.File(f'{scriptDir}EcostressBrightnessTemperatureV01.h5', "r") 93 | except: 94 | print('Brightness Temp LUT not found, download the table at https://git.earthdata.nasa.gov/projects/LPDUR/repos/ecostress_swath2grid/browse and make sure it is in the same directory as the ECOSTRESS files to be processed or the ECOSTRESS_swath2grid.py script.') 95 | sys.exit(2) 96 | # Open the lookup table for the desired radiance band 97 | lut = lutFile[f"/lut/radiance_{s[-1]}"][()].astype(float) 98 | lutFile.close() 99 | 100 | # Take the input radiance array, and map to bt conversion coefficient depending on radiance band and value 101 | ecoSDflat = ecoSD.flatten() 102 | ecoSDflat = np.where(np.logical_and(0 <= ecoSDflat, ecoSDflat <= 60), ecoSDflat, 0) # Filter fill values 103 | indexLUT = np.int32(ecoSDflat / 0.001) 104 | 105 | # Interpolate the LUT values for each radiance based on two nearest LUT values 106 | bt = np.empty(ecoSDflat.shape, dtype=ecoSDflat.dtype) 107 | radiance_x0 = indexLUT * 0.001 108 | radiance_x1 = radiance_x0 + 0.001 109 | factor0 = (radiance_x1 - ecoSDflat) / 0.001 110 | factor1 = (ecoSDflat - radiance_x0) / 0.001 111 | bt[:] = (factor0 * lut[indexLUT]) + (factor1 * lut[indexLUT + 1]) 112 | 113 | # Set out of range radiance and fill values back to fill value 114 | bt = np.where((ecoSDflat != 0), bt, fv) 115 | bt = bt.reshape(ecoSD.shape) 116 | return bt 117 | 118 | if args.utmzone is not None and args.utmzone[0:3] != '326' and args.utmzone[0:3] != '327': 119 | parser.error('--utmzone requires the EPSG code (http://spatialreference.org/ref/epsg/) for a UTM zone, and only WGS84 datum is supported') 120 | # ------------------------------------IMPORT ECOSTRESS FILE-------------------------------------- # 121 | # Batch process all files in the input directory 122 | for i, e in enumerate(ecoList): 123 | i += 1 124 | print('Processing: {} ({} of {})'.format(e, str(i), str(len(ecoList)))) 125 | f = h5py.File(e, "r") # Read in ECOSTRESS HDF5-EOS data file 126 | ecoName = e.split('.h5')[0] # Keep original filename 127 | eco_objs = [] 128 | f.visit(eco_objs.append) # Retrieve list of datasets 129 | 130 | # Search for relevant SDS inside data file 131 | ecoSDS = [str(o) for o in eco_objs if isinstance(f[o], h5py.Dataset)] 132 | 133 | # Added functionality for dataset subsetting (--sds argument) 134 | if args.sds is not None: 135 | sds = args.sds.split(',') 136 | ecoSDS = [e for e in ecoSDS if e.endswith(tuple(sds))] 137 | if ecoSDS == []: 138 | print('No matching SDS layers found for {}'.format(e)) 139 | continue 140 | # ---------------------------------CONVERT SWATH DATA TO GRID------------------------------------ # 141 | # ALEXI products already gridded, bypass below 142 | if 'ALEXI_USDA' in e: 143 | cols, rows, dims = 3000, 3000, (3000, 3000) 144 | ecoSDS = [s for s in ecoSDS if f[s].shape == dims] # Omit NA layers/objs 145 | if ecoSDS == []: 146 | print('No matching SDS layers found for {}'.format(e)) 147 | continue 148 | else: 149 | # ---------------------------------IMPORT GEOLOCATION FILE--------------------------------------- # 150 | geo = [g for g in geoList if e[-37:-10] in g] # Match GEO filename--updated to exclude build ID 151 | if len(geo) != 0 or 'L1B_MAP' in e: # Proceed if GEO/MAP file 152 | if 'L1B_MAP' in e: 153 | g = f # Map file contains lat/lon 154 | else: 155 | g = h5py.File(geo[0], "r") # Read in GEO file 156 | geo_objs = [] 157 | g.visit(geo_objs.append) 158 | 159 | # Search for relevant SDS inside data file 160 | latSD = [str(o) for o in geo_objs if isinstance(g[o], h5py.Dataset) and '/latitude' in o] 161 | lonSD = [str(o) for o in geo_objs if isinstance(g[o], h5py.Dataset) and '/longitude' in o] 162 | lat = g[latSD[0]][()].astype(float) # Open Lat array 163 | lon = g[lonSD[0]][()].astype(float) # Open Lon array 164 | dims = lat.shape 165 | ecoSDS = [s for s in ecoSDS if f[s].shape == dims] # Omit NA layers/objs 166 | if ecoSDS == []: 167 | print('No matching SDS layers found for {}'.format(e)) 168 | continue 169 | # --------------------------------SWATH TO GEOREFERENCED ARRAYS---------------------------------- # 170 | swathDef = geom.SwathDefinition(lons=lon, lats=lat) 171 | midLat, midLon = np.mean(lat), np.mean(lon) 172 | 173 | if crsIN == 'UTM': 174 | if args.utmzone is None: 175 | epsg = utmLookup(midLat, midLon) # Determine UTM zone that center of scene is in 176 | else: 177 | epsg = args.utmzone 178 | epsgConvert = pyproj.Proj("+init=EPSG:{}".format(epsg)) 179 | proj, pName = 'utm', 'Universal Transverse Mercator' 180 | projDict = {'proj': proj, 'zone': epsg[-2:], 'ellps': 'WGS84', 'datum': 'WGS84', 'units': 'm'} 181 | if epsg[2] == '7': 182 | projDict['south'] = 'True' # Add for s. hemisphere UTM zones 183 | llLon, llLat = epsgConvert(np.min(lon), np.min(lat), inverse=False) 184 | urLon, urLat = epsgConvert(np.max(lon), np.max(lat), inverse=False) 185 | areaExtent = (llLon, llLat, urLon, urLat) 186 | ps = 70 # 70 is pixel size (meters) 187 | 188 | if crsIN == 'GEO': 189 | # Use info from aeqd bbox to calculate output cols/rows/pixel size 190 | epsgConvert = pyproj.Proj("+proj=aeqd +lat_0={} +lon_0={}".format(midLat, midLon)) 191 | llLon, llLat = epsgConvert(np.min(lon), np.min(lat), inverse=False) 192 | urLon, urLat = epsgConvert(np.max(lon), np.max(lat), inverse=False) 193 | areaExtent = (llLon, llLat, urLon, urLat) 194 | cols = int(round((areaExtent[2] - areaExtent[0])/70)) # 70 m pixel size 195 | rows = int(round((areaExtent[3] - areaExtent[1])/70)) 196 | '''Use no. rows and columns generated above from the aeqd projection 197 | to set a representative number of rows and columns, which will then be translated 198 | to degrees below, then take the smaller of the two pixel dims to determine output size''' 199 | epsg, proj, pName = '4326', 'longlat', 'Geographic' 200 | llLon, llLat, urLon, urLat = np.min(lon), np.min(lat), np.max(lon), np.max(lat) 201 | areaExtent = (llLon, llLat, urLon, urLat) 202 | projDict = pyproj.CRS("epsg:4326") 203 | areaDef = geom.AreaDefinition(epsg, pName, proj, projDict, cols, rows, areaExtent) 204 | ps = np.min([areaDef.pixel_size_x, areaDef.pixel_size_y]) # Square pixels 205 | 206 | cols = int(round((areaExtent[2] - areaExtent[0])/ps)) # Calculate the output cols 207 | rows = int(round((areaExtent[3] - areaExtent[1])/ps)) # Calculate the output rows 208 | areaDef = geom.AreaDefinition(epsg, pName, proj, projDict, cols, rows, areaExtent) 209 | index, outdex, indexArr, distArr = kdt.get_neighbour_info(swathDef, areaDef, 210, neighbours=1) 210 | else: 211 | print('ECO1BGEO File not found for {}'.format(e)) 212 | continue 213 | 214 | # ------------------LOOP THROUGH SDS CONVERT SWATH2GRID AND APPLY GEOREFERENCING----------------- # 215 | for s in ecoSDS: 216 | ecoSD = f[s][()] # Create array and read dimensions 217 | 218 | # Scale factor and add offset attribute names updated in build 6, accounted for below: 219 | scaleName = [a for a in f[s].attrs if 'scale' in a.lower()] # '_Scale' or 'scale_factor' 220 | addoffName = [a for a in f[s].attrs if 'offset' in a.lower()] 221 | 222 | # Read SDS Attributes if available 223 | try: 224 | fv = int(f[s].attrs['_FillValue']) 225 | except KeyError: 226 | fv = None 227 | except ValueError: 228 | if f[s].attrs['_FillValue'] == b'n/a': 229 | fv = None 230 | elif type(f[s].attrs['_FillValue'][0]) == np.float32: 231 | fv = np.nan 232 | else: 233 | fv = f[s].attrs['_FillValue'][0] 234 | try: 235 | sf = f[s].attrs[scaleName[0]][0] 236 | except: 237 | sf = 1 238 | try: 239 | add_off = f[s].attrs[addoffName[0]][0] 240 | except: 241 | add_off = 0 242 | 243 | # Convert to brightness temperature if bt argument is set, product is L1B, and SDS is Radiance 244 | if args.bt and 'RAD' in e: 245 | if 'radiance' in s: 246 | ecoSD = btConversion(s, ecoSD) 247 | 248 | if 'ALEXI_USDA' in e: # USDA Contains proj info in metadata 249 | if 'ET' in e: 250 | metaName = 'L3_ET_ALEXI Metadata' 251 | else: 252 | metaName = 'L4_ESI_ALEXI Metadata' 253 | gt = f[f"{metaName}/Geotransform"][()] 254 | proj = f['{}/OGC_Well_Known_Text'.format(metaName)][()].decode('UTF-8') 255 | sdGEO = ecoSD 256 | else: 257 | try: 258 | # Perform kdtree resampling (swath 2 grid conversion) 259 | sdGEO = kdt.get_sample_from_neighbour_info('nn', areaDef.shape, ecoSD, index, outdex, indexArr, fill_value=fv) 260 | ps = np.min([areaDef.pixel_size_x, areaDef.pixel_size_y]) 261 | gt = [areaDef.area_extent[0], ps, 0, areaDef.area_extent[3], 0, -ps] 262 | except ValueError: 263 | continue 264 | 265 | # Apply Scale Factor and Add Offset 266 | sdGEO = sdGEO * sf + add_off 267 | 268 | # Set fill value 269 | if fv is not None: 270 | sdGEO[sdGEO == fv * sf + add_off] = fv 271 | 272 | # -------------------------------------EXPORT GEOTIFFS------------------------------------------- # 273 | # For USDA, export to UTM, then convert to GEO 274 | if 'ALEXI_USDA' in e and crsIN == 'GEO': 275 | tempName = '{}{}_{}_{}.tif'.format(outDir, ecoName, s.rsplit('/')[-1], 'TEMP') 276 | outName = tempName 277 | elif args.bt and 'RAD' in e and 'radiance' in s: 278 | outName = '{}{}_{}_{}.tif'.format(outDir, ecoName, s.rsplit('/')[-1], crsIN).replace('radiance', 'brightnesstemperature') 279 | else: 280 | outName = '{}{}_{}_{}.tif'.format(outDir, ecoName, s.rsplit('/')[-1], crsIN) 281 | 282 | # Get driver, specify dimensions, define and set output geotransform 283 | height, width = sdGEO.shape # Define geotiff dimensions 284 | driv = gdal.GetDriverByName('GTiff') 285 | dataType = gdal_array.NumericTypeCodeToGDALTypeCode(sdGEO.dtype) 286 | d = driv.Create(outName, width, height, 1, dataType) 287 | d.SetGeoTransform(gt) 288 | 289 | # Create and set output projection, write output array data 290 | if 'ALEXI_USDA' in e: 291 | d.SetProjection(proj) 292 | else: 293 | # Define target SRS 294 | srs = osr.SpatialReference() 295 | srs.ImportFromEPSG(int(epsg)) 296 | d.SetProjection(srs.ExportToWkt()) 297 | band = d.GetRasterBand(1) 298 | band.WriteArray(sdGEO) 299 | 300 | # Define fill value if it exists, if not, set to mask fill value 301 | if fv is not None and fv != 'NaN': 302 | band.SetNoDataValue(fv) 303 | else: 304 | try: 305 | band.SetNoDataValue(int(sdGEO.fill_value)) 306 | except AttributeError: 307 | pass 308 | except TypeError: 309 | pass 310 | 311 | band.FlushCache() 312 | d, band = None, None 313 | 314 | if 'ALEXI_USDA' in e and crsIN == 'GEO': 315 | # Define target SRS 316 | srs = osr.SpatialReference() 317 | srs.ImportFromEPSG(int('4326')) 318 | srs = srs.ExportToWkt() 319 | 320 | # Open temp file, get default vals for target dims & geotransform 321 | dd = gdal.Open(tempName, gdalconst.GA_ReadOnly) 322 | vrt = gdal.AutoCreateWarpedVRT(dd, None, srs, gdal.GRA_NearestNeighbour, 0.125) 323 | 324 | # Create the final warped raster 325 | outName = '{}{}_{}_{}.tif'.format(outDir, ecoName, s.rsplit('/')[-1], crsIN) 326 | d = driv.CreateCopy(outName, vrt) 327 | dd, d, vrt = None, None, None 328 | os.remove(tempName) 329 | -------------------------------------------------------------------------------- /python/scripts/ecostress_swath2grid/README.md: -------------------------------------------------------------------------------- 1 | 2 | # ECOSTRESS Swath to Grid Conversion Script 3 | 4 | ## Objective 5 | 6 | The ECOSTRESS_swath2grid.py script converts ECOSTRESS swath data products, stored in Hierarchical Data Format version 5 (HDF5, .h5) into projected GeoTIFFs. When executing this script, a user will submit a desired output projection and input directory containing ECOSTRESS swath data products as command line arguments. The script begins by opening any of the ECOSTRESS products listed below that are contained in the input directory. Next, it uses the latitude and longitude arrays from the ECO1BGEO product (except for L3/L4 ALEXI_USDA and ECO1BMAPRAD products) to resample the swath dataset to a grid using nearest neighbor resampling (`Pyresample/kdtree`). Note that you will need to download the ECO1BGEO files that correspond to your higher level product files. From there, the script defines the coordinate reference system (CRS) input by the user (options include UTM Zones and Geographic (EPSG:4326)). There is an optional argument to override the default UTM zone selected by the script (see below) if needed. Ultimately, the script exports the gridded array as a GeoTIFF (`GDAL`). By default, the script will loop through and perform the aforementioned steps for each science dataset (SDS) in the HDF5 file. There is an optional argument that allows you to select a subset of SDS layers within a given product (see details below). There is another optional argument that allows users to convert L1B radiance to brightness temperature. The resulting GeoTIFF files can be imported with spatial reference into GIS and Remote Sensing software programs. The script also will batch process all ECOSTRESS swath files contained in the input directory provided. For ECOSTRESS products that include a scale factor in the metadata, the output will be scaled, and for products that include a fill value in the file metadata, this will be carried over into the GeoTIFF outputs. For layers that do not contain a fill value in the file metadata, the fill value will be defined as the highest possible value for the given datatype of an SDS. 7 | 8 | ## Available Products 9 | 10 | ### Collection 1 11 | 12 | 1. ECO1BGEO 13 | 2. ECO1BMAPRAD (lat/lon arrays contained within, ECO1BGEO not needed; radiance can be converted to brightness temperature) 14 | 3. ECO1BRAD (radiance can be converted to brightness temperature) 15 | 4. ECO2CLD 16 | 5. ECO2LSTE 17 | 6. ECO3ETALEXIU (30 m, in UTM Projection, ECO1BGEO not needed) 18 | 7. ECO3ETPTJPL 19 | 8. ECO3ANCQA 20 | 9. ECO4ESIPTJPL 21 | 10. ECO4ESIALEXIU (30 m, in UTM Projection, ECO1BGEO not needed) 22 | 11. ECO4WUE 23 | 24 | ### Collection 2 25 | 26 | 1. ECO_L1B_GEO 27 | 2. ECO_L1B_ATT 28 | 3. ECO_L1B_RAD 29 | 4. ECO_L2_LSTE 30 | 5. ECO_L2_CLOUD 31 | 32 | > Note that you will need to separately download the ECO1BGEO files that correspond to the files you have downloaded for products 2-4, 6-8, and 10 above. 33 | 34 | ## Prerequisites 35 | 36 | > Disclaimer: Script has been tested on Windows and MacOS using the specifications identified below. 37 | 38 | + **Python version 3.8** 39 | + `GDAL` 40 | + `h5py` 41 | + `pyproj` 42 | + `pyresample` 43 | + `numpy` 44 | + `pandas` 45 | + `scipy` 46 | 47 | + A [NASA Earthdata Login](https://urs.earthdata.nasa.gov/) account is required to download the data used in this tutorial. You can create an account at the link provided. 48 | 49 | ## Procedures 50 | 51 | ### Getting Started 52 | 53 | 1. Download ECOSTRESS higher level products and corresponding ECO1BGEO files (ordered separately) from the [LP DAAC Data Pool](https://e4ftl01.cr.usgs.gov/ECOSTRESS/) or [Earthdata Search Client](https://search.earthdata.nasa.gov/search?fi=ECOSTRESS) to a local directory (see above for applicable products) 54 | 2. Copy/clone/download [ECOSTRESS_swath2grid.py](https://git.earthdata.nasa.gov/projects/LPDUR/repos/ecostress_swath2grid/browse/ECOSTRESS_swath2grid.py) from LP DAAC Data User Resources Repository 55 | 56 | ### Python Environment Setup 57 | 58 | 1. It is recommended to use [Conda](https://conda.io/docs/), an environment manager to set up a compatible Python environment. Download Conda for your OS here: . Once you have Conda installed, Follow the instructions below to successfully setup a Python environment on MacOS or Windows. 59 | 2. Using your preferred command line interface (command prompt, terminal, cmder, etc.) type the following to successfully create a compatible python environment: 60 | 61 | ```text 62 | > conda create -n ecostress -c conda-forge --yes python=3.8 h5py pyproj pyresample gdal pandas scipy 63 | > conda activate ecostress 64 | ``` 65 | 66 | > NOTE: If you are having trouble activating your environment, or loading specific packages once you have activated your environment? Try entering `conda update conda` or `conda update --all` 67 | 68 | [Additional information](https://conda.io/docs/user-guide/tasks/manage-environments.html) on setting up and managing Conda environments. 69 | 70 | If you prefer to not install Conda, the same setup and dependencies can be achieved by using another package manager such as pip. 71 | 72 | Still having trouble getting a compatible Python environment set up? Contact [LP DAAC User Services](https://lpdaac.usgs.gov/lpdaac-contact-us/). 73 | 74 | ## Script Execution 75 | 76 | Once you have set up your MacOS/Windows environment and it has been activated, run the script with the following in your Command Prompt/terminal window: 77 | 78 | ```text 79 | > python ECOSTRESS_swath2grid.py --proj --dir 80 | ``` 81 | 82 | Where: 83 | 84 | + GEO = Geographic lat/lon, EPSG code 4326 85 | + UTM = Universal Transverse Mercator Zones (north/south) with WGS84 datum 86 | 87 | > NOTE: `--proj` argument is case sensitive 88 | 89 | **Example** 90 | 91 | ```text 92 | > python ECOSTRESS_swath2grid.py --proj GEO --dir C:\Users\ECOSTRESS\ 93 | ``` 94 | 95 | If UTM is selected, the script will calculate the UTM zone by using the location of the center of each ECOSTRESS granule. If you prefer to set the UTM zone manually, you can do so by adding the optional argument `--utmzone `. This optional argument will override the default functionality for users who desire all ECOSTRESS granules to be in a common UTM projection, regardless of the center location of the granule. 96 | 97 | **Example** 98 | 99 | ```text 100 | > python ECOSTRESS_swath2grid.py --proj UTM --dir --utmzone 101 | ``` 102 | 103 | > NOTE: You can look up EPSG codes for UTM zones at: , note that only WGS84 datum is supported, and thus EPSG codes for UTM north zones will begin with `326` and utm south zones with `327` 104 | 105 | The default functionality is to export each science dataset (SDS) layer contained in an ECOSTRESS product as a GeoTIFF. If you prefer to only export one or more layers, you can do so by adding the optional argument `--sds ` (comma separated with no spaces, see below for specific SDS layer names by product--note that the input is case sensitive) 106 | 107 | **Example** 108 | 109 | ```text 110 | > python ECOSTRESS_swath2grid.py --proj GEO --dir C:\Users\ECOSTRESS\ --sds LST,QC,Emis1 111 | ``` 112 | 113 | > NOTE: SDS layer names for each product are below in section [Subsetting Layers](#subsetting-layers). 114 | 115 | The default functionality for L1B radiance is to export each layer contained as radiance (W/m^2/sr/um). If you prefer to export the L1B datasets as brightness temperature (K), you can do so by adding the optional argument `--bt` (see section [Radiance to Brightness Temperature Conversion](#radiance-to-brightness-temperature-conversion) for additional information) 116 | 117 | **Example** 118 | 119 | ```text 120 | > python ECOSTRESS_swath2grid.py --proj GEO --dir C:\Users\ECOSTRESS\ --bt` 121 | ``` 122 | 123 | ## Radiance to Brightness Temperature Conversion 124 | 125 | To use the `--bt` optional command line argument to convert L1B radiance science datasets (bands 1-5) from radiance (W/m^2/sr/um) to brightness temperature (K), you will need to add the `--bt` argument to your script execution command. 126 | Example: 127 | 128 | ```text 129 | > python ECOSTRESS_swath2grid.py --proj GEO --dir C:\Users\ECOSTRESS\ --bt 130 | ``` 131 | 132 | > **Note:** You will first need to download the `EcostressBrightnessTemperatureV01.h5` Lookup Table (LUT) and save it to the directory containing your `ECOSTRESS_swath2grid.py` script, or the directory containing the ECOSTRESS L1B files to be processed. 133 | 134 | ## Subsetting Layers 135 | 136 | To use the `--sds` optional command line argument in order to select a subset of science datasets from an ECOSTRESS granule, you will need to submit 1 or more SDS layers names into the `--sds` argument exactly as they appear in the list below. **The SDS layers must be comma separated, with no spaces between SDS!** 137 | 138 | + Example for a single layer: `--sds LST` 139 | + Example for multiple layers: `--sds ETcanopy,ETdaily,ETinst` 140 | 141 | ## Available ECOSTRESS Layers 142 | 143 | ### Collection 1 144 | 145 | 1. **ECO1BGEO** 146 | + height 147 | + land_fraction 148 | + latitude 149 | + longitude 150 | + solar_azimuth 151 | + solar_zenith 152 | + view_azimuth 153 | + view_zenith 154 | 155 | 2. **ECO1BMAPRAD** 156 | + data_quality_1 157 | + data_quality_2 158 | + data_quality_3 159 | + data_quality_4 160 | + data_quality_5 161 | + height 162 | + latitude 163 | + longitude 164 | + radiance_1 (can be exported to brightnesstemperature_1) 165 | + radiance_2 (can be exported to brightnesstemperature_2) 166 | + radiance_3 (can be exported to brightnesstemperature_3) 167 | + radiance_4 (can be exported to brightnesstemperature_4) 168 | + radiance_5 (can be exported to brightnesstemperature_5) 169 | + solar_azimuth 170 | + solar_zenith 171 | + swir_dn 172 | + view_azimuth 173 | + view_zenith 174 | 175 | 3. **ECO1BRAD** 176 | + data_quality_1 177 | + data_quality_2 178 | + data_quality_3 179 | + data_quality_4 180 | + data_quality_5 181 | + radiance_1 (can be exported to brightnesstemperature_1) 182 | + radiance_2 (can be exported to brightnesstemperature_2) 183 | + radiance_3 (can be exported to brightnesstemperature_3) 184 | + radiance_4 (can be exported to brightnesstemperature_4) 185 | + radiance_5 (can be exported to brightnesstemperature_5) 186 | + swir_dn 187 | 188 | 4. **ECO2CLD** 189 | + CloudMask 190 | 191 | 5. **ECO2LSTE** 192 | + Emis1 193 | + Emis1_err 194 | + Emis2 195 | + Emis2_err 196 | + Emis3 197 | + Emis3_err 198 | + Emis4 199 | + Emis4_err 200 | + Emis5 201 | + Emis5_err 202 | + EmisWB 203 | + LST 204 | + LST_err 205 | + PWV 206 | + QC 207 | 208 | 6. **ECO3ETALEXIU** 209 | + ETdaily 210 | + ETdailyUncertainty 211 | + QualityFlag 212 | 213 | 7. **ECO3ETPTJPL** 214 | + ETcanopy 215 | + ETdaily 216 | + ETinst 217 | + ETinstUncertainty 218 | + ETinterception 219 | + ETsoil 220 | 221 | 8. **ECO3ANCQA** 222 | + ECOSTRESS_L2_QC 223 | + Landsat8_QC 224 | + MCD12Q1_QC 225 | + MCD43A3_QC 226 | + MOD04_QC 227 | + MOD06_1km_QC 228 | + MOD06_5km_QC 229 | + MOD07_QC 230 | + MOD13Q1_QC 231 | + MOD17A2H_QC 232 | + MOD44W_QC 233 | 234 | 9. **ECO4ESIALEXIU** 235 | + ESIdaily 236 | + ESIdailyUncertainty 237 | + QualityFlag 238 | 239 | 10. **ECO4ESIPTJPL** 240 | + ESIavg 241 | + PET 242 | 243 | 11. **ECO4WUE** 244 | + WUEavg 245 | 246 | ### Collection 2 247 | 248 | 1. **ECO_L1B_GEO** 249 | + height 250 | + land_fraction 251 | + latitude 252 | + line_start_time_j2000 253 | + longitude 254 | + solar_azimuth 255 | + solar_zenith 256 | + view_azimuth 257 | + view_zenith 258 | 259 | 2. **ECO_L1B_ATT** 260 | + Attitude quaternion 261 | + Attitude time_j2000 262 | + Ephemeris eci_position 263 | + Ephemeris eci_velocity 264 | + Ephemeris time_j2000 265 | + Uncorrected Attitude quaternion 266 | + Uncorrected Attitude time_j2000 267 | + Uncorrected Ephemeris eci_position 268 | + Uncorrected Ephemeris eci_velocity 269 | + Uncorrected Ephemeris time_j2000 270 | 271 | 3. **ECO_L1B_RAD** 272 | + radiance_1 273 | + radiance_2 274 | + radiance_3 275 | + radiance_4 276 | + radiance_5 277 | + data_quality_1 278 | + data_quality_2 279 | + data_quality_3 280 | + data_quality_4 281 | + data_quality_5 282 | + swir_dn 283 | + EncoderValue 284 | + line_start_time_j2000 285 | 286 | 4. **ECO_L2_LSTE** 287 | + LST 288 | + QC 289 | + Emis1 290 | + Emis2 291 | + Emis3 292 | + Emis4 293 | + Emis5 294 | + LST_err 295 | + Emis1_err 296 | + Emis2_err 297 | + Emis3_err 298 | + Emis4_err 299 | + Emis5_err 300 | + EmisWB 301 | + PWV 302 | + cloud_mask 303 | + water_mask 304 | 305 | 5. **ECO_L2_CLOUD** 306 | + Cloud_confidence 307 | + Cloud_final 308 | 309 | --- 310 | ## Contact Information 311 | ### Author: LP DAAC 1 312 | 313 | **Contact:** LPDAAC@usgs.gov 314 | **Voice:** +1-866-573-3222 315 | **Organization:** Land Processes Distributed Active Archive Center (LP DAAC) 316 | **Website:** 317 | **Date last modified:** 11-21-2022 318 | 319 | 1LP DAAC Work performed under NASA contract NNG14HH33I. 320 | -------------------------------------------------------------------------------- /python/scripts/extract_geolocation_flag/ECOSTRESS_geolocation.py: -------------------------------------------------------------------------------- 1 | """ 2 | =============================================================================== 3 | This script contains a workflow to extract the Geolocation Accuracy QA flag 4 | from ECOSTRESS L1B_GEO file level metadata. 5 | 6 | ------------------------------------------------------------------------------- 7 | Authors: Mahsa Jami, Erik Bolch 8 | Contact: lpdaac@usgs.gov 9 | Last Updated: 2025-02-03 10 | =============================================================================== 11 | """ 12 | # Import necessary packages 13 | import earthaccess 14 | import pandas as pd 15 | import xarray as xr 16 | import argparse 17 | import os 18 | from colorama import Fore, Back, Style 19 | import multiprocessing 20 | import warnings 21 | from tqdm import tqdm # Import tqdm for the progress bar 22 | 23 | 24 | # Suppress the specific UserWarning 25 | warnings.filterwarnings("ignore", message="Creating scratch directories is taking a surprisingly long time.") 26 | 27 | # ----------------------------------USER-DEFINED VARIABLES--------------------------------------- # 28 | def get_link(id): 29 | """This function extract the associated ECO_L1B_GEO URL using date and time information.""" 30 | attempts = 0 31 | url = '' 32 | while attempts < 3: 33 | try: 34 | response = earthaccess.search_data(short_name="ECO_L1B_GEO",version='002',granule_name = f'*{id}*') 35 | # print(response) 36 | # get the L1B_GEO access URL 37 | url = [granule.data_links(access="external") for granule in response] 38 | break 39 | except: 40 | attempts += 1 41 | return(url) 42 | 43 | def file_geolocation(url): 44 | """This function extract the GeolocationAccuracyQA flag from file metadata using xarray.""" 45 | fs = earthaccess.get_fsspec_https_session() 46 | fp = fs.open(url) 47 | l1geo = xr.open_dataset(fp, engine='h5netcdf', group='L1GEOMetadata') 48 | try: 49 | label = l1geo['GeolocationAccuracyQA'].data.item() 50 | except: 51 | label = 'missing' 52 | return(label) 53 | 54 | def dmrpp_geolocation(url): 55 | """This function extract the GeolocationAccuracyQA flag from .dmrpp metadata file.""" 56 | try: 57 | response = requests.get(url) 58 | # print(response.raise_for_status()) 59 | # Decode using ISO-8859-1 60 | xml_content = response.content.decode("ISO-8859-1") 61 | # Parse XML 62 | root = ET.fromstring(xml_content) 63 | 64 | for group in root.iter(): 65 | if "Group" in group.tag: 66 | group_name = group.attrib.get("name", "Unnamed Group") 67 | if group_name == "L1GEOMetadata": 68 | for elem in group.iter(): 69 | if "String" in elem.tag: 70 | string = elem.attrib.get("name", "Unnamed Attribute") 71 | if "GeolocationAccuracyQA" in string and "GeolocationAccuracyQAExplanation" not in string: 72 | for e in elem.iter(): 73 | encoded_value = e.text.strip() # Remove extra spaces/newlines 74 | label = base64.b64decode(encoded_value).decode("utf-8", errors="ignore") 75 | except: 76 | label = 'failed' 77 | return(label) 78 | 79 | 80 | if __name__ == "__main__": 81 | multiprocessing.freeze_support() 82 | 83 | # Set up argument 84 | parser = argparse.ArgumentParser(description='Extract the gelocation accuracy QA flag') 85 | parser.add_argument('-dir', '--directory', required=True, help='Specify directory to save files to') 86 | parser.add_argument('-f', '--files', required=True, help='A single granule URL, or the location of csv or textfile containing granule URLs') 87 | 88 | args = parser.parse_args() 89 | 90 | saveDir = args.directory # Set local directory to save file to 91 | files = args.files # Define granules that their geolocation flags are needed 92 | 93 | # ---------------------------------SET UP WORKSPACE---------------------------------------------- # 94 | 95 | # Create a list of granule IDs based on input type of files above 96 | if files.endswith('.txt') or files.endswith('.csv'): 97 | with open(files, 'r') as f: 98 | fileList = f.read().splitlines() # If input is text/csv file with file URLs 99 | 100 | out_name = f"{files.rsplit('.',1)[0]}_geolocation_flag.csv" 101 | elif isinstance(files, str): 102 | fileList = [files] # If input is a single file 103 | out_name = f"{files.rsplit('/',1)[1].rsplit('.')[0]}_geolocation_flag.csv" 104 | 105 | if not fileList: 106 | print(Fore.RED + "Error: No granules provided in the input file.") 107 | exit(1) 108 | 109 | # Check if the directory exists 110 | if not os.path.isdir(saveDir): 111 | os.makedirs(saveDir) 112 | 113 | out_dir = os.path.join(saveDir, out_name) 114 | 115 | # --------------------------------AUTHENTICATION CONFIGURATION----------------------------------- # 116 | # AUthenticate using earthaccess.login function. 117 | 118 | auth = earthaccess.login(persist = True) 119 | print(Fore.GREEN + 'Please note: If you just entered your Earthdata Login credentials, your username and password are now stored in a .netrc file located in your home directory on this system.') 120 | print(Style.RESET_ALL) 121 | 122 | # ------------------------------------------------------------------------------- # 123 | def get_geolocation_label(granID_db, f): 124 | # print(f'Working on {f}') 125 | 126 | id = [f for f in f.rsplit('/', 1)[1].rsplit('_') if len(f)==15 and '.' not in f][0] 127 | # print(id) 128 | if id in list(granID_db['id']): 129 | pr = granID_db[granID_db['id'] == id].iloc[0] 130 | row = pd.DataFrame({'granule': [f],'L1B_GEO': pr['L1B_GEO'], 'id': [id], 131 | 'GeolocationAccuracyQA': pr['GeolocationAccuracyQA'], 132 | 'note': pr['note']}, index=[0]) 133 | else: 134 | if 'ECOv002_' in f: 135 | url = get_link(id) 136 | if url: 137 | h5_link = [l for l in url[0] if l.endswith('.h5')][0] 138 | # print(h5_link) 139 | dmrpp_link = f'{h5_link}.dmrpp' 140 | label = dmrpp_geolocation(dmrpp_link) 141 | if label == 'failed': 142 | label = file_geolocation(h5_link) 143 | # print(label) 144 | row = pd.DataFrame({'granule': [f],'L1B_GEO': [h5_link.rsplit('/')[-1]], 'id': [id], 145 | 'GeolocationAccuracyQA': [label], 'note': '' }) 146 | else: 147 | # print(f'Failed to access ECO_L1B_GEO granule.') 148 | row = pd.DataFrame({'granule': [],'L1B_GEO': [], 'id': [], 'GeolocationAccuracyQA': [], 149 | 'note': 'Failed to access ECO_L1B_GEO granule' }) 150 | else: 151 | print(f'{f} is not associated to the ECOSTRESS version 2 collections.') 152 | row = pd.DataFrame() 153 | return(row) 154 | 155 | 156 | 157 | # -----------------------------------------GET THE LIST OF GRANULE ID(S)-------------------------------------- # 158 | # Initialize an empty DataFrame for granule data 159 | granID_db = pd.DataFrame(columns=['granule','L1B_GEO','id' ,'GeolocationAccuracyQA', 'note']) 160 | 161 | # Run the script 162 | 163 | # Add a progress bar to the loop 164 | for f in tqdm(fileList, desc="Processing files", unit="file"): 165 | if f: 166 | row_db = get_geolocation_label(granID_db, f) 167 | granID_db = pd.concat([granID_db, row_db], ignore_index=True) 168 | 169 | # -----------------------------------------SAVE THE DATABASE AS AN OUTPUT-------------------------------------- # 170 | # Remove 'id' column if it exists 171 | if 'id' in granID_db.columns: 172 | del granID_db['id'] 173 | 174 | # Check if the DataFrame is empty 175 | if granID_db.empty: 176 | print(Fore.RED + "Please note that there is no geolocation accuracy QA flag for your input data. This flag is not available for ECOSTRESS version 1 data collections.") 177 | else: 178 | # Save the DataFrame to a CSV file 179 | granID_db.to_csv(out_dir, index=False) 180 | print(Fore.RED + f'The output CSV file is stored at: {out_dir}') 181 | print(Style.RESET_ALL) -------------------------------------------------------------------------------- /python/scripts/extract_geolocation_flag/README.md: -------------------------------------------------------------------------------- 1 | 2 | # Extract ECOSTRESS Geolocation Accuracy QA Flag 3 | 4 | ## Objective 5 | 6 | NASA's Land Processes Distributed Active Archive Center (LP DAAC) is responsible for archiving and distributing ECOSTRESS data products through the LP DAAC Cumulus cloud archive. ECOSTRESS Version 2 data is available in swath, gridded, and tiled formats, provided in both Cloud Optimized GeoTIFF (COG) and HDF5 file formats. ECOSTRESS Swath Geolocation data ([ECO_L1B_GEO v002](https://doi.org/10.5067/ECOSTRESS/ECO_L1B_GEO.002)) includes essential metadata fields, such as the `Geolocation Accuracy QA` flag, which are not carried over to higher-level data products. `Geolocation Accuracy QA` flag provides an indication of geolocation error. The gelocation accuracy for corrected data could be better than 50 meters but the data was processed without correcting the geolocation could have up to 7 km geolocation error. Users of ECOSTRESS data should evaluate the geolocation accuracy and whether larger errors can be tolerated for their applications. Otherwise, data flagged as “Suspect” or “No Match” may not be suitable for you. Additional details are provided in Section 4.2 of the [User Guide](https://lpdaac.usgs.gov/documents/1491/ECO1B_User_Guide_V2.pdf). 7 | 8 | > `Geolocation Accuracy QA` could have four different flags: 9 | 10 | >- **Best**: Image matching was performed for this scene. Good geolocation accuracy. 11 | >- **Good**: Image matching was performed in a nearby scene. Good geolocation accuracy. 12 | >- **Suspect**: Image matching occurred somewhere in the orbit. Expect increased error. 13 | >- **No Match**: No matches in orbit. Expect large geolocation errors. 14 | 15 | This Python-based command-line script enables users to retrieve the `Geolocation Accuracy QA` flags for the input data. Input data can be provided as: 16 | 1. A list of download URLs or granule filenames stored in a text or CSV file. 17 | 2. A download URL or granule filename as a string for a single file. 18 | 19 | The script automates the retrieval process, allowing users to efficiently determine the geolocation accuracy of their ECOSTRESS data products. Retrieved geolocation flags will be stored as a .csv file. 20 | 21 | ## Products 22 | 23 | This script works with all the ECOSTRESS version 2 data products. 24 | 25 | ## Prerequisites/Setup Instructions   26 | 27 | ### Environment Setup 28 | 29 | If you do not have an Environment Manager installed, we recommend [mamba](https://mamba.readthedocs.io/en/latest/) to manage Python packages. Details instruction on how to install an environment manager can be found [here](https://github.com/nasa/LPDAAC-Data-Resources/blob/main/setup/setup_instructions_python.md). Once you have it installed, type the following in your preferred command line interface (command prompt, terminal, cmder, etc.) to create a compatible environment. 30 | 31 | ``` 32 | mamba create -n ecostress_geo python=3.12 earthaccess xarray h5netcdf 33 | ``` 34 | **This script is tested using `earthaccess` version 0.13.** 35 | 36 | **If you are using conda, replace the "mamba" with "conda" and be patient.** 37 | 38 | Instruction for setting up a compatible environment for all LP DAAC Python resources is available at: 39 | 40 | ### NASA Earthdata Login: 41 | 42 | **You will need a NASA Earthdata Login account to access LP DAAC data (and use this script).** To create a NASA Earthdata Login account, go to the [Earthdata Login website](https://urs.earthdata.nasa.gov) and click the “Register” button, which is next to the green “Log In” button under the Password entry box. Fill in the required boxes (indicated with a red asterisk), then click on the “Register for Earthdata Login” green button at the bottom of the page. An email including instructions for activating your profile will be sent to you. Activate your profile to complete the registration process. 43 | 44 | ### **.netrc file** 45 | 46 | The netrc file is needed to download NASA Earthdata science data from a scripting environment like Python. There are multiple methods to [create a .netrc file for authntication](https://github.com/nasa/LPDAAC-Data-Resources/tree/main/guides/create_netrc_file.md). Here, the `earthaccess` package is used to automatically create a `.netrc` file using your Earthdata login credentials. If you do not have a netrc file configured in your home directory, the script will prompt you for input on your NASA Earthdata Login Username and Password. Enter your username and password and hit enter to continue downloading your data. **Please note that your Earthdata Login info, your username, and password, will be stored in a .netrc file located in the Home directory on this system you are using.** You will get the same message when you run the script as a reminder. If you do not trust the machine you are using, make sure to delete the created netrc file.   47 | 48 | ## Procedures: 49 | 50 | ### Getting Started: 51 | 52 | #### 1. Save the download URL for your data from  [NASA Earthdata Search](https://search.earthdata.nasa.gov/) for a single file. For multiple files, download the text file containing URLs to files.   53 | 54 | #### 2. Access `ECOSTRESS_geolocation.py` from `ECOSTRESS-Data-Resources` Github Repository.   55 | 56 | You can download the raw file for the script from 57 |     58 | Additionally, you can download all contents of this repository as a [zip file](https://github.com/nasa/ECOSTRESS-Data-Resources/archive/refs/heads/main.zip). You can also clone the repository by typing the following into command line. 59 | 60 | ```bash 61 | git clone https://github.com/nasa/ECOSTRESS-Data-Resources.git 62 | ``` 63 | 64 | Afterwards, navigate to `python/scripts/extract_geolocation_flag/ECOSTRESS_geolocation.py`.   65 | 66 | ## Script Execution 67 | 68 | Activate your MacOS/Windows environment, run the script with the following in your Command Prompt/terminal window: 69 | 70 | ```cmd 71 | python ECOSTRESS_geolocation.py -dir -f 72 | ``` 73 | 74 | **Example 1, extracting the geolocation flag for a list of ECOSTESS files:** 75 | 76 | ```cmd 77 | python C:\User\Downloads\ECOSTRESS_geolocation.py -dir C:\User\downloads -f C:\User\downloads\ECOSTRESS-granule-list.txt 78 | ``` 79 | 80 | **Example 2, extracting the geolocation flags for a single ECOSTRESS file:** 81 | 82 | ```cmd 83 | python C:\User\Downloads\DAACDataDownload.py  -dir C:\User\downloads -f https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/ECO_L4T_ESI.002/ECOv002_L4T_ESI_36662_013_07LFK_20241223T220254_0713_01/ECOv002_L4T_ESI_36662_013_07LFK_20241223T220254_0713_01_water.tif 84 | ``` 85 | 86 | 87 | --- 88 | ## Contact Information 89 | ### Author: LP DAAC 1 90 | 91 | **Contact:** LPDAAC@usgs.gov 92 | **Voice:** +1-866-573-3222 93 | **Organization:** Land Processes Distributed Active Archive Center (LP DAAC) 94 | **Website:** 95 | **Date last modified:** 02-03-2025 96 | 97 | 1LP DAAC Work performed under NASA contract NNG14HH33I. 98 | --------------------------------------------------------------------------------