Skip to contents

Merge model outputted netCDF files across ensembles for a single site.

Usage

nc_merge_single_site(model.outdir, nc.outdir, ens.num, site.id, time)

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

Value

character: file path to the merged netCDF file.

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.

Author

Dongchen Zhang