mscross / pysplit

A package for HYSPLIT air parcel trajectory analysis.
BSD 3-Clause "New" or "Revised" License
144 stars 79 forks source link

Problem generating bulk trajectories with ERA5 data #84

Open AngelaAmpuero opened 2 years ago

AngelaAmpuero commented 2 years ago

I get the error: "ValueError: invalid literal for int() with base 10: 'L'" I am using the example script for trajectory generation with pysplit with ERA5 data. My data is global, with 0.75 * 0.75 spatial resolution, every 6 hours. Download and Transformation of the data to ARL format seems correct, in fact, trajectory generation works fine with the hysplit version for windows. Also, the pysplit script works fine with data from ERA Interim.

I would appreciate some help with this.

Screenshot from 2021-11-01 06-46-06

mscross commented 2 years ago

Are your meteorology file names properly formatted? monYY# or monYYYY#

AngelaAmpuero commented 2 years ago

Hi, thanks for you answer. I realized that when I merged the daily files into 8 day files, I was naming them xxx_number.ARL instead of just xxx_number so it was reading the letter L instead of the number. I changed the -1 for -5 in the script and that solved the problem. Another option was to actually name the files without the .ARL extension and leave the script as it is.

El sáb., 13 de nov. de 2021 22:36, Mellissa S. C. Warner < @.***> escribió:

Are your meteorology file names properly formatted? monYY# or mon YYYY#

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mscross/pysplit/issues/84#issuecomment-968181575, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWJR2Z7PTZH4AMUN2V2BPI3UL4AA7ANCNFSM5HD722GA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

AlFontal commented 2 years ago

Hi @AngelaAmpuero, sorry to dive in here as I am struggling to properly use ERA5 data as meteo source for running backtrajectories with HYSPLIT/PySPLIT.

I assume you succeeded at this attempt, but I wonder:

Thanks a lot! (and if there is any resource/tutorial on how to deal with this specifically with ERA5 data, I'd be really happy to know :) )

AngelaAmpuero commented 2 years ago

Hi Alejandro,

I used exactly the scripts by mscross. This means that I downloaded all variables within the script and all pressure levels. I downloaded the data in GRIB format and used the ERA52ARL tool to make the conversion.

I should point out that I use global data and download each month separately. This can be automated with a bash script. Here I attach the exact files that I use, all of them in the same directory. Finally, there are some things you should consider: -The commented part I run separately as indicated in the script. -I create daily files, then I merge them in groups of 8 days per month (last week has less days depending on the month) -When you generate your final data, avoid the .ARL extension, otherwise you will get an error.

I hope this helps, and if anything, let me know,

Cheers, Angela

El mar, 22 feb 2022 a las 13:00, Alejandro Fontal @.***>) escribió:

Hi @AngelaAmpuero https://github.com/AngelaAmpuero, sorry to dive in here as I am struggling to properly use ERA5 data as meteo source for running backtrajectories with HYSPLIT/PySPLIT.

I assume you succeeded at this attempt, but I wonder:

  • What variables from ERA5 did you download to be able to run HYSPLIT?
  • Did you use data from all pressure levels?
  • I assume you downloaded the files in GRIB format then converted them to ARL via a conversion tool. Could you point me towards which tool you used?

