Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
apps:datastudio:compareatmospherescriptdetails [2022/01/29 12:41] – created freddiapps:datastudio:compareatmospherescriptdetails [2022/01/29 13:23] (current) freddi
Line 4: Line 4:
  
 ==== Description ==== ==== Description ====
-The "Compare Atmosphere Data"-script analyses and compares two user defined locations in the same simulation for a specified variable. The idea of the the script is, that two areas in the same simulation are directly comparable. The script output shows 2 plots, each with two figures. The fist plot shows the mean, maximum and minimum values for each timestep at location A in the upper figure and at location B in the lower figure. The second plot shows the direct comparison between both locations: The upper figure shows the mean values of location A and B and the lower figure shows the absolute difference between the mean values for each timestep. +The "Compare Locations"-script analyses and compares two user defined locations in the same simulation for a specified variable. The idea of the the script is, that two areas in the same simulation are directly comparable. The script output shows 2 plots, each with two figures. The fist plot shows the mean, maximum and minimum values for each timestep at location A in the upper figure and at location B in the lower figure. The second plot shows the direct comparison between both locations: The upper figure shows the mean values of location A and B and the lower figure shows the absolute difference between the mean values for each timestep. 
  
 === General advice == === General advice ==
Line 18: Line 18:
 The Potential Air Temperture is saved in the atmosphere output folder. Hence, we need to set the Datafile 1 to a random .EDX-file in the atmosphere output folder of our simulation. Datafile 2 keeps empty.  The Potential Air Temperture is saved in the atmosphere output folder. Hence, we need to set the Datafile 1 to a random .EDX-file in the atmosphere output folder of our simulation. Datafile 2 keeps empty. 
  
-In addition you can also define a diagram-title which will be used in the output figure. Anyway, if you leave the Diagram Title field empty the script generates appropriate title automatically. +In addition you can also define a diagram-title which will be used in the output figure. Anyway, if you leave the Diagram Title field empty the script generates an appropriate title automatically. 
  
 Now click on the script and click "Copy to Python Console" to adjust the remaining settings.   Now click on the script and click "Copy to Python Console" to adjust the remaining settings.  
 +
 +{{:apps:datastudio:comparelocations_datastudiosettings.png}}
  
 === Model Area === === Model Area ===
-The locations we would like to compare are displayed in red in the following image. Every grid cell inside each red cuboid will be taken into account for the corresponding location. +The locations we would like to compare are displayed in the following image. Every grid cell inside each cuboid will be taken into account for the corresponding location. 
 To set these areas in the script, change the following lines accordingly: To set these areas in the script, change the following lines accordingly:
 <code python> <code python>
Line 35: Line 37:
  
 # define Location B (as bounding box) # define Location B (as bounding box)
-x2_from = 47 +x2_from = 34 
-x2_to = 56 +x2_to = 52 
-y2_from = 30 +y2_from = 8 
-y2_to = 48+y2_to = 18
 z2_from = 4 z2_from = 4
 z2_to = 4   z2_to = 4  
Line 47: Line 49:
 You can use Spaces or Leonardo to look up the x, y and z values of your area of interest. You can use Spaces or Leonardo to look up the x, y and z values of your area of interest.
  
-== Location A ==+== Location A and B ==
  
 Location A  is a parking lot behind a building row.  Location A  is a parking lot behind a building row. 
- 
-== Location B == 
  
 Location B is located at the crossroad in front of buildings. Location B is located at the crossroad in front of buildings.
  
 +{{:apps:datastudio:comparelocations_locations.png}}
  
 == Data index == == Data index ==
Line 82: Line 83:
  
 === Output === === Output ===
-If all settings are done, the script is ready to get executed. The output should look like this:+If all settings are done, the script is ready to get executed. The second plot is shown when the first plot is closed. The output should look like this: 
 + 
 +{{:apps:datastudio:comparelocations_pott_plot1.png}} 
 + 
 +{{:apps:datastudio:comparelocations_pott_plot2.png}}
  
 If you would like to analyse pollutant-data instead, an output for e.g. NO2-concentration could look like this: If you would like to analyse pollutant-data instead, an output for e.g. NO2-concentration could look like this:
 +
 +{{:apps:datastudio:comparelocations_no2_plot1.png}}
 +
 +{{:apps:datastudio:comparelocations_no2_plot2.png}}
  
 ==== Technical Note ==== ==== Technical Note ====
 Note that the execution-time of the script may be unexpected high, especially when you compare longer time periods or large areas. This is caused by limited implementation options caused by the Delphi-Python-interface. During execution, the GUI might not be reactive. Note that the execution-time of the script may be unexpected high, especially when you compare longer time periods or large areas. This is caused by limited implementation options caused by the Delphi-Python-interface. During execution, the GUI might not be reactive.