Software:NetCDF files are supported by multitude of languages, such as C, FORTRAN, Python, R, Perl, MATLAB and IDL.Most popular command-line applications are:
Examples of operations with NetCDF files:# Dump the header of a NetCDF file ncdump -h input.nc # Dump the whole NetCDF file ncdump input.nc # Dump the U wind component ncdump -v,U input.nc # Calculate wind speed from U and V cdo -s expr,'M=sqrt(U^2+V^2);' input.nc out.nc # Interpolate the file at 120m height cdo -s intlevel,120 input.nc out.nc # Interpolate a file to a different grid or mask cdo interpolate,input.nc masking.nc out.nc # Select a region defined by two latitudes [41.4, 42.5] and two longitudes [1.5, 2.2] cdo -s sellonlatbox,1.5,2.2,41.4,42.5 input.nc out.nc # Look up data values for a location [41.4,2.2] and time [20210903 08:00] cdo -outputtab,lon,lat,date,time,value -selyear,2021 -selmonth,09 -selday,03 -seltime,08:00 -remapnn,lon=2.2_lat=41.4 input.nc # Convert a GRIB file to NetCDf file cdo -f nc copy file.grb out.nc | Screenshot of a input file from WRF model displayed with ncview, a GUI-based browser. |