.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/lightning-creek-magnetic.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_lightning-creek-magnetic.py: Magnetic anomaly grid of the Lightning Creek Sill Complex, Australia -------------------------------------------------------------------- This is a section of an airborne survey acquired in 1990 by the Queensland Government, Australia. The grid has 50 m resolution (UTM coordinates) and is at a uniform orthometric height of 500 m. **Original source:** `Geophysical Acquisition & Processing Section 2019. MIM Data from Mt Isa Inlier, QLD (P1029), magnetic line data, AWAGS levelled. Geoscience Australia, Canberra `__ **Pre-processing:** `Source code for preparation of the original dataset for redistribution in Ensaio `__ .. GENERATED FROM PYTHON SOURCE LINES 25-30 .. code-block:: default import pygmt import xarray as xr import ensaio .. GENERATED FROM PYTHON SOURCE LINES 31-32 Download and cache the data and return the path to it on disk .. GENERATED FROM PYTHON SOURCE LINES 32-35 .. code-block:: default fname = ensaio.fetch_lightning_creek_magnetic(version=1) print(fname) .. rst-class:: sphx-glr-script-out Out: .. code-block:: none /home/runner/work/_temp/cache/ensaio/v1/lightning-creek-magnetic-grid.nc .. GENERATED FROM PYTHON SOURCE LINES 36-37 Load the netCDF grid with xarray .. GENERATED FROM PYTHON SOURCE LINES 37-40 .. code-block:: default data = xr.load_dataarray(fname) data .. raw:: html
<xarray.DataArray 'total_field_anomaly' (northing: 370, easting: 346)>
    array([[  35.        ,   36.19995   ,   36.69995   , ..., -101.099976  ,
            -100.400024  ,  -99.599976  ],
           [  36.5       ,   37.599976  ,   38.        , ..., -102.20007   ,
            -101.5       , -100.70007   ],
           [  37.099976  ,   38.19995   ,   38.599976  , ..., -103.30005   ,
            -102.599976  , -101.900024  ],
           ...,
           [ 182.79993   ,  172.40002   ,  160.79993   , ...,    0.79992676,
             -24.200073  ,  -41.80005   ],
           [ 182.09998   ,  172.59998   ,  161.40002   , ...,    6.        ,
             -21.5       ,  -41.        ],
           [ 178.79993   ,  170.40002   ,  160.29993   , ...,   11.400024  ,
             -16.        ,  -35.80005   ]], dtype=float32)
    Coordinates:
      * easting   (easting) float64 4.655e+05 4.656e+05 ... 4.827e+05 4.828e+05
      * northing  (northing) float64 7.576e+06 7.576e+06 ... 7.595e+06 7.595e+06
        height    (northing, easting) float64 500.0 500.0 500.0 ... 500.0 500.0
    Attributes:
        Conventions:   CF-1.8
        title:         Magnetic total-field anomaly of the Lightning Creek sill c...
        crs:           proj=utm zone=54 south datum=WGS84 units=m no_defs ellps=W...
        source:        Interpolated from airborne magnetic line data using gradie...
        license:       Creative Commons Attribution 4.0 International Licence
        references:    Geophysical Acquisition & Processing Section 2019. MIM Dat...
        long_name:     total-field magnetic anomaly
        units:         nT
        actual_range:  [-1785.  3798.]


.. GENERATED FROM PYTHON SOURCE LINES 41-42 Make a PyGMT pseudo-color map of the total field magnetic anomaly. .. GENERATED FROM PYTHON SOURCE LINES 42-58 .. code-block:: default fig = pygmt.Figure() scale = 2500 pygmt.makecpt(cmap="polar+h", series=[-scale, scale], background=True) fig.grdimage( grid=data, cmap=True, shading="+a45+nt0.1", projection="X15c/17c", frame="af", ) fig.colorbar( frame='af+l"total field magnetic anomaly [nT]"', position="JBC+h+o0/1c+e", ) fig.show() .. image-sg:: /gallery/images/sphx_glr_lightning-creek-magnetic_001.png :alt: lightning creek magnetic :srcset: /gallery/images/sphx_glr_lightning-creek-magnetic_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 59-60 The anomaly at the top right is the Lightning Creek sill complex. .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 5.157 seconds) .. _sphx_glr_download_gallery_lightning-creek-magnetic.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: lightning-creek-magnetic.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: lightning-creek-magnetic.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_