{"action":"created","issue":{"url":"https://api.github.com/repos/PecanProject/pecan/issues/994","repository_url":"https://api.github.com/repos/PecanProject/pecan","labels_url":"https://api.github.com/repos/PecanProject/pecan/issues/994/labels{/name}","comments_url":"https://api.github.com/repos/PecanProject/pecan/issues/994/comments","events_url":"https://api.github.com/repos/PecanProject/pecan/issues/994/events","html_url":"https://github.com/PecanProject/pecan/issues/994","id":172005322,"number":994,"title":"download.file and FTP gateway issues","user":{"login":"serbinsh","id":3067369,"avatar_url":"https://avatars.githubusercontent.com/u/3067369?v=3","gravatar_id":"","url":"https://api.github.com/users/serbinsh","html_url":"https://github.com/serbinsh","followers_url":"https://api.github.com/users/serbinsh/followers","following_url":"https://api.github.com/users/serbinsh/following{/other_user}","gists_url":"https://api.github.com/users/serbinsh/gists{/gist_id}","starred_url":"https://api.github.com/users/serbinsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serbinsh/subscriptions","organizations_url":"https://api.github.com/users/serbinsh/orgs","repos_url":"https://api.github.com/users/serbinsh/repos","events_url":"https://api.github.com/users/serbinsh/events{/privacy}","received_events_url":"https://api.github.com/users/serbinsh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PecanProject/pecan/labels/Question","name":"Question","color":"5319e7"}],"state":"open","locked":false,"assignee":{"login":"serbinsh","id":3067369,"avatar_url":"https://avatars.githubusercontent.com/u/3067369?v=3","gravatar_id":"","url":"https://api.github.com/users/serbinsh","html_url":"https://github.com/serbinsh","followers_url":"https://api.github.com/users/serbinsh/followers","following_url":"https://api.github.com/users/serbinsh/following{/other_user}","gists_url":"https://api.github.com/users/serbinsh/gists{/gist_id}","starred_url":"https://api.github.com/users/serbinsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serbinsh/subscriptions","organizations_url":"https://api.github.com/users/serbinsh/orgs","repos_url":"https://api.github.com/users/serbinsh/repos","events_url":"https://api.github.com/users/serbinsh/events{/privacy}","received_events_url":"https://api.github.com/users/serbinsh/received_events","type":"User","site_admin":false},"assignees":[{"login":"serbinsh","id":3067369,"avatar_url":"https://avatars.githubusercontent.com/u/3067369?v=3","gravatar_id":"","url":"https://api.github.com/users/serbinsh","html_url":"https://github.com/serbinsh","followers_url":"https://api.github.com/users/serbinsh/followers","following_url":"https://api.github.com/users/serbinsh/following{/other_user}","gists_url":"https://api.github.com/users/serbinsh/gists{/gist_id}","starred_url":"https://api.github.com/users/serbinsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serbinsh/subscriptions","organizations_url":"https://api.github.com/users/serbinsh/orgs","repos_url":"https://api.github.com/users/serbinsh/repos","events_url":"https://api.github.com/users/serbinsh/events{/privacy}","received_events_url":"https://api.github.com/users/serbinsh/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-08-18T21:28:04Z","updated_at":"2016-08-26T19:12:14Z","closed_at":null,"body":"@robkooper \r\n\r\nI have been running into new issues with FTPs from within BNL that relate to our firewall and the need to use a FTP gateway when connecting to an external FTP such as NARR or fluxnet, but not Ameriflux which goes over https.  The issue is that I need to connect via an FTP gateway or it can't reach the external FTP site:\r\n\r\n```\r\n> remotefunc <- function() {\r\n+ PEcAn.data.atmosphere::download.NARR('/data/Model_Output/pecan.output/dbfiles/NARR','2004/01/01','2004/12/31')\r\n+ }\r\n> remoteout <- remotefunc()\r\nLoading required package: PEcAn.utils\r\nLoading required package: abind\r\nLoading required package: plyr\r\nLoading required package: XML\r\nLoading required package: ggplot2\r\nLoading required package: randtoolbox\r\nLoading required package: rngWELL\r\nThis is randtoolbox. For overview, type 'help(\"randtoolbox\")'.\r\nLoading required package: RCurl\r\nLoading required package: bitops\r\nLoading required package: lubridate\r\n\r\nAttaching package: 'lubridate'\r\n\r\nThe following object is masked from 'package:plyr':\r\n\r\n    here\r\n\r\nThe following object is masked from 'package:base':\r\n\r\n    date\r\n\r\n2016-08-18 17:17:59 DEBUG  [PEcAn.data.atmosphere::download.NARR] : \r\n   File ' /data/Model_Output/pecan.output/dbfiles/NARR/pres.sfc.2004.nc ' \r\n   already exists, skipping to next file. \r\ntrying URL 'ftp://ftp.cdc.noaa.gov/Datasets/NARR/monolevel/dswrf.2004.nc'\r\nError in download.file(url, new.file) : \r\n  cannot open URL 'ftp://ftp.cdc.noaa.gov/Datasets/NARR/monolevel/dswrf.2004.nc'\r\nCalls: remotefunc -> <Anonymous> -> download.file\r\nExecution halted\r\n[1] 1\r\nError in new.files$file : $ operator is invalid for atomic vectors\r\nCalls: do.conversions ... <Anonymous> -> dbfile.input.insert -> basename -> dirname\r\n> proc.time()\r\n   user  system elapsed \r\n  4.843   0.297   5.399 \r\n\r\n```\r\n\r\n\r\nI noticed that download.file()  uses curl.  \r\n\r\n```\r\n./web/PEcAn.Network.R:    download.file(sync.url,destfile=temporaryFile, method=\"curl\")\r\n```\r\n\r\nI wonder if you might have an idea of what to use instead on modex to get around FTP gateways?  Maybe it isn't possible.  I am trying to find out how to connect in one command but also using our FTP gateway, in which case I would just need to setup a special case of the download.file() function that would run for networks like ours...."},"comment":{"url":"https://api.github.com/repos/PecanProject/pecan/issues/comments/242825661","html_url":"https://github.com/PecanProject/pecan/issues/994#issuecomment-242825661","issue_url":"https://api.github.com/repos/PecanProject/pecan/issues/994","id":242825661,"user":{"login":"serbinsh","id":3067369,"avatar_url":"https://avatars.githubusercontent.com/u/3067369?v=3","gravatar_id":"","url":"https://api.github.com/users/serbinsh","html_url":"https://github.com/serbinsh","followers_url":"https://api.github.com/users/serbinsh/followers","following_url":"https://api.github.com/users/serbinsh/following{/other_user}","gists_url":"https://api.github.com/users/serbinsh/gists{/gist_id}","starred_url":"https://api.github.com/users/serbinsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serbinsh/subscriptions","organizations_url":"https://api.github.com/users/serbinsh/orgs","repos_url":"https://api.github.com/users/serbinsh/repos","events_url":"https://api.github.com/users/serbinsh/events{/privacy}","received_events_url":"https://api.github.com/users/serbinsh/received_events","type":"User","site_admin":false},"created_at":"2016-08-26T19:12:14Z","updated_at":"2016-08-26T19:12:14Z","body":"@robkooper I am going to give this a try: https://blog.linuxnet.ch/ftp-via-proxy/#NcFTP"}}
{"actor":{"display_login":"serbinsh"}}