Thanks a lot! (and if there is any resource/tutorial on how to deal with this specifically with ERA5 data, I'd be really happy to know :) )

— Reply to this email directly, view it on GitHub https://github.com/mscross/pysplit/issues/84#issuecomment-1047945335, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWJR2ZYAC772H7Q5FG4CPODU4OXINANCNFSM5HD722GA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

AlFontal commented 2 years ago

Hi @AngelaAmpuero!

Thanks a lot for your quick response! And sorry for my late reply, I am only now noticing your response :sweat_smile:

In the end I managed to work with weekly GDAS1 files, although I would like to be able to use ERA5 data in the future. Since GDAS data is already in ARL format, it was rather easy to get it working once you I had everything properly stored in the meteo folder.

I used exactly the scripts by mscross. This means that I downloaded all variables within the script and all pressure levels.

However, I was wondering if there'd be any way to specify where the scripts you mention here are, as I don't know which ones you mean!

In any case, thanks and kind regards!

AngelaAmpuero commented 2 years ago

Hi Alejandro,

I attached them in my last email. Anyway, here is the link : https://github.com/amcz/hysplit_metdata Good luck!

Angela

On Tue, Apr 12, 2022 at 11:30 AM Alejandro Fontal @.***> wrote:

Hi @AngelaAmpuero https://github.com/AngelaAmpuero!

Thanks a lot for your quick response! And sorry for my late reply, I am only now noticing your response 😅

In the end I managed to work with weekly GDAS1 files, although I would like to be able to use ERA5 data in the future. Since GDAS data is already in ARL format, it was rather easy to get it working once you I had everything properly stored in the meteo folder.

I used exactly the scripts by mscross. This means that I downloaded all variables within the script and all pressure levels.

However, I was wondering if there'd be any way to specify where the scripts you mention here are, as I don't know which ones you mean!

In any case, thanks and kind regards!

— Reply to this email directly, view it on GitHub https://github.com/mscross/pysplit/issues/84#issuecomment-1096805217, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWJR2ZZMDAQSX6RQGCZB6WTVEWCGRANCNFSM5HD722GA . You are receiving this because you were mentioned.Message ID: @.***>

AlFontal commented 2 years ago

I can see it now, I think I should be able to repurpose those scripts to do what I want!

I don't think GitHub supports attachments in comments even when responding through email, so probably they just got lost in the way in the previous comment.

Gracias @AngelaAmpuero 😁

rmoore67 commented 12 months ago

Hi Alejandro, I used exactly the scripts by mscross. This means that I downloaded all variables within the script and all pressure levels. I downloaded the data in GRIB format and used the ERA52ARL tool to make the conversion. I should point out that I use global data and download each month separately. This can be automated with a bash script. Here I attach the exact files that I use, all of them in the same directory. Finally, there are some things you should consider: -The commented part I run separately as indicated in the script. -I create daily files, then I merge them in groups of 8 days per month (last week has less days depending on the month) -When you generate your final data, avoid the .ARL extension, otherwise you will get an error. I hope this helps, and if anything, let me know, Cheers, Angela El mar, 22 feb 2022 a las 13:00, Alejandro Fontal @.>) escribió: Hi @AngelaAmpuero https://github.com/AngelaAmpuero, sorry to dive in here as I am struggling to properly use ERA5 data as meteo source for running backtrajectories with HYSPLIT/PySPLIT. I assume you succeeded at this attempt, but I wonder: - What variables from ERA5 did you download to be able to run HYSPLIT? - Did you use data from all pressure levels? - I assume you downloaded the files in GRIB format then converted them to ARL via a conversion tool. Could you point me towards which tool you used? Thanks a lot! (and if there is any resource/tutorial on how to deal with this specifically with ERA5 data, I'd be really happy to know :) ) — Reply to this email directly, view it on GitHub <#84 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWJR2ZYAC772H7Q5FG4CPODU4OXINANCNFSM5HD722GA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.>

Hi Angela,

I was wondering how you converted daily .ARL files to weekly / combined 8 files into one?

Thank you, Ruth

AngelaAmpuero commented 12 months ago

Hi Ruth, I merged the daily files into 8-day files with a shell script. You will notice that there is definitely room for improvement, but this worked in my case. Here is an example for september 2019:

###########################################################################################################3

!/bin/bash

Bash to call other bashes

outdir='/home/ubuntu/Documentos/metdat_ERA5_ARL' year='2019' monthnum='09' month='sep'

cat ERA5${year}${monthnum}01.ARL ERA5${year}${monthnum}02.ARL ERA5${year}${monthnum}03.ARL ERA5${year}${monthnum}04.ARL ERA5${year}${monthnum}05.ARL ERA5${year}${monthnum}06.ARL ERA5${year}${monthnum}07.ARL ERA5${year}${monthnum}08.ARL > ERA5.${month}${year}_1.ARL

