/Users/huttone/Devel/sedflux-new/sedflux/trunk/ew/squall/squall.h File Reference

#include <utils/utils.h>
#include <sed/sed_sedflux.h>

Go to the source code of this file.

Defines

#define SQUALL_DEFAULT_C_E   (.2)
#define SQUALL_DEFAULT_C_V   (0.05)
#define SQUALL_DEFAULT_M   (3.)
#define SQUALL_DEFAULT_A   (2.)
#define SQUALL_DEFAULT_Z_L   (1)
#define SQUALL_DEFAULT_C_H   (1.)
#define SQUALL_DEFAULT_ALPHA_REF   (.005)

Functions

void write_output_file (const char *file, Sed_cube p)
gboolean squall (Sed_cube, double)
double get_erosion_rate_from_profile (Sed_cube p, int i, double h_c, double h_w)
double get_shoreface_slope (Sed_cube p, int i_c, int i_w)
double get_erosion_rate (double h, double h_w, double h_c, double alpha_sf, double h_wave, double h_wave_fair)
double get_erosion_efficiency (double h, double h_w, double h_c)
double get_coastal_dissipation (double alpha_sf)
double get_coastal_wave_energy (double wave_height_actual, double wave_height_fair)
double get_wave_base (double wave_length)
double get_breaking_wave_base (double wave_height)
double get_deep_water_wave_base (double wave_height)
int * get_zone_boundaries (Sed_cube p, double h_w, double h_c)
double get_travel_dist (double grain_size_in_m, double depth, double dx)
double get_non_dim_travel_dist (double grain_size_in_m)
double * get_moveable_grains (double water_depth, double wave_height, double wave_period, Sed_sediment sed, double *is_moveable)


Define Documentation

#define SQUALL_DEFAULT_A   (2.)

Definition at line 31 of file squall.h.

Referenced by get_travel_dist().

#define SQUALL_DEFAULT_ALPHA_REF   (.005)

Definition at line 34 of file squall.h.

Referenced by get_coastal_dissipation().

#define SQUALL_DEFAULT_C_E   (.2)

Definition at line 27 of file squall.h.

Referenced by get_erosion_rate(), and squall().

#define SQUALL_DEFAULT_C_H   (1.)

Definition at line 33 of file squall.h.

Referenced by get_non_dim_travel_dist().

#define SQUALL_DEFAULT_C_V   (0.05)

Definition at line 29 of file squall.h.

Referenced by squall().

#define SQUALL_DEFAULT_M   (3.)

Definition at line 30 of file squall.h.

Referenced by get_erosion_efficiency().

#define SQUALL_DEFAULT_Z_L   (1)

Definition at line 32 of file squall.h.

Referenced by get_travel_dist().


Function Documentation

double get_breaking_wave_base ( double  wave_height  ) 

Get the depth of the wave base for a breaking wave.

As per usual, the wave base is taken to be half of the wavelength of a wave. The wave length is assumed to be 7 times its height.

Parameters:
wave_height The height of incoming waves.
Returns:
The wave base.

Definition at line 755 of file squall.c.

References get_wave_base().

double get_coastal_dissipation ( double  alpha_sf  ) 

Get the coastal dissipation.

Parameters:
alpha_sf The slope of the shoreface.
Returns:
The coastal dissipation factor (dimensionless).

Definition at line 714 of file squall.c.

References SQUALL_DEFAULT_ALPHA_REF.

Referenced by get_erosion_rate().

double get_coastal_wave_energy ( double  wave_height_actual,
double  wave_height_fair 
)

Get the coastal wave energy.

Parameters:
wave_height_actual The current wave height of incoming waves.
wave_height_fair The wave height of waves during calm conditions.
Returns:
The Coastal wave enerrgy (dimensionless).

Definition at line 727 of file squall.c.

double get_deep_water_wave_base ( double  wave_height  ) 

Get the depth of the wave base for a deep water wave.

As per usual, the wave base is taken to be half of the wavelength of a wave. The wave length is assumed to be 25 times the wave height.

