-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hrrr3.HRRR
fails when fetching 2 day forecast
#46
Comments
@SorooshMani-NOAA This error happens when the requested data is not available yet on aws. |
@SorooshMani-NOAA Below are plots for hrrr and hrrr3. As you can see, hrrr_orig puts data from the curvilinear grid on the rectilinear grid, which results in the white area with missing values (very large values). SCHISM cannot recognize missing values and take them as input. I cannot remember the issues for original gfs. After comparing it with Dan's sflux, there are some big errors between the two datasets. That's the reason I switched to the original grib2 format. |
@cuill, that's true, but the forecast data is actually available. For the 6-hour cycles, (about 2 hour after the actual cycle) the data should be available on AWS, just like NOMADS. However unlike old So if I want to forecast for 2 days, I need to look at a 6-hour cycle which has forecast into the future. This is what I'm doing in the script above (snippet below): now = datetime.now()
last_cycle = np.datetime64(pd.DatetimeIndex([now-timedelta(hours=2)]).floor('6H').values[0], 'h').tolist()
start = (last_cycle - timedelta(days=1)).replace(hour=0)
end = last_cycle + timedelta(days=2) To quote myself from the ticket you don't have access to:
But |
@cuill thanks for this information. I would really like to use |
Here it seems to be just using timedate stamp: pyschism/pyschism/forcing/nws/nws2/hrrr3.py Lines 36 to 60 in 96e52fd
|
@SorooshMani-NOAA hrrr3 considered both hindcast and forecast scenarios: As suggested by Dan, hrrr3 can take forecast at t00z, t06z, t12z, t18z, which has 49 points, covering longer than t01z, t02z, t03z, etc. which only have 19 points. For example, if your nearest cycle is 2022093000, it will generate hrrr_2022093000.nc, likewise, if your nearest cycle is 2022093006, it will generate hrrr_2022093006.nc. |
Here is the script I just used to generate hrrr_2022093006.nc
|
@cuill, thank you, for the information. So are you saying to resolve my issue for a I'm OK with doing this in my scripts, but this is very implicit and opaque to a new user. I think, from a usability perspective of Also it might be beneficial if Maybe this is not a high priority since "this just works" if I know what to do with it, but I think it's an important improvement for new users down the line. |
With your script, it generates start and today as follows: last_cycle is 2022-09-30 12:00:00 So you can set rnday = 2, because only two days (2022-09-29, 2022-09-30) are available during your cycle, and set record = 2, then it will generate hrrr_2022092900.nc and hrrr_2022093000.nc, both has 48 timestamps. The remaining 1.5 days will be covered by sflux1. |
No, I would say the remaining 0.5 days will be covered by sflux1, 1 day covered by hrrr_2022092900.nc, and 2 days covered by hrrr_2022093000.nc |
I think there's a miscommunication. Let's say I want to do a simulation which is hindcast + forecast. Let's assume today is 9/30, the time is past 14 Zulu and I have:
I'd like to setup the simulation using HRRR (from Thanks! |
@cuill thank you for your detailed explanation. I have some follow up questions:
If I remember correctly the
Either way, as I said earlier, I think it's better to abstract this so that without the requirement for exact knowledge, the user can just do import pandas as pd
import numpy as np
from matplotlib.transforms import Bbox
from datetime import datetime, timedelta
from pyschism.forcing.nws.nws2 import hrrr3
box = Bbox([[-70, 44], [-69, 45]])
now = datetime.now()
last_cycle = np.datetime64(pd.DatetimeIndex([now-timedelta(hours=2)]).floor('6H').values[0], 'h').tolist()
start = (last_cycle - timedelta(days=1)).replace(hour=0)
end = last_cycle + timedelta(days=2)
rndelta = end -start
rnday = rndelta.total_seconds() / 86400.
hrrr3.HRRR(start_date=start, rnday=rnday, bbox=box)
gfs2.GFS(start_date=start, rnday=rnday, bbox=box) and get the correct files. In my opinion having Ideally I would also think about abstracting the part where we need to link files to the actual |
@SorooshMani-NOAA |
@cuill Sure, I understand there are other priorities. I just wanted to document our discussions and ideas. For now I don't have any immediate need for it, your scripts will help me with my use case. Thank you! |
6-hour cycles of HRRR (either on NOMADS or AWS) have 48 hour forecast data. However, when using HRRR in the following script, it fails to download the data:
with the following error:
Note the line numbers might have shifted since I added some
print
calls to debug.This does not fail if I try it with the old implementation of HRRR
hrrr.HRRR
. However the limitation from NOMADS is that it only has archive data from the day before:The text was updated successfully, but these errors were encountered: