|
PBL-LIB, a library of PBL
modeling routines
BWIND needs only one (but would like four) parameters to run:
-
Sea Level Pressure (to calculate winds; necessary)
-
Near-sfc Air Temperature (for stratification correction and thermal wind)
-
Surface Temperature (for stratification correction)
-
Humidity or Dew Point (for latent heat flux)
To retrieve input data, there is a program called UNBUNDLE. It currently
reads from a variety of sources of data that can be obtained from
NCAR (ncardata.ucar.edu):
-
NMC data:
-
ds464.0: slp, sat and rlh, gridded to the 47 by 51 Octagon
-
ds195.0: sst, gridded to the 47 by 51 Octagon
-
ECMWF data:
-
ds111.0: surface and upper air, T106/T63 spherical harmonic grid
-
ds111.1: surface only, N80/N48 gaussian-latitude grid
-
ds111.2: surface and upper air, 2.5 by 2.5 degree grid
UNBUNDLE extracts subregions of the entire grids, has the option
of interpolating to another grid, and writes them to a file in the "pbl
format" that BWIND expects. These are binary files; for the exact
specs, see the file called write_pbl.f. You can use the subroutines
write_pbl.f
and
read_pbl.f to manipulate the data with your own programs (or
your own data display programs). Get the helpful file 'USER I/O' along
with the source code for some hints and help.
PBL-LIB consists of a series of programs written in FORTRAN 77
(and one in C) for unix. Here is a list:
-
bwind
-
calculates a whole host of PBL parameters. Reads the input files from the
subdirectory ../data/ and writes its output to the same directory (both
in binary pbl-format).
-
unbundle
-
extracts subsets of data (both in time and space) from huge data files
for use as input files for bwind. Writes its output to the subdirectory
../data/ in pbl-format.
-
pbl_to_asc
-
translates pbl-format files into ASCII; default output is to the screen.
There are several switches. Use the "-h" switch to list all the current
options.
-
pbl_math
-
performs elementary mathematical operations on a data file, or point-by-point
operations between two data files (both files must be on the same grid).
Use this to scale a data file, find the difference between two grids, etc.
-
pbl_ave
-
averages the files you pass it (all files must be on the same grid) and
writes an output file.
-
pbl_find
-
can find the high, the low, all values greater than a given cutoff, all
values less than a given cutoff, or simply the value at a grid point in
a data file.
-
pbl_plot
-
plots the values of one file vs. the values of another. Calls the program
gnuplot. Can create postscript files.
-
pbl_uv2ma
-
reads the u- and v-vector files and creates files of the magnitude and
angle (w.r.t. East). File name extensions are of the form .??m and .??a,
where the ?? is from the vector (.??u and .??v).
-
pbl_density
-
reads the slp, sat, and either rlh or dew files and calculates the density
of the near-surface air. Easier than running bwind on a grid if that's
the only output you need.
-
pbl_neutral
-
reads a near-surface wind file of your choice (along with the sst, sat,
slp and either rlh or dew) and can either calculate the neutral-equivalent
wind or correct a neutral wind for stratification.
-
pbl_interp
-
interpolates from any grid onto an equal-angle (lat-lon) grid.
-
pbl_to_si
-
creates a satellite-image file (pixels) for viewing in satview*. Places
the file in the subdirectory ../sat. This program works on any grid, regardless
of whether or not it is an equal-angle (lat-lon) grid.
-
pbl_to_ov
-
creates an overlay file (contours, vectors) for viewing in satview*. Places
the file in the subdirectory ../sat. The data file MUST be on an equal-angle
(lat-lon) grid, or you will get an output file filled with garbage (with
one exception: see the "irregular vectors" option).
* Satview is a data display program developed at the University of Washington;
contact satview@atmos.washington.edu
and/or look here
for more information.
Of course, since this is a point model, the user can forgo the "wrapper"
and call the similarity model directly from his/her program. The appropriate
subroutine to call is brown.f and is packaged in the source code
for BWIND. It has a long section of comments in the beginning describing
each of the input and output variables. You could call it at each grid
point of your own model, if you need one of the output variables.
FORTRAN codes
Source Code and Installation Guide (FTP links)
Get the source code for BWIND:
a compressed .tar file or
a .zip file
Get the source code for UNBUNDLE:
a compressed .tar file or
a .zip file
Get the source code for UTILITIES:
a compressed .tar file or
a .zip file
Get the helpful file USER I/O:
a compressed .tar file or
a .zip file
Get some Sample Input and Output Files:
a compressed .tar file or
a .zip file
Get some extra programs that calculate the profiles and hodographs
of wind components, including secondary flow:
a compressed .tar file or
a .zip file
Links to the README files
MATLAB codes
The Matlab direct model was created by Dr. Ralph Foster in September
1998. The main Matlab program is twolayer.m and a sample call is
provided in exbr1.m. All the Matlab (*.m) commands necessary to run
the model are packaged together in each of the links below.
This model is still undergoing testing and improvements.
Input Parameters
| Boundary Layer Values |
Control Flags |
- Gspd: Geostrophic wind speed (m/s)
- Tair: Air temperature (K)
- Tsfc: Sea temperature (K)
- qair: Specific humidity at height Z_q
- qsfc: Specific humidity at surface
- Z_T: Height of temperature (m)
- Z_q: Height of humidity (m)
- gradT: Temperature gradient (K/km?)
- TGA: Turning angle? (degrees)
- fcor:
- Z_out: Height for output winds
- Cd: Drag coefficient
- lambda:
|
- iprnt: Flag to turn on printing
- Strat: Flag
- Second: Flag to turn on secondary flow
- Baroclinic: Flag
- tol_ustar: tolerance for U*
- tol_zl: tolerance for stratification parameter Z/L
- MAX_inner: Maximum number of iterations for inner loop
- JUMP_inner:
|
Output Parameters
- Usfc
- CIA
- ustar
- tstar
- qstar
- zl
- z0
- zt
- zq
|
- EK_depth
- err
- Nin
- Nout
- test_ustar
- test_alf
- test_zl
- con_inner
- con_outer
|
Source Code Links
|