Skip to content

Unexpected behavior when passing scales=<tuple> to file_handler.add_task() #336

Description

@afraser3

If I'm outputting 2D slices (such as the 'buoyancy' task in the 2D RBC example) and pass, say, scales=(1/4, 1/2) to file_handler.add_task(), then the output will be down-sampled by 1/4 along the first axis, and 1/2 along the second axis. If I try this with the 2D RBC IVP example (MWE attached), this down-sampling is applied as intended to the data, but the axes that are output (the stuff in h5py.dset.dims, or in file['scales/...']) are not down-sampled appropriately. They are down-sampled, just by the wrong amount. In the attached, I'm running the 2D RBC example on an (Nx, Nz) = (128, 32) grid and outputting snapshots with scales=(1/4, 1/2), which correctly outputs 32 x 16 data slices. However, the z array inappropriately has length 8, not 16. Am I right that this is unintended behavior? Unfortunately, I'm having a hard time tracing the cause.

2D_RBC_IVP_MWE.py

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions