pysplit icon indicating copy to clipboard operation
pysplit copied to clipboard

Issue with trajectory analysis commands

Open nelsonkayla opened this issue 6 years ago • 12 comments

Hi,

I've been learning how to use PySPLIT as part of my undergraduate research credit, and have been running into a few technical issues. I have the most recent version of HYSPLIT (April 2018), and use Jupyter notebooks.

I can generate my necessary trajectory files/trajgroups with no issues, but when I try to analyze my trajectories, I hit a wall--using traj.calculate_distance(), traj.calculate_vector(), and traj.calculate_moistureflux() will not work for me. The first screenshot is my error for the first two traj commands, and the second is my specific humidity error. I don't know how to go about fixing this issue, so any guidance would be very helpful!

(result of traj.calculate_distance(), traj.calculate_vector()) image (result of traj.calculate_moistureflux()) image

Kayla

nelsonkayla avatar Nov 18 '18 03:11 nelsonkayla

During trajectory generation you must output specific humidity. As for the distance/vector issue I will look into that once I'm back from vacation, thanks for bringing it to my attention! Cheers, Mellissa

mscross avatar Nov 18 '18 15:11 mscross

Mellissa,

That makes sense, thank you for your help!

Kayla

nelsonkayla avatar Nov 18 '18 20:11 nelsonkayla

Mellissa,

That makes sense, thank you for your help!

Kayla

hello ,could you share your notebook? I do not understand how to use this pysplit!

xigrug avatar Nov 25 '18 05:11 xigrug

Hi, I run into the same problem of "mismatch error",so how did you solve this finally。

muyinglin avatar Mar 08 '19 03:03 muyinglin

Hello nelsonkayla and muyinglin, I'm also running into the distance/vector mismatch problem. Wondering if you've found a solution or a work-around?

Thanks!

geoboy1 avatar May 20 '19 18:05 geoboy1

Looks like the version of PySPLIT up on PyPI has the old version of the distance to origin calculator, which doesn't work right in any version of Python and does really weird things on Python 3.6. This issue appears to be fixed in the PySPLIT version here on github. I plan to upload PySPLIT 0.3.5 on May 31 to PyPI and hopefully conda forge and updating to this new version should fix this issue.

mscross avatar May 24 '19 22:05 mscross

Hi, I am using pySPLIT version 0.3.6. While running the example codes for trajectory.calculate_moistureflux(), i also ran into the same problem "Calculate Specific_Humidity first". When I tried to calculate relative humidity and specific humidity using trajectory.calculate_rh() and trajectory.calculate_sh() they said "Calculate mixing ratio first!". Furthermore, when I tried to calculate mixing ratio using trajectory.calculate_w() which needs argument: 'calc_using'. I checked the possible inputs for 'calc_using' in traj.py file and it is indicated either 'Relative_Humidity' or 'Specific_Humidity'. Did i get it right? Can you please help me through this problem?

sugam72-os avatar Oct 13 '20 12:10 sugam72-os

Hi, @sugam72-os . I know how to do it right, those are along-trajectory meteorologcial outputs generated at the same time in trajectory generations. Open the Hysplit GUI -> Menu -> Advanced -> Configuration setup -> Trajectory -> Add METEOROLOGY output along trajectory (6): Menu ->Check all the options -> Save -> Save Then re-run the whole program, it should be ok.

tingvan avatar Oct 20 '20 05:10 tingvan

Hi, I am using pySPLIT version 0.3.6. While running the example codes for trajectory.calculate_moistureflux(), i also ran into the same problem "Calculate Specific_Humidity first". When I tried to calculate relative humidity and specific humidity using trajectory.calculate_rh() and trajectory.calculate_sh() they said "Calculate mixing ratio first!". Furthermore, when I tried to calculate mixing ratio using trajectory.calculate_w() which needs argument: 'calc_using'. I checked the possible inputs for 'calc_using' in traj.py file and it is indicated either 'Relative_Humidity' or 'Specific_Humidity'. Did i get it right? Can you please help me through this problem?

Is there any chance you have solved this issue? I am currently stuck on the same problem... I am using downloaded NCEP data, which may be contributing to the problem. Which dataset are you using?

otiniano avatar Dec 03 '20 00:12 otiniano

@otiniano, The answer given by tingvan has solved my problem. I am using gdas1 dataset.

sugam72-os avatar Dec 03 '20 15:12 sugam72-os

@sugam72-os Thank you!

otiniano avatar Dec 08 '20 06:12 otiniano

Hi all, I am also running pySPLIT version 0.3.6 and am having the same issue when trying to use trajectory.calculate_moistureflux(); it throws 'Calculate Specific_Humidity first!' I've tried editing the GUI as suggested by @tingvan, but I am still getting the same message. I don't see a SETUP.CFG file in the working directory that I could try to edit, and when I try to edit the CONTROL or TRAJ.CFG files in the working directory they just reset after I use pysplit.generate_bulktraj(). I am using GDAS 1 data.

lnarellano avatar Jan 19 '23 18:01 lnarellano