2.2.2 L1 Custom Additional - wolfiex/AerVis GitHub Wiki
L1 process and save
The level 1 processing stage calculates additional information and appends it to the netcdf dataset.
The actual functions used can be seen in run
(HERE) and calculate the temperature, pressure, density and mass concentrations from the dataset. These are then appended to the run netCDF file (note this will only run once, so if changes are made the override flag needs to be used.
General usage
d = AerData('datasetname') # load dataset
d.getL1(override=True) # run the L1 code
Custom (additional processing)
Custom functions can be created to generate additional features to the ones already defined. The general format, and procedure for the L1 code is defined below:
1. First we create a new (empty) xarray dataset
import xarray
dataset = xarray.Dataset()
2. Append required attribute, coordinate and variable data
<do stuff here>
3. Add new dataset to existing file
d.to_netcdf(d.nc_loc,mode='a',format='NETCDF4',compute=True)
Alternatively method of adding data (pre-processed)
It is also possible to add data to the netCDF file by using the update
function of the AerData class. This is described under update (HERE).
Wiki Demo: https://github.com/wolfiex/AerVis/wiki/Updating-a-dataset-(file)-in-place.