Skip to content

Commit d4a3202

Browse files
committed
Add new gust factor to HAFS products NOAA-EMC#1422 The CIMAS/AOML/HRD team has developed a new gust factor as part of HAFS development. This PR implements the new calculations into the UPP source code and adds the new GUST ID to the HAFS products list.
1 parent 07f242a commit d4a3202

File tree

6 files changed

+198
-6
lines changed

6 files changed

+198
-6
lines changed

parm/hafs/postcntrl_hafs_nosat.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,11 @@
554554
<scale>3.0</scale>
555555
</param>
556556

557+
<param>
558+
<shortname>HAFS_GUST_ON_SPEC_ALT_ABOVE_MEAN_SEA_LVL</shortname>
559+
<scale>3.0</scale>
560+
</param>
561+
557562
<param>
558563
<shortname>MAX_MAXUVV_ON_ISOBARIC_SFC_100-1000hpa</shortname>
559564
<pname>MAXUVV</pname>

parm/hafs/postxconfig-NT-hafs_nosat.txt

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
1
2-
84
2+
85
33
HURPRS
44
32769
55
ncep_nco
@@ -3376,6 +3376,48 @@ surface
33763376
?
33773377
?
33783378
?
3379+
1026
3380+
HAFS_GUST_ON_SPEC_ALT_ABOVE_MEAN_SEA_LVL
3381+
?
3382+
1
3383+
tmpl4_0
3384+
GUST
3385+
?
3386+
?
3387+
spec_hgt_lvl_above_grnd
3388+
0
3389+
?
3390+
1
3391+
10.
3392+
?
3393+
0
3394+
?
3395+
0
3396+
?
3397+
?
3398+
?
3399+
?
3400+
0
3401+
0.0
3402+
0
3403+
0.0
3404+
?
3405+
0
3406+
0.0
3407+
0
3408+
0.0
3409+
0
3410+
0.0
3411+
0
3412+
0.0
3413+
1
3414+
3.0
3415+
0
3416+
0
3417+
0
3418+
?
3419+
?
3420+
?
33793421
423
33803422
MAX_MAXUVV_ON_ISOBARIC_SFC_100-1000hpa
33813423
hourly maximum Upward Vertical Velocity between 100-1000hpa

parm/post_avblflds.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8660,5 +8660,14 @@
86608660
<scale>3.0</scale>
86618661
</param>
86628662

8663+
<param>
8664+
<post_avblfldidx>1026</post_avblfldidx>
8665+
<shortname>HAFS_GUST_ON_SPEC_ALT_ABOVE_MEAN_SEA_LVL</shortname>
8666+
<pname>GUST</pname>
8667+
<fixed_sfc1_type>spec_hgt_lvl_above_grnd</fixed_sfc1_type>
8668+
<level>10.</level>
8669+
<scale>3.0</scale>
8670+
</param>
8671+
86638672
</post_avblflds>
86648673
</postxml>

