Skip to content

[Question]: How to download met data for use in back trajectories #367

@Anuragsahucuraj

Description

@Anuragsahucuraj
library(openair)

setwd('C:/Users/Anurag Sahu/Downloads/NP') 

getMet <- function(year = 2018:2023, month = 1:12, path_met = 'TrajData/') 
{
  for (i in seq_along(year)) 
    {
    for (j in seq_along(month)) 
      {
      download.file(url=paste0('ftp://arlftp.arlhq.noaa.gov/pub/archives/reanalysis/RP',
                               year[i],sprintf('%02d',month[j]),'.gbl'),
                    destfile=paste0(path_met,'RP',year[i],sprintf('%02d',month[j]),'.gbl'),
                    mode='wb')
    }
  }
}

getMet(year=2018,month=2:12,path_met='TrajData/')

I am trying to download the back trajectory data but its not make 23mb the .gbl file which is not completed

Error:trying URL 'http://arlftp.arlhq.noaa.gov/pub/archives/reanalysis/RP201802.gbl'
Error in download.file(url = paste0("http://arlftp.arlhq.noaa.gov/pub/archives/reanalysis/RP",  : 
  cannot open URL 'http://arlftp.arlhq.noaa.gov/pub/archives/reanalysis/RP201802.gbl'
In addition: Warning message:
In download.file(url = paste0("http://arlftp.arlhq.noaa.gov/pub/archives/reanalysis/RP",  :
  URL 'http://arlftp.arlhq.noaa.gov/pub/archives/reanalysis/RP201802.gbl': Timeout of 60 seconds was reached 

Metadata

Metadata

Assignees

No one assigned

    Labels

    hysplit 🌐HYSPLIT trajectories & associated openair functionsquestionQuestions about function use or interpretation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions