NCO (NetCDF Climate Operators) cli tools can be used to modify ADCIRC netcdf vector outputs to work with QGIS for vector-specific visualization. ncks creates a new file with a subset of parameters, and ncatted modifies the appropriate variable attributes.
These long_name
attribute changes will probably be rolled in to the default outputs in future releases of ADCIRC so that vector visualization in QGIS will work automatically. (These changes have been merged in to the development branch of ADCIRC now, and will be the default in v56)
fort.74.nc example #
Using the diagnostic output of u/v-component wind input from a typical fort.74.nc file:
- remove extra variables from the ADCIRC vector output netcdf for space and create an MDAL compatible ugrid file.
|
|
Next, modify metadata for vector components to help MDAL:
- change the
long_name
attribute to include “u/v-component” at the end, - and starting with the same text describing the speed/magnitude of the vector components (“Wind speed at 10m”).
|
|
fort.64.nc example #
A similar proceedure can be done for ADCIRC’s fort.64.nc depth-average velocity output as well. This time the variables are “u-vel” and “v-vel”.
|
|
Resulting file headers #
long_name
is changed, but all other attributes remain unchanged including standard_name
.
fort.74.nc (before) #
double windx(time, node) ;
windx:long_name = "e/w wind velocity" ;
windx:standard_name = "eastward_wind" ;
windx:positive = "east" ;
windx:units = "m s-1" ;
windx:_FillValue = -99999. ;
windx:coordinates = "time y x" ;
windx:location = "node" ;
windx:mesh = "adcirc_mesh" ;
double windy(time, node) ;
windy:long_name = "n/s wind velocity" ;
windy:standard_name = "northward_wind" ;
windy:positive = "north" ;
windy:units = "m s-1" ;
windy:_FillValue = -99999. ;
windy:coordinates = "time y x" ;
windy:location = "node" ;
windy:mesh = "adcirc_mesh" ;
fort.74_mdal.nc (after) #
double windx(time, node) ;
windx:standard_name = "eastward_wind" ;
windx:positive = "east" ;
windx:units = "m s-1" ;
windx:_FillValue = -99999. ;
windx:coordinates = "time y x" ;
windx:location = "node" ;
windx:mesh = "adcirc_mesh" ;
windx:long_name = "Wind speed at 10m u-component" ;
double windy(time, node) ;
windy:standard_name = "northward_wind" ;
windy:positive = "north" ;
windy:units = "m s-1" ;
windy:_FillValue = -99999. ;
windy:coordinates = "time y x" ;
windy:location = "node" ;
windy:mesh = "adcirc_mesh" ;
windy:long_name = "Wind speed at 10m v-component" ;