Skip to content
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

error message generated during wrf_load() #33

Open
jonathancallahan opened this issue Mar 15, 2021 · 1 comment
Open

error message generated during wrf_load() #33

jonathancallahan opened this issue Mar 15, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@jonathancallahan
Copy link
Member

Calling wrf_load() seems to properly download and load the data but stops the following error message:

trying URL 'http://m2.airfire.org/PNW/4km/WRF/2021031200/wrfout_d3.2021031200.f24.0000'
Content type 'text/html; charset=iso-8859-1' length 367002144 bytes (350.0 MB)
============================
downloaded 198.9 MB

Error in value[[3L]](cond) : Error downloading: PNW-4km
In addition: Warning messages:
1: In utils::download.file(url = fileUrl, destfile = filePath, quiet = !verbose) :
  downloaded length 208584704 != reported length 367002144
2: In utils::download.file(url = fileUrl, destfile = filePath, quiet = !verbose) :
 
 Error in value[[3L]](cond) : Error downloading: PNW-4km 
@jonathancallahan jonathancallahan added the bug Something isn't working label Mar 15, 2021
@tabrasel
Copy link
Contributor

tabrasel commented Apr 5, 2021

Judging from the download URL, I'm assuming you requested something like:

raster <- wrf_load(
  modelName = "PNW-4km",
  modelRun = "2021031200",
  modelRunHour = 24,
  ...
)

Unfortunately, I can't make that particular request anymore since AirFire gets rid of model runs more than a week old. It's strange that it stopped downloading about halfway through the file though. The source file clearly existed and it's likely that at least some grid data had been downloaded successfully, so I don't think the problem lies in the param values for modelName, modelRun, modelRunHour, or baseUrl. The problem also couldn't lie in bad param values for varNames, res, xlim, or ylim since those are only used once the file has completely finished downloading.

I'm tempted to say the problem lay in the source file itself since wrf_download() (called by wrf_load()) simply builds a file URL like http://m2.airfire.org/PNW/4km/WRF/2021031200/wrfout_d3.2021031200.f24.0000 and downloads the matching remote file. The fact that only half of the file downloaded when the entire file was requested (variable and boundary cropping are done after downloading) leads me to believe that something was wrong with the remote file itself. I haven't encountered the issue yet myself when I try downloading any of the currently available the model runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants