slcs-jsc / mptrac

Massive-Parallel Trajectory Calculations (MPTRAC) is a Lagrangian particle dispersion model for the analysis of atmospheric transport processes in the free troposphere and stratosphere.
GNU General Public License v3.0
35 stars 14 forks source link

Python code examples #29

Closed lars2015 closed 2 months ago

lars2015 commented 8 months ago

Is your feature request related to a problem?

Describe the solution you'd like

Additional context

laomangio commented 7 months ago

I have put the python plot scripts in projects/example to use the atm and grid output in example/data.

lars2015 commented 7 months ago

Hi Mingzhao,

thank you for sharing the python plot scripts.

Can you please put them in the separate directory ./projects/python, as said above?

I do not want to merge it with the example.

Best regards Lars

lars2015 commented 7 months ago

Hi Mingzhao,

thanks for fixing the path.

Perhaps you could add a README.md file providing a few sentences about what the scripts are doing and which prerequisites are necessary to run them?

For example, I found I had to install these packages on Ubuntu 22.04 to create the plots:

sudo apt install python-is-python3 python3-cartopy python3-opencv

Best regards Lars

lars2015 commented 7 months ago

Hi Mingzhao,

I modified the grid output to include the standard deviations and sorted the columns in a different way.

Can you please update the python example for the grid output? (I could not figure out how you select the column that is to be plotted.)

Thanks Lars

fkhosrawi commented 7 months ago

Hi Mingzhao, Hi Lars,

I have a suggestion on the header of our example codes. In one of our Python meetings at KIT I learned that code headers should look as follows:

"""" Author: Farahnaz Khosrawi Data created: 17.10.2023 Last modified: 17.10.2023 Purpose: Find the trajectory index for the trajectory with the largest differences to the reference and plot locations of these on a map """"

Thus, adding some kind of history (when written and changed) and a short description what the code is doing additionally to the information of the author of the code. Would that be something we could/should do for our example codes as well? What do you think?

Best wishes, Farah

lars2015 commented 7 months ago

Hi Farah,

this is a very nice idea, yes, let's do that!

Lars

lars2015 commented 2 months ago

Hello,

Fixed some minor code issues found by static code analysis.

It seems we can close this issue now.

Best regards Lars