rompy.swan.components.lockup.HOTFILE#
- pydantic model rompy.swan.components.lockup.HOTFILE[source]#
Write intermediate results.
HOTFILE 'fname' ->FREE|UNFORMATTED
This command can be used to write the entire wave field at the end of a computation to a so-called hotfile, to be used as initial condition in a subsequent SWAN run (see command INITIAL HOTSTART). This command must be entered immediately after a COMPUTE command.
The user may choose the format of the hotfile to be written either as free or unformatted. If the free format is chosen, then this format is identical to the format of the files written by the SPECOUT command (option SPEC2D). This hotfile is therefore an ASCII file which is human readable.
An unformatted (or binary) file usually requires less space on your computer than an ASCII file. Moreover, it can be readed by a subsequent SWAN run much faster than an ASCII file. Especially, when the hotfile might become a big file, the choice for unformatted is preferable. Note that your compiler and OS should follow the same ABI (Application Binary Interface) conventions (e.g. word size, endianness), so that unformatted hotfiles may transfer properly between different OS or platforms. This implies that the present and subsequent SWAN runs do not have to be carried out on the same operating system (e.g. Windows, Linux) or on the same computer, provided that distinct ABI conventions have been followed.
Note
For parallel MPI runs, more than one hotfile will be generated depending on the number of processors (fname-001, fname-002, etc).
Examples
In [1]: from rompy.swan.components.lockup import HOTFILE In [2]: hotfile = HOTFILE(fname="hotfile.swn") In [3]: print(hotfile.render()) HOTFILE fname='hotfile.swn' In [4]: hotfile = HOTFILE(fname="hotfile.dat", format="unformatted") In [5]: print(hotfile.render()) HOTFILE fname='hotfile.dat' UNFORMATTED
- Fields:
- field fname: Path [Required]#
Name of the file to which the wave field is written
- Constraints:
max_length = 36
- field format: Literal['free', 'unformatted'] | None = None#
Choose between free (SWAN ASCII) or unformatted (binary) format
- field model_type: Literal['hotfile', 'HOTFILE'] = 'hotfile'#
Model type discriminator