Matlab code

This directory contains the Matlab code for the Convective Internal Boundary-Layer model of 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. The same model is also used for my Coastal polynyas in the southern Weddell Sea paper.

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.

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.

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