Parameters:
wave_height The height of incoming waves.
Returns:
The wave base.

Definition at line 769 of file squall.c.

References get_wave_base().

Referenced by squall().

double get_erosion_efficiency ( double  h,
double  h_w,
double  h_c 
)

Get the erosion efficiency.

Parameters:
h Water depth.
h_w Water depth of the wave base.
h_c Maximum coastal elevation that is acted on by waves.
Returns:
The erosion efficiency (dimensionless).

Definition at line 687 of file squall.c.

References eh_require, eh_watch_dbl, and SQUALL_DEFAULT_M.

Referenced by get_erosion_rate().

double get_erosion_rate ( double  h,
double  h_w,
double  h_c,
double  alpha_sf,
double  h_wave,
double  h_wave_fair 
)

Calculate the rate of erosion.

Parameters:
h Water depth.
h_w Water depth of the wave base.
h_c Maximum coastal elevation that is acted on by waves.
alpha_sf The slope of the shoreface.
h_wave The current wave height of incoming waves.
h_wave_fair The wave height of waves during calm conditions.
Returns:
The erosion rate (m/year).

Definition at line 662 of file squall.c.

References get_coastal_dissipation(), get_erosion_efficiency(), and SQUALL_DEFAULT_C_E.

Referenced by get_erosion_rate_from_profile().

double get_erosion_rate_from_profile ( Sed_cube  p,
int  i,
double  h_c,
double  h_w 
)

Calculate the erosion rate from a Sed_cube.

Parameters:
p A pointer to a Sed_cube.
i Index to a column of a Sed_cube.
h_c Maximum coastal elevation that is acted on by waves
h_w Wave height
Returns:
The erosion rate (m/year)

Definition at line 622 of file squall.c.

References get_erosion_rate(), sed_cube_water_depth(), and sed_cube_wave_height().

double* get_moveable_grains ( double  water_depth,
double  wave_height,
double  wave_period,
Sed_sediment  sed,
double *  is_moveable 
)

Determine which grain types are able to move under given ocean conditions.

Use relations of orbital velocity to grain diameter to determine which grain types are able to move at some depth and wave conditions. If a grain type can be moved, its corresponding element in the output array is set to 1, otherwise 0. Currently, only zeros and ones are written to the output array.

This is taken from,

Komar, P.D., 1976. Beach Processes and Sedimentation. Prentice Hall Inc, NJ.

Parameters:
water_depth Water depth in meters.
wave_height Wave height in meters.
wave_period Wave period in seconds.
sed Type of sediment of the sea bed.
is_moveable Array to store the fraction of each grain type that is able to be moved. If NULL, a newly allocated array is used.
Returns:
A pointer to an array of doubles that indicate the moveability of each grain type.

Definition at line 893 of file squall.c.

References eh_free, eh_new0, M_PI, sed_gravity(), sed_rho_quartz(), sed_rho_sea_water(), sed_sediment_env_n_types(), sed_sediment_n_types(), sed_sediment_property(), and sed_type_grain_size_in_meters().

Referenced by squall().

double get_non_dim_travel_dist ( double  grain_size_in_m  ) 

Get the non-dimensional travel distance for a grain size.

Calculate the non-dimensional travel distance for a grain size using the formula of Storms 2003.

Parameters:
grain_size_in_m Grain diameter in units of meters.
Returns:
The non-dimensional travel distance.

Definition at line 857 of file squall.c.

References SQUALL_DEFAULT_C_H.

Referenced by get_travel_dist().

double get_shoreface_slope ( Sed_cube  p,
int  i_c,
int  i_w 
)

Calculate the slope of the shoreface.

Parameters:
p A pointer to a Sed_cube.
i_c Index to the maximum landward extent of the waves.
i_w Index to the location of the wave base.
Returns:
The slope of the shoreface (grads).

Definition at line 642 of file squall.c.

References sed_cube_col_y(), and sed_cube_water_depth().

