|
30 | 30 | "import matplotlib.pyplot as plt\n", |
31 | 31 | "import matplotlib\n", |
32 | 32 | "import geopandas\n", |
| 33 | + "import logging\n", |
33 | 34 | "import sliderule\n", |
34 | 35 | "from sliderule import icesat2" |
35 | 36 | ] |
36 | 37 | }, |
37 | 38 | { |
38 | 39 | "cell_type": "markdown", |
39 | 40 | "id": "a9cdeed4-810c-4540-869b-78e09591b68c", |
40 | | - "metadata": {}, |
| 41 | + "metadata": { |
| 42 | + "user_expressions": [] |
| 43 | + }, |
41 | 44 | "source": [ |
42 | 45 | "#### Initialize Client\n", |
43 | 46 | "* Organization currently set to \"utexas\"; if you want to be a member of the utexas SlideRule organization, make a request through the SlideRule provisioning system (https://ps.slideruleearth.io); otherwise, remove the organization parameter to default to the public SlideRule cluster.\n", |
|
53 | 56 | }, |
54 | 57 | "outputs": [], |
55 | 58 | "source": [ |
56 | | - "icesat2.init(\"slideruleearth.io\", verbose=False)" |
| 59 | + "logging.basicConfig(level=logging.INFO)\n", |
| 60 | + "icesat2.init(\"slideruleearth.io\", verbose=True, loglevel=logging.INFO)" |
57 | 61 | ] |
58 | 62 | }, |
59 | 63 | { |
60 | 64 | "cell_type": "markdown", |
61 | 65 | "id": "f4c96101-53cf-4614-80a2-e50afcf65a03", |
62 | | - "metadata": {}, |
| 66 | + "metadata": { |
| 67 | + "user_expressions": [] |
| 68 | + }, |
63 | 69 | "source": [ |
64 | 70 | "#### Processing parameters\n", |
65 | 71 | "* 100m segments stepped every 100m\n", |
66 | 72 | "* Subsetted to the Grand Mesa region\n", |
67 | 73 | "* Time range is one day, Nov 14, 2019\n", |
68 | 74 | "* Only processing ground, canopy, and top of canopy photons\n", |
| 75 | + "* Request the \"h_dif_ref\" variable as an ancillary field to be included in the results\n", |
69 | 76 | "* Running PhoREAL algorithm using a binsize of 1m, and geolocating each segment at the center of the segment\n", |
70 | 77 | "* Sending reconstructed waveforms along with metrics (for diagnostics and demonstration purposes only)" |
71 | 78 | ] |
|
88 | 95 | " \"res\": 100,\n", |
89 | 96 | " \"pass_invalid\": True, \n", |
90 | 97 | " \"atl08_class\": [\"atl08_ground\", \"atl08_canopy\", \"atl08_top_of_canopy\"],\n", |
| 98 | + " \"atl08_fields\": [\"h_dif_ref\"],\n", |
91 | 99 | " \"phoreal\": {\"binsize\": 1.0, \"geoloc\": \"center\", \"use_abs_h\": False, \"send_waveform\": True}\n", |
92 | 100 | "}" |
93 | 101 | ] |
94 | 102 | }, |
95 | 103 | { |
96 | 104 | "cell_type": "markdown", |
97 | 105 | "id": "e9bd5e72-f5d5-4686-94b2-c65f6715a877", |
98 | | - "metadata": {}, |
| 106 | + "metadata": { |
| 107 | + "user_expressions": [] |
| 108 | + }, |
99 | 109 | "source": [ |
100 | 110 | "#### Make Atl08 Request" |
101 | 111 | ] |
|
115 | 125 | { |
116 | 126 | "cell_type": "markdown", |
117 | 127 | "id": "60702b08-c333-4502-b948-26015c1520d5", |
118 | | - "metadata": {}, |
| 128 | + "metadata": { |
| 129 | + "user_expressions": [] |
| 130 | + }, |
119 | 131 | "source": [ |
120 | 132 | "#### Print Resulting GeoDataFrame" |
121 | 133 | ] |
|
135 | 147 | { |
136 | 148 | "cell_type": "markdown", |
137 | 149 | "id": "23a8280a-844e-4405-a8a2-53e2dd51f5e0", |
138 | | - "metadata": {}, |
| 150 | + "metadata": { |
| 151 | + "user_expressions": [] |
| 152 | + }, |
139 | 153 | "source": [ |
140 | 154 | "#### Plot Canopy Height" |
141 | 155 | ] |
|
156 | 170 | { |
157 | 171 | "cell_type": "markdown", |
158 | 172 | "id": "d3665d73-2745-4ba6-b209-5cf7a6abe693", |
159 | | - "metadata": {}, |
| 173 | + "metadata": { |
| 174 | + "user_expressions": [] |
| 175 | + }, |
160 | 176 | "source": [ |
161 | 177 | "#### Plot Landcover" |
162 | 178 | ] |
|
176 | 192 | { |
177 | 193 | "cell_type": "markdown", |
178 | 194 | "id": "6fc1e14d-8936-4f26-a6ca-a2361f54ef4d", |
179 | | - "metadata": {}, |
| 195 | + "metadata": { |
| 196 | + "user_expressions": [] |
| 197 | + }, |
180 | 198 | "source": [ |
181 | 199 | "#### Create and Plot 75th percentile Across All Ground Tracks" |
182 | 200 | ] |
|
191 | 209 | "outputs": [], |
192 | 210 | "source": [ |
193 | 211 | "atl08['75'] = atl08.apply(lambda row : row[\"canopy_h_metrics\"][icesat2.P['75']], axis = 1)\n", |
194 | | - "atl08.plot.scatter(x='distance', y='75')" |
| 212 | + "atl08.plot.scatter(x='x_atc', y='75')" |
195 | 213 | ] |
196 | 214 | }, |
197 | 215 | { |
198 | 216 | "cell_type": "markdown", |
199 | 217 | "id": "22804320-47c7-4965-a4d2-afc855cfd1b9", |
200 | | - "metadata": {}, |
| 218 | + "metadata": { |
| 219 | + "user_expressions": [] |
| 220 | + }, |
201 | 221 | "source": [ |
202 | 222 | "#### Create Sample Waveform Plots" |
203 | 223 | ] |
|
222 | 242 | { |
223 | 243 | "cell_type": "markdown", |
224 | 244 | "id": "5da80824-8569-4d87-9544-6bc409956893", |
225 | | - "metadata": {}, |
| 245 | + "metadata": { |
| 246 | + "user_expressions": [] |
| 247 | + }, |
226 | 248 | "source": [ |
227 | 249 | "#### Make Atl06 Request\n", |
228 | 250 | "* Below we run an ATL06-SR processing request on the same source data using the same parameters. Because the `keep_id` argument is set to true here and above when we made the ATL08 request, we can merge the resulting dataframes and have a single table of both elevation data using the customized ATL06-SR algorithm, and vegatation data using the PhoREAL algorithm." |
|
243 | 265 | { |
244 | 266 | "cell_type": "markdown", |
245 | 267 | "id": "fd03f4ab-163a-49e3-b810-2f7d3bb37ffc", |
246 | | - "metadata": {}, |
| 268 | + "metadata": { |
| 269 | + "user_expressions": [] |
| 270 | + }, |
247 | 271 | "source": [ |
248 | 272 | "#### Merge Atl06 and Atl08 GeoDataFrames" |
249 | 273 | ] |
|
272 | 296 | ], |
273 | 297 | "metadata": { |
274 | 298 | "kernelspec": { |
275 | | - "display_name": "Python 3 (ipykernel)", |
| 299 | + "display_name": "IPython - SlideRule", |
276 | 300 | "language": "python", |
277 | | - "name": "python3" |
| 301 | + "name": "sliderule_env" |
278 | 302 | }, |
279 | 303 | "language_info": { |
280 | 304 | "codemirror_mode": { |
|
286 | 310 | "name": "python", |
287 | 311 | "nbconvert_exporter": "python", |
288 | 312 | "pygments_lexer": "ipython3", |
289 | | - "version": "3.11.3" |
| 313 | + "version": "3.11.4" |
290 | 314 | } |
291 | 315 | }, |
292 | 316 | "nbformat": 4, |
|
0 commit comments