### Pre-training the Processor Module (Bash) Source: https://github.com/anna-allen/aardvark-weather-public/blob/main/README.md This command demonstrates the pre-training step for the processor module of the Aardvark Weather model. It runs a bash script that handles the initial training phase for the processor, showcasing another component of the model's multi-stage training. This command is for illustrative purposes and requires specific local setup. ```bash bash train_processor.sh ``` -------------------------------- ### Finetuning the Processor Module (Bash) Source: https://github.com/anna-allen/aardvark-weather-public/blob/main/README.md This command illustrates the finetuning process for the processor module of the Aardvark Weather model. It executes a bash script designed to refine the pre-trained processor, representing a subsequent stage in the model's training pipeline. This command is provided for transparency and requires specific local dependencies. ```bash bash finetune.sh ``` -------------------------------- ### Loading Sample Weather Forecast Data - Python Source: https://github.com/anna-allen/aardvark-weather-public/blob/main/notebooks/data_demo.ipynb This snippet loads the sample weather forecast data from a pickle file named `sample_data_final.pkl`. The data, which is a single timeslice containing observations for forecast generation, is deserialized into the `data` variable for subsequent analysis and visualization. ```python with open('../data/sample_data_final.pkl', 'rb') as fp: data = pickle.load(fp) ``` -------------------------------- ### End-to-End Model Finetuning (Bash) Source: https://github.com/anna-allen/aardvark-weather-public/blob/main/README.md This command illustrates the end-to-end finetuning process for the complete Aardvark Weather model. It executes a bash script that tunes the entire model, optimizing its performance for specific tasks or datasets. This command is provided for transparency and requires specific local dependencies for execution. ```bash bash train_e2e.sh ``` -------------------------------- ### Training the Encoder Module (Bash) Source: https://github.com/anna-allen/aardvark-weather-public/blob/main/README.md This command illustrates the process for training the encoder module of the Aardvark Weather model. It executes a bash script responsible for the encoder's training, demonstrating a key stage in the multi-stage training process. Note that this command is illustrative and depends on specific local data and compute infrastructure. ```bash bash train_encoder.sh ``` -------------------------------- ### Importing Core Libraries for Data Handling - Python Source: https://github.com/anna-allen/aardvark-weather-public/blob/main/notebooks/data_demo.ipynb This snippet imports the fundamental Python libraries `numpy` for numerical operations and `pickle` for serializing and deserializing Python objects, which are essential for loading and processing the weather dataset. ```python import numpy as np import pickle ``` -------------------------------- ### Training the Decoder Module (Bash) Source: https://github.com/anna-allen/aardvark-weather-public/blob/main/README.md This command demonstrates the training of the decoder module within the Aardvark Weather model. It runs a bash script that manages the training of the decoder, which is a crucial component in generating forecasts. This command is illustrative and depends on specific local data and compute infrastructure. ```bash bash train_decoder.sh ``` -------------------------------- ### Configuring Matplotlib for Scientific Plotting - Python Source: https://github.com/anna-allen/aardvark-weather-public/blob/main/notebooks/data_demo.ipynb This snippet imports Matplotlib for data visualization and configures its default parameters (`rcParams`) to use 'stix' for mathematical text and 'STIXGeneral' for the font family, enhancing the aesthetic and scientific presentation of plots. ```python import matplotlib from matplotlib import pyplot as plt matplotlib.rcParams['mathtext.fontset'] = 'stix' matplotlib.rcParams['font.family'] = 'STIXGeneral' ``` -------------------------------- ### Visualizing ASCAT Satellite Radiance Data - Python Source: https://github.com/anna-allen/aardvark-weather-public/blob/main/notebooks/data_demo.ipynb This snippet generates a contour plot of ASCAT satellite data for a specified channel (defaulting to 5). It visualizes the normalized radiance across the defined longitude and latitude grid, providing a spatial representation of ASCAT observations. The plot is equipped with a color bar and descriptive labels. ```python fig = plt.figure() plot_channel = 5 p = plt.contourf( lon, lat, data["assimilation"]["ascat_current"][0,...,plot_channel].T.cpu(), levels=100, cmap="magma") cbar = fig.colorbar(p) cbar.set_label('Normalised radiance') plt.xlabel("Longitude") plt.ylabel("Latitude") plt.title(f"ASCAT channel {plot_channel}") plt.show() ``` -------------------------------- ### Visualizing IASI Satellite Radiance Data - Python Source: https://github.com/anna-allen/aardvark-weather-public/blob/main/notebooks/data_demo.ipynb This snippet creates a contour plot to visualize IASI satellite data for a selected channel (defaulting to 10). It displays the normalized radiance values over the global longitude and latitude grid, representing observations from the IASI instrument. The plot includes a color bar and appropriate labels. ```python fig = plt.figure() plot_channel = 10 p = plt.contourf( lon, lat, data["assimilation"]["iasi_current"][0,...,plot_channel].T.cpu(), levels=100, cmap="magma") cbar = fig.colorbar(p) cbar.set_label('Normalised radiance') plt.xlabel("Longitude") plt.ylabel("Latitude") plt.title(f"IASI channel {plot_channel}") plt.show() ``` -------------------------------- ### Visualizing AMSU-A Satellite Radiance Data - Python Source: https://github.com/anna-allen/aardvark-weather-public/blob/main/notebooks/data_demo.ipynb This snippet creates a contour plot of AMSU-A satellite data for a specified channel (defaulting to 8). It displays the normalized radiance values over longitude and a truncated latitude range, illustrating observations from the AMSU-A instrument. The plot includes standard visualization elements like a color bar and labels. ```python fig = plt.figure() plot_channel = 8 p = plt.contourf( lon, lat[:-1], data["assimilation"]["amsua_current"][0,...,plot_channel].cpu(), levels=100, cmap="magma") cbar = fig.colorbar(p) cbar.set_label('Normalised radiance') plt.xlabel("Longitude") plt.ylabel("Latitude") plt.title(f"AMSU-A channel {plot_channel}") plt.show() ``` -------------------------------- ### Defining Geographic Coordinates for Plotting - Python Source: https://github.com/anna-allen/aardvark-weather-public/blob/main/notebooks/data_demo.ipynb This snippet initializes NumPy arrays for longitude and latitude, creating grids for plotting. `lon` and `lat` define a 1-degree resolution grid, while `lon_1p5` and `lat_1p5` define a 1.5-degree resolution grid, used for mapping various observational data. ```python lon = np.linspace(0,359,360) lat = np.linspace(90,-90,181) lon_1p5 = np.linspace(0,359,240) lat_1p5 = np.linspace(90,-90,121) ``` -------------------------------- ### Visualizing ICOADS Marine Platform Data - Python Source: https://github.com/anna-allen/aardvark-weather-public/blob/main/notebooks/data_demo.ipynb This snippet generates a scatter plot for ICOADS marine platform data, focusing on a specific channel (defaulting to 1). It displays the normalized observation values at their geographic coordinates, illustrating marine surface observations. The plot includes a color bar and descriptive labels. ```python plot_channel = 1 fig = plt.figure() p = plt.scatter( data["assimilation"]["icoads_x_current"][0][0,:].cpu(), data["assimilation"]["icoads_x_current"][1][0,:].cpu(), c = data["assimilation"]["icoads_current"][0,plot_channel,:].T.cpu(), cmap="magma") cbar = fig.colorbar(p) cbar.set_label('Normalised value') plt.xlabel("Longitude") plt.ylabel("Latitude") plt.title(f"ICOADS channel {plot_channel}") plt.show() ``` -------------------------------- ### Visualizing HIRS Satellite Radiance Data - Python Source: https://github.com/anna-allen/aardvark-weather-public/blob/main/notebooks/data_demo.ipynb This snippet generates a contour plot of HIRS satellite data for a specified channel (defaulting to 11). It visualizes the normalized radiance across longitude and latitude, providing insights into atmospheric conditions observed by the HIRS instrument. The plot includes a color bar, axis labels, and a title. ```python fig = plt.figure() plot_channel = 11 p = plt.contourf( lon, lat, data["assimilation"]["hirs_current"][0,...,plot_channel].cpu().T, levels=100, cmap="magma") cbar = fig.colorbar(p) cbar.set_label('Normalised radiance') plt.xlabel("Longitude") plt.ylabel("Latitude") plt.title(f"HIRS channel {plot_channel}") plt.show() ``` -------------------------------- ### Visualizing HadISD Land Station Data - Python Source: https://github.com/anna-allen/aardvark-weather-public/blob/main/notebooks/data_demo.ipynb This snippet creates a scatter plot to visualize HadISD land station data for a specified channel (defaulting to 0). It plots the normalized observation values at their respective longitude and latitude coordinates, representing surface observations. The plot includes a color bar and axis labels. ```python fig = plt.figure() plot_channel = 0 p = plt.scatter( data["assimilation"]["x_context_hadisd_current"][plot_channel][0,0,:].cpu(), data["assimilation"]["x_context_hadisd_current"][plot_channel][0,1,:].cpu(), c = data["assimilation"]["y_context_hadisd_current"][plot_channel][0].T.cpu(), cmap="magma") cbar = fig.colorbar(p) cbar.set_label('Normalised value') plt.xlabel("Longitude") plt.ylabel("Latitude") plt.title(f"HadISD channel {plot_channel}") plt.show() ``` -------------------------------- ### Visualizing AMSU-B Satellite Radiance Data - Python Source: https://github.com/anna-allen/aardvark-weather-public/blob/main/notebooks/data_demo.ipynb This snippet generates a contour plot for AMSU-B satellite data, focusing on a specific channel (defaulting to 10). It visualizes the normalized radiance across the defined longitude and latitude grid, providing a spatial representation of AMSU-B observations. The plot is equipped with a color bar and descriptive labels. ```python fig = plt.figure() plot_channel = 10 p = plt.contourf( lon, lat, data["assimilation"]["amsub_current"][0,...,plot_channel].T.cpu(), levels=100, cmap="magma") cbar = fig.colorbar(p) cbar.set_label('Normalised radiance') plt.xlabel("Longitude") plt.ylabel("Latitude") plt.title(f"AMSU-A channel {plot_channel}") plt.show() ``` -------------------------------- ### Visualizing IGRA Radiosonde Profile Data - Python Source: https://github.com/anna-allen/aardvark-weather-public/blob/main/notebooks/data_demo.ipynb This snippet creates a scatter plot to visualize IGRA radiosonde profile data for a specified channel (defaulting to 1). It plots the normalized observation values at their respective longitude and latitude coordinates, representing upper-air observations. The plot includes a color bar and axis labels. ```python plot_channel = 1 fig = plt.figure() p = plt.scatter( data["assimilation"]["igra_x_current"][0][0,:].cpu(), data["assimilation"]["igra_x_current"][1][0,:].cpu(), c = data["assimilation"]["igra_current"][0,plot_channel,:].T.cpu(), cmap="magma") cbar = fig.colorbar(p) cbar.set_label('Normalised value') plt.xlabel("Longitude") plt.ylabel("Latitude") plt.title(f"IGRA channel {plot_channel}") plt.show() ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.