Skip to content

Commit 1a3f507

Browse files
committed
fix the unit attrs of Edata
1 parent dff6dd3 commit 1a3f507

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

hypergas/unit_spectrum.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,9 @@ def _read_refdata(self):
164164
E_filename = 'solar_irradiance_0400-2600nm_highres_sparse.nc'
165165
Edata = xr.open_dataset(os.path.join(self.irradiance_dir, E_filename))['irradiance']
166166

167-
# convert units to W m-2 um-1
167+
# convert units to mW m-2 nm-1
168168
Edata *= 1e3
169+
Edata.attrs['units'] = 'mW m-2 nm-1'
169170

170171
# read abs data
171172
abs_filename = f'absorption_cs_ALL_{MODE[self.model]}.nc'

0 commit comments

Comments
 (0)