Skip to content

Commit

Permalink
Add three new wind farm parameterizations and their ensembles (#1944)
Browse files Browse the repository at this point in the history
TYPE: new feature

KEYWORDS: wind farm parameterization, windfarm wake option

SOURCE: Cristina Archer (UDEL), Yulong Ma(UDEL;GWA-MWF) and Ahmad Vasel-Be-Hagh(Tennessee Technological University)

DESCRIPTION OF CHANGES:
Three new wind farm parameterizations and their ensembles have been added. The key innovation of these parameterizations is their ability to directly account for the individual and overlapping sub-grid wakes of wind turbines within a wind farm. This feature was absent in the Fitch parameterization previously used in WRF. Additionally, the three parameterizations differ in their representation of wakes (e.g., top-hat or Gaussian) and their superposition methods (e.g., sum of squared deficits, squared velocities, or empirical fittings).
The new namelist option windfarm_wake_model can be used to select one of the three wind farm parameterizations, the windfarm_overlap_method namelist option can be used to select the desired wake superposition method.
We recommend to use the new wind farm parameterizations, particularly for coarse resolution, high turbine density, and wind directions aligned with the turbine columns.

LIST OF MODIFIED FILES: 
dyn_em/module_first_rk_step_part1.F
phys/module_pbl_driver.F
phys/module_physics_init.F
phys/module_wind_jensen.F
phys/Makefile
Registry/Registry.EM_COMMON
run/README.namelist

TESTS CONDUCTED: 
1. Code tested as shown in references.
2. The Jenkins tests are all passing.

RELEASE NOTE: 
This PR adds options for three new wind farm parameterizations and their ensembles to account for the individual and overlapping sub-grid wakes of wind turbines within a wind farm. It is recommended to use the new wind farm parameterizations, particularly for coarse resolution, high turbine density, and wind directions aligned with the turbine columns. References:
Ma, Yulong, Cristina L. Archer, and Ahmadreza Vasel-Be-Hagh. "The Jensen wind farm parameterization." Wind Energy Science 7.6 (2022): 2407-2431.
Ma, Yulong, Cristina L. Archer, and Ahmad Vasel‐Be‐Hagh. "Comparison of individual versus ensemble wind farm parameterizations inclusive of sub‐grid wakes for the WRF model." Wind Energy 25.9 (2022): 1573-1595.
  • Loading branch information
YulongMa authored Jan 24, 2024
1 parent 554b12c commit c50bf2a
Show file tree
Hide file tree
Showing 7 changed files with 2,170 additions and 2 deletions.
9 changes: 9 additions & 0 deletions Registry/Registry.EM_COMMON
Original file line number Diff line number Diff line change
Expand Up @@ -3369,6 +3369,8 @@ package wrfhydro wrf_hydro==1 - state:SOLDRAIN
#WRF Windfarm
package no_windfarm windfarm_opt==0 - -
package fitchscheme windfarm_opt==1 - state:power
# Yulong add for WLM
package mavscheme windfarm_opt==2 - state:power

#Ideal Cases
package realcase ideal_case==0 - -
Expand Down Expand Up @@ -3634,3 +3636,10 @@ xpose XPOSE_SPECTRAL_NUDGING dyn_em dif_analysis,dif_xxx,dif_yyy
package no_fft_used fft_used==0 - -
package any_fft_used fft_used==1 - state:t_xxx,u_xxx,ru_xxx,v_xxx,rv_xxx,w_xxx,ww_xxx,ph_xxx,dum_yyy,fourd_xxx

# Yulong add for wind wake models
# 1 = Jensen; 2 = XA; 3 = GM
rconfig integer windfarm_wake_model namelist,physics max_domains 2 rh "windfarm_wake_model" "" ""
#
# wake overlap method, M1, M2, M3, M4 [1, 2, 3, 4]
rconfig integer windfarm_overlap_method namelist,physics max_domains 4 rh "windfarm_overlap_method" "" ""
rconfig real windfarm_deg namelist,physics max_domains 0 - "windfarm_deg" "for windfarm ideal case" "degree"
2 changes: 2 additions & 0 deletions dyn_em/module_first_rk_step_part1.F
Original file line number Diff line number Diff line change
Expand Up @@ -1109,6 +1109,8 @@ SUBROUTINE first_rk_step_part1 ( grid , config_flags &
& AKHS=grid%akhs ,AKMS=grid%akms &
& ,BL_PBL_PHYSICS=config_flags%bl_pbl_physics &
& ,WINDFARM_OPT=config_flags%windfarm_opt,power=grid%power &
& ,windfarm_wake_model=config_flags%windfarm_wake_model & ! Yulong add for WLM
& ,windfarm_overlap_method=config_flags%windfarm_overlap_method & ! Yulong add for WLM
& ,BLDT=grid%bldt, CURR_SECS=curr_secs, ADAPT_STEP_FLAG=adapt_step_flag &
& ,BLDTACTTIME=grid%bldtacttime &
& ,BR=grid%br ,CHKLOWQ=chklowq ,CT=grid%ct &
Expand Down
1 change: 1 addition & 0 deletions phys/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ MODULES = \
module_fddaobs_rtfdda.o \
module_fddaobs_driver.o \
module_wind_fitch.o \
module_wind_mav.o \
module_sf_lake.o \
module_diagnostics_driver.o \
module_irrigation.o
Expand Down
52 changes: 51 additions & 1 deletion phys/module_pbl_driver.F
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ SUBROUTINE pbl_driver( &
,kpbl,mixht,ct,lh,snow,xice &
,znu, znw, mut, p_top &
,ctopo,ctopo2,windfarm_opt,power &
,windfarm_wake_model, windfarm_overlap_method &
,ysu_topdown_pblmix &
,shinhong_tke_diag &
! OPTIONAL for TEMF scheme
Expand All @@ -39,7 +40,7 @@ SUBROUTINE pbl_driver( &
,flhc,flqc &
! MYNN
,qke,Sh3d,Sm3d &
,qke_adv,bl_mynn_tkeadvect & !ACF for QKE advection
,qke_adv,bl_mynn_tkeadvect &
,tsq,qsq,cov,rmol,ch,qcg,grav_settling &
,dqke,qWT,qSHEAR,qBUOY,qDISS,tke_budget &
,bl_mynn_closure,bl_mynn_cloudpdf &
Expand Down Expand Up @@ -155,6 +156,7 @@ SUBROUTINE pbl_driver( &
CAMUWPBLSCHEME,BEPSCHEME,BEP_BEMSCHEME,MYJSFCSCHEME, &
FITCHSCHEME,SHINHONGSCHEME, &
TEMFPBLSCHEME,GBMPBLSCHEME,EEPSSCHEME,KEPSSCHEME, &
MAVSCHEME, & ! Yulong add for WLM
CAMMGMPSCHEME,p_qi,p_qni,p_qnc,param_first_scalar,& !CAMMGMPSCHEME, p_qni,p_qnc is used for camuwpbl scheme
p_qnwfa,p_qnifa,p_qnbca
#if ( WRFPLUS == 1 )
Expand All @@ -167,6 +169,7 @@ SUBROUTINE pbl_driver( &
, TEMFPBLSCHEME, GFSEDMFSCHEME &
, CAMUWPBLSCHEME &
, FITCHSCHEME, SHINHONGSCHEME &
, MAVSCHEME ! Yulong add for WLM
, GBMPBLSCHEME, MYJSFCSCHEME
#endif

Expand Down Expand Up @@ -198,6 +201,7 @@ SUBROUTINE pbl_driver( &
USE module_bl_keps
USE module_bl_fogdes
USE module_wind_fitch
USE module_wind_mav ! Yulong add for WLM
#endif

! This driver calls subroutines for the PBL parameterizations.
Expand Down Expand Up @@ -434,6 +438,9 @@ SUBROUTINE pbl_driver( &
REAL, DIMENSION( ims:ime, jms:jme ), &
INTENT(IN), OPTIONAL :: xlat_u,xlong_u,xlat_v,xlong_v

! Yulong add for WLM
INTEGER, INTENT(IN ) :: windfarm_wake_model, windfarm_overlap_method

REAL, DIMENSION( ims:ime, kms:kme ,jms:jme ), &
INTENT(IN), OPTIONAL :: w
!
Expand Down Expand Up @@ -820,6 +827,8 @@ SUBROUTINE pbl_driver( &
integer iu_bep,iurb,idiff
real seamask,thsk,zzz,unew,vnew,tnew,qnew,umom,vmom
REAL :: z0,z1,z2,w1,w2

REAL, DIMENSION( ims:ime, kms:kme, jms:jme ) :: TKE_windfarm ! Yulong add for WLM
!
! FASDAS
!
Expand Down Expand Up @@ -2062,6 +2071,47 @@ SUBROUTINE pbl_driver( &
CALL wrf_error_fatal('Lack arguments to call turbine_drag')
ENDIF

! Yulong add new wind farm schemes with wind turbine loss effect
CASE (mavscheme)
IF (PRESENT(id) .AND. &
PRESENT(z_at_w) ) THEN
CALL wrf_debug(100,'in phys/module_wind_mav.F')
CALL dragforce_mav(itimestep &
&,ID=id &
&,Z_AT_W=z_at_w,z_at_m=z,u=u_phy,v=v_phy &
&,DX=dx,DZ=dz8w,DT=dt &
&,TKE=TKE_windfarm &
&,DU=rublten,DV=rvblten &
&,WINDFARM_OPT=windfarm_opt,POWER=power &
&,windfarm_wake_model=windfarm_wake_model &
&,windfarm_overlap_method=windfarm_overlap_method &
&,xland=xland &
&,cosa=cosa,sina=sina &
&,IDS=ids,IDE=ide,JDS=jds,JDE=jde,KDS=kds,KDE=kde &
&,IMS=ims,IME=ime,JMS=jms,JME=jme,KMS=kms,KME=kme &
&,ITS=its,ITE=ite,JTS=jts,JTE=jte,KTS=kts,KTE=kte &
&)

IF (bl_mynn_tkeadvect) THEN
QKE = QKE + 2.*TKE_windfarm
qke_adv=qke
ENDIF

ELSE
WRITE ( message , FMT = '(A,6(L1,1X))' ) &
'present: '// &
'ID, '// &
'z_at_w, '// &
'xlat_u, '// &
'xlong_u, '// &
'xlat_v, '// &
'xlong_v = ' , &
PRESENT( id ) , &
PRESENT( z_at_w )
CALL wrf_debug(0,message)
CALL wrf_error_fatal('Lack arguments to call dragforce_mav')
ENDIF

END SELECT windfarm_select
#endif

Expand Down
5 changes: 5 additions & 0 deletions phys/module_physics_init.F
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ SUBROUTINE phy_init ( id, config_flags, DT, restart, zfull, zhalf, &
USE module_cam_support, ONLY : cam_mam_aerosols
#endif
USE module_wind_fitch
USE module_wind_mav ! Yulong add for WLM
IMPLICIT NONE
!-----------------------------------------------------------------
TYPE (grid_config_rec_type) :: config_flags
Expand Down Expand Up @@ -1394,6 +1395,10 @@ SUBROUTINE phy_init ( id, config_flags, DT, restart, zfull, zhalf, &
!
IF ( config_flags%windfarm_opt .EQ. 1 ) THEN
CALL init_module_wind_fitch(id,config_flags,xlong,xlat,windfarm_initialized,ims,ime,jms,jme,its,ite,jts,jte,ids,ide,jds,jde)
! --- Yulong ---
ELSEIF ( config_flags%windfarm_opt .EQ. 2 ) THEN
CALL init_module_wind_mav(id,config_flags,xlong,xlat,windfarm_initialized, &
dx,ims,ime,jms,jme,its,ite,jts,jte,ids,ide,jds,jde)
ENDIF
CALL wrf_debug ( 200 , 'module_start: phy_init: Before call to ra_init' )
Expand Down
Loading

5 comments on commit c50bf2a

@qinqin66
Copy link

@qinqin66 qinqin66 commented on c50bf2a May 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! What a good news! I have run this scheme successfully, but I found it is much slower than the fitch scheme. In my test, the fitch scheme spend 1 second to run 60s time step, but it used me 17s to run with mavscheme. I dont know why. All of tests are run with 48 cores mpirun.

@kuriasmg
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi, what was the resolution of your simulation, was it ok for 2km?

@qinqin66
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi, what was the resolution of your simulation, was it ok for 2km?

Resolution is 10 km.

@Nitrofest
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did you manage to run the scheme guys? It is not compatible with the old fitch scheme input data. It either needs a windturbine-ij.txt file or windturbines-ll.txt file, each of them require a new wf_id column. I presume it attributes the wind turbine to a particular farm, but it's not mentioned anywhere. And it's unclear to me what this separation's point is (as some farms are just co-located). In case of windturbine-ij.txt, that wf_id is not in use, but looking at the code it seems that it's only intended to be used with a single farm only. Some extra clarifications (maybe from the authors) would be greatly appreciated.

@OMGTaylor0814
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the author's paper, the MYNN scheme was also used for simulation. I would like to know if other schemes are feasible? I find it incredible that I used MYN and WFP to work, even though I couldn't find the printing information of the grid embedded in the fan in the output of RSL. But the output of power generation is not zero, and I also retrieved the appearance of the wake through visualization. So I want to know if this result is feasible?

Please sign in to comment.