[netcdfgroup] Created tempfiles

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
  • 2019 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: