vvm

Contents

vvm#

class vvm#

Public Functions

inline vvm(const Config_VVM &config)#

vvm constructor. Used to initialize the model.

inline ~vvm()#
inline void deallocateMemory()#
inline void allocateMemory()#
inline double ***allocate3DContinuousArray(int dim1, int dim2, int dim3, double *&contMemory)#
inline void deallocate3DContinuousArray(double ***array, double *contMemory)#

Public Members

double rdx#

1/dx, calculated from Config_VVM given by users.

double r2dx#

1 / (2dx), calculated from Config_VVM given by users.

double rdz#

1 / dz, calculated from Config_VVM given by users.

double r2dz#

1 / (2dz), calculated from Config_VVM given by users.

double rdx2#

1 / (dx^2), calculated from Config_VVM given by users.

double rdz2#

1 / (dz^2), calculated from Config_VVM given by users.

int nx#

Number of grid points in x direction, calculated from Config_VVM given by users.

int nz#

Number of grid points in z direction, calculated from Config_VVM given by users.

double dt#

From Config_VVM given by users.

double d2t#

From Config_VVM given by users.

double dx#

From Config_VVM given by users.

double dz#

From Config_VVM given by users.

int XRANGE#

From Config_VVM given by users.

int ZRANGE#

From Config_VVM given by users.

double TIMEEND#

From Config_VVM given by users.

int TIMEROUTPUTSIZE#

From Config_VVM given by users.

std::string outputpath#

From Config_VVM given by users.

int OUTPUTSTEP#

From Config_VVM given by users.

double Kx#

From Config_VVM given by users.

double Kz#

From Config_VVM given by users.

double TIMETS#

From Config_VVM given by users.

double tolerance#

From Config_VVM given by users.

double GRAVITY#

From Config_VVM given by users.

double Cp#

From Config_VVM given by users.

double Cv#

From Config_VVM given by users.

double Rd#

From Config_VVM given by users.

double Lv#

From Config_VVM given by users.

double P0#

From Config_VVM given by users.

double PSURF#

From Config_VVM given by users.

double addforcingtime#

From Config_VVM given by users.

int CASE#

From Config_VVM given by users.

double CRAD = 1. / 3600.#

From Config_VVM given by users.

int step = 0#

The current time step.

double ubarTopp#

The top boundary of the zonal wind for future time step. In the model design part, this is used to predict the mean top boundary of the zonal wind in the 9th governing equation.

double ubarTop#

The top boundary of the zonal wind for future time step. In the model design part, this is used to predict the mean top boundary of the zonal wind in the 9th governing equation.

double ubarTopm#

The top boundary of the zonal wind for future time step. In the model design part, this is used to predict the mean top boundary of the zonal wind in the 9th governing equation.

double moisture_nudge_time = 0.#

The time for nudging the moisture field.

double *thb#

Horizontal mean potential temperature profile.

double *thb_init#

Initial horizontal mean potential temperature profile.

double *thbm#

Horizontal mean potential temperature profile for previous step.

double *thb_zeta#

Horizontal mean potential temperature profile at grid upper edge.

double *rhou#

Horizontal mean density profile at grid center.

double *rhow#

Horizontal mean density profile at grid upper edge.

double *pib#

Horizontal mean non-dimensional height profile at grid center.

double *qvb#

Horizontal mean water vapor profile at grid center.

double *qvb0#

Horizontal mean water vapor profile at grid center.

double *qvsb#

Horizontal mean saturated water vapor profile at grid center.

double *pb#

Horizontal mean pressure profile at grid center.

double *xi#

The velocity potential in x-direction at top boundary grid center.

double *uxi#
double *thvb#
double *thvbm#
double *z#
double *z_zeta#
double *lambda2#
double **zetap#
double **zeta#
double **zetam#
double **thp#
double **th#
double **thm#
double **u#
double **w#
double **RKM#
double **RKH#
double **U_w#
double **W_u#
double *zetapcont#
double *zetacont#
double *zetamcont#
double *thpcont#
double *thcont#
double *thmcont#
double *ucont#
double *wcont#
double *init_th_forcingcont#
double *RKMcont#
double *RKHcont#
double *U_wcont#
double *W_ucont#
double **qvp#
double **qv#
double **qvm#
double **qcp#
double **qc#
double **qcm#
double **qrp#
double **qr#
double **qrm#
double **evaporation#
double **accretion#
double **autoconversion#
double **condensation#
double *precip#
double *qvpcont#
double *qvcont#
double *qvmcont#
double *qcpcont#
double *qccont#
double *qcmcont#
double *qrpcont#
double *qrcont#
double *qrmcont#
double *evaporationcont#
double *accretioncont#
double *autoconversioncont#
double *condensationcont#
double ***dth_advect#
double ***dth_buoyancy#
double ***dzeta_advect#
double *dth_advectcont#
double *dth_buoyancycont#
double *dzeta_advectcont#
double ***dqv_advect#
double ***dqc_advect#
double ***dqr_advect#
double ***dqr_VT#
double *dqv_advectcont#
double *dqc_advectcont#
double *dqr_advectcont#
double *dqr_VTcont#
double *t_advection#
double *t_poisson#
double *t_diffusion#
double *t_microphysics#
double *t_all#
Eigen::SparseMatrix<double> A = Eigen::SparseMatrix<double>((nx - 2) * (nz - 3), (nx - 2) * (nz - 3))#
Eigen::SparseMatrix<double> G = Eigen::SparseMatrix<double>(nx - 2, nx - 2)#
double **init_th_forcing#
bool status_for_adding_forcing = true#

Public Static Functions

static inline double **allocate2DContinuousArray(int rows, int cols, double *&contMemory)#
static inline void deallocate2DContinuousArray(double **array, double *contMemory)#
static void BoundaryProcess1D_center(double *var, int nz)#

A member function that process the boundary of the 1D array where the varibles are at the center of the grid

Parameters:

var – an one dimensional array that should be put into boundary process.

static void BoundaryProcess2D_center(double **var, int nx, int nz)#

A member function that process the boundary of the 2D array where the varibles are at the center of the grid

Parameters:

var – an two dimensional array that should be put into boundary process.

static void BoundaryProcess2D_westdown(double **var, int nx, int nz)#

A member function that process the boundary of the 2D array where the varibles are at the southwestern side of the grid

Parameters:

var – an two dimensional array that should be put into boundary process.

static void BoundaryProcess2D_all(vvm &model)#
static void Advection_zeta(vvm &model)#

A member function that do advection process to the vorticity (zeta) field.

Parameters:

model – the vvm object which is used to advect the vorticity field and put into it.

static void Advection_thermo(double **past, double **now, double **future, double ***dvar, vvm &model)#

A member function that do advection process to the vorticity (zeta) field.

Parameters:
  • previous – an two dimensional array that the timestep is the previous one such as zetam, thm.

  • now – an two dimensional array that the timestep is now such as zeta, th.

  • future – an two dimensional array that the timestep is the future one such as zetap, thp.

  • model – the vvm object which is the model that will be used to do the diffusion (mainly the wind and the grid info).

static void Advection_qrVT(vvm &model)#
static void Bouyancy(vvm &model)#
static void AddForcing(vvm &model)#
class Init#

Public Static Functions

static void Init1d(vvm &model)#
static void Init2d(vvm &model)#
static void RandomPerturbation(vvm &model, int t, double min_range = -0.25, double max_range = 0.25, double standard_deviation = 1.)#
class Iteration#

Public Static Functions

static void pzeta_pt(vvm &model)#
static void pth_pt(vvm &model)#
static void pqv_pt(vvm &model)#
static void pqc_pt(vvm &model)#
static void pqr_pt(vvm &model)#
static void updateMean(vvm &model)#
static void TimeMarching(vvm &model)#
static void nextTimeStep(vvm &model)#
class MicroPhysics#

