Thanks to visit codestin.com
Credit goes to github.com

Skip to content

problems downloading custom AGDD products #112

@ezylstra

Description

@ezylstra

I'm using the development version (1.3.0.9000) and couldn't seem to download AGDD custom rasters using this call:

  custr <- npn_get_custom_agdd_raster(
    method = "simple",
    climate_data_source = "NCEP",
    temp_unit = "Fahrenheit",
    start_date = "2025-01-01",
    end_date = "2025-03-24",
    base_temp = 32)

I get this error:

Error in `httr2::req_perform()`:
  ! Failed to perform HTTP request.
Caused by error in `curl::curl_fetch_disk()`:
  ! Timeout was reached [services.usanpn.org]: Failed to connect to services.usanpn.org port 3003 after 10005 ms: Timeout was reached

Changing the method to "double-sine" resulted in the same error. If I changed the data source to PRISM and used 2023 dates, I get a different error:

  custr <- npn_get_custom_agdd_raster(
    method = "simple",
    climate_data_source = "PRISM",
    temp_unit = "Fahrenheit",
    start_date = "2023-01-01",
    end_date = "2023-03-24",
    base_temp = 32)

Data service is currently unavailable, please try again later.
Error in npn_get_custom_agdd_raster(method = "simple", climate_data_source = "PRISM",  : 
  object 'resp' not found

I also tried downloading AGDD time series for a point location. I had no trouble with the function when using NCEP data, but got the same "Data service is currently unavailable" error when trying to use PRISM data:

  custts <- npn_get_custom_agdd_time_series(
    method = "simple",
    climate_data_source = "PRISM",
    temp_unit = "Fahrenheit",
    start_date = "2023-01-01",
    end_date = "2023-03-24",
    base_temp = 32,
    lat = 32.25,
    long = -110.97)
)

Service is temporarily unavailable. Please try again later.
Error in npn_get_custom_agdd_time_series(method = "simple", climate_data_source = "PRISM",  :
                                           object 'resp' not found

Metadata

Metadata

Assignees

No one assigned

    Labels

    APIissues that might need to be resolved on the API endbug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions