Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changes needed for R21C #2685

Merged
merged 2 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions griddedio/GriddedIO.F90
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,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

this%items = items
Expand Down Expand Up @@ -155,6 +156,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
this%vdata=vdata
Expand Down
7 changes: 7 additions & 0 deletions pfio/Variable.F90
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,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
Expand Down Expand Up @@ -282,6 +283,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
Expand Down
Loading