The following files are needed to call the BVW library from 'C'.
bvw99.c: the library of algorithms,
bvw99.h: header file with function prototypes,
ctest_bvw99.c: example and test program for 'C',
ctest_ht_adj99.c: example and test program for 'C',
call_bvw99.c: 'C' shell used to call bvw 'C' code from with a different I/O structure (this code is not needed unless this interface is preferred),
Makefile: makefile for compiling 'C' and 'FORTRAN' versions of the model. Note that the makefile is designed for SGIs, and will probably have to be modified for other platforms.
testdata99.dat: input and output data for the test program.
It is a lot easier to program if you have examples, and even better if you can cut and paste. These examples are taken from the test codes.
int astab, air_moist_prm, count, dyn_in_prm, sfc_moist_prm, ss_prm, warn;
float *dom_phs_spd, *h_sig, *lhf, *q_star, *shf, *tau, *t_star, *u_star, *wave_age, *ww_stab, *z_over_L, *zo_m;
float air_moist_val, CONVECT, CONV_CRIT, dyn_in_val, pressure,
ref_ht_tq, ref_ht_wind, rel_wind_ang, salinity, sfc_moist_val, ss_val,
t_air, t_skin;
count = pmix( dyn_in_prm, dyn_in_val, rel_wind_ang, CONVECT, CONV_CRIT, pressure, air_moist_prm, air_moist_val, sfc_moist_prm, sfc_moist_val, salinity, ss_prm, ss_val, t_air, t_skin, ref_ht_wind, ref_ht_tq, astab, warn, shf, lhf, tau, u_star, t_star, q_star, z_over_L, wave_age, dom_phs_spd, h_sig, ww_stab, zo_m );
int astab, air_moist_prm, count, dyn_in_prm, eqv_neut, sfc_moist_prm, ss_prm, warn;
float *dom_phs_spd, *h_sig, *lhf, *q_at_z, *q_star, *shf, *t_at_z, *tau, *t_star, *u_at_z, *u_star, *wave_age, *ww_stab, *z_over_L, *zo_m;
float air_moist_val, CONVECT, CONV_CRIT, dyn_in_val, pressure, ref_ht_tq, ref_ht_wind, rel_wind_ang, salinity, sfc_moist_val, ss_val, t_air, t_skin, z_wanted;
count = ht_adj( dyn_in_prm, dyn_in_val, rel_wind_ang, CONVECT, CONV_CRIT, pressure, air_moist_prm, air_moist_val, sfc_moist_prm, sfc_moist_val, salinity, ss_prm, ss_val, t_air, t_skin, ref_ht_wind, ref_ht_tq, astab, warn, shf, lhf, tau, u_star, t_star, q_star, z_over_L, wave_age, dom_phs_spd, h_sig, ww_stab, zo_m, eqv_neut, z_wanted, u_at_z, t_at_z, q_at_z );
Status: tested and working, except for a bug at very low wind speeds U10 < 0.6 m/s) when the sea state is set to local equilibrium.
Warnings:
1) There are very few checks on the range of input parameters: unbelievable input will result in unbelievable output.
2) The influence of a difference in the directions of wind velocity and mean wave propagation is underestimated. This model is an improvement over models with only one horizontal dimension; however, several problems remain to be resolved.
Last update: 18 January 1999