Public Static Functions

static void condensation(vvm &model)#
static void autoconversion(vvm &model)#
static void accretion(vvm &model)#
static void evaporation(vvm &model)#
static void NegativeValueProcess(double **var, int nx, int nz)#
class NumericalProcess#

Public Static Functions

static void Diffusion(double **var_in, double **var_out, vvm &model)#
static void DiffusionAll(vvm &model)#
static void TimeFilter(double **previous, double **now, double **future, vvm &model)#
static void timeFilterAll(vvm &model)#
static void Nudge_theta(vvm &model)#
static void Nudge_zeta(vvm &model)#
static void Nudge_qv(vvm &model)#
class Output#

Public Static Functions

static void printInit(vvm &model)#
static void create_all_directory(vvm &model)#
static void create_directory(std::string path)#
static void output_nc(int step, vvm &model)#
static void output_time_nc(int step, vvm &model)#
class PoissonSolver#

Public Members

Eigen::SparseMatrix<double> A#
Eigen::SparseMatrix<double> G#

Public Static Functions

static void InitPoissonMatrix(vvm &model)#
static void cal_w(vvm&, int p = 0, int i = 0, int j = 0)#
static void cal_u(vvm &model)#
static void pubarTop_pt(vvm &model)#
class Turbulence#

Public Static Functions

static void RKM_RKH(vvm &model)#
static void Mparam(vvm &model, double **var_now, double **var_future)#
static void Hparam(vvm &model, double **var_now, double **var_future)#

vvm::Init#

class Init

Public Static Functions

static void Init1d(vvm &model)
static void Init2d(vvm &model)
static void RandomPerturbation(vvm &model, int t, double min_range = -0.25, double max_range = 0.25, double standard_deviation = 1.)

vvm::PoissonSolver#

class PoissonSolver

Public Members

Eigen::SparseMatrix<double> A
Eigen::SparseMatrix<double> G

Public Static Functions

static void InitPoissonMatrix(vvm &model)
static void cal_w(vvm&, int p = 0, int i = 0, int j = 0)
static void cal_u(vvm &model)
static void pubarTop_pt(vvm &model)

vvm::NumericalProcess#

class NumericalProcess

Public Static Functions

static void Diffusion(double **var_in, double **var_out, vvm &model)
static void DiffusionAll(vvm &model)
static void TimeFilter(double **previous, double **now, double **future, vvm &model)
static void timeFilterAll(vvm &model)
static void Nudge_theta(vvm &model)
static void Nudge_zeta(vvm &model)
static void Nudge_qv(vvm &model)

vvm::MicroPhysics#

class MicroPhysics

Public Static Functions

static void condensation(vvm &model)
static void autoconversion(vvm &model)
static void accretion(vvm &model)
static void evaporation(vvm &model)
static void NegativeValueProcess(double **var, int nx, int nz)

vvm::Turbulence#

class Turbulence

Public Static Functions

static void RKM_RKH(vvm &model)
static void Mparam(vvm &model, double **var_now, double **var_future)
static void Hparam(vvm &model, double **var_now, double **var_future)

vvm::Iteration#

class Iteration

Public Static Functions

static void pzeta_pt(vvm &model)
static void pth_pt(vvm &model)
static void pqv_pt(vvm &model)
static void pqc_pt(vvm &model)
static void pqr_pt(vvm &model)
static void updateMean(vvm &model)
static void TimeMarching(vvm &model)
static void nextTimeStep(vvm &model)

vvm::Output#

class Output

Public Static Functions

static void printInit(vvm &model)
static void create_all_directory(vvm &model)
static void create_directory(std::string path)
static void output_nc(int step, vvm &model)
static void output_time_nc(int step, vvm &model)