7.6 Display Particle Position: Python display not working

Post Reply
roxanasierra
Posts: 10
Joined: August 27th, 2020, 1:30 pm
Registered HYSPLIT User: Yes

7.6 Display Particle Position: Python display not working

Post by roxanasierra »

Hello
I am going over the tutorial videos and for this section 7.6 Display Particle Position the the center-of-mass particle distribution along the trajectory is shown using python. I followed the instructions to install python as suggested in a previous question in the forum but no PDF displays for some reason (see attachment).
I updated the directory in Advanced > Configuration Setup > Set Directories, as follows:
C:/Users/[my_username]/anaconda3/envs/hysplit

It did not originally installed here C:\Users\YOUR_USERNAME\AppData\Local\Continuum\anaconda3\envs\hysplit but as shown above, not sure if that would be a problem.

Hope you can help to solve this issue.
Thanks
Attachments
Tutorial 7.6 problem python.png
sonny.zinn
Posts: 354
Joined: May 8th, 2019, 1:31 pm
Registered HYSPLIT User: Yes

Re: 7.6 Display Particle Position: Python display not working

Post by sonny.zinn »

Could you scroll the Log window all the way to the left and let us know the entire command-line? My computer for a Python trajectory plot shows:

C:\hysplit\working>"C:/Users/[MY_USERNAME]/AppData/Local/Continuum/anaconda3/envs/hysplit/../../Scripts/activate.bat" "C:/Users/[MY_USERNAME]/AppData/Local/Continuum/anaconda3/envs/hysplit" && python.exe "C:/hysplit/exec/trajplot.py" --interactive -i./tdump -otrajplot.pdf -jC:/hysplit/graphics/arlmap -m0 -k1 -l12 -z50 -v0 -a0 -s1 -: -:

It activates the "hysplit" anaconda environment and then runs the "trajplot.py" Python script. Have you created the "hysplit" anaconda environment and installed the Python packages required for hysplit graphics?
roxanasierra
Posts: 10
Joined: August 27th, 2020, 1:30 pm
Registered HYSPLIT User: Yes

Re: 7.6 Display Particle Position: Python display not working

Post by roxanasierra »

Here it is the Log command-line:

C:\hysplit\working>"C:/Users/My_username/anaconda3/envs/hysplit/../../Scripts/activate.bat" "C:/Users/My_username/anaconda3/envs/hysplit" && python.exe "C:/hysplit/exec/trajplot.py" --interactive -icmtraj.txt -otrajplot.pdf -jC:/hysplit/graphics/arlmap -m0 -k1 -l1 -z10 -v1 -a0 -s1 -: -:

I did create the "hysplit" anaconda environment and installed the Python packages required for hysplit graphics as described in the install_win10.txt

Thank you, hope you can help. I see the command line is pretty much identical to yours except for the last part "-icmtraj.txt" and "l1 -z10 -v1"
sonny.zinn
Posts: 354
Joined: May 8th, 2019, 1:31 pm
Registered HYSPLIT User: Yes

Re: 7.6 Display Particle Position: Python display not working

Post by sonny.zinn »

Thank you. Indeed, the command line looks all right to me.

Since I cannot reproduce the issue you are experiencing on my computer, I would appreciate if you could help me to diagnose the issue. The python plotting script can be directly called without using the GUI. With the -v option, python can produce a lot more information for debugging purposes.

Could you do the followings? The resulting file may contain your username so please do not post it here. Instead, could you send it to my email address? I will send you an email shortly after this post.

1) Open "Anaconda Prompt (anaconda3)" from the Windows Start menu under "Anaconda3 (64-bit)".
2) Change directory to your hysplit working directory by running "cd c:\hysplit\working" (without the quotation marks).
3) Activate the hysplit environment by executing "conda activate hysplit" (again without the quotation marks).
4) Run python as follows, noting the -v option after python.exe and redirection of python messages to debug.txt at the end:

python.exe -v "C:/hysplit/exec/trajplot.py" --interactive -icmtraj.txt -otrajplot.pdf -jC:/hysplit/graphics/arlmap -m0 -k1 -l1 -z10 -v1 -a0 -s1 -: -: 2> debug.txt

5) Email debug.txt to me for analysis.

Thank you
sonny.zinn
Posts: 354
Joined: May 8th, 2019, 1:31 pm
Registered HYSPLIT User: Yes

Re: 7.6 Display Particle Position: Python display not working

Post by sonny.zinn »

Thank you for sending me the debug.txt file. I was able to see an exception:

ImportError: cannot import name '_NDFrameIndexer' from 'pandas.core.indexing' (C:\Users\USERNAME\Anaconda3\envs\hysplit\lib\site-packages\pandas-1.1.1-py3.7-win-amd64.egg\pandas\core\indexing.py)

Our baselined versions for geopandas and pandas are 0.4.1 and 1.0.1, respectively. Your computer has the same version of geopandas but it has version 1.1.1 for pandas. This is causing the issue.

We will see how to resolve the pandas issue.
Post Reply

Return to “7. Air concentration calculations”