Merge model outputted netCDF files across ensembles for a single site.
Source:R/combine_model_netcdf.R
nc_merge_single_site.RdMerge model outputted netCDF files across ensembles for a single site.
Arguments
- model.outdir
character: physical path to the model output folder.
- nc.outdir
character: physical path to the folder that contains the merged netCDF files.
- ens.num
numeric: ensemble size.
- site.id
numeric: identification number of the site.
- time
numeric or character: the current time of netCDF files to be extracted. See details for use with non-numeric siteIDs
Details
The function is only tested for SIPNET model runs. Please make sure you have the same netCDF formats if you want to proceed with different models.
This function requires site.id to be an integer.
If your sites have non-numeric IDs, one possible workaround is to
pass a dummy value and then edit the output file afterward to replace its site_id variable
with character data. If you do this, do be aware many legacy netCDF tools have poor support
for netCDFs containing character data.