[R] Clip smaller domain from large domain netCDF file
Roy Mendelssohn
roy.mendelssohn at noaa.gov
Wed Aug 27 02:52:31 CEST 2014
Using the ncdf4 library requires some knowledge of netcdf files and how they work. However, if you can provide the following information I may be able to provide some pointers. I am assuming your file is named "myFile.nc". Where you see that replace with the actual name.
library(ncdf4)
myFile<-nc_open('myFile.nc')
str(myFile)
The output of the last command will show what is basically a dump of metadata content of the file, showing its structure. From the bounds I assume this is a Canadian dataset?
-Roy
On Aug 26, 2014, at 4:46 PM, Aseem Sharma <nature.aseem at gmail.com> wrote:
> Hi,
> I have this huge ( ~30GB) .nc file (NC_FORMAT_NETCDF4_CLASSIC)) for the
> whole country 141.00 to 52.00 W, 41.00 to 84.00 N".
> I am trying to clip this big dataset for a small region specific domain
> (120.00 to 130.00 W, 50.00 to 60.00 N).
> I am trying to do using netCDF4 r package but could not figure out how to
> do so.
> Kindly please suggest me how should i proceed.
>
>
> Thank you,
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
**********************
"The contents of this message do not reflect any position of the U.S. Government or NOAA."
**********************
Roy Mendelssohn
Supervisory Operations Research Analyst
NOAA/NMFS
Environmental Research Division
Southwest Fisheries Science Center
***Note new address and phone***
110 Shaffer Road
Santa Cruz, CA 95060
Phone: (831)-420-3666
Fax: (831) 420-3980
e-mail: Roy.Mendelssohn at noaa.gov www: http://www.pfeg.noaa.gov/
"Old age and treachery will overcome youth and skill."
"From those who have been given much, much will be expected"
"the arc of the moral universe is long, but it bends toward justice" -MLK Jr.
More information about the R-help
mailing list