STEP 1: please install CLASS4GL on your operating system first

STEP 2: perform a first experiment with one station

Run your first experiment consisting of simulations for each day with an available morning–afternoon sounding pair for station 74560 (Lincoln):

python $CLASS4GL/simulations/ \
    --c4gl_path_lib $CLASS4GL \
    --station_id 74560 \
    --path_forcing $CLASS4GL_DATA/forcing/IGRA_PAIRS_20190515/ \
    --path_experiments $CLASS4GL_DATA/experiments/IGRA_PAIRS_20190515/ \
    --experiments BASE \
    --split_by 25 \
    --global_chunk_number 0

This takes some time. Afterwards, you can list the output files with:

ls -larth $CLASS4GL_DATA/experiments/IGRA_PAIRS_20190515/BASE

Please note that the last two arguments --split_by 25 --global_chunk_number 0 will result in simulations of only the first 25 sounding days. If you remove these arguments, all available sounding days of that station will be run. Please note, that this will take a much longer long tim. In order to overcome the computational time of multiple simulations (and over multiple stations), please see section Parallel simulations on a supercomputer.

You can get a list and explanation of the command line arguments as follows:

python $CLASS4GL/simulations/ --help

STEP 3: explore your first experiment

ipython -i $CLASS4GL/interface/ -- \
  --c4gl_path_lib $CLASS4GL \
  --path_forcing $CLASS4GL_DATA/forcing/IGRA_PAIRS_20190515/ \
  --path_experiments $CLASS4GL_DATA/experiments/IGRA_PAIRS_20190515/ \
  --experiments BASE

Have a look at the pandas data frame of the one-parameters CLASS4GL data you have generated:

print("Initial (morning) table")
print("Model end (afternoon) table")
print("Observed end (afternoon) table")

Basically, every one-parameter value can be extracted directly from these tables for all simulation days in the experiment at once. For example, you can get the end state of the lifted condensation level with:


To see which other one-parameters are in the tables, you can type (either for morning, mod/afternoon and obs/afternoon state):

print("-- Initial (morning) parameters --")
print("-- Model end (afternoon) parameters --")
print("-- Observed end (afternoon) parameters --")

STEP 4: View vertical profile data and time series

Not all data is provided in the table, particularly one-dimensional data such as vertical profile data (this step) and timeseries (next step).

This shows the vertical profile data table of the first simulation day:

# Initial (morning) profile
# End (afternoon) profile, observed.
# End (afternoon) profile, modelled.

More specifically, you can display the vertical theta profile of the modeled afternoon profile with:


Here are the other columns of the profiles (analogous for the other profiles).


It should be noted that the air_ap section provides the vertical profiles for which an ABL is considered for the model. In order to get the original unfitted profile from the soundings, you can get it with the air_balloon section.


Note that most of these features also apply for the other objects.

STEP 5: View daytime time series

The daytime evolution of model variables, eg., specific humidity q in the mixed layer, can be displayed as follows:


These are the corresponding local solar hours:


An overview of all available output time series can be listed with:


Note that there is also the pars section, in which you can find back the different one-parameter values for the current sounding day:


or you can choose any other parameter from:


Finally, you can get an overview what’s inside the rest of the ‘record_yaml_*’ objects as follows:

print("-- Keys of the initial (morning) input/sounding object --")
print("-- Keys of the end (afternoon) model object --")
print("-- Keys of the end (afternoon) sounding object --")

If you remove .__dict__.keys(), you will notice that theey are actually class4gl (model) and class4gl_input objects, which we will use later on in step 8.

STEP 6: move between simulation days

The previous two steps only show one-dimensional data for the first simulation day. You can go to the next simulation day by:


Now, you just do the steps 4 and 5 again, but this will now display the next sounding.

Here is how to jump 10 simulation days ahead:


STEP 7: Load and run CLASS4GL objects from the CLASS4GL interface

For quick model parameter sensitivity testing, it is sometimes convenient to run class directly from the interface. Therefore, make a shortcut of the class4gl (input) objects:

c4gli_disk = c4gldata['BASE'].frames['profiles']['record_yaml_ini']

You can now create your own set of input parameters and run a new class simulation:

import copy
c4gl = class4gl(c4gli_disk) 

c4gli_wilt = copy.copy(c4gli_disk) = = 
c4gl_wilt = class4gl(c4gli_wilt)

You can now compare the original (c4gl) and new (c4gl_wilt) class4gl simulation to see the effect of setting the soil moisture to wilting point:

import pylab as plt
fig = plt.figure()

Next: parallel simulations.