cat ERA5${year}${monthnum}09.ARL ERA5${year}${monthnum}10.ARL ERA5${year}${monthnum}11.ARL ERA5${year}${monthnum}12.ARL ERA5${year}${monthnum}13.ARL ERA5${year}${monthnum}14.ARL ERA5${year}${monthnum}15.ARL ERA5${year}${monthnum}16.ARL > ERA5.${month}${year}_2.ARL

cat ERA5${year}${monthnum}17.ARL ERA5${year}${monthnum}18.ARL ERA5${year}${monthnum}19.ARL ERA5${year}${monthnum}20.ARL ERA5${year}${monthnum}21.ARL ERA5${year}${monthnum}22.ARL ERA5${year}${monthnum}23.ARL ERA5${year}${monthnum}24.ARL > ERA5.${month}${year}_3.ARL

##################################################

Uncomment one option depending on the month

cat ERA5${year}${monthnum}25.ARL ERA5${year}${monthnum}26.ARL

ERA5${year}${monthnum}27.ARL ERA5${year}${monthnum}28.ARL ERA5${year}${monthnum}29.ARL ERA5${year}${monthnum}30.ARL ERA5_${year}${monthnum}31.ARL > ERA5.${month}${year}_4.ARL

cat ERA5${year}${monthnum}25.ARL ERA5${year}${monthnum}26.ARL ERA5${year}${monthnum}27.ARL ERA5${year}${monthnum}28.ARL ERA5${year}${monthnum}29.ARL ERA5${year}${monthnum}30.ARL > ERA5.${month}${year}_4.ARL

cat ERA5${year}${monthnum}25.ARL ERA5${year}${monthnum}26.ARL

ERA5${year}${monthnum}27.ARL ERA5${year}${monthnum}28.ARL ERA5_${year}${monthnum}29.ARL > ERA5.${month}${year}_4.ARL

cat ERA5${year}${monthnum}25.ARL ERA5${year}${monthnum}26.ARL

ERA5${year}${monthnum}27.ARL ERA5${year}${monthnum}28.ARL > ERA5.${month}${year}_4.ARL

################################################

On Tue, Jul 11, 2023 at 6:14 PM Ruth Moore @.***> wrote:

Hi Alejandro, I used exactly the scripts by mscross. This means that I downloaded all variables within the script and all pressure levels. I downloaded the data in GRIB format and used the ERA52ARL tool to make the conversion. I should point out that I use global data and download each month separately. This can be automated with a bash script. Here I attach the exact files that I use, all of them in the same directory. Finally, there are some things you should consider: -The commented part I run separately as indicated in the script. -I create daily files, then I merge them in groups of 8 days per month (last week has less days depending on the month) -When you generate your final data, avoid the .ARL extension, otherwise you will get an error. I hope this helps, and if anything, let me know, Cheers, Angela El mar, 22 feb 2022 a las 13:00, Alejandro Fontal @ .

>) escribió: … <#m-3815092025042629238> Hi @AngelaAmpuero https://github.com/AngelaAmpuero https://github.com/AngelaAmpuero https://github.com/AngelaAmpuero, sorry to dive in here as I am struggling to properly use ERA5 data as meteo source for running backtrajectories with HYSPLIT/PySPLIT. I assume you succeeded at this attempt, but I wonder: - What variables from ERA5 did you download to be able to run HYSPLIT? - Did you use data from all pressure levels? - I assume you downloaded the files in GRIB format then converted them to ARL via a conversion tool. Could you point me towards which tool you used? Thanks a lot! (and if there is any resource/tutorial on how to deal with this specifically with ERA5 data, I'd be really happy to know :) ) — Reply to this email directly, view it on GitHub <#84 (comment) https://github.com/mscross/pysplit/issues/84#issuecomment-1047945335>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWJR2ZYAC772H7Q5FG4CPODU4OXINANCNFSM5HD722GA https://github.com/notifications/unsubscribe-auth/AWJR2ZYAC772H7Q5FG4CPODU4OXINANCNFSM5HD722GA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.>

Hi Angela,

I was wondering how you converted daily .ARL files to weekly / combined 8 files into one?

Thank you, Ruth

