mscross / pysplit

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

Can monthly data be used? #100

Open zhanghan12345 opened 1 year ago

zhanghan12345 commented 1 year ago

When using PySplit, I noticed the following description in the generate_bulktraj function:
_meteobookends : tuple of lists of ints Default ([4, 5], [1]). To calculate a month of trajectories, files from the previous and month must be included. The default is optimized for weekly meteorology and indicates that weeks 4 and 5 from the previous month and the first week of the next month must be included to run the entire current month of trajectories. The user is responsible for making sure the correct bookends for their trajectory length and meteorology file periods are provided. So I want to know if it's necessary to import weekly data in order to generate trajectories? Because I plan to use ERA5 data and convert it to ARL format, so I'd like to know if monthly data can be used instead?

zhanghan12345 commented 1 year ago

I have resolved this question, thank you

xli3111 commented 6 months ago

I have resolved this question, thank you Hi, Han, May I ask how did you solve this question, and how did you use ERA5 data to run the Pysplit? Hope for your reply, thanks.

zhanghan12345 commented 6 months ago

@xli3111 There seems to be some error in the font format of the email, here is the full answer: Hello, xli Did you have converted monthly data from ERA5 to ARL format? If the ARL file have been created, you need to change the name of the file to a specific format, like gdas1_aug21.m1. The most important point in the file name format is the date ("aug21" in this example) and "m1". Now you got several files (named gdas1_aug21.m1 gdas1_sep21.m1 gdas1_oct21.m1 ), then change the parameters in function generate_bulktraj from the Default ([4, 5], [1]) to ([1],[1]), and now run your program that generates trajectories based on Pysplit and the monthly data you generate will be read correctly.

Default ([4, 5], [1]) indicating ([last month week4,last month week5],[current month week1]) Now ([1],[1]) indicating ([last month1],[current month1])

xli3111 commented 6 months ago

Hi, Han,

Thanks for your quick reply. I used hysplit_metdata to download ERA5 daily data and transfer them into ARL, then I just write a .sh script to combine them into weekly data, like those GDAS data (gdas1.apr18.w1) that originally used to run Pysplit. However, I encountered a problem,

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 I noticed that someone else may be suffering from this issue as well, and after I saw your comment you shared, I'm guessing it may have something to do with the meteo_bookends=([4, 5], [1] setting. If possible, would you mind share some details about the ERA5 data you downloaded and how you work with them through Pysplit? Or did you face this problem before? Thanks for your help very much again.

By the way, those ERA5 data I downloaded through hysplit_metdata is hourly or every 6 hours from March 15, 2018 to April 30, 2018.

Best wishes, Xinhao Li. 发件人: zhanghan12345 @.> 日期: 星期四, 2024年3月14日 11:46 收件人: mscross/pysplit @.> 抄送: Li, Xinhao @.>, Mention @.> 主题: Re: [mscross/pysplit] Can monthly data be used? (Issue #100)

@xli3111https://github.com/xli3111 There seems to be some error in the font format of the email, here is the full answer: Hello, xli Did you have converted monthly data from ERA5 to ARL format? If the ARL file have been created, you need to change the name of the file to a specific format, like gdas1_aug21.m1. The most important point in the file name format is the date ("aug21" in this example) and "m1". Now you got several files (named gdas1_aug21.m1 gdas1_sep21.m1 gdas1_oct21.m1 ), then change the parameters in function generate_bulktraj from the Default ([4, 5], [1]) to ([1],[1]), and now run your program that generates trajectories based on Pysplit and the monthly data you generate will be read correctly.

Default ([4, 5], [1]) indicating ([last month week4,last month week5],[current month week1]) Now ([1],[1]) indicating ([last month1],[current month1])

― Reply to this email directly, view it on GitHubhttps://github.com/mscross/pysplit/issues/100#issuecomment-1997764312, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BF5Z3OKZQTRM3N5APW4KT23YYHA4FAVCNFSM6AAAAAA5BMSZRGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJXG43DIMZRGI. You are receiving this because you were mentioned.Message ID: @.***>

zhanghan12345 commented 6 months ago

@xli3111 I haven't had that problem. I have downloaded and successfully run both the 3-hour interval and the 6-hour interval data. The whole downloading, processing, and running process is very complicated, so I don't know where you are going, and which step may be the problem. Please provide me with your email address and I can provide you with my data download script so that you can visually observe the data structure. Now my time here is 00:50, so I should reply to your email tomorrow.

xli3111 commented 6 months ago

@xli3111 I haven't had that problem. I have downloaded and successfully run both the 3-hour interval and the 6-hour interval data. The whole downloading, processing, and running process is very complicated, so I don't know where you are going, and which step may be the problem. Please provide me with your email address and I can provide you with my data download script so that you can visually observe the data structure. Now my time here is 00:50, so I should reply to your email tomorrow.

Thank you very much again, my email address is xl498@cantab.ac.uk.