write
- write(path, obj1[, obj2, ...])
- write(filehandler, obj1[, obj2, ...])
Writes output to a file specified by
pathorfilehandler.- Parameters
path (str) – output file path
filehandler (Metview filehandler object) – Metview filehandler of the output file (has to be created with
file())obj (Metview data object (see below)) – data objects to be written into the output
- Return type
None
The output file format depends on the object type that is being written:
Object
Output format
GRIB
Geopoints
BUFR
NetCDF
ODB
other types
text
If you use
write()sequentially, note that it will overwrite any previous output if called with apath, but will add to previous output if called with afilehandler.Note that special characters such as newline and tab can be written to text files.
Note
See also
write().