Python code used to postprocess the raw output data of the tracer algorithm.

***********************************************************************************************************************************************************************************************************

The raw output data of the tracer algorithm have been stored on the Mogon server of the Johannes Gutenberg University Mainz in the following folders:
/lustre/miifs01/project/m2_jgu-w2w/w2w/amayer02/TRACEROUTPUT/2010-2022_tracerdiagnostics/lambda7/YYYY/Advection_horizontal_theta_lamdarec7.0days_2010-02-20_00/
/lustre/miifs01/project/m2_jgu-w2w/w2w/amayer02/TRACEROUTPUT/2010-2022_tracerdiagnostics/lambda7/YYYY/Advection_vertical_theta_lamdarec7.0days_2010-02-20_00/
/lustre/miifs01/project/m2_jgu-w2w/w2w/amayer02/TRACEROUTPUT/2010-2022_tracerdiagnostics/lambda7/YYYY/Advection_seasonal_theta_lamdarec7.0days_2010-02-20_00/
/lustre/miifs01/project/m2_jgu-w2w/w2w/amayer02/TRACEROUTPUT/2010-2022_tracerdiagnostics_indirect_source/lambda7/YYYY/Advection_potential_temperature_lamdarec7.0days_2010-02-20_00/

They comprise the absolute contributions from horizontal transport, vertical transport, diabatic heating, and seasonality to a given potential temperature anomaly. 
The temporal resolution of these data is 3 hours.

With the code in this directory, these data have been postprocessed to yield dailymeans of the absolute contributions of the individual processes, complemented by the contribution from the pre-existing temperature anomaly. Further, climatological and anomalous contributions were calculated as well as near-surface averages.

******************************************************************************************************************************************************************************************************

The code is provided as bundled git repositories.

From within the repository (e.g. "testcode"), a bundle of some branch (e.g. "master") has been created:
git bundle create testcode.bundle master

Unbundle the bundled repository by cloning the bundled repository into some branch (e.g. "master") of a new repository 
(e.g. "testcode_unbundled"):
git clone -b master testcode.bundle testcode_unbundled 

******************************************************************************************************************************************************************************************************

The following files are provided:

	compute_residuum.bundle: 
		Code to compute the contribution from the pre-existing anomaly as a residuum of the other 4 terms and the actual potential temperature anomaly 
		(The used potential temperature anomaly was computed as the difference between the instantaneous potential temperature and the climatological potential temperature.)
		(used commit: ce4088cf8c465dc1c070784d7a1dabcc162bc2a6)
	
	compute_dailymeans.bundle: 
		Code to compute daily means of the 3 hourly data.
		(used commits: 74200875e43a15720600fce70422596028242e08, 3219e9e74c321543de0d03b1d961679be1a54688, b5efd5a7a0eb7719437ab6b36623ba3b9fc5c25e, 4ae3bda8c47631316084211e1a513a2bde3f53e6)
	
	combine_into_dataset.bundle: 
		Code to combine all variables into one netcdf file.
		(used commit: bbad7c07912d30d82efb7348770dbfcbcaf37a27)
	
	compute_tracer_climatologies.bundle: 
		Code to compute day-specific long-term averages (i.e. climatologies) of the absolute contributions.
		(used commit:  82f03d70f4bbc105ea6c81e8ac01bebac0c1cdb0)

	code_for_computing_anomalies.bundle: 
		Code to compute anomalous contributions as the difference between the absolute contributions and the climatological contributions.
		(used commit: a2b0e0761c41ecec45f954f76a2fa63890068d8d)
	
	compute_levels_above_ground.bundle: 
		Code to compute near-surface averages.
		(used commit for absolute contributions: f96d9152772224ca65e6d2b3e3d8657d1be41d30)
		(used commit for anomalous contributions: 779a97a601264b8e5f5865f970d20c1681cc55e6)

	code_compression.bundle: 
		Code to compress the files using the "scale_factor" and "add_offset" attributes.
		(commits on 24/25 June 2024)

	add_metadata.bundle: 
		Code to add metadata to the netcdf files.
		(commits on 25 June 2024)
	
	README.txt

***********************************************************************************************************************************************************************************************************

Directory structure on Mogon at the start of the postprocessing:

