Problem Session 1 [9/12/96]

  1. Capture the T [temperature] data file

  2. Try to write these simple programs as generally as possible. You are going to use them throughout the semester. Start with a Main or Driver program and call all subroutines off that. You will build on Main or Driver throughout the course.

    Your first little subroutine, ZtoP or ZtoP.f if you write in modular form as you should, is needed because Atmospheric chemists tend to work in z, though the atmoshpere makes much more sense in p. Essentially, you have to integrate A(z) = const/T(z) from z=0 to z=Z. Write a subroutine to calculate p(Z) for the 11 values of Z using T(Z). For z > 50km, assume that T(z) = T(50km).

  3. Next, write a subroutine to calculate the atmospheric column density COLMDEN(Z) in [molecules/cm2] from p(Z) to the top of the atmosphere for the 11 Z levels [Z = 0 to 50 in 5km increments. This same subroutine should be general enough to calculate the atmospheric column density in a slab bounded by p(Z1) and p(Z2) [see Eq 9 Lect1 for details].
  4. The other key subroutine is Output or Output.f which you will use to present your results. For this first problem set, generate a table of the form

    nlev - Z - T(Z) - p(Z) - COLMDEN(Z)

  5. If you have time, plot T(Z), p(Z), and COLMDEN(Z) against Z.