-
Notifications
You must be signed in to change notification settings - Fork 21
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
NWM 2.1
Issue for Puerto Rico
#55
Comments
@jreniel I noticed this issue when using NWM |
@jreniel, adding @cuill email for reference:
|
I was able to reproduce the issue using this script and the attached mesh: mesh = Hgrid.open('mesh_w_bdry.grd', crs=4326)
nwm = NWM()
nwm.write(
output_directory='.',
gr3=mesh,
start_date=datetime.datetime(2018, 8, 28, 6, 0, tzinfo=datetime.timezone.utc),
end_date=2.0,
overwrite=False,
nprocs=-1,
product=None,
msource=True,
vsource=True,
vsink=True,
source_sink=True
) |
2.1
Issue for Puerto Rico
Based on @cuill's email, the title was misleading. The issue is not multiple pairing, but it's just missing files. So I changed the issue title to reflect that. |
Just FYI, I just tested downloading NWM hydrofabric dataset using the link in |
If I remember correctly, one of my pending issues was to put a guard for the case where there mesh has absolutely no intersections with the input data. The reason I did not put a guard immediately is because I was unsure if I should just print a warning or raise an exception. I am more inclined towards the exception, which makes it clear to the user that the input dataset is not consistent with the mesh. Think about whether it is more desirable to print a warning or raise an exception in this case. I vote for exception with a clear message: |
I vote for exception.
Regards,
-------------------------------
Joseph Zhang
(804)684 7595 (office)
SCHISM web: http://ccrm.vims.edu/schism/
From: Jaime R Calzada ***@***.***>
Sent: Friday, December 23, 2022 10:40 AM
To: schism-dev/pyschism ***@***.***>
Cc: Y. Joseph Zhang ***@***.***>; Mention ***@***.***>
Subject: Re: [schism-dev/pyschism] NWM `2.1` Issue for Puerto Rico (Issue #55)
[EXTERNAL to VIMS received message]
If I remember correctly, one of my pending issues was to put a guard for the case where there mesh has absolutely no intersections with the input data. The reason I did not put a guard immediately is because I was unsure if I should just print a warning or raise an exception. I am more inclined towards the exception, which makes it clear to the user that the input dataset is not consistent with the mesh. Think about whether it is more desirable to print a warning or raise an exception in this case. I vote for exception with a clear message: No intersections found between input file X and the mesh. On the other hand, if we allow for more than 1 file as input, it should not raise. It should only raise iff len(idxs) == 0.
-
Reply to this email directly, view it on GitHub<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fschism-dev%2Fpyschism%2Fissues%2F55%23issuecomment-1364052348&data=05%7C01%7Cyjzhang%40vims.edu%7Cd2f7466c4b484c0c9cde08dae4fbe2be%7C8cbcddd9588d4e3b9c1e2367dbdf1740%7C0%7C0%7C638074067732722426%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=oQMLvWUyEq8b7%2FkDG5cPV0NSlvMEuHYYRblRzvrki8s%3D&reserved=0>, or unsubscribe<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAFBKNZYJ4HTNP72P2UIDFOTWOXBTHANCNFSM6AAAAAATEY6YLM&data=05%7C01%7Cyjzhang%40vims.edu%7Cd2f7466c4b484c0c9cde08dae4fbe2be%7C8cbcddd9588d4e3b9c1e2367dbdf1740%7C0%7C0%7C638074067732722426%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=G3lsd5Ha%2BgCoWxj21sXW1q0ADYHKp47SrPEAozSnTRU%3D&reserved=0>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
I see. We still need to make sure we raise clear exceptions when we know we will run into errors. |
I haven't looked into NWM 3.0, so I don't know. I think the reasoning was that since @cuill is busy with a lot of other tasks, and NWM 3 will be released soon, it's not worth it to spend time on 2.1 and then again later on 3.0. |
Here is the email from Brian (NOAA NWM):
I think the same situation for Puerto Rico. I checked google cloud, it seems that Puerto Rico forecasts started on April 20, 2020: @SorooshMani-NOAA FeatureID 800031171 is in nwm_v2_1_hydrofabric_nwm_reaches_puertorico layer, however, we only downloaded the data for CONUS, which caused idx is empty: To work around this, probably only read nwm_reaches_conus into gdf: pyschism/pyschism/forcing/source_sink/nwm.py Line 264 in 96e52fd
|
@cuill, thank you for your comment. You're right, the issue is that I read reaches info for which data files are not downloaded. This however is from the NWM 2.1 reaches dataset. NWM 2.0 doesn't have PR reaches (right?). That's why I rename the issue title to reflect that the issue occurs when using hydrofabric for NWM 2.1. |
@SorooshMani-NOAA Yes, NWM2.0 doesn't have PR reaches layer. |
NWM writer runs into issue when there are multiple entries for the element pairing. The following function call results in an exception
pyschism/pyschism/forcing/source_sink/nwm.py
Line 897 in 96e52fd
which happens at:
pyschism/pyschism/forcing/source_sink/nwm.py
Line 337 in 96e52fd
when there are multiple matches in a pairing map. In my case I noticed this with a north Atlantic domain mesh, and the region of the issue was Puerto Rico reaches (not CONUS!). I'm still trying to figure out what is different between PR and CONUS reaches that causes this.
The text was updated successfully, but these errors were encountered: