Skip to content

Commit

Permalink
Write history as string, not string array
Browse files Browse the repository at this point in the history
  • Loading branch information
xylar committed Sep 18, 2023
1 parent 8b3640c commit ba424f8
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyremap/descriptor/lat_lon_2d_grid_descriptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def read(cls, fileName=None, ds=None, latVarName='lat',
descriptor.history = '\n'.join([ds.attrs['history'],
' '.join(sys.argv[:])])
else:
descriptor.history = sys.argv[:]
descriptor.history = ' '.join(sys.argv[:])
return descriptor

def to_scrip(self, scripFileName):
Expand Down
2 changes: 1 addition & 1 deletion pyremap/descriptor/lat_lon_grid_descriptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def read(cls, fileName=None, ds=None, latVarName='lat',
descriptor.history = '\n'.join([ds.attrs['history'],
' '.join(sys.argv[:])])
else:
descriptor.history = sys.argv[:]
descriptor.history = ' '.join(sys.argv[:])
return descriptor

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion pyremap/descriptor/mpas_cell_mesh_descriptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def to_scrip(self, scripFileName):
newhist = '\n'.join([getattr(inFile, 'history'),
' '.join(sys.argv[:])])
else:
newhist = sys.argv[:]
newhist = ' '.join(sys.argv[:])
setattr(outFile, 'history', newhist)

inFile.close()
Expand Down
2 changes: 1 addition & 1 deletion pyremap/descriptor/mpas_edge_mesh_descriptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def to_scrip(self, scripFileName):
newhist = '\n'.join([getattr(inFile, 'history'),
' '.join(sys.argv[:])])
else:
newhist = sys.argv[:]
newhist = ' '.join(sys.argv[:])
setattr(outFile, 'history', newhist)

inFile.close()
Expand Down
2 changes: 1 addition & 1 deletion pyremap/descriptor/mpas_vertex_mesh_descriptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def to_scrip(self, scripFileName):
newhist = '\n'.join([getattr(inFile, 'history'),
' '.join(sys.argv[:])])
else:
newhist = sys.argv[:]
newhist = ' '.join(sys.argv[:])
setattr(outFile, 'history', newhist)

inFile.close()
Expand Down
2 changes: 1 addition & 1 deletion pyremap/descriptor/projection_grid_descriptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def create(cls, projection, x, y, meshName):
# interp/extrap corners
descriptor.xCorner = interp_extrap_corner(descriptor.x)
descriptor.yCorner = interp_extrap_corner(descriptor.y)
descriptor.history = sys.argv[:]
descriptor.history = ' '.join(sys.argv[:])
return descriptor

def to_scrip(self, scripFileName):
Expand Down

0 comments on commit ba424f8

Please sign in to comment.