analyze module

analyze module#

Module Functions#

vvmtools.analyze.create_nc_output(filename, ...)

Creates a NetCDF file with multiple 1D and 2D data arrays and user-defined attributes using xarray.

Module Class#

class vvmtools.analyze.DataRetriever(case_path, debug_mode=False)[source]#

Bases: object

A class to handle variable extraction and processing from simulation output files.

Parameters:
  • case_path (str) – Path to the directory containing case files.

  • debug_mode (bool, optional) – Optional flag to enable debug mode for logging, defaults to False.

Attributes:

VARTYPE

Dictionary of variable types.

DIM

Dictionary of spatial dimensions, containing keys such as xc, yc, zc (grid center), and zz (grid upper).

INIT

Dictionary of initial profile data with entries for RHO, THBAR, PBAR, PIBAR, and QVBAR.

time_array_str

Array of time values generated from 05:00 to 05:00 the next day at 2-minute intervals (721 elements).

Methods:

vvmtools.analyze.DataRetriever.get_var

Get a variable's data at a specified time and domain range.

vvmtools.analyze.DataRetriever.get_var_parallel

Get variable data for multiple time steps in parallel.

vvmtools.analyze.DataRetriever.func_time_parallel

Applies a time-dependent function func in parallel over a list of time steps.