install_grids#
- cherab.lhd.emc3.repository.install.install_grids(path: Path | str, mode: Literal['w', 'a'] = 'a', save_dir: Path | str = PosixPath('/home/docs/.cache/cherab/lhd/emc3')) NoneSource#
Install EMC3-EIRENE grid into netCDF file.
EMC3-EIRENE grid data is stored in a text file originally. This function parses the text file and save the grid data into a netCDF file.
The value of \(R_\mathrm{ax}\) coordinates of the magnetic axis is parsed from a filename (e.g.
grid-360.textmeans $R = 3.6$ m). \(Z_\mathrm{ax}\) is always regarded as 0.0. The name of the saved file is the same as the name of the file to be loaded (e.g.grid-360.nc).- Parameters:
- path
Path|str Path to the original text file written about grid coordinates at each zone.
- mode{“w”, “a”},
optional Mode to open the netCDF file, by default “a”. - “w”: write mode (overwrite if exists) - “a”: append mode (create if not exists)
- save_dir
Path|str,optional Directory path to save the netCDF file, by default
cherab/lhd/emc3/under the user’s cache directory.
- path