NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi everyone - I wrote the portion of the rnoaa R package <https://github.com/ropensci/rnoaa/blob/master/R/gefs.R> that accesses GEFS netcdf files via a URL. The trouble is, when we do so (we use the R ncdf4 library), it seems the netcdf c library creates a temporary file in the system temp directory, (e.g., in linux it creates it in "/tmp/occookie*"). We'd prefer that it gets stored inside the R temporary directory, so we are wondering if there's a flag to pass to the netcdf c library that would set the temporary directory? I think it might be HTTP.COOKIEJAR as suggested in this github issue <https://github.com/Unidata/netcdf-c/issues/435> and in these docs <https://www.unidata.ucar.edu/software/netcdf/docs/md__Volumes_Workspace_Ward_releases_netcdf-c-4_87_82_netcdf-c_docs_auth.html#REDIR>, but I'm not familiar with it and thought someone may already know. >From reading "/usr/include/netcdf.h" (line 538), it also doesn't seem like nc_open() would take HTTP.COOKIEJAR as an argument anyway. Does anyone have suggestions on how to change the location of the temporary file that gets created when opening a netcdf file located via URL? Thanks for your help, Nick
netcdfgroup
archives: