NOAA-SWPC / WAM

Whole Atmosphere Model extension of the GFS
GNU General Public License v3.0
3 stars 7 forks source link

solar heating calculated incorrectly due to type error in idea_solar_heating #36

Closed akubaryk closed 1 year ago

akubaryk commented 2 years ago

@SvetlanaKarol-NOAA noted this issue via email. There's an incorrect type error in idea_solar_heating.f that leads to dayno being interpreted as effectively 0 in the subroutine solar_heat_dissociation_TIEGCM. As a result, sfeps is always a little over 1.03363, while the value should vary like this according to day of year:

image

a difference of almost 6.5% in the NH summer.

A branch bugfix/solar_heating will be pushed shortly -- we should identify the impact on the model.

ZhuxiaoLi66 commented 2 years ago

Will take a look tomorrow. Thanks, Zhuxiao

On Tue, Jul 12, 2022 at 1:39 PM akubaryk @.***> wrote:

@SvetlanaKarol-NOAA https://github.com/SvetlanaKarol-NOAA noted this issue via email. There's an incorrect type error in idea_solar_heating.f https://github.com/NOAA-SWPC/WAM/blob/421547ea7ce97e53c0ba404b17e32f2eef5a97b0/src/phys/idea_solar_heating.f#L259 that leads to dayno being interpreted as effectively 0 in the subroutine solar_heat_dissociation_TIEGCM. As a result, sfeps is always a little over 1.03363, while the value should vary like this according to day of year:

[image: image] https://user-images.githubusercontent.com/31134616/178579045-03d1630a-c69e-45fe-b868-1c19340461d4.png

a difference of almost 6.5% in the NH summer.

A branch bugfix/solar_heating will be pushed shortly -- we should identify the impact on the model.

— Reply to this email directly, view it on GitHub https://github.com/NOAA-SWPC/WAM/issues/36, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFMARC7XK6UCVAAVVUWSD3TVTXCWDANCNFSM53MEO67Q . You are receiving this because you were assigned.Message ID: @.***>

ZhuxiaoLi66 commented 2 years ago

The influence of the 'dayno' bugfix on total number density & TEC has been checked with two WAM-IPE free runs for June 2015 with real-time drivers. The ratios (bugfix/ori) of the monthly mean of total number density at 400km and TEC had been described in the following plots.

ZhuxiaoLi66 commented 2 years ago

den_400km_ratio_dayno_bugfix_201506_4p_cb den_400km_ratio_dayno_bugfix_201506_4p TEC_ratio_dayno_bugfix_201506_4p

ZhuxiaoLi66 commented 2 years ago

TEC_after_dayno_bugfix_201506_4p TEC_ori_dayno_bugfix_201506_4p

ZhuxiaoLi66 commented 2 years ago

The following plots are the monthly mean (June 2015) total number density at 400km by the dayno_fix code and the original code respectively. den_400km_before_dayno_bugfix_201506_4p den_400km_dayno_bugfix_201506_4p