|
99 | 99 | " DS = '/gt%d%s/%s/%s' % (pair, beam, group, dataset)\n", |
100 | 100 | " try:\n", |
101 | 101 | " temp[dataset] = np.array(h5f[DS]) \n", |
102 | | - " if '_FillValue' in h5f[DS].attrs: # Converting Fortran NaNs to Python NaNs\n", |
| 102 | + " if '_FillValue' in h5f[DS].attrs: # Convert Fortran NaNs to Python NaNs\n", |
103 | 103 | " fill_value = h5f[DS].attrs['_FillValue']\n", |
104 | 104 | " temp[dataset][temp[dataset] == fill_value] = np.NaN\n", |
105 | 105 | " except KeyError:\n", |
|
137 | 137 | ], |
138 | 138 | "source": [ |
139 | 139 | "%%bash\n", |
140 | | - "aws s3 cp s3://pangeo-data-upload-oregon/icesat2/data-correction/byrd_moa.mat /home/jovyan/external_data/ " |
| 140 | + "aws s3 cp s3://pangeo-data-upload-oregon/icesat2/data-correction/byrd_moa.mat \\\n", |
| 141 | + " /home/jovyan/external_data/ " |
141 | 142 | ] |
142 | 143 | }, |
143 | 144 | { |
|
199 | 200 | "output_type": "stream", |
200 | 201 | "text": [ |
201 | 202 | "download: s3://pangeo-data-upload-oregon/icesat2/data-correction/IceShelf_Antarctica_v1.cpg to ../external_data/IceShelf_Antarctica_v1.cpg\n", |
202 | | - "download: s3://pangeo-data-upload-oregon/icesat2/data-correction/IceShelf_Antarctica_v1.shx to ../external_data/IceShelf_Antarctica_v1.shx\n", |
203 | 203 | "download: s3://pangeo-data-upload-oregon/icesat2/data-correction/IceShelf_Antarctica_v1.dbf to ../external_data/IceShelf_Antarctica_v1.dbf\n", |
| 204 | + "download: s3://pangeo-data-upload-oregon/icesat2/data-correction/IceShelf_Antarctica_v1.shx to ../external_data/IceShelf_Antarctica_v1.shx\n", |
204 | 205 | "download: s3://pangeo-data-upload-oregon/icesat2/data-correction/IceShelf_Antarctica_v1.prj to ../external_data/IceShelf_Antarctica_v1.prj\n", |
205 | 206 | "download: s3://pangeo-data-upload-oregon/icesat2/data-correction/IceShelf_Antarctica_v1.shp to ../external_data/IceShelf_Antarctica_v1.shp\n" |
206 | 207 | ] |
207 | 208 | } |
208 | 209 | ], |
209 | 210 | "source": [ |
210 | 211 | "%%bash\n", |
211 | | - "aws s3 cp s3://pangeo-data-upload-oregon/icesat2/data-correction/ /home/jovyan/external_data/ --recursive --exclude \"*\" --include \"IceShelf_Antarctica_v1.*\"" |
| 212 | + "aws s3 cp s3://pangeo-data-upload-oregon/icesat2/data-correction/ /home/jovyan/external_data/ \\\n", |
| 213 | + " --recursive --exclude \"*\" --include \"IceShelf_Antarctica_v1.*\"" |
212 | 214 | ] |
213 | 215 | }, |
214 | 216 | { |
|
278 | 280 | "coords = np.squeeze(np.dstack((xp,yp)))\n", |
279 | 281 | "poly_mpl = path.Path(coords)\n", |
280 | 282 | "\n", |
281 | | - "for Di in D6: # Add 'mask' dataset (containing the x-y coordinate pairs within the mask) to list D6 for each beam/pair combination\n", |
| 283 | + "# Add 'mask' dataset (containing the x-y coordinate pairs within the mask) to list D6 for each beam/pair combination\n", |
| 284 | + "for Di in D6:\n", |
282 | 285 | " Di['mask'] = poly_mpl.contains_points(np.transpose([Di['x'],Di['y']]))\n", |
283 | 286 | "\n", |
284 | 287 | "plt.figure(figsize = (10,8))\n", |
|
346 | 349 | "plt.subplot(122)\n", |
347 | 350 | "plot_moa()\n", |
348 | 351 | "for Di in D6:\n", |
349 | | - " plt.scatter(Di['x'][::20],Di['y'][::20],c = Di['tide_load'][::20],s = 0.1,vmin=-0.01,vmax=0.01)\n", |
| 352 | + " plt.scatter(Di['x'][::20],Di['y'][::20],c = Di['tide_load'][::20],s = 0.1,\\\n", |
| 353 | + " vmin=-0.01,vmax=0.01)\n", |
350 | 354 | "\n", |
351 | 355 | "cbar = plt.colorbar()\n", |
352 | 356 | "cbar.set_label('ocean load tide height [m]', rotation=270, labelpad = 12)\n", |
|
401 | 405 | "plt.figure(figsize = (10,8))\n", |
402 | 406 | "plot_moa()\n", |
403 | 407 | "for Di in D6:\n", |
404 | | - " plt.scatter(Di['x'][Di['mask']][::20],Di['y'][Di['mask']][::20],c = Di['dac'][Di['mask']][::20],s = 0.1,vmin=0,vmax=0.5)\n", |
| 408 | + " plt.scatter(Di['x'][Di['mask']][::20],Di['y'][Di['mask']][::20],\\\n", |
| 409 | + " c = Di['dac'][Di['mask']][::20],s = 0.1,vmin=0,vmax=0.5)\n", |
405 | 410 | "cbar = plt.colorbar()\n", |
406 | 411 | "cbar.set_label('dynamic atmosphere correction [m]', rotation=270, labelpad = 12)\n", |
407 | 412 | "\n", |
|
474 | 479 | ], |
475 | 480 | "source": [ |
476 | 481 | "%%bash\n", |
477 | | - "aws s3 cp s3://pangeo-data-upload-oregon/icesat2/data-correction/ /home/jovyan/external_data/ --recursive --exclude \"*\" --include \"FDM_*.nc\"" |
| 482 | + "aws s3 cp s3://pangeo-data-upload-oregon/icesat2/data-correction/ /home/jovyan/external_data/ \\\n", |
| 483 | + " --recursive --exclude \"*\" --include \"FDM_*.nc\"" |
478 | 484 | ] |
479 | 485 | }, |
480 | 486 | { |
|
496 | 502 | "FAC = Dataset(external_data + '/FDM_FirnAir_ANT27_1979-2016.nc')\n", |
497 | 503 | "\n", |
498 | 504 | "print(FAC.file_format)\n", |
499 | | - "print(FAC.dimensions.keys()) # In this case, dimensions represent the physical dimensions assigned to each variable\n", |
500 | | - "print(FAC.variables.keys()) # Variables are arrays of values where the bulk of the information is stored" |
| 505 | + "print(FAC.dimensions.keys())\n", |
| 506 | + "print(FAC.variables.keys())\n", |
| 507 | + "\n", |
| 508 | + "# In this case, dimensions represent the physical dimensions assigned to each variable. Variables are arrays of values where the bulk of the information is stored" |
501 | 509 | ] |
502 | 510 | }, |
503 | 511 | { |
|
593 | 601 | "metadata": {}, |
594 | 602 | "outputs": [], |
595 | 603 | "source": [ |
596 | | - "inds = np.where((lon_fac > 147) & (lon_fac < 163) & (lat_fac > -82) & (lat_fac < -78)) # Subsetting area around Byrd\n", |
| 604 | + "# Subset area around Byrd\n", |
| 605 | + "inds = np.where((lon_fac > 147) & (lon_fac < 163) & (lat_fac > -82) & (lat_fac < -78))\n", |
597 | 606 | "mean_fac_byrd = np.squeeze(meanFirnAir_16[inds]).ravel()\n", |
598 | 607 | "xy = np.empty((len(x_fac[inds]),2))\n", |
599 | 608 | "xy[:,0] = np.squeeze(x_fac[inds]).ravel()\n", |
|
679 | 688 | "for Di in D6:\n", |
680 | 689 | " h_MSL = Di['h_li'] - MDT_corr - Di['geoid_h']\n", |
681 | 690 | " thickness = ((1/rho_ice - 1/rho_ocean)**(-1)) * ((h_MSL - Di['FAC_interp'])/rho_ice)\n", |
682 | | - " plt.scatter(Di['x'][Di['mask']][::20],Di['y'][Di['mask']][::20],c = thickness[Di['mask']][::20],s = 0.1)\n", |
| 691 | + " plt.scatter(Di['x'][Di['mask']][::20],Di['y'][Di['mask']][::20],\\\n", |
| 692 | + " c = thickness[Di['mask']][::20],s = 0.1)\n", |
683 | 693 | " plt.clim([0,1000])\n", |
684 | 694 | "cbar = plt.colorbar()\n", |
685 | 695 | "cbar.set_label('thickness [m]', rotation=270, labelpad = 12)\n", |
|
723 | 733 | ], |
724 | 734 | "source": [ |
725 | 735 | "%%bash\n", |
726 | | - "aws s3 cp s3://pangeo-data-upload-oregon/icesat2/data-correction/ /home/jovyan/external_data/ --recursive --exclude \"*\" --include \"SMB_*.nc\"" |
| 736 | + "aws s3 cp s3://pangeo-data-upload-oregon/icesat2/data-correction/ /home/jovyan/external_data/ \\\n", |
| 737 | + " --recursive --exclude \"*\" --include \"SMB_*.nc\"" |
727 | 738 | ] |
728 | 739 | }, |
729 | 740 | { |
|
0 commit comments