How to create a CF-NetCDF file#
Each subsection below describes a different way to create a NetCDF file.
Using common programming languages#
Most common programming languages have libraries that can be used to create NetCDF files. Here are some useful materials for different programming languages.
Python#
Some useful materials:
Tutorial on creating with NetCDF files using xarray: https://nordatanet.github.io/NetCDF_in_Python_from_beginner_to_pro/04_creating_a_cfnetcdf_file.html
xarray documentation: https://docs.xarray.dev/en/stable/
from IPython.display import YouTubeVideo
YouTubeVideo('a5QvdSffqrM')
R#
Some useful materials:
Tutorial on creating with NetCDF files using R: https://nordatanet.github.io/NetCDF_in_R_from_beginner_to_pro/04_creating_a_cfnetcdf_file.html
RNetCDF documentation: https://cran.r-project.org/web/packages/RNetCDF/RNetCDF.pdf
Rosetta#
Rosetta is a web application that you can use to convert tabular data (e.g. CSV, Excel) to a CF-NetCDF file using a graphical user inteface.
Rosetta handles three categories of data:
Profiles - a dataset collected at a given location and point in time (i.e. fixed latitude, longitude and time) where the observations are made at different altitudes (i.e. variable altitudes above or depths below sea surface)
Time series - a dataset collected at a given location and altitude (i.e. fixed latitude, longitude and altitude), where observations are made over a time period (i.e. varying time coordinate)
Trajectories - a dataset collected over time at a given altitude (i.e. fixed altitude or depth) at a series of locations (i.e. varying latitude, longitude, time coordinates).
Note there are some limitations regarding the maximum size of the input file.
Use Rosetta here: https://rosetta.nersc.no/
User manual: https://drive.google.com/file/d/1Ss7G2kHZipBWLn28CdZooxDiXLztRQlp/view