emc2.core.model.WRF¶
- class emc2.core.model.WRF(file_path, z_range=None, time_range=None, mcphys_scheme='nssl', NUWRF=False, bounding_box=None)[source]¶
This load a WRF simulation and all of the necessary parameters from the simulation.
- Parameters:
- file_path: str
Path to WRF simulation.
- time_range: tuple or None
Start and end time to include. If this is None, the entire simulation will be included.
- z_range: numpy array or None
The z levels of the vertical grid you want to use. By default, the levels are 0 m to 15000 m, increasing by 500 m.
- mcphys_scheme: str
3ice: Goddard 3ICE scheme morrison: Morrison microphysics
- NUWRF: bool
If true, model is NASA Unified WRF.
- bounding_box: None or 4-tuple
If not none, then a tuple representing the bounding box (lat_min, lon_min, lat_max, lon_max).
- __init__(file_path, z_range=None, time_range=None, mcphys_scheme='nssl', NUWRF=False, bounding_box=None)[source]¶
This load a WRF simulation and all of the necessary parameters from the simulation.
- Parameters:
- file_path: str
Path to WRF simulation.
- time_range: tuple or None
Start and end time to include. If this is None, the entire simulation will be included.
- z_range: numpy array or None
The z levels of the vertical grid you want to use. By default, the levels are 0 m to 15000 m, increasing by 500 m.
- mcphys_scheme: str
3ice: Goddard 3ICE scheme morrison: Morrison microphysics
- NUWRF: bool
If true, model is NASA Unified WRF.
- bounding_box: None or 4-tuple
If not none, then a tuple representing the bounding box (lat_min, lon_min, lat_max, lon_max).
Methods
__init__
(file_path[, z_range, time_range, ...])This load a WRF simulation and all of the necessary parameters from the simulation.
check_and_stack_time_lat_lon
([...])Stack the time dim together with the lat and lon dims (if the lat and/or lon dims are longer than 1) to enable EMC^2 processing of regional model output.
finalize_subcol_fields
([more_fieldnames])Remove all zero values from subcolumn output fields enabling better visualization.
load_subcolumns_from_netcdf
(file_name)Load all of the subcolumn data from a previously saved netCDF file.
permute_dims_for_processing
([base_order, ...])Reorder dims for consistent processing such that the order is: subcolumn x time x height.
remove_appended_str
([all_appended_in_lat])Remove appended strings from xr.Dataset coords and fieldnames based on lat/lon coord names (typically required when using post-processed output data files).
remove_subcol_fields
([cloud_class])Remove all subcolumn output fields for the given cloud class to save memory (mainly releveant for CESM and E3SM).
set_hyd_types
(hyd_types)subcolumns_to_netcdf
(file_name)Saves all of the simulated subcolumn parameters to a netCDF file.
unstack_time_lat_lon
([order_dim, ...])Unstack the time, lat, and lon dims if they were previously stacked together (self.stacked_time_dim is not None).
Attributes
hydrometeor_classes
The list of hydrometeor classes.
num_hydrometeor_classes
The number of hydrometeor classes used
num_subcolumns
Gets the number of subcolumns in the model.