Skip to content

Commit bdf6aba

Browse files
committed
Try using fixed point formatting instead of rounding
1 parent 21fbafe commit bdf6aba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMIP7/esm1p6/atmosphere/volcanic/cmip7_HI_volcanic_generate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def save_hi_year_tapered_saod(year, tapered_saod_array, save_file):
106106
for lat_band_nbr in range(NBR_OF_BANDS):
107107
saod = tapered_saod_array[index, month - 1, lat_band_nbr]
108108
print(
109-
f"{round(saod):5d}",
109+
f"{saod:7.1f}",
110110
end="",
111111
file=save_file,
112112
)
@@ -158,7 +158,7 @@ def save_hi_stratospheric_aerosol_optical_depth(args, dataset_path):
158158
lat_cube = sum_over_height_layers(lat_cube)
159159
saod = lat_cube.data * 10000.0
160160
print(
161-
f"{round(saod):5d}",
161+
f"{saod:7.1f}",
162162
end="",
163163
file=save_file,
164164
)

0 commit comments

Comments
 (0)