Output path error when including numbers

Post any defects you find in the HYSPLIT software here. The HYSPLIT Developers carefully monitor this list and will work diligently to repair any reported problems. When posting a bug report, please specify both the HYSPLIT version and operating system you are using.
Post Reply
niomara19
Posts: 2
Joined: March 26th, 2021, 10:36 am
Registered HYSPLIT User: No

Output path error when including numbers

Post by niomara19 »

I am working on trying to automate HYSPLIT back trajectories for several locations and want to direct the resulting trajectories files to directories labeled with the location of the site with the format: site_XN_YE_Zmagl, e.g. site_19N_20E_100magl. Whenever I try this, the output files are not saved properly. I figured out that the output fails to save correctly whenever there is any digit 0-9 within the desired output file path and the resulting trajectory file name is saved as the parent folder I want it to save to appended with the filename in the CONTROL file. When the output path only contains letters and underscores, there is no problem and the files save perfectly.

For example, if the CONTROL text file has the output path
/User/hysplit_output/site_15N_20W_100magl/
And the file name
traj_test_output

The trajectory file saves as "site_15N_20W_100magltraj_test_output" in the "hysplit_output" directory, but if it is set up like so:

Output path = /User/hysplit_output/site_fifteenN_twentyW_onehundredmagl/
file name = traj_test_output

The trajectory file saves in the "site_fifteenN_twentyW_onehundredmagl" directory normally.

Does anyone know if this is an outstanding bug? Have others been able to include digits in their output file paths without issue?

I am running HYSPLIT v5.0.0 on a macOS Catalina v10.15
sonny.zinn
Posts: 91
Joined: May 8th, 2019, 1:31 pm
Registered HYSPLIT User: Yes

Re: Output path error when including numbers

Post by sonny.zinn »

I prepared a sample CONTROL file specifying the output directory to /Users/MY_USERNAME/Downloads/site_15N_20W_100magl/ and saw a tdump file being created in the directory. This was done with v5.0.0 for Windows PC but the macOS distribution should work in the same way.

Note that the trailing slash (/) is a must when specifying the directory name in CONTROL.
niomara19
Posts: 2
Joined: March 26th, 2021, 10:36 am
Registered HYSPLIT User: No

Re: Output path error when including numbers

Post by niomara19 »

Thank you for your reply. After doing some more tinkering to my code I realized that having digits in the output path was not the problem, but the real issue was the output path generated in my automated script had more than 80 characters, so hysplit was not reading the '/' at the end of the output path line in the control file, resulting in strange filenames saved in the wrong directory.

By abbreviating the file path, my output files are now saved in the correct directories with the correct names. For the sake of other coding novices like myself, it would be helpful if there was a warning in the hysplit documentation about path length restrictions.

Thanks again!
Post Reply