V3FIT
|
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. More... | |
type(compression_class) function, pointer | compression_construct_netcdf (ncid, name) |
Construct a compression_class object by reading from an netcdf. file. More... | |
subroutine | compression_destruct (this) |
Deconstruct a compression_class object. More... | |
integer function | compression_get_dimension1 (this) |
Get the ith dimension length. More... | |
integer function | compression_get_dimension2 (this) |
Get the jth dimension length. More... | |
subroutine | compression_decompress (this) |
Decompress the data. More... | |
subroutine | compression_cleanup (this) |
Cleanup decompressed data. More... | |
subroutine | compression_define (this, ncid, name) |
Define variables for the compressed data. More... | |
subroutine | compression_write (this, ncid, name) |
Cleanup decompressed data. More... | |
Variables | |
real(rprec), parameter | compression_max_percentage = 100.0 |
Maximum compressed size before uncompressed buffers are stored. | |
character(len= *), parameter | compression_data_buffer_post = 'data_buffer' |
Postfix for the data buffer. | |
character(len= *), parameter | compression_u_buffer_post = 'u_buffer' |
Postfix for the data buffer. | |
character(len= *), parameter | compression_wvt_buffer_post = 'wvt_buffer' |
Postfix for the data buffer. | |
character(len= *), parameter | compression_data_dim_post = 'data_dim' |
Postfix for the data buffer. | |
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. |
Definition at line 496 of file compression.f.
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. |
Definition at line 287 of file compression.f.
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. |
Definition at line 101 of file compression.f.
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. |
Definition at line 459 of file compression.f.
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. |
Definition at line 524 of file compression.f.
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. |
Definition at line 356 of file compression.f.
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. |
Definition at line 395 of file compression.f.
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. |
Definition at line 425 of file compression.f.
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. |
Definition at line 562 of file compression.f.