Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 6-hrly max winds at 10m to SFS #1019

Merged
merged 18 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions parm/sfs/postcntrl_sfs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,21 @@
<scale>6.0</scale>
</param>

<param>
<shortname>MAX_WIND_ON_SPEC_HGT_LVL_ABOVE_GRND_10m</shortname>
<scale>-4.0</scale>
</param>

<param>
<shortname>MAX_UGD_ON_SPEC_HGT_LVL_ABOVE_GRND_10m</shortname>
<scale>-4.0</scale>
</param>

<param>
<shortname>MAX_VGD_ON_SPEC_HGT_LVL_ABOVE_GRND_10m</shortname>
<scale>-4.0</scale>
</param>

<!-- comments wherever I like -->
</paramset>
</postxml>
128 changes: 127 additions & 1 deletion parm/sfs/postxconfig-NT-sfs.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
1
110
113
GFSPRS
0
ncep_nco
Expand Down Expand Up @@ -4636,3 +4636,129 @@ surface
?
?
?
422
MAX_WIND_ON_SPEC_HGT_LVL_ABOVE_GRND_10m
maximum wind speed on 10 meter Above Ground
1
tmpl4_8
WIND
?
MAX
spec_hgt_lvl_above_grnd
0
?
1
10.
?
0
?
0
?
?
?
?
0
0.0
0
0.0
?
0
0.0
0
0.0
0
0.0
0
0.0
1
-4.0
0
0
0
?
?
?
783
MAX_UGD_ON_SPEC_HGT_LVL_ABOVE_GRND_10m
maximum u wind on 10 meter Above Ground
1
tmpl4_8
MAXUW
NCEP
MAX
spec_hgt_lvl_above_grnd
0
?
1
10.
?
0
?
0
?
?
?
?
0
0.0
0
0.0
?
0
0.0
0
0.0
0
0.0
0
0.0
1
-4.0
0
0
0
?
?
?
784
MAX_VGD_ON_SPEC_HGT_LVL_ABOVE_GRND_10m
maximum v wind on 10 meter Above Ground
1
tmpl4_8
MAXVW
NCEP
MAX
spec_hgt_lvl_above_grnd
0
?
1
10.
?
0
?
0
?
?
?
?
0
0.0
0
0.0
?
0
0.0
0
0.0
0
0.0
0
0.0
1
-4.0
0
0
0
?
?
?
22 changes: 19 additions & 3 deletions sorc/ncep_post.fd/INITPOST_NETCDF.f
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
!> 2024-05-09 | Eric James | Enable reading of clear-sky downwelling shortwave irradiance
!> 2024-05-10 | Karina Asmar | Read omega from model output and calculate HGT for hydrostatic runs
!> 2024-06-25 | Wen Meng | Add capability to read fhzero as either an integer or float
!> 2024-08-26 | Karina Asmar | Add temporal u/v, speed max wind components at 10m agl
!>
!> @author Hui-Ya Chuang @date 2016-03-04
!----------------------------------------------------------------------
Expand Down Expand Up @@ -105,7 +106,7 @@ SUBROUTINE INITPOST_NETCDF(ncid2d,ncid3d)
ti,aod550,du_aod550,ss_aod550,su_aod550,oc_aod550,bc_aod550,prate_max,maod,dustpm10, &
dustcb,bccb,occb,sulfcb,sscb,dustallcb,ssallcb,dustpm,sspm,pp25cb,pp10cb,no3cb,nh4cb,&
pwat, hwp, aqm_aod550, ltg1_max,ltg2_max,ltg3_max, hail_maxhailcast, pblhgust, &
smoke_ave, dust_ave, coarsepm_ave
smoke_ave, dust_ave, coarsepm_ave, wspd10umax, wspd10vmax
use soil, only: sldpth, sllevel, sh2o, smc, stc
use masks, only: lmv, lmh, htm, vtm, gdlat, gdlon, dx, dy, hbm2, sm, sice
use physcons_post, only: grav => con_g, fv => con_fvirt, rgas => con_rd, &
Expand Down Expand Up @@ -1998,12 +1999,27 @@ SUBROUTINE INITPOST_NETCDF(ncid2d,ncid3d)
call read_netcdf_2d_para(ncid2d,ista,ista_2l,iend,iend_2u,jsta,jsta_2l,jend,jend_2u, &
spval,VarName,v10max)
if(debugprint)print*,'sample ',VarName,' = ',v10max(isa,jsa)
! max hourly 10m agl wind speed
VarName='spd10max'
! max 10m agl wind speed
if (modelname=='FV3R') then
VarName='spd10max' ! hourly max wind speed at 10m
else if (modelname=='GFS') then
VarName='wind10m_max' ! temporal max wind speed at 10m
endif
call read_netcdf_2d_para(ncid2d,ista,ista_2l,iend,iend_2u,jsta,jsta_2l,jend,jend_2u, &
spval,VarName,wspd10max)
if(debugprint)print*,'sample ',VarName,' = ',wspd10max(isa,jsa)

