/* 'C' library prototypes for combined sea state and atmospheric boundary layer model Developed by Mark A. Bourassa Based on Original Bourassa-Vincent-Wood combined sea state and atmospheric boundary layer model developed at Purdue University. Several upgrades and options have been added while at the Center for Ocean-Atmospheric Prediction Studies (COAPS) at Florida State University. Dr. Bourassa is currently (Jan. 1997) a reasearch associate at COAPS. Please send comments, suggestions, and requests for added features to Dr. Mark Bourassa Center for Ocean-Atmospheric Prediction Studies Florida State University Tallahassee, FL 32306-3041 Email: bourassa@coaps.fsu.edu Phone: (904) 644-6923 The bulk of the ducumentation is in the subroutine pmix_. */ #include #include #include #include #define TRUE 1 #define FALSE 0 #define B 0.0488000 /* equilibrium const for capillary waves [] */ #define KV 0.40000 /* von Karman's constant for momentum [] */ #define KVT 0.35000 /* von Karman's constant for potential temp. [] */ #define KVQ 0.40000 /* von Karman's constant for moisture [] */ #define G 9.81000 /* gravitational acc. (at sea level) [m/s^2] */ #define H 1000.0 /* approximate height of boundary layer (at low */ /* wind speed) [m] */ #define PI2 6.28318 /* two PI [] */ #define R 287.05000 /* specific gas constant for dry air [J/kg] */ #define RW 441.0000 /* specific gas constant for water vapour [J/kg] */ #define DTR 3.14159 / 180.0 /* degrees to radians conversion factor */ double f_bstar( short neutral, double qmixa, double ta, double *qstar, double *tstar, double minimum_value ); double find_q_( int *moist_prm, double *moist_val, double *press, double *temperature ); void find_ustar( short first, short fixedcp, short fixedwa, short fixed_hsig, short fixed_uen, short neutral, int count, double CON_P, double *ustar, double *qstar, double *tstar, double *monin_inv, double *zz, double *cp, double *wa, double *hsig, double CRIT, double denwat, double nu, double qmixa, double sfcten, double ta, double *wind_vel, double betac_prime, double betag_prime, double betas_prime, double *betac, double *betag, double *betas, double ww, double ww_eql, int ss_prm, double ss_val, double zref, double zreft ); int ht_adj_( int dyn_in_prm, float dyn_in_val, float rel_wind_ang, float CONVECT, float CONV_CRIT, float pressure, int air_moist_prm, float air_moist_val, int sfc_moist_prm, float sfc_moist_val, float salinity, int ss_prm, float ss_val, float t_air, float t_skin, float ref_ht_wind, float ref_ht_tq, int astab, int warn, float *shf, float *lhf, float *tau, float *u_star, float *t_star, float *q_star, float *z_over_L, float *wave_age, float *dom_phs_spd, float *h_sig, float *ww_stab, float *zo_m, int eqv_neut, float z_wanted, float *u_at_z, float *t_at_z, float *q_at_z ); double phi_u_f( double zref, double zzd, double *monin_inv ); double phi_Q_f( double zrefq, double *zzt, double *monin_inv ); double phi_T_f( double zreft, double *zzq, double *monin_inv ); int pmix_( int dyn_in_prm, float dyn_in_val, float rel_wind_ang, float CONVECT, float CONV_CRIT, float pressure, int air_moist_prm, float air_moist_val_dum, int sfc_moist_prm, float sfc_moist_val_dum, float salinity, int ss_prm, float ss_val_dum, float t_air, float t_skin, float ref_ht_wind, float ref_ht_tq, int astab, int warn, float *shf, float *lhf, float *tau, float *u_star, float *t_star, float *q_star, float *z_over_L, float *wave_age, float *dom_phs_spd, float *h_sig, float *ww_stab, float *zo_m ); int solve( short fixedcp, short fixedwa, short fixed_hsig, short fixed_uen, short fixed_ustar, short neutral, double *ustar, double *qstar, double *tstar, double *monin_inv, double *zz, double CON_P, double *cp, double *wa, double *hsig, double CRIT, double denwat, double nu, double qmixa, double qmixw, double sfcten, int ss_prm, double ss_val, double ta, double tskin, double *wind_vel, double zref, double zreft, double zrefq, double ww, double ww_eql, double betag_set, double betac_set, double betas_set, double *betac, double *betag, double *betas, int warn ); double f_ustar( short fixed_uen, short neutral, double bstar, double CON_P, double phi_u, double delta_u, double ww, double zref, double *ustar, double *monin_inv, double *zz, double max_value, int i ); int z_o_z0( short fixedcp, short fixedwa, short neutral, short hsig_known, double denwat, double nu, double sfcten, double zref, double betac_prime, double betag_prime, double betas_prime, double *betac, double *betag, double *betas, double *wind_vel, double *cp, double *wa, double *hsig, double ww, double ww_eql, int ss_prm, double ss_val, double *ustar, double *monin_inv, double *zz, int count, int i ); double z_o_zt( double zref, double zreft, double *ustar, double nu ); double z_o_zq( double zref, double zrefq, double *ustar, double nu );