Skip to content

Commit

Permalink
remove air part of SMP profiles (#147)
Browse files Browse the repository at this point in the history
* remove air part of SMP profiles

* typo fixes
  • Loading branch information
mikedurand authored Jul 23, 2021
1 parent c28b22d commit 46ff025
Showing 1 changed file with 46 additions and 7 deletions.
53 changes: 46 additions & 7 deletions book/tutorials/microstructure/microstructure-tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
"# Grab all the sites with equivalent diameter data (set reduces a list to only its unique entries)\n",
"sites = df['site_id'].unique()\n",
"\n",
"# Store all site names that have mulitple SSA instruments\n",
"# Store all site names that have multiple SSA instruments\n",
"multi_instr_sites = []\n",
"instruments = []\n",
"\n",
Expand Down Expand Up @@ -304,7 +304,7 @@
"source": [
"### 2. Pull the snowmicropenetrometer data and compute SSA\n",
"\n",
"The next step is to grab some SMP data to compare to. We're going to get the SMP at site 2N13, where we have a copule of SSA profiles from interating spheres (as well as microCT data, to be looked at in the next step!). \n",
"The next step is to grab some SMP data to compare to. We're going to get the SMP at site 2N13, where we have a copule of SSA profiles from integrating spheres (as well as microCT data, to be looked at in the next step!). \n",
"\n",
"The SMP measurements for SnowEx 2020 GrandMesa were all made by Megan Mason. If you're interested in working with the SMP data, please carefully read the NSIDC [documentation page](https://nsidc.org/data/SNEX20_SMP/versions/1). If you're planning to work with the data, please reach out to the author; the contact is (Megan Mason [email protected]). If you use a profile, consider checking out the comments which are described in the [Excel sheet linked from the Technical References part of the NSIDC documentation](https://nsidc.org/sites/nsidc.org/files/technical-references/SNEX20_SMP_FieldNotes.xlsx), where there are some really useful comments. \n",
"\n",
Expand Down Expand Up @@ -433,6 +433,38 @@
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The above shows the entire SMP profile; this includes the part of the force profile that is above the snow surface, and thus needs to be removed, in order to apply calculations only to the snow (not the air!). "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#extract the part of the profile that is in the snow (i.e. remove air)\n",
"depth_surf=p.detect_surface()\n",
"depth_ground=p.detect_ground()\n",
"samples_snow=p.samples_within_distance(begin=depth_surf, end=depth_ground, relativize=False)\n",
"samples_snow.distance-=depth_surf\n",
"plt.plot(samples_snow.distance, samples_snow.force)\n",
"plt.title(p.name)\n",
"plt.ylabel('Force [N]')\n",
"plt.xlabel('Depth [mm]')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The above part of the profile is just the part that is in the snow. PLEASE NOTE that the automated functions are not infallible, and need to be used with care. For now, these need to be compared back to the notes and interpreted manually. "
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -446,16 +478,16 @@
"metadata": {},
"outputs": [],
"source": [
"# the window size is a parameter you can play with. default is 2.5 mm setting to 10 mm does some smoothing\n",
"p2015 = proksch2015.calc(p.samples,window=10) \n",
"# call using the snowmicropyn library proksch2015\n",
"p2015 = proksch2015.calc(p.samples) \n",
"p2015.head() #check out the first few values of SSA"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 3. Read microCT data, and compare intergrating sphere, SMP and CT data"
"### 3. Read microCT data, and compare integrating sphere, SMP and CT data"
]
},
{
Expand Down Expand Up @@ -488,7 +520,7 @@
"data_dir='/tmp/microstructure/microCT/txt/'\n",
"[SSA_CT,height_min,height_max]=read_CT_txt_files(data_dir)\n",
"\n",
"SSA_CT #chck out the SSA values read in from MicroCT"
"SSA_CT #check out the SSA values read in from MicroCT"
]
},
{
Expand Down Expand Up @@ -553,12 +585,19 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Some of the ways that you could imagine connecting microstructure measurements to other quantities would be with the SWESARR radar data. Although the radar data does seem to have some orthorectification issues that haven't been fully worked out, I can imagine these being worked around by careful choice of places you match up the microstructure to the radar. Note that places that are shallower tend to have larger D<sub>eq</sub> and vice versa, and the spatial variability in SSA was fairly low in general in Grand Mesa 2020, so looking at multiple SSA vs radar samples might not yield a great correlation. But you never know, could be fun to try! Generaly speaking, we don't expect a ton of impact of the microstructure on L-band (UAVSAR), but it would be interesting to explore that.\n",
"Some of the ways that you could imagine connecting microstructure measurements to other quantities would be with the SWESARR radar data. Although the radar data does seem to have some orthorectification issues that haven't been fully worked out, I can imagine these being worked around by careful choice of places you match up the microstructure to the radar. Note that places that are shallower tend to have larger D<sub>eq</sub> and vice versa, and the spatial variability in SSA was fairly low in general in Grand Mesa 2020, so looking at multiple SSA vs radar samples might not yield a great correlation. But you never know, could be fun to try! Generally speaking, we don't expect a ton of impact of the microstructure on L-band (UAVSAR), but it would be interesting to explore that.\n",
"\n",
"One thing that could be of great value is to calibrate the SMP estimates of SSA to the integrating spheres. If you're interested in doing that, do reach out first. This could be a really interesting thing to explore!\n",
"\n",
"It might also be interesting to compare the data to hand hardness measured in the snowpit, and to traditional hand lens measurements. "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit 46ff025

Please sign in to comment.