Skip to content

Commit

Permalink
Merge pull request #13 from ymoch/bugfix/mesh-code
Browse files Browse the repository at this point in the history
Bugfix/mesh code
  • Loading branch information
ymoch committed May 10, 2016
2 parents e5e1ba3 + df1e073 commit dac900c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jpmesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def __init__(self, parent_mesh, lon_number, lat_number):
'Invalid latitude number for {0}: {1:d}'
.format(self.__class__.__name__, lat_number))

code = '{0}{1:1d}{2:1d}'.format(
code = '{0}{1:01d}{2:01d}'.format(
parent_mesh.code, lat_number, lon_number)
south_west = parent_mesh.south_west + Coordinate(
lon=self.size.lon * lon_number, lat=self.size.lat * lat_number)
Expand Down Expand Up @@ -362,7 +362,7 @@ def __init__(self, parent_mesh, div_index):
'Invalid divide index for {0}: {1:d}'
.format(self.__class__.__name__, div_index))

code = '{0}{1:1d}'.format(parent_mesh.code, div_index)
code = '{0}{1:01d}'.format(parent_mesh.code, div_index)
south_west = parent_mesh.south_west + Coordinate(
lon=self.size.lon * ((div_index - 1) % 2),
lat=self.size.lat * ((div_index - 1) // 2))
Expand Down Expand Up @@ -430,7 +430,7 @@ def __init__(self, lon_number, lat_number):
'Invalid latitude number for {0}: {1:d}'
.format(self.__class__.__name__, lat_number))

code = '{0:2d}{1:2d}'.format(lat_number, lon_number)
code = '{0:02d}{1:02d}'.format(lat_number, lon_number)
south_west = Coordinate(
lon=Angle.from_degree(lon_number + 100),
lat=Angle.from_minute(lat_number * 40))
Expand Down

0 comments on commit dac900c

Please sign in to comment.