cdfextract             package:clim.pact             R Documentation

_E_x_t_r_a_c_t _a _s_u_b_f_i_e_l_d _f_r_o_m _a _n_e_t_C_D_F _f_i_l_e.

_D_e_s_c_r_i_p_t_i_o_n:

     A slow routine that extraxcts a subfield. This routine is suitable
     for reading subsections of large data files that are too big for
     'retrieve.nc'. 

     This version uses 'cdfcont' to obtain vital meta data for handling
     the data in the netCDF file and constructing a 'field' object.

_U_s_a_g_e:

     cdfextract(filename,varname,x.rng=NULL,y.rng=NULL,t.rng=NULL,
                            greenwich=TRUE,x.nam="lon",y.nam="lat",t.nam="tim",
                            plot=TRUE,l.scale=TRUE)

_A_r_g_u_m_e_n_t_s:

filename: name of netCDF file.

 varname: name ov variable.

   x.rng: X-range (in degrees East): c(min,max).

   y.rng: Y-range (in degrees North): c(min,max).

   t.rng: T-range (in units stored in 'tim'): c(min,max).

greenwich: TRUE: longitude runs from -180E to 180E.

   x.nam: name of X-dimension.

   y.nam: name of Y-dimension.

   t.nam: name of T-dimension.

    plot: TRUE for plotting.

 l.scale: scale field by offset and scaling-factor.

_V_a_l_u_e:

     a field object. Also see 'retrieve.nc'. Saves the extracted data
     in a netCDF file called "cdfextract.nc" under current working
     directory (see 'r2cdf').

_A_u_t_h_o_r(_s):

     R.E. Benestad

_E_x_a_m_p_l_e_s:

     ## Not run: 
     slp <- cdfextract("data/nmc_slp.nc","slp",x.rng=c(-80,40),y.rng=c(20,75),
                       t.rng=c(times[is],times[is]+499),plot=FALSE)
     ## End(Not run)