— Reply to this email directly, view it on GitHub https://github.com/mscross/pysplit/issues/84#issuecomment-1631521160, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWJR2Z4PXHBR2G57BLIFJ3DXPW64RANCNFSM5HD722GA . You are receiving this because you were mentioned.Message ID: @.***>

rmoore67 commented 12 months ago

Hi Angela,

Thank you so much for your quick reply! I combined 5 daily files as you have done above and wanted to test out to see if they work ok. When I ran the file as a single back trajectory using the GUI I got this error - did you get this too or not?

Model started ... HYSPLIT - Initialization HYSPLIT version: hysplit.v5.2.0 Last Changed Date: 2022-01-16 ERROR metset: meteorological data time interval varies. Check input meteo file. Changed from 60 min to 24540 min At day/hr 20 0 23

Ruth

AngelaAmpuero commented 12 months ago

I didn't get that error message. But if it helps, my data was daily and every 6 hours.

On Tue, Jul 11, 2023, 19:47 Ruth Moore @.***> wrote:

Hi Angela,

Thank you so much for your quick reply! I combined 5 daily files as you have done above and wanted to test out to see if they work ok. When I ran the file as a single back trajectory using the GUI I got this error - did you get this too or not?

Model started ... HYSPLIT - Initialization HYSPLIT version: hysplit.v5.2.0 Last Changed Date: 2022-01-16 ERROR metset: meteorological data time interval varies. Check input meteo file. Changed from 60 min to 24540 min At day/hr 20 0 23

Ruth

— Reply to this email directly, view it on GitHub https://github.com/mscross/pysplit/issues/84#issuecomment-1631604189, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWJR2Z5LY6EH2IUA7TTKAYLXPXJZBANCNFSM5HD722GA . You are receiving this because you were mentioned.Message ID: @.***>

rmoore67 commented 12 months ago

ok cool thank you - out of interest how big were your ARL daily files?

AngelaAmpuero commented 12 months ago

About 957 MB for 8 days and global.

On Tue, Jul 11, 2023 at 9:30 PM Ruth Moore @.***> wrote:

ok cool thank you - out of interest how big were your ARL daily files?

— Reply to this email directly, view it on GitHub https://github.com/mscross/pysplit/issues/84#issuecomment-1631679824, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWJR2Z5JXCNDON6STGG26PTXPXVZ7ANCNFSM5HD722GA . You are receiving this because you were mentioned.Message ID: @.***>

rmoore67 commented 12 months ago

I got it working, thank you ! : )

AngelaAmpuero commented 12 months ago

Great!!

On Thu, Jul 13, 2023 at 12:44 PM Ruth Moore @.***> wrote:

I got it working, thank you ! : )

— Reply to this email directly, view it on GitHub https://github.com/mscross/pysplit/issues/84#issuecomment-1634481194, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWJR2ZZOMHNU2FDUMRNOSW3XQAJXJANCNFSM5HD722GA . You are receiving this because you were mentioned.Message ID: @.***>

Iaminalake commented 10 months ago

I found this so helpful thank you!!

If the ARL files aren't that big, just wondering if anyone has any converted ERA5 weekly/monthly files that you could share?

I'm currently downloading June 2021 global and after a whole day I'm not even half way through. Eventually I need to have at least a complete year (any complete year between 2016 and 2021 will do), and just hoping to speed things up a little.

Thanks again!

Iaminalake commented 9 months ago

I got it working, thank you ! : )

How did you get it working? I merged 9th - 16th Jun 2021 and tried to run a trajectory, but I also get the error:

HYSPLIT - Initialization HYSPLIT version: hysplit.v5.2.1 Last Changed Date: 2022-05-16 ERROR metset: meteorological data time interval varies. Check input meteo file. Changed from 60 min to -300 min At day/hr 15 18 23

Also, my week-long merged ARL file is 53.23 GB global..

xli3111 commented 4 months ago

I got it working, thank you ! : )

HYSPLIT - Initialization HYSPLIT version: hysplit.v5.3.0 Last Changed Date: 2023-11-07 ERROR metset: meteorological data time interval varies. Check input meteo file. Changed from 60 min to -4260 min At day/hr 15 0 23