! max temporal u comp of 10m agl wind
VarName='u10m_max'
call read_netcdf_2d_para(ncid2d,ista,ista_2l,iend,iend_2u,jsta,jsta_2l,jend,jend_2u, &
spval,VarName,wspd10umax)
if(debugprint)print*,'sample ',VarName,' = ',u10max(isa,jsa)
! max temporal v comp of 10m agl wind
VarName='v10m_max'
call read_netcdf_2d_para(ncid2d,ista,ista_2l,iend,iend_2u,jsta,jsta_2l,jend,jend_2u, &
spval,VarName,wspd10vmax)
if(debugprint)print*,'sample ',VarName,' = ',v10max(isa,jsa)

! inst snow water eqivalent using nemsio
VarName='weasd'
call read_netcdf_2d_para(ncid2d,ista,ista_2l,iend,iend_2u,jsta,jsta_2l,jend,jend_2u, &
Expand Down
105 changes: 90 additions & 15 deletions sorc/ncep_post.fd/SURFCE.f
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
!> 2024-05-01 | E James | Adapt the BUCKET1 type fields (15-min acc) for use in RRFS
!> 2024-05-24 | E James | Modify the run total acc precip fields for 15-min output
!> 2024-06-11 | E James | Modifying RRFS hourly average smoke/dust fields to be PM2.5 and PM20
!> 2024-08-26 | K Asmar | Modify max winds at 10m agl for UFS time buckets
!>
!> @note
!> USAGE: CALL SURFCE
Expand Down Expand Up @@ -2612,6 +2613,27 @@ SUBROUTINE SURFCE
! ANEMOMETER LEVEL (10 M) MAX WIND SPEED.
!
IF (IGET(422)>0) THEN
IF (MODELNAME == 'GFS') THEN
ID(1:25) = 0
ITSRFC = NINT(TSRFC)
if (ITSRFC /= 0) then
IFINCR = MOD(IFHR,ITSRFC)
IF(IFMIN >= 1)IFINCR= MOD(IFHR*60+IFMIN,ITSRFC*60)
else
IFINCR = 0
endif
ID(18) = 0
ID(19) = IFHR
IF(IFMIN >= 1)ID(19)=IFHR*60+IFMIN
ID(20) = 4
IF (IFINCR==0) THEN
ID(18) = IFHR-ITSRFC
ELSE
ID(18) = IFHR-IFINCR
IF(IFMIN >= 1)ID(18)=IFHR*60+IFMIN-IFINCR
ENDIF
IF (ID(18)<0) ID(18) = 0
ENDIF
!$omp parallel do private(i,j)
DO J=JSTA,JEND
DO I=ISTA,IEND
Expand All @@ -2621,12 +2643,16 @@ SUBROUTINE SURFCE
if(grib=='grib2') then
cfld=cfld+1
fld_info(cfld)%ifld=IAVBLFLD(IGET(422))
if (ifhr==0) then
WenMeng-NOAA marked this conversation as resolved.
Show resolved Hide resolved
fld_info(cfld)%ntrange=1
IF (MODELNAME == 'FV3R' .OR. MODELNAME == 'RAPR') THEN
if (ifhr==0) then
fld_info(cfld)%tinvstat=0
else
else
fld_info(cfld)%tinvstat=1
endif
fld_info(cfld)%ntrange=1
endif
ELSE IF (MODELNAME == 'GFS') THEN
fld_info(cfld)%tinvstat=IFHR-ID(18)
ENDIF
!$omp parallel do private(i,j,ii,jj)
do j=1,jend-jsta+1
jj = jsta+j-1
Expand All @@ -2637,10 +2663,31 @@ SUBROUTINE SURFCE
enddo
endif
ENDIF

!
! ANEMOMETER LEVEL (10 M) MAX WIND SPEED U COMPONENT.
!
IF (IGET(783)>0) THEN
IF (MODELNAME == 'GFS') THEN
ID(1:25) = 0
ITSRFC = NINT(TSRFC)
if (ITSRFC /= 0) then
IFINCR = MOD(IFHR,ITSRFC)
IF(IFMIN >= 1)IFINCR= MOD(IFHR*60+IFMIN,ITSRFC*60)
else
IFINCR = 0
endif
ID(18) = 0
ID(19) = IFHR
IF(IFMIN >= 1)ID(19)=IFHR*60+IFMIN
ID(20) = 4
IF (IFINCR==0) THEN
ID(18) = IFHR-ITSRFC
ELSE
ID(18) = IFHR-IFINCR
IF(IFMIN >= 1)ID(18)=IFHR*60+IFMIN-IFINCR
ENDIF
IF (ID(18)<0) ID(18) = 0
ENDIF
!$omp parallel do private(i,j)
DO J=JSTA,JEND
DO I=ISTA,IEND
Expand All @@ -2650,12 +2697,16 @@ SUBROUTINE SURFCE
if(grib=='grib2') then
cfld=cfld+1
fld_info(cfld)%ifld=IAVBLFLD(IGET(783))
if (ifhr==0) then
fld_info(cfld)%ntrange=1
IF (MODELNAME == 'FV3R' .OR. MODELNAME == 'RAPR') THEN
WenMeng-NOAA marked this conversation as resolved.
Show resolved Hide resolved
if (ifhr==0) then
fld_info(cfld)%tinvstat=0
else
else
fld_info(cfld)%tinvstat=1
endif
fld_info(cfld)%ntrange=1
endif
ELSE IF (MODELNAME == 'GFS') THEN
fld_info(cfld)%tinvstat=IFHR-ID(18)
ENDIF
!$omp parallel do private(i,j,ii,jj)
do j=1,jend-jsta+1
jj = jsta+j-1
Expand All @@ -2666,10 +2717,31 @@ SUBROUTINE SURFCE
enddo
endif
ENDIF

!
! ANEMOMETER LEVEL (10 M) MAX WIND SPEED V COMPONENT.
!
IF (IGET(784)>0) THEN
IF (MODELNAME == 'GFS') THEN
ID(1:25) = 0
ITSRFC = NINT(TSRFC)
if (ITSRFC /= 0) then
IFINCR = MOD(IFHR,ITSRFC)
IF(IFMIN >= 1)IFINCR= MOD(IFHR*60+IFMIN,ITSRFC*60)
else
IFINCR = 0
endif
ID(18) = 0
ID(19) = IFHR
IF(IFMIN >= 1)ID(19)=IFHR*60+IFMIN
ID(20) = 4
IF (IFINCR==0) THEN
ID(18) = IFHR-ITSRFC
ELSE
ID(18) = IFHR-IFINCR
IF(IFMIN >= 1)ID(18)=IFHR*60+IFMIN-IFINCR
ENDIF
IF (ID(18)<0) ID(18) = 0
ENDIF
!$omp parallel do private(i,j)
DO J=JSTA,JEND
DO I=ISTA,IEND
Expand All @@ -2679,12 +2751,16 @@ SUBROUTINE SURFCE
if(grib=='grib2') then
cfld=cfld+1
fld_info(cfld)%ifld=IAVBLFLD(IGET(784))
if (ifhr==0) then
fld_info(cfld)%ntrange=1
IF (MODELNAME == 'FV3R' .OR. MODELNAME == 'RAPR') THEN
WenMeng-NOAA marked this conversation as resolved.
Show resolved Hide resolved
if (ifhr==0) then
fld_info(cfld)%tinvstat=0
else
else
fld_info(cfld)%tinvstat=1
endif
fld_info(cfld)%ntrange=1
endif
ELSE IF (MODELNAME == 'GFS') THEN
fld_info(cfld)%tinvstat=IFHR-ID(18)
ENDIF
!$omp parallel do private(i,j,ii,jj)
do j=1,jend-jsta+1
jj = jsta+j-1
Expand All @@ -2695,7 +2771,6 @@ SUBROUTINE SURFCE
enddo
endif
ENDIF

!
! SRD
!
Expand Down
Loading