CIBL Model Code

This directory contains the Matlab code for my Convective Internal Boundary-Layer.

Relevant publications (click on publications button):

The model is described in detail in:

Renfrew, I. A. and J. C. King, 2000: A simple model of the convective internal boundary layer and its application to surface heat flux estimates within polynyas, Boundary-Layer Meteorol., 94, 335-356.

and used in the following papers:

Renfrew, I. A., J. C. King, and T. Markus, 2002: Coastal polynyas in the southern Weddell Sea: variability of the surface energy budget, J. Geophys. Res. (Oceans), 107 (C6), 3063, doi: 10.1029/2000JC000720.

Fiedler, E., T. Lachlan-Cope, I. A. Renfrew, J. C. King, 2010: Convective heat transfer of thin-ice covered polynyas, J. Geophysical Res. (Oceans),in press, doi:10.1029/2009JC005797.

The core of the program is pretty simple, but there is a lot of bits and pieces which make it messy at the start and end. My code is fairly well documented, so I hope you can understand it. It also uses some code to calculate the bulk fluxes, (sfcflux etc) which I originally obtained from Peter Guest a few years ago - it is quite messy but I have tested it and checked it and it is ok. The bulk algorithm does not always converge - there are problems in the stable case and for low wind speeds - to get round this problem use the 'robust' routines. These calculate bulk fluxes using constant exchange coefficients for conditions when convergence of the algorithm is a problem

There are two versions of the code:

version 1:

The is a stand-alone version of the code, the one that was used to create figures 2,3,7,8,9 in the Renfrew and King paper. You put the input values at the beginning of the code.

Code

Description

cbl_growth.m the main code
cbl_plot.m plotting program used to create figures
sfcflux_all_robust.m a bulk flux routine, this version outputs many variables. Based on Smith (1988) paper. The "robust" part is that it calculates neutral fluxes first and only goes into iteraction routine if likely to converge. Based on original code by Peter Guest.
sfcflux_hf_robust.m bulk flux routine which only outputs the sensible and latent heat fluxes, it is simpler.
stars_q.m iteration scheme part of bulk flux code.
stars_rh.m iteration scheme part of bulk flux code.
psim.m calculates psi (stability) function for momentum
psit.m calculates psi (stability) function for scalars
Bw_brutsaert.m correction for the stability function
thermo_rh.m generates thermodynamic variables from T (degC) p(mb) rh(%) vectors; output [theta, thetae, q, qsat, qsati] = thermo_rh(t,p,rh)
thermo_es.m thermo_es calculates saturation vapour pressures (mb) wrt water and ice from T (degC) from the polynomial approximation of Lowe (see Sargent 1980)

version 2:

This is a functional form of the main code, so it is simpler in some ways, you pass the winds, temps, etc as variables and get back the fluxes as a function of fetch. The central code is simpler, but there are some complicating bits, as I don't calculate the fluxes using the algorithm in certain cases (ie. when winds are low, or when the atmosphere is near neutral, etc), as the algorithm will not converge then. Instead I calculate the fluxes using a constant coefficient. Very simple. It also copes with when the wind is onshore etc. This is the function I have used for a climatological study.

Code

Description

ropex_cbl_growth.m the main code
cbl_coeffs.m where coefficients are calculated

You will also need some of the code from above table.

Please let me know if you get any interesting results or have any problems.