FileNotFoundError Traceback (most recent call last) File ~/anaconda3/lib/python3.11/shutil.py:825, in move(src, dst, copy_function) 824 try: --> 825 os.rename(src, real_dst) 826 except OSError:

FileNotFoundError: [Errno 2] No such file or directory: 'DY_3_ERA5mar0500spring2018031600' -> '/Users/lixinhao/Desktop/GTRA/trajectories/DY_3_ERA5/DY_3_ERA5mar0500spring2018031600'

During handling of the above exception, another exception occurred:

FileNotFoundError Traceback (most recent call last) Cell In[10], line 1 ----> 1 pysplit.generate_bulktraj(basename, working_dir, storage_dir, meteo_dir, 2 years, months, hours, altitudes, location, runtime, 3 monthslice=slice(15, 21, 1), hysplit='/Users/lixinhao/Desktop/hysplit/exec/hyts_std')

File ~/anaconda3/lib/python3.11/site-packages/pysplit/trajectory_generator.py:176, in generate_bulktraj(basename, hysplit_working, output_dir, meteo_dir, years, months, hours, altitudes, coordinates, run, meteoyr_2digits, outputyr_2digits, monthslice, meteo_bookends, get_reverse, get_clipped, hysplit) 173 _cliptraj(output_cdir, trajname) 175 # Move the trajectory file to output directory --> 176 shutil.move(trajname, final_trajpath) 178 # Revert current working directory 179 finally: 180 os.chdir(cwd)

File ~/anaconda3/lib/python3.11/shutil.py:845, in move(src, dst, copy_function) 843 rmtree(src) 844 else: --> 845 copy_function(src, real_dst) 846 os.unlink(src) 847 return real_dst

File ~/anaconda3/lib/python3.11/shutil.py:436, in copy2(src, dst, follow_symlinks) 434 if os.path.isdir(dst): 435 dst = os.path.join(dst, os.path.basename(src)) --> 436 copyfile(src, dst, follow_symlinks=follow_symlinks) 437 copystat(src, dst, follow_symlinks=follow_symlinks) 438 return dst

File ~/anaconda3/lib/python3.11/shutil.py:256, in copyfile(src, dst, follow_symlinks) 254 os.symlink(os.readlink(src), dst) 255 else: --> 256 with open(src, 'rb') as fsrc: 257 try: 258 with open(dst, 'wb') as fdst: 259 # macOS

FileNotFoundError: [Errno 2] No such file or directory: 'DY_3_ERA5mar0500spring2018031600'

Hello! I encountered the similar problem, could you give me some help, and how do you solve that problem finally.

xli3111 commented 4 months ago

Great!! On Thu, Jul 13, 2023 at 12:44 PM Ruth Moore @.> wrote: I got it working, thank you ! : ) — Reply to this email directly, view it on GitHub <#84 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWJR2ZZOMHNU2FDUMRNOSW3XQAJXJANCNFSM5HD722GA . You are receiving this because you were mentioned.Message ID: @.>

I got it working, thank you ! : )

How did you get it working? I merged 9th - 16th Jun 2021 and tried to run a trajectory, but I also get the error:

HYSPLIT - Initialization HYSPLIT version: hysplit.v5.2.1 Last Changed Date: 2022-05-16 ERROR metset: meteorological data time interval varies. Check input meteo file. Changed from 60 min to -300 min At day/hr 15 18 23

Also, my week-long merged ARL file is 53.23 GB global..

Do you solve this problem, I would really appreciate it if you would like to provide some help, thanks.

xli3111 commented 4 months ago

I didn't get that error message. But if it helps, my data was daily and every 6 hours. On Tue, Jul 11, 2023, 19:47 Ruth Moore @.> wrote: Hi Angela, Thank you so much for your quick reply! I combined 5 daily files as you have done above and wanted to test out to see if they work ok. When I ran the file as a single back trajectory using the GUI I got this error - did you get this too or not? Model started ... HYSPLIT - Initialization HYSPLIT version: hysplit.v5.2.0 Last Changed Date: 2022-01-16 ERROR metset: meteorological data time interval varies. Check input meteo file. Changed from 60 min to 24540 min At day/hr 20 0 23 Ruth — Reply to this email directly, view it on GitHub <#84 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWJR2Z5LY6EH2IUA7TTKAYLXPXJZBANCNFSM5HD722GA . You are receiving this because you were mentioned.Message ID: @.>

