![]() |
Stellarator-Tools
|
Defines the base class of the type compression_class. This class contains the code and buffers to hold compressed and uncompressed data. 2D matrix data is compressed using a singular value decomposition. See del-Castillo-Negrete et. al. doi:10.1016/j.jcp.2006.07.022. More...
Data Types | |
| type | compression_class |
| Base class containing buffers for compressed and uncompressed data. More... | |
| interface | compression_construct |
| Interface for the construction of compression_class types using compression_construct_new or compression_construct_netcdf. More... | |
| type | compression_pointer |
| Pointer to a compression object. Used for creating arrays of compression pointers. This is needed because fortran does not allow arrays of pointers directly. More... | |
Functions/Subroutines | |
| type(compression_class) function, pointer | compression_construct_new (data_in, svd_cut_off) |
| Construct a compression_class object. | |
| type(compression_class) function, pointer | compression_construct_netcdf (ncid, name) |
| Construct a compression_class object by reading from an netcdf. file. | |
| subroutine | compression_destruct (this) |
| Deconstruct a compression_class object. | |
| integer function | compression_get_dimension1 (this) |
| Get the ith dimension length. | |
| integer function | compression_get_dimension2 (this) |
| Get the jth dimension length. | |
| subroutine | compression_decompress (this) |
| Decompress the data. | |
| subroutine | compression_cleanup (this) |
| Cleanup decompressed data. | |
| subroutine | compression_define (this, ncid, name) |
| Define variables for the compressed data. | |
| subroutine | compression_write (this, ncid, name) |
| Cleanup decompressed data. | |
Defines the base class of the type compression_class. This class contains the code and buffers to hold compressed and uncompressed data. 2D matrix data is compressed using a singular value decomposition. See del-Castillo-Negrete et. al. doi:10.1016/j.jcp.2006.07.022.
| subroutine compression::compression_cleanup | ( | type (compression_class), pointer | this | ) |
Cleanup decompressed data.
If the data dimensions arrays or the U and WVT is allocated, then delete the data buffer. Otherwise the data is stored uncompressed.
| [in,out] | this | A compression_class instance. |
| type (compression_class) function, pointer compression::compression_construct_netcdf | ( | integer, intent(in) | ncid, |
| character (len=*), intent(in) | name | ||
| ) |
Construct a compression_class object by reading from an netcdf. file.
Constructs data from a precompressed netcdf file.
| [in] | ncid | A netcdf file id. |
| [in] | name | A netcdf variable name id. |
| [in] | name | Flag discribing how the data was compressed. |
| type (compression_class) function, pointer compression::compression_construct_new | ( | real (rprec), dimension(:,:), intent(in) | data_in, |
| real (rprec), intent(in) | svd_cut_off | ||
| ) |
Construct a compression_class object.
Constructs compression object and compresses the data buffer if compression meets the specified criteria.
| [in] | data_in | Data buffer to compress. This gets copied to the internal storage buffer. |
| [in] | svn_cut_off | Cutoff value for determining the number of singular values to use for compression. |
| subroutine compression::compression_decompress | ( | type (compression_class), pointer | this | ) |
Decompress the data.
Checks if the U and WVT arrays are allocated. If they are not the data_buffer was left uncompressed. If the data dimensions is also unallocated, then the orginal data buffer was all zeros otherwise data is uncompressed by matrix a multiplication.
| [in,out] | this | A compression_class instance. |
| subroutine compression::compression_define | ( | type (compression_class), intent(in) | this, |
| integer, intent(in) | ncid, | ||
| character (len=*), intent(in) | name | ||
| ) |
Define variables for the compressed data.
Defines the netcdf variables for writting compressed data to a netcdf file.
| [in] | this | A compression_class instance. |
| [in] | ncid | Netcdf file id. |
| [in] | name | Base name of variables to compress. |
| subroutine compression::compression_destruct | ( | type (compression_class), pointer | this | ) |
Deconstruct a compression_class object.
Deallocates memory and uninitializes a compression_class object.
| [in,out] | this | A compression_class instance. |
| integer function compression::compression_get_dimension1 | ( | type (compression_class), pointer | this | ) |
Get the ith dimension length.
Retrives the uncompressed dimension of the first data buffer index. This can be used without needing to decompress the data first.
| [in,out] | this | A compression_class instance. |
| integer function compression::compression_get_dimension2 | ( | type (compression_class), pointer | this | ) |
Get the jth dimension length.
Retrives the uncompressed dimension of the second data buffer index. This can be used without needing to decompress the data first.
| [in,out] | this | A compression_class instance. |
| subroutine compression::compression_write | ( | type (compression_class), intent(in) | this, |
| integer, intent(in) | ncid, | ||
| character (len=*), intent(in) | name | ||
| ) |
Cleanup decompressed data.
If the data dimensions arrays or the U and WVT is allocated, then delete the data buffer. Otherwise the data is stored uncompressed.
| [in,out] | this | A compression_class instance. |
| [in] | ncid | A netcdf file handle. |
| [in] | name | The name to write the variable to. |