diff --git a/CHANGELOG.md b/CHANGELOG.md index c7907ed679c9..dfb84b073edb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fix inconsistency in History output so that multi-dimensional coordinate variables are also compressed if requested in the collection - Minor workaround to enable NAG 7.2.01 to compile. (Reproducer submitted to NAG.) - Fixed bug with split restart files - Removed unnecessary memory allocation for tile reads. This is critical for high res runs on SCU17 diff --git a/griddedio/GriddedIO.F90 b/griddedio/GriddedIO.F90 index c8c9f51a10ac..fe2e6fb45be5 100644 --- a/griddedio/GriddedIO.F90 +++ b/griddedio/GriddedIO.F90 @@ -128,6 +128,7 @@ subroutine CreateFileMetaData(this,items,bundle,timeInfo,vdata,ogrid,global_attr integer :: metadataVarsSize type(StringStringMapIterator) :: s_iter character(len=:), pointer :: attr_name, attr_val + class(Variable), pointer :: coord_var integer :: status if ( allocated (this%metadata) ) deallocate(this%metadata) @@ -164,6 +165,14 @@ subroutine CreateFileMetaData(this,items,bundle,timeInfo,vdata,ogrid,global_attr factory => get_factory(this%output_grid,rc=status) _VERIFY(status) call factory%append_metadata(this%metadata) + coord_var => this%metadata%get_variable('lons') + if (associated(coord_var)) call coord_var%set_deflation(this%deflateLevel) + coord_var => this%metadata%get_variable('lats') + if (associated(coord_var)) call coord_var%set_deflation(this%deflateLevel) + coord_var => this%metadata%get_variable('corner_lons') + if (associated(coord_var)) call coord_var%set_deflation(this%deflateLevel) + coord_var => this%metadata%get_variable('corner_lats') + if (associated(coord_var)) call coord_var%set_deflation(this%deflateLevel) if (present(vdata)) then diff --git a/pfio/Variable.F90 b/pfio/Variable.F90 index ae6a5c7bcafb..9d42cf97f7f2 100644 --- a/pfio/Variable.F90 +++ b/pfio/Variable.F90 @@ -48,6 +48,7 @@ module pFIO_VariableMod procedure :: get_chunksizes procedure :: get_deflation + procedure :: set_deflation procedure :: get_quantize_algorithm procedure :: get_quantize_level procedure :: is_attribute_present @@ -292,6 +293,12 @@ function get_deflation(this) result(deflateLevel) deflateLevel=this%deflation end function get_deflation + subroutine set_deflation(this,deflate_level) + class (Variable), target, intent(inout) :: this + integer, intent(in) :: deflate_level + this%deflation = deflate_level + end subroutine + function get_quantize_algorithm(this) result(quantizeAlgorithm) class (Variable), target, intent(In) :: this integer :: quantizeAlgorithm