NOAA-EMC / UPP

Other
32 stars 95 forks source link

Bug fix for QPFARI and QPFFFG encoding in RRFS #968

Closed EricJames-NOAA closed 3 weeks ago

EricJames-NOAA commented 4 weeks ago

The main changes are:

prob_num and tot_num_prob were not set in grib2_module.f, resulting in seemingly random values showing up for the new GRIB2 records QPFARI and QPFFFG, as noted by Hui-Ya Chuang:

< 772:4824832913:vt=2024022023:surface:11-12 hour acc fcst:var discipline=1 center=7 local_table=1 parmcat =1 parm=197:prob >1:prob fcst 72/110 772:4824832913:vt=2024022023:surface:11-12 hour acc fcst:var discipline=1 center=7 local_table=1 parmcat =1 parm=197:prob >1:prob fcst 96/110 6177c6177 < 773:4824833141:vt=2024022023:surface:0-12 hour acc fcst:var discipline=1 center=7 local_table=1 parmcat= 1 parm=197:prob >1:prob fcst 72/110

773:4824833141:vt=2024022023:surface:0-12 hour acc fcst:var discipline=1 center=7 local_table=1 parmcat= 1 parm=197:prob >1:prob fcst 96/110

This small change fixes the issue, and should lead to bitwise identical results.

The change was tested for the RRFS_NA_3km system on Hera.

WenMeng-NOAA commented 4 weeks ago

@EricJames-NOAA Can you sync your branch with the latest commit of the branch 'release/rrfs_v1'?

EricJames-NOAA commented 4 weeks ago

@WenMeng-NOAA welcome back! I hope your family are well.

Just to clarify, yes, these changes are needed for RRFSv1.

Smoke/dust folks have requested one more small change which I hope to include in this PR if that's OK.

WenMeng-NOAA commented 3 weeks ago

@WenMeng-NOAA welcome back! I hope your family are well.

Just to clarify, yes, these changes are needed for RRFSv1.

Smoke/dust folks have requested one more small change which I hope to include in this PR if that's OK.

@EricJames-NOAA The modification in smoke/dust product calculation is fine with me unless @MatthewPyle-NOAA has concerns.

WenMeng-NOAA commented 3 weeks ago

@EricJames-NOAA Can you take a look at my test results for the sub-hourly case at /home/Wen.Meng/stmp2/rrfs_2024050203 and let me know if there are any inconsistencies with your testing?

WenMeng-NOAA commented 3 weeks ago

@EricJames-NOAA With the fix in grib2 meta data, the QPFARI and QPFFFG in rrfs PRSLEV dataset are encoded as:

772:714248470:d=2023062800:var discipline=1 center=7 local_table=1 parmcat=1 parm=197:surface:9-10 hour acc fcst:prob >1:prob fcst 0/1
773:714248695:d=2023062800:var discipline=1 center=7 local_table=1 parmcat=1 parm=197:surface:10-10 hour acc fcst:prob >1:prob fcst 0/1
774:714248920:d=2023062800:var discipline=1 center=7 local_table=1 parmcat=1 parm=196:surface:9-10 hour acc fcst:prob >2:prob fcst 0/1
775:714249145:d=2023062800:var discipline=1 center=7 local_table=1 parmcat=1 parm=196:surface:10-10 hour acc fcst:prob >2:prob fcst 0/1
776:714249370:d=2023062800:var discipline=1 center=7 local_table=1 parmcat=1 parm=196:surface:9-10 hour acc fcst:prob >5:prob fcst 0/1
777:714249595:d=2023062800:var discipline=1 center=7 local_table=1 parmcat=1 parm=196:surface:10-10 hour acc fcst:prob >5:prob fcst 0/1
778:714249820:d=2023062800:var discipline=1 center=7 local_table=1 parmcat=1 parm=196:surface:9-10 hour acc fcst:prob >10:prob fcst 0/1
779:714250045:d=2023062800:var discipline=1 center=7 local_table=1 parmcat=1 parm=196:surface:10-10 hour acc fcst:prob >10:prob fcst 0/1
780:714250270:d=2023062800:var discipline=1 center=7 local_table=1 parmcat=1 parm=196:surface:9-10 hour acc fcst:prob >100:prob fcst 0/1
781:714250495:d=2023062800:var discipline=1 center=7 local_table=1 parmcat=1 parm=196:surface:10-10 hour acc fcst:prob >100:prob fcst 0/1

Please confirm the above changes.

WenMeng-NOAA commented 3 weeks ago

@EricJames-NOAA Can you also combine another change in your PR? Update g2tmpl/1.12.0 location on WCOSS2 which was officially installed at the prod side: in UPP/modulefiles/wcoss2.lua, remove line 48, and 49:

prepend_path("MODULEPATH"," /u/wen.meng/noscrub/ncep_post/g2tmpl/libs/modulefiles/compiler/intel/19.1.3.304")
load(pathJoin("g2tmpl", g2tmpl_ver))
EricJames-NOAA commented 3 weeks ago

@EricJames-NOAA Can you take a look at my test results for the sub-hourly case at /home/Wen.Meng/stmp2/rrfs_2024050203 and let me know if there are any inconsistencies with your testing?

@WenMeng-NOAA my tests were on Jet on /lfs4 which is not accessible at the moment. I am recreating my tests on Hera.

EricJames-NOAA commented 3 weeks ago

@EricJames-NOAA With the fix in grib2 meta data, the QPFARI and QPFFFG in rrfs PRSLEV dataset are encoded as:

772:714248470:d=2023062800:var discipline=1 center=7 local_table=1 parmcat=1 parm=197:surface:9-10 hour acc fcst:prob >1:prob fcst 0/1
773:714248695:d=2023062800:var discipline=1 center=7 local_table=1 parmcat=1 parm=197:surface:10-10 hour acc fcst:prob >1:prob fcst 0/1
774:714248920:d=2023062800:var discipline=1 center=7 local_table=1 parmcat=1 parm=196:surface:9-10 hour acc fcst:prob >2:prob fcst 0/1
775:714249145:d=2023062800:var discipline=1 center=7 local_table=1 parmcat=1 parm=196:surface:10-10 hour acc fcst:prob >2:prob fcst 0/1
776:714249370:d=2023062800:var discipline=1 center=7 local_table=1 parmcat=1 parm=196:surface:9-10 hour acc fcst:prob >5:prob fcst 0/1
777:714249595:d=2023062800:var discipline=1 center=7 local_table=1 parmcat=1 parm=196:surface:10-10 hour acc fcst:prob >5:prob fcst 0/1
778:714249820:d=2023062800:var discipline=1 center=7 local_table=1 parmcat=1 parm=196:surface:9-10 hour acc fcst:prob >10:prob fcst 0/1
779:714250045:d=2023062800:var discipline=1 center=7 local_table=1 parmcat=1 parm=196:surface:10-10 hour acc fcst:prob >10:prob fcst 0/1
780:714250270:d=2023062800:var discipline=1 center=7 local_table=1 parmcat=1 parm=196:surface:9-10 hour acc fcst:prob >100:prob fcst 0/1
781:714250495:d=2023062800:var discipline=1 center=7 local_table=1 parmcat=1 parm=196:surface:10-10 hour acc fcst:prob >100:prob fcst 0/1

Please confirm the above changes.

@WenMeng-NOAA those changes look correct and consistent with my results.

EricJames-NOAA commented 3 weeks ago

@WenMeng-NOAA your results are consistent with mine. I added the smoke change requested by NCEP, so this PR is ready from my perspective.

WenMeng-NOAA commented 3 weeks ago

@EricJames-NOAA The 1-h averaged PM2.5 and PM10 in PRSLEV dataset are labeled as:

751:704042206:d=2023062800:MASSDEN:8 m above ground:10-11 hour ave fcst:aerosol=Missing:aerosol_size <2.5e-06
752:704280574:d=2023062800:MASSDEN:8 m above ground:10-11 hour ave fcst:aerosol=Missing:aerosol_size <1e-05

Please confirm.

EricJames-NOAA commented 3 weeks ago

@EricJames-NOAA The 1-h averaged PM2.5 and PM10 in PRSLEV dataset are labeled as:

751:704042206:d=2023062800:MASSDEN:8 m above ground:10-11 hour ave fcst:aerosol=Missing:aerosol_size <2.5e-06
752:704280574:d=2023062800:MASSDEN:8 m above ground:10-11 hour ave fcst:aerosol=Missing:aerosol_size <1e-05

Please confirm.

@WenMeng-NOAA yes, that is correct. We have changed these fields to be PM2.5 and PM10 (including both smoke and dust), so I changed the aerosol type to "Missing". The size categorization is correct.

WenMeng-NOAA commented 3 weeks ago

@EricJames-NOAA The 1-h averaged PM2.5 and PM10 in PRSLEV dataset are labeled as:

751:704042206:d=2023062800:MASSDEN:8 m above ground:10-11 hour ave fcst:aerosol=Missing:aerosol_size <2.5e-06
752:704280574:d=2023062800:MASSDEN:8 m above ground:10-11 hour ave fcst:aerosol=Missing:aerosol_size <1e-05

Please confirm.

@WenMeng-NOAA yes, that is correct. We have changed these fields to be PM2.5 and PM10 (including both smoke and dust), so I changed the aerosol type to "Missing". The size categorization is correct.

@EricJames-NOAA Thanks for clarifying.