rich-iannone / splitr

Use the HYSPLIT model from inside R and do more with it
Other
141 stars 60 forks source link

hyts_std truncates directories on linux #11

Open rdisalv2 opened 7 years ago

rdisalv2 commented 7 years ago

The hysplit executable for linux, hyts_std (which calculates trajectories), does not seem to work with long directories (seems like 80 characters is the limit).

Instead of outputting things in the working directory, it seems to truncate the working directory to 80 chars and then outputs there (this can distort the filenames too).

For this reason when used in a very long directory the SplitR package throws errors when it tries to call system('mv') -- because the product of hyts_std is not in the working directory.

On the one hand this is not really a problem with SplitR but rather with hyts_std. On the other hand, hyts_std examples from NOAA always focus on relative paths (which are short), while SplitR puts in absolute paths in the CONTROL file.

Anyway, if you find you can replicate this by running the linux hyts_std in a long directory, it might be good to have SplitR check the length of the current working directory and print a warning if it is super long.

The problem was a little tricky for me to diagnose because it really just looked like hyts_std was just not working.

Thanks for your work!