f_2nc: Write a file to netcdf file

Description Usage Arguments Examples

Description

Write a file to netcdf file

Usage

1
2
3
f_2nc(filename = NA, da = NA, ncfname, varname, start_date = NA,
  scale = "1 year", attrs = NA, fillvalue = -99, dlname = "",
  varunit = "", plot = T)

Arguments

filename

The input nc file

da

The input raster object

ncfname

The output nc file

varname

This is the var names for the data

start_date

Optional. The start date for the input data ("1982-01-01")

scale

Optional. This scale of the time series. ("1 year","1 month", "1 day")

attrs

Optional. Extra attributes for the data. c("name"="value")

fillvalue

Optional. The default fill value for the missing data.

dlname

The long name of the variable

varunit

The unit of the variable

plot

Logical. Whether plot the output nc"

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
path and file name, set dname
# add global attributes
attr_global<-c("Author"="Ning Liu",
              "Email"="N.LIU@murdoch.edu.au",
              "Institution"="Murdoch University",
              "References"="Reference")
f_2nc(filename="/mnt/Ning/GPP_Tr_anomaly_ann_Fixed_CO2_82_14.nc",
ncfname="/mnt/Ning/tt.nc",
varname = "GPP_Tr",
varunit= "g C kg-1 H2O"
lname = "Anomaly of annual GPP-Tr with Fixed CO2 from CALBE model",
start_date = "1982-01-01",
scale = "1 month")

ln1267/dWaSSI documentation built on Dec. 3, 2019, 4:39 a.m.