Note
Go to the end to download the full example code.
Example on how to plot lake breeze and determine optimal radar pointing direction#
Example workflow on how to run ADAM and plot the resulting lake breeze. In addition, we will set up an instrument at ATMOS and show the angle at which the radar should be pointed to optimally capture the lake breeze.
import matplotlib.pyplot as plt
import numpy as np
import adam
The location of the Argonne Testbed for Multiscale Observational Studies (ATMOS)
atmos_location = (41.70101404798476, -87.99577278662817) # (lat, lon)
Load a radar scan and run the lake breeze model.
rad_scan = adam.io.preprocess_radar_image('KLOT', '2025-07-15T18:00:00')
rad_scan = adam.model.infer_lake_breeze(
rad_scan, model_name='lakebreeze_best_model_fcn_resnet50')
Downloading: "https://download.pytorch.org/models/fcn_resnet50_coco-1167a1af.pth" to /home/runner/.cache/torch/hub/checkpoints/fcn_resnet50_coco-1167a1af.pth
0%| | 0.00/135M [00:00<?, ?B/s]
4%|▍ | 5.75M/135M [00:00<00:02, 59.4MB/s]
31%|███▏ | 42.4M/135M [00:00<00:00, 249MB/s]
53%|█████▎ | 71.0M/135M [00:00<00:00, 272MB/s]
82%|████████▏ | 111M/135M [00:00<00:00, 329MB/s]
100%|██████████| 135M/135M [00:00<00:00, 305MB/s]
Calculate the azimuth angle from the radar to the lake breeze front center.
angle, lat, lon, dist = adam.util.azimuth_point(atmos_location[1], atmos_location[0], rad_scan)
print(f'Azimuth angle to point radar: {angle:.2f} degrees'
f'\nLatitude: {lat:.4f}, Longitude: {lon:.4f}')
Azimuth angle to point radar: 32.38 degrees
Latitude: 41.9751, Longitude: -87.7585
Plot the lake breeze with the radar pointing direction.
fig, ax = adam.vis.visualize_lake_breeze(rad_scan, bg_field='reflectivity')
plt.scatter(atmos_location[1], atmos_location[0], c='red', s=100, label='ATMOS')
plt.scatter(lon, lat, c='blue', s=100, label='Lake Breeze Center')
# Note the angle is clockwise from North
plt.quiver(atmos_location[1], atmos_location[0], np.sin(np.deg2rad(angle)),
np.cos(np.deg2rad(angle)), scale=5, color='k')
plt.legend()
plt.show()

Total running time of the script: (4 minutes 5.799 seconds)