sorc/ncep_post.fd/CALGUSTCONV.f

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
!> @file
2+
!> @brief Subroutine that computes wind gust from turbulence and convective components
3+
!> for HAFS model.
4+
!>
5+
!> This subroutine is based on the Python code provided by Andrew Hazelton (HRD),
6+
!> which computes a new wind gust factor based on turbulence and convective components.
7+
!>
8+
!> ### Program history log:
9+
!> Date | Programmer | Comments
10+
!> -----|------------|---------
11+
!> 2026-01-06 | Karina Asmar | Initial
12+
!>
13+
!> @author Karina Asmar NCEP/EMC @date 2026-01-06
14+
! ------------------------------------------------------------------------------------------
15+
!>
16+
!> @param[in] SPEED850 Wind speed at 850 mb.
17+
!> @param[in] SPEED950 Wind speed at 950 mb.
18+
!> @param[inout] GUSTCONV Gust factor.
19+
!>
20+
SUBROUTINE CALGUSTCONV(SPEED850,SPEED950,GUSTCONV)
21+
!
22+
!
23+
use vrbls2d , only: u10,v10, ustar
24+
use ctlblk_mod, only: ista, iend, jsta, jend, ista_2l, iend_2u, jsta_2l, jend_2u, spval
25+
!
26+
implicit none
27+
!
28+
INCLUDE "mpif.h"
29+
!
30+
! INCLUDE ETA GRID DIMENSIONS. SET/DERIVE PARAMETERS.
31+
!
32+
! DECLARE VARIABLES.
33+
!
34+
REAL,intent(in) :: SPEED850(ista_2l:iend_2u,jsta_2l:jend_2u)
35+
REAL,intent(in) :: SPEED950(ista_2l:iend_2u,jsta_2l:jend_2u)
36+
REAL,intent(inout) :: GUSTCONV(ista_2l:iend_2u,jsta_2l:jend_2u)
37+
!
38+
REAL, dimension(ista_2l:iend_2u,jsta_2l:jend_2u) :: WIND10, WSD, GUST1_NEW, GUST2_NEW, WSTT1_NEW, &
39+
WSTT2_NEW, GF1_NEW, GF2_NEW
40+
!
41+
!
42+
integer I,J
43+
!
44+
!
45+
!*****************************************************************************
46+
!> CALGUSTCONV computes new gust wind factor for HAFS based on convective and
47+
!> turbulent components.
48+
! START CALGUSTCONV HERE.
49+
!
50+
!
51+
!$omp parallel do private(i,j)
52+
DO J=JSTA,JEND
53+
DO I=ISTA,IEND
54+
GUSTCONV(I,J) = SPVAL
55+
ENDDO
56+
ENDDO
57+
58+
! CALCULATE GUST FACTORS
59+
!$omp parallel do private(i,j)
60+
DO J=JSTA,JEND
61+
DO I=ISTA,IEND
62+
IF(U10(I,J)<SPVAL.AND.V10(I,J)<SPVAL.AND.SPEED850(I,J)<SPVAL.AND.SPEED950(I,J)<SPVAL) THEN
63+
! CALCULATE WINDS AND WIND SPEED DIFFERENCE
64+
WIND10(I,J) = SQRT(U10(I,J)**2 + V10(I,J)**2)
65+
WSD(I,J) = SPEED850(I,J) - SPEED950(I,J)
66+
IF (WSD(I,J) < 0.0) WSD(I,J) = 0.0 ! MAKE SURE WIND SPEED IS >= ZERO
67+
68+
! CALCULATE NEW GUST FACTOR
69+
GUST1_NEW(I,J) = 3.0 * USTAR(I,J) ! TURBULENT COMPONENT
70+
WSTT1_NEW(I,J) = WIND10(I,J) + GUST1_NEW(I,J)
71+
GF1_NEW(I,J) = WSTT1_NEW(I,J) / WIND10(I,J)
72+
GUST2_NEW(I,J) = 0.3 * WSD(I,J) ! CONVECTIVE MIXING COMPONENT
73+
74+
GUSTCONV(I,J) = (WSTT1_NEW(I,J) + GUST2_NEW(I,J))
75+
ENDIF
76+
ENDDO
77+
ENDDO
78+
!
79+
! END OF ROUTINE.
80+
!
81+
RETURN
82+
END

sorc/ncep_post.fd/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ list(APPEND LIB_SRC
77
CALDRG.f
88
CALDWP.f
99
CALGUST.f
10+
CALGUSTCONV.f
1011
CALHEL.f
1112
CALHEL2.f
1213
CALHEL3.f

sorc/ncep_post.fd/MDL2P.f

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,13 @@
3939
!> 2023-08-24 | Y Mao | Add gtg_on option for GTG interpolation
4040
!> 2023-09-12 | J Kenyon | Prevent spurious supercooled rain and cloud water
4141
!> 2024-04-23 | E James | Adding smoke emissions (ebb) from RRFS
42-
!> 2024-09-23 | K Asmar | Add velocity potential and streamfunction from wind vectors
42+
!> 2024-09-23 | K Asmar | Add velocity potential and streamfunction from wind vectors
4343
!> 2024-12-12 | J Meng | Adding UUtah 2024 SLR algorithm
4444
!> 2025-01-17 | J Kenyon | Add graupel number concentration (QQNG)
4545
!> 2025-11-13 | L Pan | enable aerosols to be output on isobaric surfaces
4646
!> 2025-11-17 | W Meng | Correct variable allocation
4747
!> 2025-11-19 | W Meng | Relocate dxm calculation
48+
!> 2026-01-06 | K Asmar | Add convective wind gust calculation
4849
!>
4950
!> @author T Black W/NP2 @date 1999-09-23
5051
!--------------------------------------------------------------------------------------
@@ -114,6 +115,7 @@ SUBROUTINE MDL2P(iostatusD3D)
114115
&, SALTSL(:,:,:), SOOTSL(:,:,:), WASOSL(:,:,:) &
115116
&, SUSOSL(:,:,:)
116117
REAL, allocatable :: GTGSL(:,:),CATSL(:,:),MWTSL(:,:)
118+
REAL, allocatable :: WS850(:,:), WS950(:,:), GUSTCONV(:,:)
117119
!
118120
integer,intent(in) :: iostatusD3D
119121
INTEGER, dimension(ista_2l:iend_2u,jsta_2l:jend_2u) :: NL1X, NL1XF
@@ -277,6 +279,10 @@ SUBROUTINE MDL2P(iostatusD3D)
277279
if (.not. allocated(CATSL)) allocate(CATSL(ista_2l:iend_2u,jsta_2l:jend_2u))
278280
if (.not. allocated(MWTSL)) allocate(MWTSL(ista_2l:iend_2u,jsta_2l:jend_2u))
279281
endif
282+
! Allocate HAFS wind speeds and gust factor
283+
if (.not. allocated(ws850)) allocate(ws850(ista_2l:iend_2u,jsta_2l:jend_2u))
284+
if (.not. allocated(ws950)) allocate(ws950(ista_2l:iend_2u,jsta_2l:jend_2u))
285+
if (.not. allocated(gustconv)) allocate(gustconv(ista_2l:iend_2u,jsta_2l:jend_2u))
280286
!
281287
! SET TOTAL NUMBER OF POINTS ON OUTPUT GRID.
282288
!
@@ -301,7 +307,8 @@ SUBROUTINE MDL2P(iostatusD3D)
301307
(IGET(257) > 0) .OR. (IGET(258) > 0) .OR. &
302308
(IGET(294) > 0) .OR. (IGET(268) > 0) .OR. &
303309
(IGET(331) > 0) .OR. (IGET(326) > 0) .OR. &
304-
(IGET(1021) > 0) .OR. (IGET(1022) > 0) .OR. &
310+
(IGET(1021) > 0) .OR. (IGET(1022) > 0) .OR. &
311+
(IGET(1026) > 0) .OR. &
305312
! add D3D fields
306313
(IGET(354) > 0) .OR. (IGET(355) > 0) .OR. &
307314
(IGET(356) > 0) .OR. (IGET(357) > 0) .OR. &
@@ -350,6 +357,10 @@ SUBROUTINE MDL2P(iostatusD3D)
350357
if(gridtype == 'B' .or. gridtype == 'E') &
351358
call exch(PINT(ISTA_2L:IEND_2U,JSTA_2L:JEND_2U,LP1))
352359

360+
! wind speeds at 850 and 950 mb for HAFS wind gust
361+
WS850 = SPVAL
362+
WS950 = SPVAL
363+
353364
DO LP=1,LSM
354365

355366
! if(me == 0) print *,'in LP loop me=',me,'UH=',UH(1:10,JSTA,LP), &
@@ -1864,11 +1875,11 @@ SUBROUTINE MDL2P(iostatusD3D)
18641875
!
18651876
IF(IGET(018) > 0.OR.IGET(019) > 0)THEN
18661877
log1=.false.
1867-
IF(IGET(018) > 0.) then
1868-
if(LVLS(LP,IGET(018)) > 0 ) log1=.true.
1878+
IF(IGET(018) > 0) then
1879+
if(LVLS(LP,IGET(018)) > 0) log1=.true.
18691880
endif
18701881
IF(IGET(019) > 0) then
1871-
if(LVLS(LP,IGET(019)) > 0 ) log1=.true.
1882+
if(LVLS(LP,IGET(019)) > 0) log1=.true.
18721883
endif
18731884
if ( log1 ) then
18741885
!$omp parallel do private(i,j)
@@ -1917,6 +1928,19 @@ SUBROUTINE MDL2P(iostatusD3D)
19171928
enddo
19181929
enddo
19191930
endif
1931+
1932+
! *** WIND SPEED AT 850 AND 950 MB FOR HAFS WIND GUST
1933+
IF(IGET(1026)>0)THEN
1934+
DO J=JSTA,JEND
1935+
DO I=ISTA,IEND
1936+
IF(GRID1(I,J)<SPVAL .and. GRID2(I,J)<SPVAL) then
1937+
IF (ABS(SPL(LP)-85000.)<SMALL) WS850(I,J) = SQRT(GRID1(I,J)**2 + GRID2(I,J)**2)
1938+
IF (ABS(SPL(LP)-95000.)<SMALL) WS950(I,J) = SQRT(GRID1(I,J)**2 + GRID2(I,J)**2)
1939+
ENDIF
1940+
ENDDO
1941+
ENDDO
1942+
ENDIF
1943+
19201944
ENDIF
19211945
ENDIF
19221946
!
@@ -4967,6 +4991,31 @@ SUBROUTINE MDL2P(iostatusD3D)
49674991
enddo
49684992
endif
49694993
ENDIF
4994+
4995+
!
4996+
! *** HAFS WIND GUST
4997+
!
4998+
IF (IGET(1026) > 0) THEN
4999+
CALL CALGUSTCONV(WS850,WS950,GUSTCONV)
5000+
!$omp parallel do private(i,j)
5001+
DO J=JSTA,JEND
5002+
DO I=ISTA,IEND
5003+
GRID1(I,J) = GUSTCONV(I,J)
5004+
ENDDO
5005+
ENDDO
5006+
if(grib=='grib2') then
5007+
cfld=cfld+1
5008+
fld_info(cfld)%ifld=IAVBLFLD(IGET(1026))
5009+
!$omp parallel do private(i,j,ii,jj)
5010+
do j=1,jend-jsta+1
5011+
jj = jsta+j-1
5012+
do i=1,iend-ista+1
5013+
ii = ista+i-1
5014+
datapd(i,j,cfld) = GRID1(ii,jj)
5015+
enddo
5016+
enddo
5017+
endif
5018+
ENDIF
49705019
!
49715020
if(allocated(d3dsl)) deallocate(d3dsl)
49725021
if(allocated(smokesl)) deallocate(smokesl)
@@ -4982,6 +5031,10 @@ SUBROUTINE MDL2P(iostatusD3D)
49825031
if(allocated(GTGSL)) deallocate(GTGSL)
49835032
if(allocated(CATSL)) deallocate(CATSL)
49845033
if(allocated(MWTSL)) deallocate(MWTSL)
5034+
! HAFS winds and gust factor
5035+
if(allocated(WS850)) deallocate(WS850)
5036+
if(allocated(WS950)) deallocate(WS950)
5037+
if(allocated(GUSTCONV)) deallocate(GUSTCONV)
49855038
! END OF ROUTINE.
49865039
!
49875040
RETURN

0 commit comments

Comments
 (0)