Skip to content

Conversation

@xylar
Copy link
Collaborator

@xylar xylar commented Nov 14, 2019

This is necessary for compatibility with MPAS-Model, which hard codes a 64 character string length (!!!)

This has the unfortunate effect of cutting short long feature names stored in strings in files generated by the mask creator.

This is necessary for compatibility with MPAS-Model, which hard
codes a 64 character string length (!!!)

This has the unfortunate effect of cutting short long feature
names stored in strings in files generated by the mask creator.
@xylar xylar self-assigned this Nov 14, 2019
@xylar xylar requested a review from mark-petersen November 14, 2019 14:30
@xylar
Copy link
Collaborator Author

xylar commented Nov 14, 2019

@mark-petersen, I know it's a busy day today but could you take a quick look at this? I want to merge before making a new release for @matthewhoffman

@xylar
Copy link
Collaborator Author

xylar commented Nov 14, 2019

Testing

I ran the tests I use in the conda package:

MpasMeshConverter.x mesh_tools/mesh_conversion_tools/test/mesh.QU.1920km.151026.nc mesh.nc
MpasMaskCreator.x mesh.nc arctic_mask.nc -f mesh_tools/mesh_conversion_tools/test/Arctic_Ocean.geojson

The result is:

$ ncdump -h arctic_mask.nc
netcdf arctic_mask {
dimensions:
	nCells = 162 ;
	nVertices = 320 ;
	nEdges = 480 ;
	nRegions = 1 ;
	nRegionGroups = 2 ;
	maxRegionsInGroup = 1 ;
	StrLen = 64 ;
...

So the string length is back to 64. With the current release (0.0.4) it's 1024.

Copy link
Collaborator

@mark-petersen mark-petersen left a comment

Choose a reason for hiding this comment

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

Yes, I can see why this is needed. @xylar thanks for being attentive to these issues. Please merge.

@xylar xylar merged commit 10f6f84 into MPAS-Dev:master Nov 14, 2019
@xylar xylar deleted the mpas_mask_creator_64_char_strings branch November 14, 2019 14:48
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.

2 participants