{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Clouds over SGP for April 4, 2019\n", "\n", "Looking at LASSO data for April 4, 2019 to see meterological data and calculate cloud base and cloud top." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "---" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Imports\n" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [], "source": [ "from datetime import datetime\n", "import numpy as np\n", "import xarray as xr\n", "import xwrf\n", "\n", "import matplotlib.pyplot as plt" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Bring in the data" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Here is the raw model output from LASSO." ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [], "source": [ "path_shcu_root = \"/data/project/ARM_Summer_School_2024_Data/lasso_tutorial/ShCu/untar\" # on Jupyter\n", "\n", "case_date = datetime(2019, 4, 4)\n", "sim_id = 7\n", "\n", "ds_stat = xr.open_dataset(f\"{path_shcu_root}/{case_date:%Y%m%d}/sim{sim_id:04d}/raw_model/wrfstat_d01_{case_date:%Y-%m-%d_12:00:00}.nc\")\n", "ds_stat\n", "\n", "ds_stat[\"Time\"] = ds_stat[\"XTIME\"]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Find the indices of the boundary layer depth - in case we happen to care about that later" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
<xarray.DataArray 'bottom_top' (Time: 91)> Size: 728B\n", "array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 1., 1.,\n", " 2., 2., 2., 3., 3., 3., 2., 2., 2., 3., 3., 3., 4.,\n", " 4., 4., 5., 5., 5., 5., 5., 6., 6., 7., 7., 7., 7.,\n", " 8., 10., 12., 13., 13., 12., 12., 12., 11., 11., 11., 10., 11.,\n", " 11., 11., 10., 11., 10., 10., 10., 10., 10., 10., 10., 9., 9.,\n", " 9., 9., 8., 8., 7., 7., 6., 6., 4., 3., 0., 0., 0.,\n", " 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])\n", "Coordinates:\n", " XTIME (Time) datetime64[ns] 728B 2019-04-04T12:00:00 ... 2019-04-05T03...\n", "Dimensions without coordinates: Time