|
98 | 98 | " for dataset in datasets[group]:\n", |
99 | 99 | " DS = '/gt%d%s/%s/%s' % (pair, beam, group, dataset)\n", |
100 | 100 | " try:\n", |
101 | | - " temp[dataset] = np.array(h5f[DS]) \n", |
102 | | - " if '_FillValue' in h5f[DS].attrs: # Convert Fortran NaNs to Python NaNs\n", |
| 101 | + " temp[dataset] = np.array(h5f[DS])\n", |
| 102 | + " # Convert Fortran NaNs to Python NaNs\n", |
| 103 | + " if '_FillValue' in h5f[DS].attrs:\n", |
103 | 104 | " fill_value = h5f[DS].attrs['_FillValue']\n", |
104 | 105 | " temp[dataset][temp[dataset] == fill_value] = np.NaN\n", |
105 | 106 | " except KeyError:\n", |
|
199 | 200 | "name": "stdout", |
200 | 201 | "output_type": "stream", |
201 | 202 | "text": [ |
202 | | - "download: s3://pangeo-data-upload-oregon/icesat2/data-correction/IceShelf_Antarctica_v1.cpg to ../external_data/IceShelf_Antarctica_v1.cpg\n", |
203 | | - "download: s3://pangeo-data-upload-oregon/icesat2/data-correction/IceShelf_Antarctica_v1.dbf to ../external_data/IceShelf_Antarctica_v1.dbf\n", |
204 | 203 | "download: s3://pangeo-data-upload-oregon/icesat2/data-correction/IceShelf_Antarctica_v1.shx to ../external_data/IceShelf_Antarctica_v1.shx\n", |
| 204 | + "download: s3://pangeo-data-upload-oregon/icesat2/data-correction/IceShelf_Antarctica_v1.dbf to ../external_data/IceShelf_Antarctica_v1.dbf\n", |
| 205 | + "download: s3://pangeo-data-upload-oregon/icesat2/data-correction/IceShelf_Antarctica_v1.cpg to ../external_data/IceShelf_Antarctica_v1.cpg\n", |
205 | 206 | "download: s3://pangeo-data-upload-oregon/icesat2/data-correction/IceShelf_Antarctica_v1.prj to ../external_data/IceShelf_Antarctica_v1.prj\n", |
206 | 207 | "download: s3://pangeo-data-upload-oregon/icesat2/data-correction/IceShelf_Antarctica_v1.shp to ../external_data/IceShelf_Antarctica_v1.shp\n" |
207 | 208 | ] |
|
280 | 281 | "coords = np.squeeze(np.dstack((xp,yp)))\n", |
281 | 282 | "poly_mpl = path.Path(coords)\n", |
282 | 283 | "\n", |
283 | | - "# Add 'mask' dataset (containing the x-y coordinate pairs within the mask) to list D6 for each beam/pair combination\n", |
| 284 | + "# Add 'mask' dataset (containing the x-y coordinate pairs within the mask) to list D6 for each \n", |
| 285 | + "# beam/pair combination\n", |
284 | 286 | "for Di in D6:\n", |
285 | 287 | " Di['mask'] = poly_mpl.contains_points(np.transpose([Di['x'],Di['y']]))\n", |
286 | 288 | "\n", |
|
349 | 351 | "plt.subplot(122)\n", |
350 | 352 | "plot_moa()\n", |
351 | 353 | "for Di in D6:\n", |
352 | | - " plt.scatter(Di['x'][::20],Di['y'][::20],c = Di['tide_load'][::20],s = 0.1,\\\n", |
| 354 | + " plt.scatter(Di['x'][::20],Di['y'][::20],c = Di['tide_load'][::20],s = 0.1, \\\n", |
353 | 355 | " vmin=-0.01,vmax=0.01)\n", |
354 | 356 | "\n", |
355 | 357 | "cbar = plt.colorbar()\n", |
|
405 | 407 | "plt.figure(figsize = (10,8))\n", |
406 | 408 | "plot_moa()\n", |
407 | 409 | "for Di in D6:\n", |
408 | | - " plt.scatter(Di['x'][Di['mask']][::20],Di['y'][Di['mask']][::20],\\\n", |
| 410 | + " plt.scatter(Di['x'][Di['mask']][::20],Di['y'][Di['mask']][::20], \\\n", |
409 | 411 | " c = Di['dac'][Di['mask']][::20],s = 0.1,vmin=0,vmax=0.5)\n", |
410 | 412 | "cbar = plt.colorbar()\n", |
411 | 413 | "cbar.set_label('dynamic atmosphere correction [m]', rotation=270, labelpad = 12)\n", |
|
688 | 690 | "for Di in D6:\n", |
689 | 691 | " h_MSL = Di['h_li'] - MDT_corr - Di['geoid_h']\n", |
690 | 692 | " thickness = ((1/rho_ice - 1/rho_ocean)**(-1)) * ((h_MSL - Di['FAC_interp'])/rho_ice)\n", |
691 | | - " plt.scatter(Di['x'][Di['mask']][::20],Di['y'][Di['mask']][::20],\\\n", |
| 693 | + " plt.scatter(Di['x'][Di['mask']][::20],Di['y'][Di['mask']][::20], \\\n", |
692 | 694 | " c = thickness[Di['mask']][::20],s = 0.1)\n", |
693 | 695 | " plt.clim([0,1000])\n", |
694 | 696 | "cbar = plt.colorbar()\n", |
|
0 commit comments