HYSPLIT - Initialization HYSPLIT version: hysplit.v5.3.0 Last Changed Date: 2023-11-07 ERROR metset: meteorological data time interval varies. Check input meteo file. Changed from 60 min to -4260 min At day/hr 15 0 23

FileNotFoundError Traceback (most recent call last) File ~/anaconda3/lib/python3.11/shutil.py:825, in move(src, dst, copy_function) 824 try: --> 825 os.rename(src, real_dst) 826 except OSError:

FileNotFoundError: [Errno 2] No such file or directory: 'DY_3_ERA5mar0500spring2018031600' -> '/Users/lixinhao/Desktop/GTRA/trajectories/DY_3_ERA5/DY_3_ERA5mar0500spring2018031600'

During handling of the above exception, another exception occurred:

FileNotFoundError Traceback (most recent call last) Cell In[10], line 1 ----> 1 pysplit.generate_bulktraj(basename, working_dir, storage_dir, meteo_dir, 2 years, months, hours, altitudes, location, runtime, 3 monthslice=slice(15, 21, 1), hysplit='/Users/lixinhao/Desktop/hysplit/exec/hyts_std')

File ~/anaconda3/lib/python3.11/site-packages/pysplit/trajectory_generator.py:176, in generate_bulktraj(basename, hysplit_working, output_dir, meteo_dir, years, months, hours, altitudes, coordinates, run, meteoyr_2digits, outputyr_2digits, monthslice, meteo_bookends, get_reverse, get_clipped, hysplit) 173 _cliptraj(output_cdir, trajname) 175 # Move the trajectory file to output directory --> 176 shutil.move(trajname, final_trajpath) 178 # Revert current working directory 179 finally: 180 os.chdir(cwd)

File ~/anaconda3/lib/python3.11/shutil.py:845, in move(src, dst, copy_function) 843 rmtree(src) 844 else: --> 845 copy_function(src, real_dst) 846 os.unlink(src) 847 return real_dst

File ~/anaconda3/lib/python3.11/shutil.py:436, in copy2(src, dst, follow_symlinks) 434 if os.path.isdir(dst): 435 dst = os.path.join(dst, os.path.basename(src)) --> 436 copyfile(src, dst, follow_symlinks=follow_symlinks) 437 copystat(src, dst, follow_symlinks=follow_symlinks) 438 return dst

File ~/anaconda3/lib/python3.11/shutil.py:256, in copyfile(src, dst, follow_symlinks) 254 os.symlink(os.readlink(src), dst) 255 else: --> 256 with open(src, 'rb') as fsrc: 257 try: 258 with open(dst, 'wb') as fdst: 259 # macOS

FileNotFoundError: [Errno 2] No such file or directory: 'DY_3_ERA5mar0500spring2018031600'

I encountered this problem, and my ERA5 data is 0.25*0.25, hourly data downloaded as you recommended by hysplit_metdata. I also combined them through a similar .sh script as you did. Do you believe my data format may not be good for Pysplit package or any other problems? Hope for your reply, and I would really appreciate it, thank you so much.

vwgeiser commented 3 months ago

@xli3111 I am running into this issue now with some of my meteorology data and getting it up and working with pysplit. I had thought my conversion ran smoothly, but when I ran through the check file process on the HYSPLIT GUI it seemed some of my data may not have been properly converted.

One of the files that didn't make it through the check file process in the GUI reported this error when I ran it through. I am also using hourly, 0.25 x 0.25 degree resolution.

Did you ever find a solution for this? Was it indeed the meteorology?

xli3111 commented 3 months ago

@vwgeiser Hi, I solved this problem, you could download the monthly data for three continuous months, and set the meteo_bookends=([1], [1]), like this. Then, for the whole mid month among these three months, you could successfully generate its relevant files through traj_gen function. By the way, your hourly, 0.25 x 0.25 degree resolution era5 data should include the whole pressure levels, otherwise the generated files would have missings.