/lustre/miifs01/project/m2_jgu-w2w/w2w/amayer02/TRACEROUTPUT/
|
|--2010-2022_tracerdiagnostics
   |--lambda7
       |--2010
           |--Advection_horizontal_theta_lamdarec7.0days_2010-02-20_00
                |--chi_on_pl_2010-03-01_00_2160.nc
                |--chi_on_pl_2010-03-01_03_2190.nc
                |--..
                |--chi_on_pl_2010-09-30_18_53460.nc
                |--chi_on_pl_2010-09-30_21_53490.nc
           |--Advection_vertical_theta_lamdarec7.0days_2010-02-20_00
                |--..
           |--Advection_seasonal_theta_lamdarec7.0days_2010-02-20_00
                |--..
        |--..
        |--2022
            |--..
                |-..
|--2010-2022_tracerdiagnostics_indirectsource
    |--lambda7
	|--2010
	    |--Advection_potential_temperature_lamdarec7.0days_2010-02-20_00
		|--chi_on_pl_2010-02-20_00_0000.nc
		|--chi_on_pl_2010-02-20_03_0030.nc
		|--..
		|--chi_on_pl_2010-09-30_18_53460.nc
		|--chi_on_pl_2010-09-30_21_53490.nc
	|--..
	    |--..
		|--..
	|--2022
	    |--..
		|-..
	
***********************************************************************************************************************************************************************************************************

Directory structure on Mogon after the postprocessing:

/lustre/miifs01/project/m2_jgu-w2w/w2w/amayer02/TRACEROUTPUT/2010-2022_tracerdiagnostics/lambda7/dailymeans/temperature_diagnostics_in_terms_of_theta_with_indirect_diabatic_source_and_seasonality/
|		    
|--2010
    |--temperature_diagnostics_2010-03-01.nc
    |--..
    |--temperature_diagnostics_2010-09-30.nc
|--..
    |-..
|--2022
    |-..
|--anomalies
    |--2010
        |--temperature_diagnostics_2010-03-01_anomalies.nc
        |--..
        |--temperature_diagnostics_2010-09-30_anomalies.nc
    |--..
        |--..
    |--2022
        |--
    |--mean_50hPa_above_ground
        |--..
    |--climatologies
        |--temperature_diagnostics_diabatic_ydaymean_smoothed31days.nc
        |--..
	|--mean_50hPa_above_grounds
            |--50_mean_above_ground_temperature_diagnostics_diabatic_ydaymean_smoothed31days.nc
            |--..
|--mean_50hPa_above_ground_masked_as_anomalies
    |--2010
        |--50_mean_above_ground_temperature_diagnostics_2010-03-01.nc
        |..
        |--50_mean_above_ground_temperature_diagnostics_2010-09-30.nc
    |--..
    |--2022
        |--..

***********************************************************************************************************************************************************************************************************

For publication on Zenodo the directories in 
/lustre/miifs01/project/m2_jgu-w2w/w2w/amayer02/TRACEROUTPUT/2010-2022_tracerdiagnostics/lambda7/dailymeans/temperature_diagnostics_in_terms_of_theta_with_indirect_diabatic_source_and_seasonality/
were archived into tar files:

The directories 
	./2010, ./2011, ./2012, ..., ./2022 
were archived into 
	absolutes_2010.tar, absolutes_2011.tar, absolutes_2012.tar, ..., absolutes_2022.tar

The directory 
	./mean_50hPa_above_ground_masked_as_anomalies 
was archived into 
	absolutes_mean_50hPa_above_ground_masked_as_anomalies.tar

The directory 
	./climatologies 
was archived into 
	climatologies.tar

The directories 
	./anomalies/2010, ./anomalies/2011, ./anomalies/2012, ..., ./anomalies/2022 
were archived into 
	anomalies_2010.tar, anomalies_2011.tar, anomalies_2012.tar, ..., anomalies_2022.tar

The directory 
	anomalies/mean_50hPa_above_ground 
was archived into 
	anomalies_mean_50hPa_above_ground.tar

******************************************************************************************************************************************************************************************	

In case of any questions, please contact Amelie Mayer (amelie.mayer@uni-mainz.de).



