WaveVortexModel style guide
Naming
- All classes within the WaveVortexModel use a prefix of
WVto establish a namespace. - Any user defined subclasses should not use the
WVprefix. - Class names use
UpperCamelCasestarting with a capital letter. - Property and method names use
lowerCamelCasestarting with a lower-case letter. - The only exceptions are properties where the notation follows standard practice or follows a manuscript’s notation. For example, the squared buoyancy frequency is written as
N2and notn2. - Properties that return a boolean should read like an assertion, e.g.,
isPeriodicorshouldAntiAlias.
Initialization
All classes can be initialized directly, or from NetCDF file and thus also written to file.
- A class has a single initialization method (constructor), such as ` WaveVortexTransformConstantStratification(Lxyz, Nxyz, N0, options)`
- Each class has an instance method
-writeToFilePathand-writeToNetCDFFile. - Each class has a class method (or static method) to re-initialize from file, e.g.,
-transformFromFilePath' andtransformFromNetCDFFile’.