Skip to content

Commit 204f7f9

Browse files
committed
increase number decimals in INPGRID
1 parent 986d1f3 commit 204f7f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dnora/inp.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def __call__(self, grid: Grid, forcing: Forcing, boundary: Boundary, start_time:
8787
file_out.write('$ \n')
8888

8989
file_out.write('INPGRID BOTTOM ' + str(grid.lon()[0])+' '+str(grid.lat()[0])+' 0. '+str(grid.nx()-1)+' '+str(
90-
grid.ny()-1)+' ' + str((delta_X/(grid.nx()-1)).round(4)) + ' ' + str((delta_Y/(grid.ny()-1)).round(4)) + '\n')
90+
grid.ny()-1)+' ' + str((delta_X/(grid.nx()-1)).round(6)) + ' ' + str((delta_Y/(grid.ny()-1)).round(6)) + '\n')
9191
file_out.write('READINP BOTTOM 1 \''+ grid_path +'\' 3 0 FREE \n')
9292
file_out.write('$ \n')
9393
file_out.write('BOU NEST \''+boundary_path+'\' OPEN \n')
@@ -96,7 +96,7 @@ def __call__(self, grid: Grid, forcing: Forcing, boundary: Boundary, start_time:
9696
if self.wind:
9797

9898
file_out.write('INPGRID WIND '+str(grid.lon()[0])+' '+str(grid.lat()[0])+' 0. '+str(forcing.nx()-1)+' '+str(forcing.ny()-1)+' '+str(
99-
(delta_X/(forcing.nx()-1)).round(4)) + ' '+str((delta_Y/(forcing.ny()-1)).round(4)) + ' NONSTATIONARY ' + STR_START + f" {forcing.dt():.0f} HR " + STR_END + '\n')
99+
(delta_X/(forcing.nx()-1)).round(6)) + ' '+str((delta_Y/(forcing.ny()-1)).round(6)) + ' NONSTATIONARY ' + STR_START + f" {forcing.dt():.0f} HR " + STR_END + '\n')
100100
file_out.write('READINP WIND '+str(factor_wind)+' \''+forcing_path+'\' 3 0 0 1 FREE \n')
101101
file_out.write('$ \n')
102102
else:

0 commit comments

Comments
 (0)