
README.TXT

These are the files that are needed to do a sensitivity analysis on the meteorological pre-processor 
(MPP-FMI 3.0). The sensitivity analysis was performed using artificial input data. Therefore, the 
routine that produces the input data is included instead of the actual data to save space. The files 
needed for the sensitivity study is in .zip format to preserve the required directory structure. The 
paths in the code are relative and should work out-of-the-box.

Relevant files and directories:

./evuot.f95 
The meteorological pre-processor's (MPP-FMI) routine to derive turbulent fluxes and boundary layer 
scaling parameters. This file is the 'top routine' for the algorithmic differentiation. The file was 
rewritten in Fortran 95 from the Fortran 77 version evuot.f. The difference is the syntax and that 
the code is commented in English; also where no comments existed before. Numerically both versions 
are equivalent.

./mpp-fmi-3.0.zip
Zip file that contains the source code for the meteorological pre-processor MPP-FMI 3.0. The
source code is written in Fortran 77.

./input/  
This folder contains the Python 2.7 code that was used to produce the input data. Run 
'python make_input_data.py' in this folder to generate the input data. The code requires the python 
package NumPy to be installed. The header of the newly created files are self explanatory. 

./mpp-fmi-ad/ 
Contains the source transformed code as well as a wrapper to handle the data. Note that the source 
transformed code (files ending with _d.f95) is subject to TAPENADE's license agreement and can 
therefore only be used for academic use. Read the LISENCE file in the folder for more information. 
The source code can be compiled using GNU 'make'. The code is compiled using relative paths so that 
the wrapper reads the data from ../input/ and writes the data to ../output/ and ../output_ws/

./output/ and ./output_ws/
The different files in the output directories comprise one column of a Jacobian matrix so that each 
row in the respective files represents one column of the Jacobian. Data on the same row, but in 
different files, are from the same complete Jacobian matrix. The file names indicate which dependent 
output variable (which column of the Jacobian) is output to the file.
The relevant files are friction_velocity.dat that contains the partial derivatives of friction 
velocity with respect to the different input variables and obukhov_length.dat contains the partial 
derivatives of inverse Obukhov length with respect to the input variables. The input variables are 
listed in the file headers and are self explanatory.
The final file of relevance in the output directories is the evuot_res.dat file. This file contains 
the standard output of evuot.f95 routine. The columns comprise the following:
1    			record number
2     			station id
3			year
4			month
5			day
6			hour
7			sea level pressure (mbar)
8			temperature at 2 metres (K)
9			relative humidity (%)
10			state of the ground
11			total cloudiness
12			dew point tempemperature (K)
13			wet-bulb temperature (K)
14			amount of rain (mm/12h)
15			visibility (m)
16			synop code (0-99)
17			weather during previous hour (code)
18			weather during previous 3 h (code)
19			amount of low clouds (0-1)
20			type of low clouds (code 0-9)
21			height of low clouds (m)
22			type of middle clouds (code 0-10)
23			type of high clouds (code 0-10)
24			direction of wind flow (N = 270 degrees)
25			wind speed at 10 metres (m/s)
26			hourly amount of sunshine (0-1)
27			surface albedo (0-1)
28			solar elevation (degrees)
29			solar radiation (W/m²)
30			moisture parameter (0.5-1.0)
31			inverse Obukhov length (1/m)
32			temperature scale (K)
33			friction velocity (m/s)
34			turbulent/sensible heat flux (W/m²)
35			net radiation (W/m²)
36			latent heat flux (W/m²)
The data format and output is the same for both the ./output/ and ./output_ws/ directories. The folder 
./output/ comprise data from the input_range.txt file as model input. The folder ./output_ws/ comprise 
data from the input_range_ws.txt file as model input.

