Hi
I have a question about the energy budget.
I used the NOAH LSM to calculate a particular sunny day in Beijing (d03:100*100, 3km). Based on the formula in module_sf_noahdrv.F for NOAHRES, I extracted the relevant parameter from the wrfout file and calculated. It turns out that the calculation results are quite different from NOAHRES. Can you help me to see what is going on?
I have listed the python code used for the calculations and the output.
---------------- PYTHON CODE ----------------
import netCDF4 as nc
import numpy as np
ds = nc.Dataset(r'G:\BJ01\merged_d03_2018-08-09_00_00_00.nc', mode="r")
for n in range(16, 40):
i = 50
j = 60
swdown = ds.variables['SWDOWN'][n, i, j]
albedo = ds.variables['ALBEDO'][n, i, j]
glw = ds.variables['GLW'][n, i, j]
emiss = ds.variables['EMISS'][n, i, j]
hfx = ds.variables['HFX'][n, i, j]
grdflx = ds.variables['GRDFLX'][n, i, j]
lh = ds.variables['LH'][n, i, j]
tsk = ds.variables['TSK'][n, i, j]
stbolt = 5.67/np.power(10, 8)
noahres = ds.variables['NOAHRES'][n, i, j]
print(swdown * (1 - albedo) + glw * emiss - hfx + grdflx - lh - emiss * stbolt * np.power(tsk, 4) - noahres)
print(f'noahres={noahres}')
---------------- CALCULATION RESULTS ----------------
-25.04837340256296
noahres=-0.415679931640625
-21.04258615853746
noahres=-0.3739013671875
-19.468577228906327
noahres=-0.269622802734375
-11.782948019316336
noahres=-0.274871826171875
-9.304868471384282
noahres=-0.092315673828125
-7.2644814604879
noahres=-0.048675537109375
-17.47009774951988
noahres=-0.13720703125
-33.498096155674375
noahres=-0.02728271484375
-43.5351843476202
noahres=-0.053863525390625
-27.63152140444288
noahres=-0.132659912109375
-11.279261508508966
noahres=-0.177093505859375
2.06485172244345
noahres=-0.24554443359375
8.751112068936209
noahres=-0.260955810546875
8.979251867863354
noahres=-0.120635986328125
3.9109820784632348
noahres=-0.042266845703125
-7.625464784312271
noahres=-0.04638671875
-28.368987386034973
noahres=-0.185272216796875
-45.63328096601629
noahres=-0.46075439453125
-53.523255352269416
noahres=-0.646209716796875
-44.916875131055065
noahres=-0.176727294921875
-42.84284334066024
noahres=-0.1722412109375
-37.42046989586572
noahres=-0.118896484375
-28.21861862158545
noahres=-0.09820556640625
-20.859836233445833
noahres=-0.077667236328125
I have a question about the energy budget.
I used the NOAH LSM to calculate a particular sunny day in Beijing (d03:100*100, 3km). Based on the formula in module_sf_noahdrv.F for NOAHRES, I extracted the relevant parameter from the wrfout file and calculated. It turns out that the calculation results are quite different from NOAHRES. Can you help me to see what is going on?
I have listed the python code used for the calculations and the output.
---------------- PYTHON CODE ----------------
import netCDF4 as nc
import numpy as np
ds = nc.Dataset(r'G:\BJ01\merged_d03_2018-08-09_00_00_00.nc', mode="r")
for n in range(16, 40):
i = 50
j = 60
swdown = ds.variables['SWDOWN'][n, i, j]
albedo = ds.variables['ALBEDO'][n, i, j]
glw = ds.variables['GLW'][n, i, j]
emiss = ds.variables['EMISS'][n, i, j]
hfx = ds.variables['HFX'][n, i, j]
grdflx = ds.variables['GRDFLX'][n, i, j]
lh = ds.variables['LH'][n, i, j]
tsk = ds.variables['TSK'][n, i, j]
stbolt = 5.67/np.power(10, 8)
noahres = ds.variables['NOAHRES'][n, i, j]
print(swdown * (1 - albedo) + glw * emiss - hfx + grdflx - lh - emiss * stbolt * np.power(tsk, 4) - noahres)
print(f'noahres={noahres}')
---------------- CALCULATION RESULTS ----------------
-25.04837340256296
noahres=-0.415679931640625
-21.04258615853746
noahres=-0.3739013671875
-19.468577228906327
noahres=-0.269622802734375
-11.782948019316336
noahres=-0.274871826171875
-9.304868471384282
noahres=-0.092315673828125
-7.2644814604879
noahres=-0.048675537109375
-17.47009774951988
noahres=-0.13720703125
-33.498096155674375
noahres=-0.02728271484375
-43.5351843476202
noahres=-0.053863525390625
-27.63152140444288
noahres=-0.132659912109375
-11.279261508508966
noahres=-0.177093505859375
2.06485172244345
noahres=-0.24554443359375
8.751112068936209
noahres=-0.260955810546875
8.979251867863354
noahres=-0.120635986328125
3.9109820784632348
noahres=-0.042266845703125
-7.625464784312271
noahres=-0.04638671875
-28.368987386034973
noahres=-0.185272216796875
-45.63328096601629
noahres=-0.46075439453125
-53.523255352269416
noahres=-0.646209716796875
-44.916875131055065
noahres=-0.176727294921875
-42.84284334066024
noahres=-0.1722412109375
-37.42046989586572
noahres=-0.118896484375
-28.21861862158545
noahres=-0.09820556640625
-20.859836233445833
noahres=-0.077667236328125