Skip to content

Fixes output of x_period and y_period - #279

Merged
xylar merged 1 commit into
MPAS-Dev:masterfrom
vanroekel:x_y_period_in_mesh_converter
Jan 23, 2020
Merged

xylar merged 1 commit into
MPAS-Dev:masterfrom
vanroekel:x_y_period_in_mesh_converter

Conversation

@vanroekel

Copy link
Copy Markdown
Contributor

For periodic grids, x and y_period where being read in as character
strings and then converted to doubles for output in the mesh. The read
in as a string caused only the first two decimals to be read of y_period
and x_period, which breaks periodicity in MPAS.

This commit reads in x_period and y_period as doubles and skips the
conversions.

For periodic grids, x and y_period where being read in as character
strings and then converted to doubles for output in the mesh.  The read
in as a string caused only the first two decimals to be read of y_period
and x_period, which breaks periodicity in MPAS.

This commit reads in x_period and y_period as doubles and skips the
conversions.
@vanroekel
vanroekel requested review from pwolfram and xylar January 22, 2020 17:28
@vanroekel

Copy link
Copy Markdown
Contributor Author

I've confirmed this fix restores doubly periodic behavior for my COMPASS test case. I can show before and after if you'd like

@xylar xylar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this, @vanroekel. Some odd code here...

@xylar

xylar commented Jan 22, 2020

Copy link
Copy Markdown
Collaborator

@vanroekel, do you want a new release of the mpas-tools package as soon as this goes in? That would allow us to update the COMPASS environments but would still take awhile to make its way to E3SM-Unified.

@vanroekel

Copy link
Copy Markdown
Contributor Author

@xylar having a new release of the compass environment would be much appreciated.

@xylar

xylar commented Jan 22, 2020

Copy link
Copy Markdown
Collaborator

@pwolfram, can you review this as soon as you're able so I can get this in?

@pwolfram pwolfram left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed by visual inspection, much cleaner solution @vanroekel!

@pwolfram

Copy link
Copy Markdown
Contributor

@xylar, thanks for your patience-- it's all good to go!

@xylar
xylar merged commit b496152 into MPAS-Dev:master Jan 23, 2020
xylar added a commit to xylar/MPAS-Tools that referenced this pull request Mar 5, 2020
MPAS-Dev#279 fixed y_period
but other attributes were still being read as strings and converted
to doubles (even though they are stored in the NetCDF file as
doubles).  The remaining variables need to be fixed in the same
way.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants