9.0
general documentation
Loading...
Searching...
No Matches
cs_atmo.cpp File Reference
#include "base/cs_defs.h"
#include <assert.h>
#include <errno.h>
#include <ctype.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <float.h>
#include "bft/bft_mem.h"
#include "bft/bft_error.h"
#include "bft/bft_printf.h"
#include "atmo/cs_air_props.h"
#include "base/cs_array.h"
#include "atmo/cs_atmo_profile_std.h"
#include "base/cs_base.h"
#include "base/cs_boundary_conditions.h"
#include "base/cs_boundary_conditions_set_coeffs.h"
#include "base/cs_boundary_zone.h"
#include "cdo/cs_domain.h"
#include "base/cs_field.h"
#include "base/cs_field_default.h"
#include "base/cs_field_pointer.h"
#include "base/cs_halo.h"
#include "base/cs_log.h"
#include "base/cs_math.h"
#include "mesh/cs_mesh.h"
#include "mesh/cs_mesh_location.h"
#include "mesh/cs_mesh_quantities.h"
#include "base/cs_measures_util.h"
#include "base/cs_parall.h"
#include "base/cs_equation_iterative_solve.h"
#include "base/cs_parameters_check.h"
#include "base/cs_physical_constants.h"
#include "pprt/cs_physical_model.h"
#include "base/cs_post.h"
#include "base/cs_prototypes.h"
#include "rayt/cs_rad_transfer.h"
#include "base/cs_thermal_model.h"
#include "turb/cs_turbulence_bc.h"
#include "turb/cs_turbulence_model.h"
#include "base/cs_volume_zone.h"
#include "alge/cs_balance.h"
#include "alge/cs_blas.h"
#include "alge/cs_convection_diffusion.h"
#include "base/cs_parameters.h"
#include "base/cs_porous_model.h"
#include "base/cs_timer.h"
#include "alge/cs_matrix_building.h"
#include "alge/cs_sles.h"
#include "alge/cs_sles_default.h"
#include "alge/cs_face_viscosity.h"
#include "alge/cs_divergence.h"
#include "base/cs_restart.h"
#include "base/cs_restart_default.h"
#include "base/cs_velocity_pressure.h"
#include "atmo/cs_intprf.h"
#include "atmo/cs_atmo.h"
#include "atmo/cs_atmo_aerosol.h"

Functions

void cs_atmo_fields_init0 (void)
void cs_atmo_bcond (void)
void cs_soil_model (void)
 Deardorff force restore model.
void cs_atmo_init_meteo_profiles (void)
 Initialize meteo profiles if no meteo file is given.
void cs_atmo_compute_meteo_profiles (void)
 Compute meteo profiles if no meteo file is given.
void cs_atmo_z_ground_compute (void)
 Compute the ground elevation.
void cs_atmo_hydrostatic_profiles_compute (void)
 Compute hydrostatic profiles of density and pressure.
void cs_atmo_set_meteo_file_name (const char *file_name)
 This function set the file name of the meteo file.
void cs_atmo_set_chem_conc_file_name (const char *file_name)
 This function set the file name of the chemistry file.
void cs_atmo_set_aero_conc_file_name (const char *file_name)
 This function set the file name of the aerosol file.
void cs_atmo_init_chemistry (void)
 Initialize chemistry array.
void cs_atmo_chemistry_set_spack_file_name (const char *file_name)
 This function set the file name of the SPACK file.
void cs_atmo_chemistry_set_aerosol_file_name (const char *file_name)
 This function sets the file name to initialize the aerosol library.
void cs_atmo_declare_chem_from_spack (void)
 This function declares additional transported variables for atmospheric module for the chemistry defined from SPACK.
void cs_atmo_compute_solar_angles (cs_real_t latitude, cs_real_t longitude, cs_real_t squant, cs_real_t utc, int sea_id, cs_real_t *albedo, cs_real_t *za, cs_real_t *muzero, cs_real_t *omega, cs_real_t *fo)
 1D Radiative scheme - Solar data + zenithal angle)
void cs_atmo_chemistry_initialization_deactivate (void)
 Deactivate chemistry initialization procedure.
int cs_atmo_chemistry_need_initialization (void)
 Check if the chemistry module needs initialization.
void cs_atmo_log_setup (void)
 Print the atmospheric module options to setup.log.
void cs_atmo_chemistry_log_setup (void)
 Print the atmospheric chemistry options to setup.log.
void cs_atmo_aerosol_log_setup (void)
 Print the atmospheric aerosols options to setup.log.
void cs_atmo_finalize (void)
 Deallocate arrays for atmo module.

Function Documentation

◆ cs_atmo_aerosol_log_setup()

void cs_atmo_aerosol_log_setup ( void )

Print the atmospheric aerosols options to setup.log.

◆ cs_atmo_bcond()

void cs_atmo_bcond ( void )

◆ cs_atmo_chemistry_initialization_deactivate()

void cs_atmo_chemistry_initialization_deactivate ( void )

Deactivate chemistry initialization procedure.

◆ cs_atmo_chemistry_log_setup()

void cs_atmo_chemistry_log_setup ( void )

Print the atmospheric chemistry options to setup.log.

◆ cs_atmo_chemistry_need_initialization()

int cs_atmo_chemistry_need_initialization ( void )

Check if the chemistry module needs initialization.

Returns
int value : 1 if needed, 0 if not

◆ cs_atmo_chemistry_set_aerosol_file_name()

void cs_atmo_chemistry_set_aerosol_file_name ( const char * file_name)

This function sets the file name to initialize the aerosol library.

Parameters
[in]file_namename of the file.

◆ cs_atmo_chemistry_set_spack_file_name()

void cs_atmo_chemistry_set_spack_file_name ( const char * file_name)

This function set the file name of the SPACK file.

Parameters
[in]file_namename of the file.

◆ cs_atmo_compute_meteo_profiles()

void cs_atmo_compute_meteo_profiles ( void )

Compute meteo profiles if no meteo file is given.

◆ cs_atmo_compute_solar_angles()

void cs_atmo_compute_solar_angles ( cs_real_t latitude,
cs_real_t longitude,
cs_real_t squant,
cs_real_t utc,
int sea_id,
cs_real_t * albedo,
cs_real_t * za,
cs_real_t * muzero,
cs_real_t * omega,
cs_real_t * fo )

1D Radiative scheme - Solar data + zenithal angle)

Compute:

  • zenithal angle
  • solar contant (with correction for earth - solar length)
  • albedo if above the sea (Use analytical formulae of Paltrige and Platt dev.in atm. science no 5)
    Parameters
    [in]latitudelatitude
    [in]longitudelongitude
    [in]squantstart day in the year
    [in]utcUniversal time (hour)
    [in]sea_idsea index
    [out]albedoalbedo
    [out]zazenithal angle
    [out]muzerocosin of zenithal angle
    [out]omegasolar azimut angle
    [out]fosolar constant

◆ cs_atmo_declare_chem_from_spack()

void cs_atmo_declare_chem_from_spack ( void )

This function declares additional transported variables for atmospheric module for the chemistry defined from SPACK.

This function declare additional transported variables for atmospheric module for the chemistry defined from SPACK.

◆ cs_atmo_fields_init0()

void cs_atmo_fields_init0 ( void )

◆ cs_atmo_finalize()

void cs_atmo_finalize ( void )

Deallocate arrays for atmo module.

◆ cs_atmo_hydrostatic_profiles_compute()

void cs_atmo_hydrostatic_profiles_compute ( void )

Compute hydrostatic profiles of density and pressure.

This function solves the following transport equation on $ \varia $:

\[ \divs \left( \grad \varia \right)
     = \divs \left( \dfrac{\vect{g}}{c_p \theta} \right)
\]

where $ \vect{g} $ is the gravity field and $ \theta $ is the potential temperature.

The boundary conditions on $ \varia $ read:

\[  \varia = \left(\dfrac{P_{sea}}{p_s}\right)^{R/C_p} \textrm{on the ground}
\]

and Neumann elsewhere.

◆ cs_atmo_init_chemistry()

void cs_atmo_init_chemistry ( void )

Initialize chemistry array.

◆ cs_atmo_init_meteo_profiles()

void cs_atmo_init_meteo_profiles ( void )

Initialize meteo profiles if no meteo file is given.

◆ cs_atmo_log_setup()

void cs_atmo_log_setup ( void )

Print the atmospheric module options to setup.log.

◆ cs_atmo_set_aero_conc_file_name()

void cs_atmo_set_aero_conc_file_name ( const char * file_name)

This function set the file name of the aerosol file.

This function set the file name of the aerosol concentration file.

Parameters
[in]file_namename of the file.

◆ cs_atmo_set_chem_conc_file_name()

void cs_atmo_set_chem_conc_file_name ( const char * file_name)

This function set the file name of the chemistry file.

This function set the file name of the chemistry concentration file.

Parameters
[in]file_namename of the file.

◆ cs_atmo_set_meteo_file_name()

void cs_atmo_set_meteo_file_name ( const char * file_name)

This function set the file name of the meteo file.

Parameters
[in]file_namename of the file.

◆ cs_atmo_z_ground_compute()

void cs_atmo_z_ground_compute ( void )

Compute the ground elevation.

This function computes the ground elevation.

This function solves the following transport equation on $ \varia $:

\[ \dfrac{\partial \varia}{\partial t} + \divs \left( \varia \vect{g} \right)
     - \divs \left( \vect{V} \right) \varia = 0
\]

where $ \vect{g} $ is the gravity field

The boundary conditions on $ \varia $ read:

\[  \varia = z \textrm{ on walls}
\]

\[  \dfrac{\partial \varia}{\partial n} = 0 \textrm{ elsewhere}
\]

Remarks:

  • a steady state is looked for.

◆ cs_soil_model()

void cs_soil_model ( void )

Deardorff force restore model.

Compute soil and interface values using Deardorff force restore method.