double get_travel_dist ( double  grain_size_in_m,
double  depth,
double  dx 
)

Get the travel distance for a grain.

The travel distance is clalculated using the equations of Storms 2003. The equation used is dependant on the grid resolution that is used and so a correction is used if the grid spacing is anything other than 50 meters.

Parameters:
grain_size_in_m Grain diameter in meters.
depth Water depth in meters.
dx Grid spacing in meters.
Returns:
The travel distance in meters.

Definition at line 832 of file squall.c.

References get_non_dim_travel_dist(), SQUALL_DEFAULT_A, and SQUALL_DEFAULT_Z_L.

Referenced by squall().

double get_wave_base ( double  wave_length  ) 

Get the depth of the wave base.

As per usual, the wave base is taken to be half of the wavelength of a wave.

Parameters:
wave_length The wavelength of incoming waves.
Returns:
The wave base.

Definition at line 741 of file squall.c.

Referenced by get_breaking_wave_base(), and get_deep_water_wave_base().

int* get_zone_boundaries ( Sed_cube  p,
double  h_w,
double  h_c 
)

Get the indices to the zone boundaries from a Sed_cube.

Given a Sed_cube, calculate the indices that mark the boundaries of the six zones in the squall model. The five boundaries are, (1) h_w - Wave base. (2) h_s - Sea level. (3) h_c - Maximum landward extent of wave action. (4) h_l - Seaward extend of lagoon. (5) h_m - Landward extent of lagoon. If a barrier does not exist, then there will be no lagoon and boundaries (4) and (5) will not exist. In such a case, their indices will be zero.

Parameters:
p A pointer to a Sed_cube.
h_w The water depth of the wave base.
h_c The maximum elevation a wave can act on.
Returns:
A newly-allocated array of the five indices.

Definition at line 792 of file squall.c.

References eh_new, sed_cube_col_y(), sed_cube_n_y(), and sed_cube_water_depth().

Referenced by squall().

gboolean squall ( Sed_cube  p,
double  time_step_in_years 
)

Calculate erosion/deposition of a Sed_cube due to waves.

Run the Storms 2003 wave model.

Parameters:
p A pointer to a Sed_cube.
time_step_in_years The length of time (in years) to run the model for.
Returns:
TRUE is there are no problems. FALSE otherwise.

Definition at line 63 of file squall.c.

References Eh_histogram::count, eh_destroy_histogram(), eh_free, eh_free_2, eh_new, eh_new0, eh_new_2, get_deep_water_wave_base(), get_moveable_grains(), get_threshold_depth(), get_travel_dist(), get_weibull_deposition_rate(), get_zone_boundaries(), make_depth_histogram(), S_FACIES_WAVE, sed_cell_add(), sed_cell_add_amount(), sed_cell_destroy(), sed_cell_dup(), sed_cell_fraction(), sed_cell_list_destroy(), sed_cell_list_new(), sed_cell_move(), sed_cell_new(), sed_cell_resize(), sed_cell_separate_fraction(), sed_cell_set_age(), sed_cell_set_facies(), sed_cell_size(), sed_column_add_cell(), sed_column_extract_top(), sed_cube_age_in_years(), sed_cube_col(), sed_cube_n_y(), sed_cube_water_depth(), sed_cube_wave_height(), sed_cube_wave_length(), sed_cube_wave_period(), sed_cube_y_res(), sed_cube_z_res(), sed_sediment_env_n_types(), sed_sediment_property(), sed_type_grain_size_in_meters(), SQUALL_DEFAULT_C_E, and SQUALL_DEFAULT_C_V.

Referenced by main(), and run_squall().

void write_output_file ( const char *  file,
Sed_cube  p 
)

Definition at line 178 of file squall_main.c.

References sed_property_destroy(), sed_property_file_destroy(), sed_property_file_new(), sed_property_file_write(), and sed_property_new().

Referenced by main().


Generated on Fri Jan 4 18:04:18 2008 for sedflux by  doxygen 1.5.2