
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "examples/Creating_GS_Files/plot_tifs_to_netcdf.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

    .. note::
        :class: sphx-glr-download-link-note

        :ref:`Go to the end <sphx_glr_download_examples_Creating_GS_Files_plot_tifs_to_netcdf.py>`
        to download the full example code.

.. rst-class:: sphx-glr-example-title

.. _sphx_glr_examples_Creating_GS_Files_plot_tifs_to_netcdf.py:


GeoTIFFs to NetCDF
------------------

In this example, we demonstrates the workflow for creating a GS file from the GeoTIFF (.tif/.tiff) file format. This includes adding individual TIF files as single 2-D variables, as well as how to create a 3-D variable by stacking multiple TIF files along a specified dimension.

Additionally, this example shows how to handle Raster data that have differing x-y grids. Specifically, this example creates the following Raster datasets:

1. Raster Dataset #1
    1a. 2-D magnetic grid, original x-y discretization (600 m cell size)
2. Raster Dataset #2
    2a. 2-D magnetic grid, aligned to match the x-y dimensions of the resistivity layers (1000 m cell size)

    2b. 3-D resistivity grid

Dataset References:

Minsley, B.J., James, S.R., Bedrosian, P.A., Pace, M.D., Hoogenboom, B.E., and Burton, B.L., 2021, Airborne electromagnetic, magnetic, and radiometric survey of the Mississippi Alluvial Plain, November 2019 - March 2020: U.S. Geological Survey data release, https://doi.org/10.5066/P9E44CTQ.

James, S.R., and Minsley, B.J., 2021, Combined results and derivative products of hydrogeologic structure and properties from airborne electromagnetic surveys in the Mississippi Alluvial Plain: U.S. Geological Survey data release, https://doi.org/10.5066/P9382RCI.

.. GENERATED FROM PYTHON SOURCE LINES 24-30

.. code-block:: Python

    import matplotlib.pyplot as plt
    from os.path import join
    import gspy
    from gspy import Survey
    from pprint import pprint








.. GENERATED FROM PYTHON SOURCE LINES 31-33

Convert data from GeoTIFF to NetCDF
+++++++++++++++++++++++++++++++++++

.. GENERATED FROM PYTHON SOURCE LINES 35-36

Initialize the Survey

.. GENERATED FROM PYTHON SOURCE LINES 36-51

.. code-block:: Python


    # Path to example files
    data_path = "..//..//..//..//example_material//example_2"

    # Survey metadata file
    metadata = join(data_path, "data//Tempest_survey_md.yml")

    # Establish the Survey
    survey = Survey.from_dict(metadata)


    container = survey.gs.add_container('derived_products', **dict(content = "raw and processed data",
                                                            comment = "This is a test"))









.. GENERATED FROM PYTHON SOURCE LINES 52-55

Create the First Raster Dataset
Import 2-D magnetic data, discretized on 600 m x 600 m grid
Define input metadata file (which contains the TIF filename linked with desired variable name)

.. GENERATED FROM PYTHON SOURCE LINES 55-60

.. code-block:: Python

    d_supp1 = join(data_path, 'data//Tempest_raster_md.yml')

    # Read data and format as Raster class object
    container.gs.add(key="map", metadata_file=d_supp1)






