Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Values update in PV parameterization

integer,intent(in) :: nz !Maximum number of vertical levels in the urban grid
real,intent(in) :: bl !Building length [m]
real,intent(in) :: bw !Building width [m]
real,intent(in) :: albr !albedo of the roof (ext.)
real,intent(in) :: emr !emissivity of the roof (ext.)
real,intent(in) :: rs !external short wave radiation [W/m2]
real,intent(in) :: rl !external long wave radiation [W/m2]
real,intent(in) :: tr !roof surface temperature [K]
real,intent(in) :: pv_frac_roof ! fraction of PV []
real,intent(in) :: sigma !Stefan-Boltzmann constant [W/m2.K4]
real,intent(in),dimension(1:nz) :: tair !external temperature [K]
integer,intent(in) :: n !number of floors in the building
real,intent(in), dimension(1:nz) :: uout
real,intent(in), dimension(1:nz) :: vout
real,intent(in) :: dt
real,intent(in) :: swddif
! Output variables
!
real,intent(inout) :: hspv ! Sensible heat flux from the PV panels to the atmosphere [W/m2]
real,intent(inout) :: eppv ! Electricity production from PV panels [W]
real,intent(inout) :: tpv !Temperature of the PV panels [K]
!
! Local variables
!
real,parameter :: albpv=0.11 ! albedo of the PV panels
real,parameter :: empv_down=0.95 ! emissivity of the PV panels
real,parameter :: empv_up=0.79
real, parameter :: T_amb=25
real, parameter :: tiltangle=0.
real, parameter :: a=3.8
real, parameter :: b=6.9

real, parameter :: r1=2330.
real, parameter :: r2=1200.
real, parameter :: r3=3000.
real, parameter :: c1=677.
real, parameter :: c2=1250.
real, parameter :: c3=500.
real, parameter :: d1=0.0003
real, parameter :: d2=0.0005
real, parameter :: d3=0.003
real, parameter :: F12=1.
real :: lwuppv !Long-wave emitted by the PV panels to the sky [W/m2]
real :: lwdwr !Long-wave incoming radiation on the roof [W/m2]
real :: lwupr !Long-wave coming up from the roof intercepted by the PV panels [W/m2]
real :: enerpv !Energy produced by PV panels [W/m2]
real :: hc
real :: sw_d
real :: lw_d
real :: lwpv_out
real :: tpv_new
real :: hdown
real :: hup
real :: deltat
real :: uroof
real :: hrad
real :: Cm
real :: hf
Cm=r1*c1*d1+r2*c2*d2+r3*c3*d3
hrad=sigma/((1-empv_down)/empv_down+1/F12+(1-emr)/emr)
uroof=(uout(n+1)**2+vout(n+1)**2)**0.5
deltat=tpv-tair(n+1)
hf=2.5*(40./100.*uroof)**(0.5)
hc=9.482*abs(deltat)**(1./3.)/(7.238-abs(cos(tiltangle)))
hup=sqrt(hc**2.+(hf)**2.)
hc=1.810*abs(deltat)**(1./3.)/(1.382+abs(cos(tiltangle)))
hdown=sqrt(hc**2.+(hf)**2.)
enerpv=effpv*rs*min(1.,1.-0.005*(tpv-(T_amb+273.15)))
sw_d=(1-albpv)*(rs)
lw_d=empv_up*rl
lwpv_out=empv_up*sigma*tpv**4.
lwupr=hrad*(tr**4-tpv**4.)
hspv=(hup+hdown)*(tpv-tair(n+1))
tpv=tpv+(sw_d+lw_d-lwpv_out+lwupr-hspv-enerpv)/Cm*dt
eppv=enerpv*pv_frac_roof*bl*bw
return
end subroutine hsfluxpv


i wanted to know if Tair is taken from boundry condition or simulation results
 
Please see whether the following two papers can be helpful:

Salamanca, F., and A. Martilli, 2010: A new building energy model coupled with an urban canopy parameterization for urban climate simulations––part II. Validation with one dimension off–line simulations. Theor. Appl. Climatol., 99, 345–356.
doi:10.1007/s00704-009-0143-8


Martilli A, Clappier A, and Rotach M.W., 2002: An urban surface exchange parameterization for mesoscale models. Bound.-Layer Meteorol., 104, 261–304.
doi:10.1023/A:1016099921195
 
tpv=tpv+(sw_d+lw_d-lwpv_out+lwupr-hspv-enerpv)/Cm*dt

I am looking for how this tpv is being saved and given as T_PV_URB3D as output, and later model calls in back in subroutine.
Since i am planning to add new global varaible so i wanted to know which files are exactly being used
 
Please look at the codes below, which involves the calculation of T_PV_URB3D

phys/module_sf_bep_bem.F,

phys/module_sf_noahdrv.F,

phys/module_sf_urban.F

It is finally passed to

phys/module_surface_driver.F and output as a state variable.
 
in subroutine T_PV_URB3D is wither called as tpv or tp_print. in which file tpv=T_PV_URB3D is declared.

I have sorted changes in all other files except phys/module_sf_bep_bem.F,
 
After changing my main subroutine I have edited all these file. but I am getting error in surface driver file. I have added two variables T_pcm and pcm_X
 

Attachments

  • module_physics_init.F
    281.1 KB · Views: 0
  • module_sf_bep_bem.F
    212.9 KB · Views: 0
  • module_sf_noahdrv.F
    251.1 KB · Views: 0
  • module_sf_urban.F
    167.1 KB · Views: 0
  • module_surface_driver.F
    385.4 KB · Views: 0
Are you able to compile WRF with these modified codes?

If so, what is the error message when you run wrf.exe?
 
Top