Hi Milu:

One of the best ways to get help is to give some description of what you have 
tried and what it was that had you stuck.  It looks like you already have the 
data in a raster brick,  have you Googled "writing RasterBrick to netcdf"?

 I assume nrow is latitude, ncol is longitude,  but what is ncell and nlayers?  
 I can't match up either of those values with the number of years you show  And 
what is actual name of the other dimension,  and does it have units?  ls what 
is the long name of "fs" and what are its units?

Thanks,

-Roy

> On May 19, 2023, at 4:19 PM, Miluji Sb <miluj...@gmail.com> wrote:
> 
> Dear all,
> 
> I am struggling to convert a dataframe with 49 years of data for 259,200
> coordinates. How can I convert this dataset into a NetCDF file with the
> following attributes;
> 
> class      : RasterBrick
> dimensions : 360, 720, 259200, 10  (nrow, ncol, ncell, nlayers)
> resolution : 0.5, 0.5  (x, y)
> extent     : -180, 180, -90, 90  (xmin, xmax, ymin, ymax)
> crs        : +proj=longlat +datum=WGS84 +no_defs
> year ()    : 1971, 1972, ..., 2019
> varname    : fs
> 
> Any help will be highly appreciated.
> 
> Best,
> 
> Milu
> 
>       [[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

**********************
"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 street address***
110 McAllister Way
Santa Cruz, CA 95060
Phone: (831)-420-3666
Fax: (831) 420-3980
e-mail: roy.mendelss...@noaa.gov www: https://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.

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to