Originally the an updated version of the C BVW code converted to Python. This updated version was known as the Modularized Flux Testbed (MFT), a name created by David Moroni in 2006. The advantage over prior versions was that the code was much more modularized and easier to modify.

Version 2006.2:

Version 2012.1: Updated Spring 2012:

  • The transition between a smooth and rough sea is changed from an abrupt increase in rouhgness as wind increases (similar to a wave tank) to a smooth transition (similar to larger scale averaged in space and time). The abrupt change can still be modeled using the original BVW parameterization (flux_model = 0), however, for open odean applications it is recommended that the update be applied.

Version 2012.2: Updated Fall 2012:

  • IO being modified to allow easier selection of options.

Version 2017.0a : Updated Aug. 2018:

  • A stand alone Python veersion is added, and a minor fix is made for consistency. This fix does not impact the C code, but the logic is not consistent.

Version 2020: many updates added over the year:

  • More options added for stability parameterizations, mimicing parameterizations in WRF.
  • Roughness length and z/L can be input
  • Better modularization of the momentum roughness length parameteriations
  • Corrections to stability parameterizations

Versions 2023.1-4:

  • Wind (or stress or friction velocity) input (as dyn_in_prm and dyn_in_prm2) changed to handle input as dyn_in_prm = speed, dyn_in_prm2 = 0 OR as vector wind components. The coordinate system is arbitrary provided that the vectors are perpendicular.
  • The code translates the input vector(s) to be wind relative to the surface current and wave characteristics where appropriate (at this time only implemented via accounting for these factors in the inputs to dyn_in_prm and dyn_in_prm2). After finishing the calculations (including height adjustment) the relevant variables are converted back to the input coordinate system.
    • The above requires a change in I/O
    • Changed sign convention for the stability parameterizations to be consistent with the vast majority of the literature on these parameterizations.
  • Gone back to the original BVW treatment of roughness length as non-isotropic
    • Roughness length is calculated in the wind direction (relative to wind and wave characteristics where appropriate) and in the perpendicular direction
    • Modified input to CFC heat fluxes to use the roughness length in the direction of the wind relative to current and wave characteristics where appropriate
  • Added a new routine for calling the flux code without explicit use of pointers to global variables: MFT_fluxes (called as follows)
    • count, shf, lhf, tau, u_star, t_star, q_star, z_over_L, wave_age, dom_phase_spd, hsig, zo_out, u_at_z, t_at_z, q_at_z = mft.MFT_fluxes( dyn_in_prm, dyn_in_val, dyn_in_val2, CONVECT, CONV_CRIT, pressure, air_moist_prm, air_moist_val, sfc_moist_prm, sfc_moist_val, salinity, ss_prm, ss_val, t_air, sst_prm, t_skin, ref_ht_wind, ref_ht_tq, z_wanted, astab, eqv_neut_prm, Qnet, warn, flux_model, z0_mom_prm, z0_TQ_prm, stable_prm, A_oil, z_over_L, zo_m )
  • Output temperature (t_at_z) is adjusted to be temperature rather than potential temperature. This corrects a 0.1 C bias high for each 10 m of height (z_wanted).
    • Adjusted plotting code for CD & CH as a function of wind speed and potential temperature differences. The calculations need potential temperature. With the change in output, the air temperature needs to be adjusted back to potential temperature.

Version 2023.5 (Sept. 2023:

  • The code was cleaned up using Black and PyCharm.
    • Formatting of the code was changed to follow the conventions in Black.
    • Global variables were removed.
    • Pointers were removed.
    • Consequently, the subroutine ht_adj_ could be elimated (mft_fluxes replaces it).
  • The improved variable management removed flaw in the calculation of the z/L.
  • Many wave dat variables were made two dimensional to aid in future improvements.
  • Surface current vector components were added as input variables. The code was adjusted to vector subtract these currents from the wind, and used the resulting wind shear vector as a wind vector. Currents are added back to output winds, making output winds Earth relative.
  • Stability parameterizations were modified to be consistant with non-zero displacement heights.
  • Wave data are now passed correctly from subroutine to subroutine. Wave parameters are now calculated. Wave data are used correctly for input. However, the values of output wave data are clearly wrong.
  • Examples for using the MFT code (test_MFT.py, stability_analysis_CD.py, stability_analysis_CH. py) have been updated.
  • The variabler conv_crit was elimenated from the input variables. This was nice to have for development work, but should be unnecessary for uses to change.
  • The value for output missing data has been added as an input parameter

Version 2023.6 (Oct. 2023):

  • Modified to remove hard exits: e.g., exit(1). Now uses Python's logging module for hard exists and warnings. i
    • Added checked for all parameter settings
    • Be aware that there are no checks for bad input
    • Provides a warning for insufficient convergences to a solution. This usually occurs for extreme stability conditions, well outside the range overwhich the stability parameterization is valid.
    • If the non-convergence is approaching zero, the value is likely close to correct. Otherwise the codes uses the logging tool to give an error.
  • Some of the variables made two dimensional in v2.5 changed back to one dimensionsal.
  • SST_prm is implimented to allow an option for a cool skin and warm-layer adjustment to bulk SST. Set sst_prm to zero to ignore this.
  • Input variable 'warn' is removed because of the upgrade to using logging.

Last Updated October 21, 2023


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