Closed SorooshMani-NOAA closed 11 months ago
I think it might be unnecessary to have the directory section of the fname
when fetching the data, or if we want to keep it, we need to first make sure that directory exists. Also why not just put it in the objects tmpdir
? @cuill do you have any preference?
@SorooshMani-NOAA I thought I fixed this a while ago. Probably I forgot to commit it.
We want to save the downloaded nc data in order to check the raw data if necessary or re-use it in further tests. It would be better to keep logic consistent with that in class AWSHindcastInventory: https://github.com/schism-dev/pyschism/blob/7b71ae9687a66f2d49af48844b960a1d99869dc9/pyschism/forcing/source_sink/nwm.py#L521
If you already have a commit in your local repo, can you push it please? I can test
Can you test it with this branch: https://github.com/schism-dev/pyschism/tree/bugfix/nwm
@cuill thanks, I ran the same test as above and it was successful.
It seems that the
request_data
function tries to download the file in a directory that does not exist, causing errors: https://github.com/schism-dev/pyschism/blob/7b71ae9687a66f2d49af48844b960a1d99869dc9/pyschism/forcing/source_sink/nwm.py#L640-L641 and https://github.com/schism-dev/pyschism/blob/7b71ae9687a66f2d49af48844b960a1d99869dc9/pyschism/forcing/source_sink/nwm.py#L655Note that the added directory in the
fname
variable does not exist by default and should be created forwget
to successfully download the data. An easy fix would be to just remove the directory since the file name already has the date in it:To reproduce:
And we get: