FMS
2024.03
Flexible Modeling System
|
File utility functions for use within FMS2 IO. More...
Functions/Subroutines | |
subroutine, public | blackboxio_init (chksz) |
Accepts the namelist fms2_io_nml variables relevant to blackboxio. | |
subroutine | copy_metadata (fileobj, new_fileobj) |
Copy metadata from one file object to another. More... | |
logical function, public | create_diskless_domain_file (fileobj, domain, path) |
Create a "diskless" netcdf file to act as a buffer to support our "register
data to a file without knowing its name" legacy restart I/O workflow. More... | |
logical function | create_diskless_netcdf_file (fileobj, pelist, path) |
Create a "diskless" netcdf file to act as a buffer to support our "register
data to a file without knowing its name" legacy restart I/O workflow. More... | |
logical function, public | create_diskless_netcdf_file_wrap (fileobj, pelist, path) |
Wrapper to distinguish interfaces. More... | |
logical function, public | create_diskless_unstructured_domain_file (fileobj, domain, path) |
Create a "diskless" netcdf file to act as a buffer to support our "register
data to a file without knowing its name" legacy restart I/O workflow. More... | |
subroutine | get_new_filename (path, new_path, directory, timestamp, new_name) |
Create a new file path. More... | |
subroutine, public | netcdf_restore_state_wrap (fileobj, unlim_dim_level, directory, timestamp, filename) |
Loop through registered restart variables and read them from a netcdf file. More... | |
subroutine, public | netcdf_save_restart_wrap2 (fileobj, unlim_dim_level, directory, timestamp, filename, nc_format) |
Support for writing new restarts from a diskless file. More... | |
subroutine | new_domain_file (fileobj, path, mode, new_fileobj, nc_format) |
Make a copy of a file's metadata to support "intermediate restarts". More... | |
subroutine | new_netcdf_file (fileobj, path, mode, new_fileobj, nc_format) |
Make a copy of a file's metadata to support "intermediate restarts". More... | |
subroutine | new_unstructured_domain_file (fileobj, path, mode, new_fileobj, nc_format) |
Make a copy of a file's metadata to support "intermediate restarts". More... | |
subroutine, public | restore_domain_state_wrap (fileobj, unlim_dim_level, directory, timestamp, filename, ignore_checksum) |
Loop through registered restart variables and read them from a netcdf file. More... | |
subroutine, public | save_domain_restart_wrap (fileobj, unlim_dim_level, directory, timestamp, filename, nc_format) |
Loop through registered restart variables and write them to a netcdf file. More... | |
subroutine | tempfile (filename) |
Create a unique filename (poor man's version of mktemp). More... | |
subroutine, public | unstructured_write_restart_wrap (fileobj, unlim_dim_level, directory, timestamp, filename, nc_format) |
Wrapper to distinguish interfaces. More... | |
File utility functions for use within FMS2 IO.
|
private |
Copy metadata from one file object to another.
[in] | fileobj | File object. |
[in,out] | new_fileobj | New file object. |
Definition at line 165 of file blackboxio.F90.
logical function, public blackboxio::create_diskless_domain_file | ( | type(fmsnetcdfdomainfile_t), intent(inout) | fileobj, |
type(domain2d), intent(in) | domain, | ||
character(len=*), intent(in), optional | path | ||
) |
Create a "diskless" netcdf file to act as a buffer to support our "register data to a file without knowing its name" legacy restart I/O workflow.
[in,out] | fileobj | File object. |
[in] | domain | Two-dimensional domain. |
[in] | path | File path. |
Definition at line 452 of file blackboxio.F90.
|
private |
Create a "diskless" netcdf file to act as a buffer to support our "register data to a file without knowing its name" legacy restart I/O workflow.
[in,out] | fileobj | File object. |
[in] | pelist | List of ranks associated with this file. If not provided, only the current rank will be able to act on the file. |
[in] | path | File path. |
Definition at line 114 of file blackboxio.F90.
logical function, public blackboxio::create_diskless_netcdf_file_wrap | ( | type(fmsnetcdffile_t), intent(inout) | fileobj, |
integer, dimension(:), intent(in), optional | pelist, | ||
character(len=*), intent(in), optional | path | ||
) |
Wrapper to distinguish interfaces.
[in,out] | fileobj | File object. |
[in] | pelist | List of ranks associated with this file. If not provided, only the current rank will be able to act on the file. |
[in] | path | File path. |
Definition at line 362 of file blackboxio.F90.
logical function, public blackboxio::create_diskless_unstructured_domain_file | ( | type(fmsnetcdfunstructureddomainfile_t), intent(inout) | fileobj, |
type(domainug), intent(in) | domain, | ||
character(len=*), intent(in), optional | path | ||
) |
Create a "diskless" netcdf file to act as a buffer to support our "register data to a file without knowing its name" legacy restart I/O workflow.
[in,out] | fileobj | File object. |
[in] | domain | Two-dimensional domain. |
[in] | path | File path. |
Definition at line 594 of file blackboxio.F90.
|
private |
Create a new file path.
[in] | path | File path. |
[out] | new_path | New file path. |
[in] | timestamp | Time. |
[in] | new_name | New file basename. |
Definition at line 61 of file blackboxio.F90.
subroutine, public blackboxio::netcdf_restore_state_wrap | ( | type(fmsnetcdffile_t), intent(inout), target | fileobj, |
integer, intent(in), optional | unlim_dim_level, | ||
character(len=*), intent(in), optional | directory, | ||
character(len=*), intent(in), optional | timestamp, | ||
character(len=*), intent(in), optional | filename | ||
) |
Loop through registered restart variables and read them from a netcdf file.
[in,out] | fileobj | File object. |
[in] | unlim_dim_level | Unlimited dimension level. |
[in] | directory | Directory to write restart file to. |
[in] | timestamp | Model time. |
[in] | filename | New name for the file. |
Definition at line 418 of file blackboxio.F90.
subroutine, public blackboxio::netcdf_save_restart_wrap2 | ( | type(fmsnetcdffile_t), intent(in), target | fileobj, |
integer, intent(in), optional | unlim_dim_level, | ||
character(len=*), intent(in), optional | directory, | ||
character(len=*), intent(in), optional | timestamp, | ||
character(len=*), intent(in), optional | filename, | ||
character(len=*), intent(in), optional | nc_format | ||
) |
Support for writing new restarts from a diskless file.
[in] | fileobj | File object. |
[in] | unlim_dim_level | Unlimited dimension level. |
[in] | directory | Directory to write restart file to. |
[in] | timestamp | Model time. |
[in] | filename | New name for the file. |
[in] | nc_format | Netcdf format that new files are written as. Allowed values are: "64bit", "classic", or "netcdf4". Defaults to "64bit". |
Definition at line 379 of file blackboxio.F90.
|
private |
Make a copy of a file's metadata to support "intermediate restarts".
[in] | fileobj | File object. |
[in] | path | Name of new file. |
[in] | mode | File mode. Allowed values are: "read", "append", "write", or "overwrite". |
[out] | new_fileobj | File object. |
[in] | nc_format | Netcdf format that new files are written as. Allowed values are: "64bit", "classic", or "netcdf4". Defaults to "64bit". |
Definition at line 484 of file blackboxio.F90.
|
private |
Make a copy of a file's metadata to support "intermediate restarts".
[in] | fileobj | File object. |
[in] | path | Name of new file. |
[in] | mode | File mode. Allowed values are: "read", "append", "write", or "overwrite". |
[out] | new_fileobj | New file object. |
[in] | nc_format | Netcdf format that new files are written as. Allowed values are: "64bit", "classic", or "netcdf4". Defaults to "64bit". |
Definition at line 332 of file blackboxio.F90.
|
private |
Make a copy of a file's metadata to support "intermediate restarts".
[in] | fileobj | File object. |
[in] | path | Name of new file. |
[in] | mode | File mode. Allowed values are: "read", "append", "write", or "overwrite." |
[out] | new_fileobj | New file object. |
[in] | nc_format | Netcdf format that new files are written as. Allowed values are: "64bit", "classic", or "netcdf4". Defaults to "64bit". |
Definition at line 622 of file blackboxio.F90.
subroutine, public blackboxio::restore_domain_state_wrap | ( | type(fmsnetcdfdomainfile_t), intent(in), target | fileobj, |
integer, intent(in), optional | unlim_dim_level, | ||
character(len=*), intent(in), optional | directory, | ||
character(len=*), intent(in), optional | timestamp, | ||
character(len=*), intent(in), optional | filename, | ||
logical, intent(in), optional | ignore_checksum | ||
) |
Loop through registered restart variables and read them from a netcdf file.
[in] | fileobj | File object. |
[in] | unlim_dim_level | Unlimited dimension level. |
[in] | directory | Directory to write restart file to. |
[in] | timestamp | Model time. |
[in] | filename | New name for the file. |
[in] | ignore_checksum | Checksum data integrity flag. |
Definition at line 560 of file blackboxio.F90.
subroutine, public blackboxio::save_domain_restart_wrap | ( | type(fmsnetcdfdomainfile_t), intent(in), target | fileobj, |
integer, intent(in), optional | unlim_dim_level, | ||
character(len=*), intent(in), optional | directory, | ||
character(len=*), intent(in), optional | timestamp, | ||
character(len=*), intent(in), optional | filename, | ||
character(len=*), intent(in), optional | nc_format | ||
) |
Loop through registered restart variables and write them to a netcdf file.
[in] | fileobj | File object. |
[in] | unlim_dim_level | Unlimited dimension level. |
[in] | directory | Directory to write restart file to. |
[in] | timestamp | Model time. |
[in] | filename | New name for the file. |
[in] | nc_format | Netcdf format that new files are written as. Allowed values are: "64bit", "classic", or "netcdf4". Defaults to "64bit". |
Definition at line 522 of file blackboxio.F90.
|
private |
Create a unique filename (poor man's version of mktemp).
[out] | filename | New unique filename. |
Definition at line 91 of file blackboxio.F90.
subroutine, public blackboxio::unstructured_write_restart_wrap | ( | type(fmsnetcdfunstructureddomainfile_t), intent(in) | fileobj, |
integer, intent(in), optional | unlim_dim_level, | ||
character(len=*), intent(in), optional | directory, | ||
character(len=*), intent(in), optional | timestamp, | ||
character(len=*), intent(in), optional | filename, | ||
character(len=*), intent(in), optional | nc_format | ||
) |
Wrapper to distinguish interfaces.
[in] | fileobj | File object. |
[in] | unlim_dim_level | Unlimited dimension level. |
[in] | directory | Directory to write restart file to. |
[in] | timestamp | Model time. |
[in] | filename | New name for the file. |
[in] | nc_format | Netcdf format that new files are written as. Allowed values are: "64bit", "classic", or "netcdf4". Defaults to "64bit". |
Definition at line 648 of file blackboxio.F90.