.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/retrievals/plot_profile_fit_pbl.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_retrievals_plot_profile_fit_pbl.py: Planetary Boundary Layer Height Profile Fit Retrievals ---------------------------------------------------------- This example shows how to estimate the planetary boundary layer height via a Profile Method scheme, where a backscatter profile is fit to an idealized profile via an error function using non-linear least-squares optimization. Author: Joe O'Brien .. GENERATED FROM PYTHON SOURCE LINES 12-48 .. image-sg:: /auto_examples/retrievals/images/sphx_glr_plot_profile_fit_pbl_001.png :alt: SGP Ceilometer PBL Height Estimate via Profile Fit Method :srcset: /auto_examples/retrievals/images/sphx_glr_plot_profile_fit_pbl_001.png :class: sphx-glr-single-img .. code-block:: Python from arm_test_data import DATASETS import act # Read Ceilometer data for an example filename_ceil = DATASETS.fetch('sgpceilC1.b1.20190101.000000.nc') ds = act.io.arm.read_arm_netcdf(filename_ceil) # Estimate PBL Height via a Profile Method ds = act.retrievals.pbl_lidar.calculate_profile_fit_pbl(ds, parm="backscatter") # Apply the ceilometer correction to the backscatter variable for plotting # Note - after the PBL Height retrieval. ds = act.corrections.correct_ceil(ds, var_name='backscatter') # Plot the pbl height estimates display = act.plotting.TimeSeriesDisplay(ds, subplot_shape=(1,), figsize=(10, 8)) # plot the CL backscatter before overlaying the Gradient Method PBL Height display.plot( 'backscatter', subplot_index=(0,), cmap='ChaseSpectral', vmin=0, vmax=4, set_title='SGP Ceilometer PBL Height Estimate via Profile Fit Method', ) # overlay the PBL Height estimate, compute ~10min temporal averages display.axes[0].plot( ds['time'].resample(time="30min").mean().values, ds['pbl_profile_fit'].resample(time="30min").mean().values, color='white', ) # shorten the range display.set_yrng([0, 3000], subplot_index=(0,)) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 2.495 seconds) .. _sphx_glr_download_auto_examples_retrievals_plot_profile_fit_pbl.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_profile_fit_pbl.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_profile_fit_pbl.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_profile_fit_pbl.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_