.. raw:: html

    <div class="output_subarea output_html rendered_html output_result">
    <div><svg style="position: absolute; width: 0; height: 0; overflow: hidden">
    <defs>
    <symbol id="icon-database" viewBox="0 0 32 32">
    <path d="M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z"></path>
    <path d="M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z"></path>
    <path d="M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z"></path>
    </symbol>
    <symbol id="icon-file-text2" viewBox="0 0 32 32">
    <path d="M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z"></path>
    <path d="M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z"></path>
    <path d="M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z"></path>
    <path d="M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z"></path>
    </symbol>
    </defs>
    </svg>
    <style>/* CSS stylesheet for displaying xarray objects in jupyterlab.
     *
     */

    :root {
      --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));
      --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));
      --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));
      --xr-border-color: var(--jp-border-color2, #e0e0e0);
      --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);
      --xr-background-color: var(--jp-layout-color0, white);
      --xr-background-color-row-even: var(--jp-layout-color1, white);
      --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);
    }

    html[theme="dark"],
    html[data-theme="dark"],
    body[data-theme="dark"],
    body.vscode-dark {
      --xr-font-color0: rgba(255, 255, 255, 1);
      --xr-font-color2: rgba(255, 255, 255, 0.54);
      --xr-font-color3: rgba(255, 255, 255, 0.38);
      --xr-border-color: #1f1f1f;
      --xr-disabled-color: #515151;
      --xr-background-color: #111111;
      --xr-background-color-row-even: #111111;
      --xr-background-color-row-odd: #313131;
    }

    .xr-wrap {
      display: block !important;
      min-width: 300px;
      max-width: 700px;
    }

    .xr-text-repr-fallback {
      /* fallback to plain text repr when CSS is not injected (untrusted notebook) */
      display: none;
    }

    .xr-header {
      padding-top: 6px;
      padding-bottom: 6px;
      margin-bottom: 4px;
      border-bottom: solid 1px var(--xr-border-color);
    }

    .xr-header > div,
    .xr-header > ul {
      display: inline;
      margin-top: 0;
      margin-bottom: 0;
    }

    .xr-obj-type,
    .xr-array-name {
      margin-left: 2px;
      margin-right: 10px;
    }

    .xr-obj-type {
      color: var(--xr-font-color2);
    }

    .xr-sections {
      padding-left: 0 !important;
      display: grid;
      grid-template-columns: 150px auto auto 1fr 0 20px 0 20px;
    }

    .xr-section-item {
      display: contents;
    }

    .xr-section-item input {
      display: inline-block;
      opacity: 0;
      height: 0;
    }

    .xr-section-item input + label {
      color: var(--xr-disabled-color);
    }

    .xr-section-item input:enabled + label {
      cursor: pointer;
      color: var(--xr-font-color2);
    }

    .xr-section-item input:focus + label {
      border: 2px solid var(--xr-font-color0);
    }

    .xr-section-item input:enabled + label:hover {
      color: var(--xr-font-color0);
    }

    .xr-section-summary {
      grid-column: 1;
      color: var(--xr-font-color2);
      font-weight: 500;
    }

    .xr-section-summary > span {
      display: inline-block;
      padding-left: 0.5em;
    }

    .xr-section-summary-in:disabled + label {
      color: var(--xr-font-color2);
    }

    .xr-section-summary-in + label:before {
      display: inline-block;
      content: "►";
      font-size: 11px;
      width: 15px;
      text-align: center;
    }

    .xr-section-summary-in:disabled + label:before {
      color: var(--xr-disabled-color);
    }

    .xr-section-summary-in:checked + label:before {
      content: "▼";
    }

    .xr-section-summary-in:checked + label > span {
      display: none;
    }

    .xr-section-summary,
    .xr-section-inline-details {
      padding-top: 4px;
      padding-bottom: 4px;
    }

    .xr-section-inline-details {
      grid-column: 2 / -1;
    }

    .xr-section-details {
      display: none;
      grid-column: 1 / -1;
      margin-bottom: 5px;
    }

    .xr-section-summary-in:checked ~ .xr-section-details {
      display: contents;
    }

    .xr-array-wrap {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: 20px auto;
    }

    .xr-array-wrap > label {
      grid-column: 1;
      vertical-align: top;
    }

    .xr-preview {
      color: var(--xr-font-color3);
    }

    .xr-array-preview,
    .xr-array-data {
      padding: 0 5px !important;
      grid-column: 2;
    }

    .xr-array-data,
    .xr-array-in:checked ~ .xr-array-preview {
      display: none;
    }

    .xr-array-in:checked ~ .xr-array-data,
    .xr-array-preview {
      display: inline-block;
    }

    .xr-dim-list {
      display: inline-block !important;
      list-style: none;
      padding: 0 !important;
      margin: 0;
    }

    .xr-dim-list li {
      display: inline-block;
      padding: 0;
      margin: 0;
    }

    .xr-dim-list:before {
      content: "(";
    }

    .xr-dim-list:after {
      content: ")";
    }

    .xr-dim-list li:not(:last-child):after {
      content: ",";
      padding-right: 5px;
    }

    .xr-has-index {
      font-weight: bold;
    }

    .xr-var-list,
    .xr-var-item {
      display: contents;
    }

    .xr-var-item > div,
    .xr-var-item label,
    .xr-var-item > .xr-var-name span {
      background-color: var(--xr-background-color-row-even);
      margin-bottom: 0;
    }

    .xr-var-item > .xr-var-name:hover span {
      padding-right: 5px;
    }

    .xr-var-list > li:nth-child(odd) > div,
    .xr-var-list > li:nth-child(odd) > label,
    .xr-var-list > li:nth-child(odd) > .xr-var-name span {
      background-color: var(--xr-background-color-row-odd);
    }

    .xr-var-name {
      grid-column: 1;
    }

    .xr-var-dims {
      grid-column: 2;
    }

    .xr-var-dtype {
      grid-column: 3;
      text-align: right;
      color: var(--xr-font-color2);
    }

    .xr-var-preview {
      grid-column: 4;
    }

    .xr-index-preview {
      grid-column: 2 / 5;
      color: var(--xr-font-color2);
    }

    .xr-var-name,
    .xr-var-dims,
    .xr-var-dtype,
    .xr-preview,
    .xr-attrs dt {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      padding-right: 10px;
    }

    .xr-var-name:hover,
    .xr-var-dims:hover,
    .xr-var-dtype:hover,
    .xr-attrs dt:hover {
      overflow: visible;
      width: auto;
      z-index: 1;
    }

    .xr-var-attrs,
    .xr-var-data,
    .xr-index-data {
      display: none;
      background-color: var(--xr-background-color) !important;
      padding-bottom: 5px !important;
    }

    .xr-var-attrs-in:checked ~ .xr-var-attrs,
    .xr-var-data-in:checked ~ .xr-var-data,
    .xr-index-data-in:checked ~ .xr-index-data {
      display: block;
    }

    .xr-var-data > table {
      float: right;
    }

    .xr-var-name span,
    .xr-var-data,
    .xr-index-name div,
    .xr-index-data,
    .xr-attrs {
      padding-left: 25px !important;
    }

    .xr-attrs,
    .xr-var-attrs,
    .xr-var-data,
    .xr-index-data {
      grid-column: 1 / -1;
    }

    dl.xr-attrs {
      padding: 0;
      margin: 0;
      display: grid;
      grid-template-columns: 125px auto;
    }

    .xr-attrs dt,
    .xr-attrs dd {
      padding: 0;
      margin: 0;
      float: left;
      padding-right: 10px;
      width: auto;
    }

    .xr-attrs dt {
      font-weight: normal;
      grid-column: 1;
    }

    .xr-attrs dt:hover span {
      display: inline-block;
      background: var(--xr-background-color);
      padding-right: 10px;
    }

    .xr-attrs dd {
      grid-column: 2;
      white-space: pre-wrap;
      word-break: break-all;
    }

    .xr-icon-database,
    .xr-icon-file-text2,
    .xr-no-icon {
      display: inline-block;
      vertical-align: middle;
      width: 1em;
      height: 1.5em !important;
      stroke-width: 0;
      stroke: currentColor;
      fill: currentColor;
    }
    </style><pre class='xr-text-repr-fallback'>&lt;xarray.DatasetView&gt; Size: 6MB
    Dimensions:       (x: 599, nv: 2, y: 1212)
    Coordinates:
        spatial_ref   float64 8B 0.0
      * x             (x) float64 5kB 2.928e+05 2.934e+05 ... 6.51e+05 6.516e+05
      * nv            (nv) int64 16B 0 1
      * y             (y) float64 10kB 1.607e+06 1.606e+06 ... 8.808e+05 8.802e+05
    Data variables:
        x_bnds        (x, nv) float64 10kB 2.925e+05 2.931e+05 ... 6.519e+05
        y_bnds        (y, nv) float64 19kB 1.607e+06 1.606e+06 ... 8.799e+05
        magnetic_tmi  (y, x) float64 6MB nan nan nan nan nan ... nan nan nan nan nan
    Attributes:
        comment:  &lt;additional details or ancillary information&gt;
        content:  gridded magnetic map</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataTree</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-feff1aff-8388-4692-a757-b12d423031de' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-feff1aff-8388-4692-a757-b12d423031de' class='xr-section-summary'  title='Expand/collapse section'>Groups: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><div style='display: inline-grid; grid-template-columns: 100%; grid-column: 1 / -1'></div></div></li><li class='xr-section-item'><input id='section-f69f6a5f-b1a1-47f2-8761-f71d7c5fb041' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-f69f6a5f-b1a1-47f2-8761-f71d7c5fb041' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>x</span>: 599</li><li><span class='xr-has-index'>nv</span>: 2</li><li><span class='xr-has-index'>y</span>: 1212</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-e070aab3-935b-4256-af55-61b868b85fba' class='xr-section-summary-in' type='checkbox'  checked><label for='section-e070aab3-935b-4256-af55-61b868b85fba' class='xr-section-summary' >Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>spatial_ref</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0</div><input id='attrs-ee449b54-2054-430f-91ed-0b59f72d78c4' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-ee449b54-2054-430f-91ed-0b59f72d78c4' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ef4d03df-6233-4844-87f7-c2d0e3064087' class='xr-var-data-in' type='checkbox'><label for='data-ef4d03df-6233-4844-87f7-c2d0e3064087' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>crs_wkt :</span></dt><dd>PROJCRS[&quot;NAD83 / Conus Albers&quot;,BASEGEOGCRS[&quot;NAD83&quot;,DATUM[&quot;North American Datum 1983&quot;,ELLIPSOID[&quot;GRS 1980&quot;,6378137,298.257222101,LENGTHUNIT[&quot;metre&quot;,1]]],PRIMEM[&quot;Greenwich&quot;,0,ANGLEUNIT[&quot;degree&quot;,0.0174532925199433]],ID[&quot;EPSG&quot;,4269]],CONVERSION[&quot;Conus Albers&quot;,METHOD[&quot;Albers Equal Area&quot;,ID[&quot;EPSG&quot;,9822]],PARAMETER[&quot;Latitude of false origin&quot;,23,ANGLEUNIT[&quot;degree&quot;,0.0174532925199433],ID[&quot;EPSG&quot;,8821]],PARAMETER[&quot;Longitude of false origin&quot;,-96,ANGLEUNIT[&quot;degree&quot;,0.0174532925199433],ID[&quot;EPSG&quot;,8822]],PARAMETER[&quot;Latitude of 1st standard parallel&quot;,29.5,ANGLEUNIT[&quot;degree&quot;,0.0174532925199433],ID[&quot;EPSG&quot;,8823]],PARAMETER[&quot;Latitude of 2nd standard parallel&quot;,45.5,ANGLEUNIT[&quot;degree&quot;,0.0174532925199433],ID[&quot;EPSG&quot;,8824]],PARAMETER[&quot;Easting at false origin&quot;,0,LENGTHUNIT[&quot;metre&quot;,1],ID[&quot;EPSG&quot;,8826]],PARAMETER[&quot;Northing at false origin&quot;,0,LENGTHUNIT[&quot;metre&quot;,1],ID[&quot;EPSG&quot;,8827]]],CS[Cartesian,2],AXIS[&quot;easting (X)&quot;,east,ORDER[1],LENGTHUNIT[&quot;metre&quot;,1]],AXIS[&quot;northing (Y)&quot;,north,ORDER[2],LENGTHUNIT[&quot;metre&quot;,1]],USAGE[SCOPE[&quot;Data analysis and small scale data presentation for contiguous lower 48 states.&quot;],AREA[&quot;United States (USA) - CONUS onshore - Alabama; Arizona; Arkansas; California; Colorado; Connecticut; Delaware; Florida; Georgia; Idaho; Illinois; Indiana; Iowa; Kansas; Kentucky; Louisiana; Maine; Maryland; Massachusetts; Michigan; Minnesota; Mississippi; Missouri; Montana; Nebraska; Nevada; New Hampshire; New Jersey; New Mexico; New York; North Carolina; North Dakota; Ohio; Oklahoma; Oregon; Pennsylvania; Rhode Island; South Carolina; South Dakota; Tennessee; Texas; Utah; Vermont; Virginia; Washington; West Virginia; Wisconsin; Wyoming.&quot;],BBOX[24.41,-124.79,49.38,-66.91]],ID[&quot;EPSG&quot;,5070]]</dd><dt><span>semi_major_axis :</span></dt><dd>6378137.0</dd><dt><span>semi_minor_axis :</span></dt><dd>6356752.314140356</dd><dt><span>inverse_flattening :</span></dt><dd>298.257222101</dd><dt><span>reference_ellipsoid_name :</span></dt><dd>GRS 1980</dd><dt><span>longitude_of_prime_meridian :</span></dt><dd>0.0</dd><dt><span>prime_meridian_name :</span></dt><dd>Greenwich</dd><dt><span>geographic_crs_name :</span></dt><dd>NAD83</dd><dt><span>horizontal_datum_name :</span></dt><dd>North American Datum 1983</dd><dt><span>projected_crs_name :</span></dt><dd>NAD83 / Conus Albers</dd><dt><span>grid_mapping_name :</span></dt><dd>albers_conical_equal_area</dd><dt><span>standard_parallel :</span></dt><dd>(29.5, 45.5)</dd><dt><span>latitude_of_projection_origin :</span></dt><dd>23.0</dd><dt><span>longitude_of_central_meridian :</span></dt><dd>-96.0</dd><dt><span>false_easting :</span></dt><dd>0.0</dd><dt><span>false_northing :</span></dt><dd>0.0</dd><dt><span>authority :</span></dt><dd>EPSG</dd><dt><span>wkid :</span></dt><dd>5070</dd></dl></div><div class='xr-var-data'><pre>array(0.)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>x</span></div><div class='xr-var-dims'>(x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>2.928e+05 2.934e+05 ... 6.516e+05</div><input id='attrs-009eae4a-698a-4b50-914a-1d6307a2d5d7' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-009eae4a-698a-4b50-914a-1d6307a2d5d7' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-186e0da1-9600-4ae7-9c80-fdeda5825113' class='xr-var-data-in' type='checkbox'><label for='data-186e0da1-9600-4ae7-9c80-fdeda5825113' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>projection_x_coordinate</dd><dt><span>long_name :</span></dt><dd>Easting</dd><dt><span>units :</span></dt><dd>meter</dd><dt><span>null_value :</span></dt><dd>not_defined</dd><dt><span>axis :</span></dt><dd>X</dd><dt><span>valid_range :</span></dt><dd>[292800. 651600.]</dd><dt><span>grid_mapping :</span></dt><dd>spatial_ref</dd><dt><span>bounds :</span></dt><dd>x_bnds</dd></dl></div><div class='xr-var-data'><pre>array([292800., 293400., 294000., ..., 650400., 651000., 651600.])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>nv</span></div><div class='xr-var-dims'>(nv)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1</div><input id='attrs-32df9168-1e66-43a3-86a3-6996d81172f3' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-32df9168-1e66-43a3-86a3-6996d81172f3' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b8360733-cfdb-4e95-b6c8-2c4a5b1b6a6b' class='xr-var-data-in' type='checkbox'><label for='data-b8360733-cfdb-4e95-b6c8-2c4a5b1b6a6b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>nv</dd><dt><span>long_name :</span></dt><dd>Number of vertices for bounding variables</dd><dt><span>units :</span></dt><dd>not_defined</dd><dt><span>null_value :</span></dt><dd>not_defined</dd><dt><span>valid_range :</span></dt><dd>[0 1]</dd><dt><span>grid_mapping :</span></dt><dd>spatial_ref</dd><dt><span>axis :</span></dt><dd>NV</dd></dl></div><div class='xr-var-data'><pre>array([0, 1])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>y</span></div><div class='xr-var-dims'>(y)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.607e+06 1.606e+06 ... 8.802e+05</div><input id='attrs-15001d97-21e6-4b4b-8eb3-b47601344c17' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-15001d97-21e6-4b4b-8eb3-b47601344c17' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f6c18b5d-41af-4d8c-96de-a58c4dec59bf' class='xr-var-data-in' type='checkbox'><label for='data-f6c18b5d-41af-4d8c-96de-a58c4dec59bf' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>projection_y_coordinate</dd><dt><span>long_name :</span></dt><dd>Northing</dd><dt><span>units :</span></dt><dd>meter</dd><dt><span>null_value :</span></dt><dd>not_defined</dd><dt><span>axis :</span></dt><dd>Y</dd><dt><span>valid_range :</span></dt><dd>[ 880200. 1606800.]</dd><dt><span>grid_mapping :</span></dt><dd>spatial_ref</dd><dt><span>bounds :</span></dt><dd>y_bnds</dd></dl></div><div class='xr-var-data'><pre>array([1606800., 1606200., 1605600., ...,  881400.,  880800.,  880200.])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-ba0054eb-ca9c-4976-bb01-646d47e343a6' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-ba0054eb-ca9c-4976-bb01-646d47e343a6' class='xr-section-summary'  title='Expand/collapse section'>Inherited coordinates: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'></ul></div></li><li class='xr-section-item'><input id='section-b62e53ac-a75e-4749-9474-59fe4bbd2afd' class='xr-section-summary-in' type='checkbox'  checked><label for='section-b62e53ac-a75e-4749-9474-59fe4bbd2afd' class='xr-section-summary' >Data variables: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>x_bnds</span></div><div class='xr-var-dims'>(x, nv)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>2.925e+05 2.931e+05 ... 6.519e+05</div><input id='attrs-cfcd0ba1-89c9-46a8-8bea-d677ff8b7e13' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-cfcd0ba1-89c9-46a8-8bea-d677ff8b7e13' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e0fb61d2-bf7a-483b-ba44-6086a0610f54' class='xr-var-data-in' type='checkbox'><label for='data-e0fb61d2-bf7a-483b-ba44-6086a0610f54' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>projection_x_coordinate_bounds</dd><dt><span>long_name :</span></dt><dd>Easting cell boundaries</dd><dt><span>units :</span></dt><dd>meter</dd><dt><span>null_value :</span></dt><dd>not_defined</dd><dt><span>axis :</span></dt><dd>X</dd><dt><span>valid_range :</span></dt><dd>[292500. 651900.]</dd><dt><span>grid_mapping :</span></dt><dd>spatial_ref</dd></dl></div><div class='xr-var-data'><pre>array([[292500., 293100.],
           [293100., 293700.],
           [293700., 294300.],
           ...,
           [650100., 650700.],
           [650700., 651300.],
           [651300., 651900.]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>y_bnds</span></div><div class='xr-var-dims'>(y, nv)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.607e+06 1.606e+06 ... 8.799e+05</div><input id='attrs-9165144b-7010-44e5-bfd3-2fd475f67ee0' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-9165144b-7010-44e5-bfd3-2fd475f67ee0' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f933893e-cf1f-4aef-97d7-051c0539e817' class='xr-var-data-in' type='checkbox'><label for='data-f933893e-cf1f-4aef-97d7-051c0539e817' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>projection_y_coordinate_bounds</dd><dt><span>long_name :</span></dt><dd>Northing cell boundaries</dd><dt><span>units :</span></dt><dd>meter</dd><dt><span>null_value :</span></dt><dd>not_defined</dd><dt><span>axis :</span></dt><dd>Y</dd><dt><span>valid_range :</span></dt><dd>[ 879900. 1607100.]</dd><dt><span>grid_mapping :</span></dt><dd>spatial_ref</dd></dl></div><div class='xr-var-data'><pre>array([[1607100., 1606500.],
           [1606500., 1605900.],
           [1605900., 1605300.],
           ...,
           [ 881700.,  881100.],
           [ 881100.,  880500.],
           [ 880500.,  879900.]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>magnetic_tmi</span></div><div class='xr-var-dims'>(y, x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-2e99b269-1a92-4f8d-9f9b-3aad0241095b' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-2e99b269-1a92-4f8d-9f9b-3aad0241095b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-67858edc-2465-4d1b-a498-16eee763f2ca' class='xr-var-data-in' type='checkbox'><label for='data-67858edc-2465-4d1b-a498-16eee763f2ca' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>total_magnetic_intensity</dd><dt><span>long_name :</span></dt><dd>Total magnetic intensity, diurnally corrected and filtered</dd><dt><span>units :</span></dt><dd>nT</dd><dt><span>null_value :</span></dt><dd>1.70141e+38</dd><dt><span>valid_range :</span></dt><dd>[-17504.6640625   11490.32324219]</dd><dt><span>grid_mapping :</span></dt><dd>spatial_ref</dd></dl></div><div class='xr-var-data'><pre>array([[          nan,           nan,           nan, ..., -437.66494751,
            -438.0090332 , -435.30517578],
           [          nan,           nan,           nan, ..., -429.26696777,
            -428.53414917, -426.61795044],
           [          nan,           nan,           nan, ..., -420.28356934,
            -419.06771851, -417.57122803],
           ...,
           [          nan,           nan,           nan, ...,           nan,
                      nan,           nan],
           [          nan,           nan,           nan, ...,           nan,
                      nan,           nan],
           [          nan,           nan,           nan, ...,           nan,
                      nan,           nan]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-4681448c-2877-424a-9ee0-7b3977f6b43a' class='xr-section-summary-in' type='checkbox'  checked><label for='section-4681448c-2877-424a-9ee0-7b3977f6b43a' class='xr-section-summary' >Attributes: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>comment :</span></dt><dd>&lt;additional details or ancillary information&gt;</dd><dt><span>content :</span></dt><dd>gridded magnetic map</dd></dl></div></li></ul></div></div>
    </div>
    <br />
    <br />

.. GENERATED FROM PYTHON SOURCE LINES 61-62

Create the Second Raster Dataset

.. GENERATED FROM PYTHON SOURCE LINES 62-70

.. code-block:: Python


    # Import both 3-D resistivity and 2-D magnetic data, aligned onto a common 1000 m x 1000 m grid
    # Define input metadata file (which contains the TIF filenames linked with desired variable names)
    d_supp2 = join(data_path, 'data//Tempest_rasters_md.yml')

    # Read data and format as Raster class object
    container.gs.add(key="maps", metadata_file=d_supp2)






.. raw:: html

    <div class="output_subarea output_html rendered_html output_result">
    <div><svg style="position: absolute; width: 0; height: 0; overflow: hidden">
    <defs>
    <symbol id="icon-database" viewBox="0 0 32 32">
    <path d="M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z"></path>
    <path d="M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z"></path>
    <path d="M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z"></path>
    </symbol>
    <symbol id="icon-file-text2" viewBox="0 0 32 32">
    <path d="M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z"></path>
    <path d="M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z"></path>
    <path d="M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z"></path>
    <path d="M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z"></path>
    </symbol>
    </defs>
    </svg>
    <style>/* CSS stylesheet for displaying xarray objects in jupyterlab.
     *
     */

    :root {
      --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));
      --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));
      --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));
      --xr-border-color: var(--jp-border-color2, #e0e0e0);
      --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);
      --xr-background-color: var(--jp-layout-color0, white);
      --xr-background-color-row-even: var(--jp-layout-color1, white);
      --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);
    }

    html[theme="dark"],
    html[data-theme="dark"],
    body[data-theme="dark"],
    body.vscode-dark {
      --xr-font-color0: rgba(255, 255, 255, 1);
      --xr-font-color2: rgba(255, 255, 255, 0.54);
      --xr-font-color3: rgba(255, 255, 255, 0.38);
      --xr-border-color: #1f1f1f;
      --xr-disabled-color: #515151;
      --xr-background-color: #111111;
      --xr-background-color-row-even: #111111;
      --xr-background-color-row-odd: #313131;
    }

    .xr-wrap {
      display: block !important;
      min-width: 300px;
      max-width: 700px;
    }

    .xr-text-repr-fallback {
      /* fallback to plain text repr when CSS is not injected (untrusted notebook) */
      display: none;
    }

    .xr-header {
      padding-top: 6px;
      padding-bottom: 6px;
      margin-bottom: 4px;
      border-bottom: solid 1px var(--xr-border-color);
    }

    .xr-header > div,
    .xr-header > ul {
      display: inline;
      margin-top: 0;
      margin-bottom: 0;
    }

    .xr-obj-type,
    .xr-array-name {
      margin-left: 2px;
      margin-right: 10px;
    }

    .xr-obj-type {
      color: var(--xr-font-color2);
    }

    .xr-sections {
      padding-left: 0 !important;
      display: grid;
      grid-template-columns: 150px auto auto 1fr 0 20px 0 20px;
    }

    .xr-section-item {
      display: contents;
    }

    .xr-section-item input {
      display: inline-block;
      opacity: 0;
      height: 0;
    }

    .xr-section-item input + label {
      color: var(--xr-disabled-color);
    }

    .xr-section-item input:enabled + label {
      cursor: pointer;
      color: var(--xr-font-color2);
    }

    .xr-section-item input:focus + label {
      border: 2px solid var(--xr-font-color0);
    }

    .xr-section-item input:enabled + label:hover {
      color: var(--xr-font-color0);
    }

    .xr-section-summary {
      grid-column: 1;
      color: var(--xr-font-color2);
      font-weight: 500;
    }

    .xr-section-summary > span {
      display: inline-block;
      padding-left: 0.5em;
    }

    .xr-section-summary-in:disabled + label {
      color: var(--xr-font-color2);
    }

    .xr-section-summary-in + label:before {
      display: inline-block;
      content: "►";
      font-size: 11px;
      width: 15px;
      text-align: center;
    }

    .xr-section-summary-in:disabled + label:before {
      color: var(--xr-disabled-color);
    }

    .xr-section-summary-in:checked + label:before {
      content: "▼";
    }

    .xr-section-summary-in:checked + label > span {
      display: none;
    }

    .xr-section-summary,
    .xr-section-inline-details {
      padding-top: 4px;
      padding-bottom: 4px;
    }

    .xr-section-inline-details {
      grid-column: 2 / -1;
    }

    .xr-section-details {
      display: none;
      grid-column: 1 / -1;
      margin-bottom: 5px;
    }

    .xr-section-summary-in:checked ~ .xr-section-details {
      display: contents;
    }

    .xr-array-wrap {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: 20px auto;
    }

    .xr-array-wrap > label {
      grid-column: 1;
      vertical-align: top;
    }

    .xr-preview {
      color: var(--xr-font-color3);
    }

    .xr-array-preview,
    .xr-array-data {
      padding: 0 5px !important;
      grid-column: 2;
    }

    .xr-array-data,
    .xr-array-in:checked ~ .xr-array-preview {
      display: none;
    }

    .xr-array-in:checked ~ .xr-array-data,
    .xr-array-preview {
      display: inline-block;
    }

    .xr-dim-list {
      display: inline-block !important;
      list-style: none;
      padding: 0 !important;
      margin: 0;
    }

    .xr-dim-list li {
      display: inline-block;
      padding: 0;
      margin: 0;
    }

    .xr-dim-list:before {
      content: "(";
    }

    .xr-dim-list:after {
      content: ")";
    }

    .xr-dim-list li:not(:last-child):after {
      content: ",";
      padding-right: 5px;
    }

    .xr-has-index {
      font-weight: bold;
    }

    .xr-var-list,
    .xr-var-item {
      display: contents;
    }

    .xr-var-item > div,
    .xr-var-item label,
    .xr-var-item > .xr-var-name span {
      background-color: var(--xr-background-color-row-even);
      margin-bottom: 0;
    }

    .xr-var-item > .xr-var-name:hover span {
      padding-right: 5px;
    }

    .xr-var-list > li:nth-child(odd) > div,
    .xr-var-list > li:nth-child(odd) > label,
    .xr-var-list > li:nth-child(odd) > .xr-var-name span {
      background-color: var(--xr-background-color-row-odd);
    }

    .xr-var-name {
      grid-column: 1;
    }

    .xr-var-dims {
      grid-column: 2;
    }

    .xr-var-dtype {
      grid-column: 3;
      text-align: right;
      color: var(--xr-font-color2);
    }

    .xr-var-preview {
      grid-column: 4;
    }

    .xr-index-preview {
      grid-column: 2 / 5;
      color: var(--xr-font-color2);
    }

    .xr-var-name,
    .xr-var-dims,
    .xr-var-dtype,
    .xr-preview,
    .xr-attrs dt {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      padding-right: 10px;
    }

    .xr-var-name:hover,
    .xr-var-dims:hover,
    .xr-var-dtype:hover,
    .xr-attrs dt:hover {
      overflow: visible;
      width: auto;
      z-index: 1;
    }

    .xr-var-attrs,
    .xr-var-data,
    .xr-index-data {
      display: none;
      background-color: var(--xr-background-color) !important;
      padding-bottom: 5px !important;
    }

    .xr-var-attrs-in:checked ~ .xr-var-attrs,
    .xr-var-data-in:checked ~ .xr-var-data,
    .xr-index-data-in:checked ~ .xr-index-data {
      display: block;
    }

    .xr-var-data > table {
      float: right;
    }

    .xr-var-name span,
    .xr-var-data,
    .xr-index-name div,
    .xr-index-data,
    .xr-attrs {
      padding-left: 25px !important;
    }

    .xr-attrs,
    .xr-var-attrs,
    .xr-var-data,
    .xr-index-data {
      grid-column: 1 / -1;
    }

    dl.xr-attrs {
      padding: 0;
      margin: 0;
      display: grid;
      grid-template-columns: 125px auto;
    }

    .xr-attrs dt,
    .xr-attrs dd {
      padding: 0;
      margin: 0;
      float: left;
      padding-right: 10px;
      width: auto;
    }

    .xr-attrs dt {
      font-weight: normal;
      grid-column: 1;
    }

    .xr-attrs dt:hover span {
      display: inline-block;
      background: var(--xr-background-color);
      padding-right: 10px;
    }

    .xr-attrs dd {
      grid-column: 2;
      white-space: pre-wrap;
      word-break: break-all;
    }

    .xr-icon-database,
    .xr-icon-file-text2,
    .xr-no-icon {
      display: inline-block;
      vertical-align: middle;
      width: 1em;
      height: 1.5em !important;
      stroke-width: 0;
      stroke: currentColor;
      fill: currentColor;
    }
    </style><pre class='xr-text-repr-fallback'>&lt;xarray.DatasetView&gt; Size: 12MB
    Dimensions:       (z: 5, nv: 2, x: 363, y: 770)
    Coordinates:
        spatial_ref   float64 8B 0.0
      * z             (z) float64 40B 0.0 5.0 10.0 15.0 20.0
      * nv            (nv) int64 16B 0 1
      * x             (x) float64 3kB 2.915e+05 2.925e+05 ... 6.525e+05 6.535e+05
      * y             (y) float64 6kB 1.648e+06 1.647e+06 ... 8.798e+05 8.788e+05
    Data variables:
        z_bnds        (z, nv) float64 80B -2.5 2.5 2.5 7.5 ... 12.5 17.5 17.5 22.5
        x_bnds        (x, nv) float64 6kB 2.91e+05 2.92e+05 ... 6.53e+05 6.54e+05
        y_bnds        (y, nv) float64 12kB 1.648e+06 1.647e+06 ... 8.783e+05
        resistivity   (z, y, x) float64 11MB nan nan nan nan nan ... nan nan nan nan
        magnetic_tmi  (y, x) float32 1MB nan nan nan nan nan ... nan nan nan nan nan
    Attributes:
        comment:  &lt;additional details or ancillary information&gt;
        content:  interpolated resistivity models (3-D depth grid) and magnetic m...</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataTree</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-b7a08bd5-6af6-4172-93c7-03f555547c42' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-b7a08bd5-6af6-4172-93c7-03f555547c42' class='xr-section-summary'  title='Expand/collapse section'>Groups: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><div style='display: inline-grid; grid-template-columns: 100%; grid-column: 1 / -1'></div></div></li><li class='xr-section-item'><input id='section-28f974e4-36a4-4b3c-bf56-ef6c7ee80e2c' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-28f974e4-36a4-4b3c-bf56-ef6c7ee80e2c' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>z</span>: 5</li><li><span class='xr-has-index'>nv</span>: 2</li><li><span class='xr-has-index'>x</span>: 363</li><li><span class='xr-has-index'>y</span>: 770</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-91144591-c2e1-46c1-9703-c2ee373ecb32' class='xr-section-summary-in' type='checkbox'  checked><label for='section-91144591-c2e1-46c1-9703-c2ee373ecb32' class='xr-section-summary' >Coordinates: <span>(5)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>spatial_ref</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0</div><input id='attrs-557cbb9f-4da3-49fb-8d4c-08855373e621' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-557cbb9f-4da3-49fb-8d4c-08855373e621' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-43074334-d383-4127-a7ec-5b91dd559012' class='xr-var-data-in' type='checkbox'><label for='data-43074334-d383-4127-a7ec-5b91dd559012' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>crs_wkt :</span></dt><dd>PROJCRS[&quot;NAD83 / Conus Albers&quot;,BASEGEOGCRS[&quot;NAD83&quot;,DATUM[&quot;North American Datum 1983&quot;,ELLIPSOID[&quot;GRS 1980&quot;,6378137,298.257222101,LENGTHUNIT[&quot;metre&quot;,1]]],PRIMEM[&quot;Greenwich&quot;,0,ANGLEUNIT[&quot;degree&quot;,0.0174532925199433]],ID[&quot;EPSG&quot;,4269]],CONVERSION[&quot;Conus Albers&quot;,METHOD[&quot;Albers Equal Area&quot;,ID[&quot;EPSG&quot;,9822]],PARAMETER[&quot;Latitude of false origin&quot;,23,ANGLEUNIT[&quot;degree&quot;,0.0174532925199433],ID[&quot;EPSG&quot;,8821]],PARAMETER[&quot;Longitude of false origin&quot;,-96,ANGLEUNIT[&quot;degree&quot;,0.0174532925199433],ID[&quot;EPSG&quot;,8822]],PARAMETER[&quot;Latitude of 1st standard parallel&quot;,29.5,ANGLEUNIT[&quot;degree&quot;,0.0174532925199433],ID[&quot;EPSG&quot;,8823]],PARAMETER[&quot;Latitude of 2nd standard parallel&quot;,45.5,ANGLEUNIT[&quot;degree&quot;,0.0174532925199433],ID[&quot;EPSG&quot;,8824]],PARAMETER[&quot;Easting at false origin&quot;,0,LENGTHUNIT[&quot;metre&quot;,1],ID[&quot;EPSG&quot;,8826]],PARAMETER[&quot;Northing at false origin&quot;,0,LENGTHUNIT[&quot;metre&quot;,1],ID[&quot;EPSG&quot;,8827]]],CS[Cartesian,2],AXIS[&quot;easting (X)&quot;,east,ORDER[1],LENGTHUNIT[&quot;metre&quot;,1]],AXIS[&quot;northing (Y)&quot;,north,ORDER[2],LENGTHUNIT[&quot;metre&quot;,1]],USAGE[SCOPE[&quot;Data analysis and small scale data presentation for contiguous lower 48 states.&quot;],AREA[&quot;United States (USA) - CONUS onshore - Alabama; Arizona; Arkansas; California; Colorado; Connecticut; Delaware; Florida; Georgia; Idaho; Illinois; Indiana; Iowa; Kansas; Kentucky; Louisiana; Maine; Maryland; Massachusetts; Michigan; Minnesota; Mississippi; Missouri; Montana; Nebraska; Nevada; New Hampshire; New Jersey; New Mexico; New York; North Carolina; North Dakota; Ohio; Oklahoma; Oregon; Pennsylvania; Rhode Island; South Carolina; South Dakota; Tennessee; Texas; Utah; Vermont; Virginia; Washington; West Virginia; Wisconsin; Wyoming.&quot;],BBOX[24.41,-124.79,49.38,-66.91]],ID[&quot;EPSG&quot;,5070]]</dd><dt><span>semi_major_axis :</span></dt><dd>6378137.0</dd><dt><span>semi_minor_axis :</span></dt><dd>6356752.314140356</dd><dt><span>inverse_flattening :</span></dt><dd>298.257222101</dd><dt><span>reference_ellipsoid_name :</span></dt><dd>GRS 1980</dd><dt><span>longitude_of_prime_meridian :</span></dt><dd>0.0</dd><dt><span>prime_meridian_name :</span></dt><dd>Greenwich</dd><dt><span>geographic_crs_name :</span></dt><dd>NAD83</dd><dt><span>horizontal_datum_name :</span></dt><dd>North American Datum 1983</dd><dt><span>projected_crs_name :</span></dt><dd>NAD83 / Conus Albers</dd><dt><span>grid_mapping_name :</span></dt><dd>albers_conical_equal_area</dd><dt><span>standard_parallel :</span></dt><dd>(29.5, 45.5)</dd><dt><span>latitude_of_projection_origin :</span></dt><dd>23.0</dd><dt><span>longitude_of_central_meridian :</span></dt><dd>-96.0</dd><dt><span>false_easting :</span></dt><dd>0.0</dd><dt><span>false_northing :</span></dt><dd>0.0</dd><dt><span>authority :</span></dt><dd>EPSG</dd><dt><span>wkid :</span></dt><dd>5070</dd></dl></div><div class='xr-var-data'><pre>array(0.)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>z</span></div><div class='xr-var-dims'>(z)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0 5.0 10.0 15.0 20.0</div><input id='attrs-c562dcf5-142b-4104-94d2-e42269003a9d' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-c562dcf5-142b-4104-94d2-e42269003a9d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e046a6b8-bbe2-48e1-a060-85403c55b79c' class='xr-var-data-in' type='checkbox'><label for='data-e046a6b8-bbe2-48e1-a060-85403c55b79c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>comment :</span></dt><dd>depth is defined here inside our json file in order to stack the resistivity tifs along a third dimension. This depth information is not contained in any of the individual tifs.</dd><dt><span>standard_name :</span></dt><dd>z</dd><dt><span>long_name :</span></dt><dd>Depth below earth&#x27;s surface DTM</dd><dt><span>units :</span></dt><dd>meters</dd><dt><span>null_value :</span></dt><dd>not_defined</dd><dt><span>axis :</span></dt><dd>Z</dd><dt><span>positive :</span></dt><dd>down</dd><dt><span>datum :</span></dt><dd>ground surface</dd><dt><span>valid_range :</span></dt><dd>[ 0. 20.]</dd><dt><span>grid_mapping :</span></dt><dd>spatial_ref</dd><dt><span>bounds :</span></dt><dd>z_bnds</dd></dl></div><div class='xr-var-data'><pre>array([ 0.,  5., 10., 15., 20.])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>nv</span></div><div class='xr-var-dims'>(nv)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1</div><input id='attrs-ce468f46-cf81-45de-a652-0daf12ff1d77' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-ce468f46-cf81-45de-a652-0daf12ff1d77' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-95126ed6-dd37-481f-aee6-4a9d62bc3435' class='xr-var-data-in' type='checkbox'><label for='data-95126ed6-dd37-481f-aee6-4a9d62bc3435' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>nv</dd><dt><span>long_name :</span></dt><dd>Number of vertices for bounding variables</dd><dt><span>units :</span></dt><dd>not_defined</dd><dt><span>null_value :</span></dt><dd>not_defined</dd><dt><span>valid_range :</span></dt><dd>[0 1]</dd><dt><span>grid_mapping :</span></dt><dd>spatial_ref</dd><dt><span>axis :</span></dt><dd>NV</dd></dl></div><div class='xr-var-data'><pre>array([0, 1])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>x</span></div><div class='xr-var-dims'>(x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>2.915e+05 2.925e+05 ... 6.535e+05</div><input id='attrs-a0a86d41-04cc-4f16-93da-32e9ab4ea784' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-a0a86d41-04cc-4f16-93da-32e9ab4ea784' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-bdd1904d-a424-43f6-8304-5342e8248d78' class='xr-var-data-in' type='checkbox'><label for='data-bdd1904d-a424-43f6-8304-5342e8248d78' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>projection_x_coordinate</dd><dt><span>long_name :</span></dt><dd>Easting</dd><dt><span>units :</span></dt><dd>meter</dd><dt><span>null_value :</span></dt><dd>not_defined</dd><dt><span>axis :</span></dt><dd>X</dd><dt><span>valid_range :</span></dt><dd>[291455. 653455.]</dd><dt><span>grid_mapping :</span></dt><dd>spatial_ref</dd><dt><span>bounds :</span></dt><dd>x_bnds</dd></dl></div><div class='xr-var-data'><pre>array([291455., 292455., 293455., ..., 651455., 652455., 653455.])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>y</span></div><div class='xr-var-dims'>(y)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.648e+06 1.647e+06 ... 8.788e+05</div><input id='attrs-4ec6df65-0aeb-4041-b86b-d116a9502cde' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-4ec6df65-0aeb-4041-b86b-d116a9502cde' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-bbf10a33-bcc8-4d12-9571-8e7f4d845e4e' class='xr-var-data-in' type='checkbox'><label for='data-bbf10a33-bcc8-4d12-9571-8e7f4d845e4e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>projection_y_coordinate</dd><dt><span>long_name :</span></dt><dd>Northing</dd><dt><span>units :</span></dt><dd>meter</dd><dt><span>null_value :</span></dt><dd>not_defined</dd><dt><span>axis :</span></dt><dd>Y</dd><dt><span>valid_range :</span></dt><dd>[ 878785. 1647785.]</dd><dt><span>grid_mapping :</span></dt><dd>spatial_ref</dd><dt><span>bounds :</span></dt><dd>y_bnds</dd></dl></div><div class='xr-var-data'><pre>array([1647785., 1646785., 1645785., ...,  880785.,  879785.,  878785.])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-a306bf78-803f-4b94-9011-72771e0720dd' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-a306bf78-803f-4b94-9011-72771e0720dd' class='xr-section-summary'  title='Expand/collapse section'>Inherited coordinates: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'></ul></div></li><li class='xr-section-item'><input id='section-49a034a3-47eb-4a93-b776-b244153f694d' class='xr-section-summary-in' type='checkbox'  checked><label for='section-49a034a3-47eb-4a93-b776-b244153f694d' class='xr-section-summary' >Data variables: <span>(5)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>z_bnds</span></div><div class='xr-var-dims'>(z, nv)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-2.5 2.5 2.5 7.5 ... 17.5 17.5 22.5</div><input id='attrs-baa24d9f-806b-411f-87d6-523dbd328991' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-baa24d9f-806b-411f-87d6-523dbd328991' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-734e2964-6109-42b0-8f8f-43db7b5a4270' class='xr-var-data-in' type='checkbox'><label for='data-734e2964-6109-42b0-8f8f-43db7b5a4270' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>comment :</span></dt><dd>depth is defined here inside our json file in order to stack the resistivity tifs along a third dimension. This depth information is not contained in any of the individual tifs.</dd><dt><span>standard_name :</span></dt><dd>z_bounds</dd><dt><span>long_name :</span></dt><dd>Depth below earth&#x27;s surface DTM cell boundaries</dd><dt><span>units :</span></dt><dd>meters</dd><dt><span>null_value :</span></dt><dd>not_defined</dd><dt><span>axis :</span></dt><dd>Z</dd><dt><span>positive :</span></dt><dd>down</dd><dt><span>datum :</span></dt><dd>ground surface</dd><dt><span>valid_range :</span></dt><dd>[-2.5 22.5]</dd><dt><span>grid_mapping :</span></dt><dd>spatial_ref</dd></dl></div><div class='xr-var-data'><pre>array([[-2.5,  2.5],
           [ 2.5,  7.5],
           [ 7.5, 12.5],
           [12.5, 17.5],
           [17.5, 22.5]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>x_bnds</span></div><div class='xr-var-dims'>(x, nv)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>2.91e+05 2.92e+05 ... 6.54e+05</div><input id='attrs-68f92651-1ebf-4a23-8029-b9799ccfa4e5' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-68f92651-1ebf-4a23-8029-b9799ccfa4e5' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1e7115c3-8ce1-4a3b-b7e9-bbaf49812448' class='xr-var-data-in' type='checkbox'><label for='data-1e7115c3-8ce1-4a3b-b7e9-bbaf49812448' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>projection_x_coordinate_bounds</dd><dt><span>long_name :</span></dt><dd>Easting cell boundaries</dd><dt><span>units :</span></dt><dd>meter</dd><dt><span>null_value :</span></dt><dd>not_defined</dd><dt><span>axis :</span></dt><dd>X</dd><dt><span>valid_range :</span></dt><dd>[290955. 653955.]</dd><dt><span>grid_mapping :</span></dt><dd>spatial_ref</dd></dl></div><div class='xr-var-data'><pre>array([[290955., 291955.],
           [291955., 292955.],
           [292955., 293955.],
           [293955., 294955.],
           [294955., 295955.],
           [295955., 296955.],
           [296955., 297955.],
           [297955., 298955.],
           [298955., 299955.],
           [299955., 300955.],
           [300955., 301955.],
           [301955., 302955.],
           [302955., 303955.],
           [303955., 304955.],
           [304955., 305955.],
           [305955., 306955.],
           [306955., 307955.],
           [307955., 308955.],
           [308955., 309955.],
           [309955., 310955.],
    ...
           [633955., 634955.],
           [634955., 635955.],
           [635955., 636955.],
           [636955., 637955.],
           [637955., 638955.],
           [638955., 639955.],
           [639955., 640955.],
           [640955., 641955.],
           [641955., 642955.],
           [642955., 643955.],
           [643955., 644955.],
           [644955., 645955.],
           [645955., 646955.],
           [646955., 647955.],
           [647955., 648955.],
           [648955., 649955.],
           [649955., 650955.],
           [650955., 651955.],
           [651955., 652955.],
           [652955., 653955.]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>y_bnds</span></div><div class='xr-var-dims'>(y, nv)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.648e+06 1.647e+06 ... 8.783e+05</div><input id='attrs-2c5d6a0d-c5fb-4a8d-9258-65f932f848a6' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-2c5d6a0d-c5fb-4a8d-9258-65f932f848a6' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a2c3c66c-926f-4b08-950a-3dfd5c3b0ad7' class='xr-var-data-in' type='checkbox'><label for='data-a2c3c66c-926f-4b08-950a-3dfd5c3b0ad7' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>projection_y_coordinate_bounds</dd><dt><span>long_name :</span></dt><dd>Northing cell boundaries</dd><dt><span>units :</span></dt><dd>meter</dd><dt><span>null_value :</span></dt><dd>not_defined</dd><dt><span>axis :</span></dt><dd>Y</dd><dt><span>valid_range :</span></dt><dd>[ 878285. 1648285.]</dd><dt><span>grid_mapping :</span></dt><dd>spatial_ref</dd></dl></div><div class='xr-var-data'><pre>array([[1648285., 1647285.],
           [1647285., 1646285.],
           [1646285., 1645285.],
           ...,
           [ 881285.,  880285.],
           [ 880285.,  879285.],
           [ 879285.,  878285.]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>resistivity</span></div><div class='xr-var-dims'>(z, y, x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-d7cbcb0a-132f-4798-9bd3-a23ae7d42894' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-d7cbcb0a-132f-4798-9bd3-a23ae7d42894' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8171706b-e244-4701-ab7f-2e79f13420ae' class='xr-var-data-in' type='checkbox'><label for='data-8171706b-e244-4701-ab7f-2e79f13420ae' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>log10_resistivity</dd><dt><span>long_name :</span></dt><dd>Electrical Resistivity on Logarithmic Scale</dd><dt><span>units :</span></dt><dd>log10_ohm_m</dd><dt><span>null_value :</span></dt><dd>-9999.99</dd><dt><span>valid_range :</span></dt><dd>[0.27706546 3.74382997]</dd><dt><span>grid_mapping :</span></dt><dd>spatial_ref</dd></dl></div><div class='xr-var-data'><pre>array([[[nan, nan, nan, ..., nan, nan, nan],
            [nan, nan, nan, ..., nan, nan, nan],
            [nan, nan, nan, ..., nan, nan, nan],
            ...,
            [nan, nan, nan, ..., nan, nan, nan],
            [nan, nan, nan, ..., nan, nan, nan],
            [nan, nan, nan, ..., nan, nan, nan]],

           [[nan, nan, nan, ..., nan, nan, nan],
            [nan, nan, nan, ..., nan, nan, nan],
            [nan, nan, nan, ..., nan, nan, nan],
            ...,
            [nan, nan, nan, ..., nan, nan, nan],
            [nan, nan, nan, ..., nan, nan, nan],
            [nan, nan, nan, ..., nan, nan, nan]],

           [[nan, nan, nan, ..., nan, nan, nan],
            [nan, nan, nan, ..., nan, nan, nan],
            [nan, nan, nan, ..., nan, nan, nan],
            ...,
            [nan, nan, nan, ..., nan, nan, nan],
            [nan, nan, nan, ..., nan, nan, nan],
            [nan, nan, nan, ..., nan, nan, nan]],

           [[nan, nan, nan, ..., nan, nan, nan],
            [nan, nan, nan, ..., nan, nan, nan],
            [nan, nan, nan, ..., nan, nan, nan],
            ...,
            [nan, nan, nan, ..., nan, nan, nan],
            [nan, nan, nan, ..., nan, nan, nan],
            [nan, nan, nan, ..., nan, nan, nan]],

           [[nan, nan, nan, ..., nan, nan, nan],
            [nan, nan, nan, ..., nan, nan, nan],
            [nan, nan, nan, ..., nan, nan, nan],
            ...,
            [nan, nan, nan, ..., nan, nan, nan],
            [nan, nan, nan, ..., nan, nan, nan],
            [nan, nan, nan, ..., nan, nan, nan]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>magnetic_tmi</span></div><div class='xr-var-dims'>(y, x)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-0d94cc6c-3856-49f3-beba-ea75e4c8c130' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-0d94cc6c-3856-49f3-beba-ea75e4c8c130' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1bdb267e-7c80-4aea-8eab-21c126f5bc74' class='xr-var-data-in' type='checkbox'><label for='data-1bdb267e-7c80-4aea-8eab-21c126f5bc74' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>total_magnetic_intensity</dd><dt><span>long_name :</span></dt><dd>Total magnetic intensity, diurnally corrected and filtered</dd><dt><span>units :</span></dt><dd>nT</dd><dt><span>null_value :</span></dt><dd>-999999</dd><dt><span>valid_range :</span></dt><dd>[-12772.     11280.377]</dd><dt><span>grid_mapping :</span></dt><dd>spatial_ref</dd></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],
           [nan, nan, nan, ..., nan, nan, nan],
           [nan, nan, nan, ..., nan, nan, nan],
           ...,
           [nan, nan, nan, ..., nan, nan, nan],
           [nan, nan, nan, ..., nan, nan, nan],
           [nan, nan, nan, ..., nan, nan, nan]], dtype=float32)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-417a8a42-6e2c-4631-9951-b5aed58fb11d' class='xr-section-summary-in' type='checkbox'  checked><label for='section-417a8a42-6e2c-4631-9951-b5aed58fb11d' class='xr-section-summary' >Attributes: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>comment :</span></dt><dd>&lt;additional details or ancillary information&gt;</dd><dt><span>content :</span></dt><dd>interpolated resistivity models (3-D depth grid) and magnetic map (2-D)</dd></dl></div></li></ul></div></div>
    </div>
    <br />
    <br />

.. GENERATED FROM PYTHON SOURCE LINES 71-72

Save to NetCDF file

.. GENERATED FROM PYTHON SOURCE LINES 72-75

.. code-block:: Python

    d_out = join(data_path, 'data//tifs.nc')
    survey.gs.to_netcdf(d_out)








.. GENERATED FROM PYTHON SOURCE LINES 76-77

Reading back in the GS NetCDF file

.. GENERATED FROM PYTHON SOURCE LINES 77-79

.. code-block:: Python

    new_survey = gspy.open_datatree(d_out)['survey']








.. GENERATED FROM PYTHON SOURCE LINES 80-81

Plotting

.. GENERATED FROM PYTHON SOURCE LINES 81-94

.. code-block:: Python


    # Make a map-view plot of a specific data variable, using Xarray's plotter
    # In this case, we slice the 3-D resistivity variable along the depth dimension
    new_survey['derived_products']["maps"]['resistivity'].plot(col='z', vmax=3, cmap='jet', robust=True)

    # Make a map-view plot comparing the different x-y discretization of the two magnetic variables, using Xarray's plotter
    plt.figure()
    ax=plt.gca()
    new_survey['derived_products']["maps"]['magnetic_tmi'].plot(ax=ax, cmap='jet', robust=True)
    new_survey['derived_products']["map"]['magnetic_tmi'].plot(ax=ax, cmap='Greys', cbar_kwargs={'label': ''}, robust=True)
    plt.ylim([1.20556e6, 1.21476e6])
    plt.xlim([3.5201e5, 3.6396e5])
    plt.show()



.. rst-class:: sphx-glr-horizontal


    *

      .. image-sg:: /examples/Creating_GS_Files/images/sphx_glr_plot_tifs_to_netcdf_001.png
         :alt: z = 0.0, z = 5.0, z = 10.0, z = 15.0, z = 20.0
         :srcset: /examples/Creating_GS_Files/images/sphx_glr_plot_tifs_to_netcdf_001.png
         :class: sphx-glr-multi-img

    *

      .. image-sg:: /examples/Creating_GS_Files/images/sphx_glr_plot_tifs_to_netcdf_002.png
         :alt: spatial_ref = 0.0
         :srcset: /examples/Creating_GS_Files/images/sphx_glr_plot_tifs_to_netcdf_002.png
         :class: sphx-glr-multi-img






.. rst-class:: sphx-glr-timing

   **Total running time of the script:** (0 minutes 2.089 seconds)


.. _sphx_glr_download_examples_Creating_GS_Files_plot_tifs_to_netcdf.py:

.. only:: html

  .. container:: sphx-glr-footer sphx-glr-footer-example

    .. container:: sphx-glr-download sphx-glr-download-jupyter

      :download:`Download Jupyter notebook: plot_tifs_to_netcdf.ipynb <plot_tifs_to_netcdf.ipynb>`

    .. container:: sphx-glr-download sphx-glr-download-python

      :download:`Download Python source code: plot_tifs_to_netcdf.py <plot_tifs_to_netcdf.py>`

    .. container:: sphx-glr-download sphx-glr-download-zip

      :download:`Download zipped: plot_tifs_to_netcdf.zip <plot_tifs_to_netcdf.zip>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
