The algorithms for the 1999 version of the Bourassa-Vincent-Wood (BVW) flux model can be downloaded through this web site or taken from our public FTP site (anonymous FTP to coaps.fsu.edu, change directories to pub/bourasssa/bvw).

The following files are needed to call the BVW library from FORTRAN77.

bvw99.c: the library of algorithms,

bvw99.h: header file with function prototypes,

ftest_bvw99.f: example and test program for FORTRAN77 on an SGI,

ftest2_bvw99.f: example and test program for FORTRAN77 on non-SGIs,

call_bvw99.c: shell for the flux code (pmix) without height adjustment. Variables are passed to this shell by address (rather than be value), which some users might find easier to work with. Arguements are ordered as for calls to pmix,

call_ht_adj99.c: shell for ht_adh99.c similar to call_bvw99.c,

ftest_ht_adj99.f: example and test program for FORTRAN77 on SGIs,

ftest2_ht_adj99.f: example and test program for FORTRAN77 on non-SGIs,

Makefile: makefile for compiling 'C' and 'FORTRAN' versions of the model. Note that the makefile is designed for SGIs, and will have to be modified for other platforms.

testdata99.dat: input and output data for the test program.

Use of the Test Routine

The test programs can be used to check for compiler related changes in output. The test codes also demonstrates how to call the main bvw routine. The test programs reads in data from the file testdata99.dat, and outputs to the screen. This output should match the second (ftest_bvw99) or third (ftest_ht_adj99) table in the file testdata99.dat.

Example Variable Declaration and Calls on SGIs

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.

pmix

integer astab, air_moist_prm, count, dyn_in_prm, pmix, sfc_moist_prm, ss_prm, warn

real dom_phs_spd, h_sig, lhf, q_star, shf, tau(2), t_star, u_star(2), wave_age, ww_stab, z_over_L, zo_m(2)

real 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 )

ht_adj

integer astab, air_moist_prm, count, dyn_in_prm, eqv_neut, ht_adj, i, num, sfc_moist_prm, ss_prm, warn

real dom_phs_spd, h_sig, lhf, q_at_z, q_star, shf, t_at_z, tau(2), t_star, u_at_z, u_star(2), wave_age, ww_stab, z_over_L, zo_m(2)

real 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 )

Example Variable Declaration and Calls on non-SGIs

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.

pmix

external pmix

integer astab, air_moist_prm, count, dyn_in_prm, pmix, sfc_moist_prm, ss_prm, warn

real dom_phs_spd, h_sig, lhf, q_star, shf, tau(2), t_star, u_star(2), wave_age, ww_stab, z_over_L, zo_m(2)

real 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

bvw_flag = pmix( %val(dyn_in_prm), %val(dyn_in_val), %val(rel_wind_ang), %val(CONVECT), %val(CONV_CRIT), %val(pressure), %val(air_moist_prm), %val(air_moist_val), %val(sfc_moist_prm), %val(sfc_moist_val), %val(salinity), %val(ss_prm), %val(ss_val), %val(t_air), %val(t_skin), %val(ref_ht_wind), %val(ref_ht_tq), %val(astab), %val(warn), shf, lhf, tau, u_star, t_star, q_star, z_over_L, wave_age, dom_phs_spd, h_sig, ww_stab, zo_m )

ht_adj

external ht_adj

integer astab, air_moist_prm, bvw_flag, dyn_in_prm, eqv_neut, ht_adj, i, num, sfc_moist_prm, ss_prm, warn

real dom_phs_spd, h_sig, lhf, q_at_z, q_star, shf, t_at_z, tau(2), t_star, u_at_z, u_star(2), wave_age, ww_stab, z_over_L, zo_m(2)

real 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

bvw_flag = ht_adj( %val(dyn_in_prm), %val(dyn_in_val), %val(rel_wind_ang), %val(CONVECT), %val(CONV_CRIT), %val(pressure), %val(air_moist_prm), %val(air_moist_val), %val(sfc_moist_prm), %val(sfc_moist_val), %val(salinity), %val(ss_prm), %val(ss_val), %val(t_air), %val(t_skin), %val(ref_ht_wind), %val(ref_ht_tq), %val(astab), %val(warn), shf, lhf, tau, u_star, t_star, q_star, z_over_L, wave_age, dom_phs_spd, h_sig, ww_stab, zo_m, %val(eqv_neut), %val(z_wanted), u_at_z, t_at_z, q_at_z )

Compiling on a Non-SGI

The following is an example of how to compile a test routine.

cc bvw99.c -lm -c
f77 ftest2_bvw99.f bvw99.o -o ftest_bvw99

The executable code will be named ftest_bvw99.

Additional Information

The flux and seastate model is programmed in 'C'. The bulk of the documentation is in the subroutine pmix. Wrappers for calling the programs from IDL and FORTRAN have been developed for the '99 version of the code.

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: 20 Sept., 2005


home page
URL research
URL publications URL scatterometry URL flux
model URL contact info URL