Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

cesm_hawc.save_inputs

cesm_hawc.save_inputs

source

Save WACCM columns as simulator-ready NetCDF files.

The files can drive hawcsimulator directly, with native sasktran2 calls and no cesm_hawc import; the documentation’s “Using saved inputs” page has a complete example.

save_column_inputs

def save_column_inputs(
    waccm,
    lat: float,
    lon: float,
    output_path: str,
    time_index: int,
    alt_m: np.ndarray,
    wavelengths_nm=None,
    profiles_only: bool = False,
    obs_time=None,
    extra_attrs: dict | None = None,
) -> None

source

Extract one WACCM column and save it as a simulator-ready file.

Parameters

Notes

The file always holds the profiles from get_column_profiles() on the altitude_m dimension. When sasktran2 is installed and profiles_only is False, it also holds, for each mode (aerosol_accum, aerosol_coarse):

plus the attributes needed to rebuild the Mie databases: extinction_reference_wavelength_nm, mode_width_accum, mode_width_coarse, mie_refractive_index, mie_wavelength_grid_nm and mie_median_radius_grid_nm. The includes_constituents attribute (0 or 1) records which kind of file it is.