####################################################################################################################################### line 1732, module_surface_driver.F !CROSMAN NOV 2009 ! Since we are not using a land surface model (LSM), but want to use model framework to input a time-varying ! heat flux, hard-wire NO latent heat flux at surface (totally dry land surface) and put a time-varying ! sensible heat flux in using sine wave wiht amplitude 12 hours. That way the heat flux peaks at 6 hours with amplitude A and ! begins and ends as zero at hours 0 and 12. ! itimestep continually increases, and since our timestep is 1 second, there are 3600 seconds in every hour DO ij = 1 , num_tiles DO j=j_start(ij),j_end(ij) DO i=i_start(ij),i_end(ij) ! hfx(i,j) = 1*itimestep/55000. ! hfx(i,j) = 1*0.15 hfx(i,j) = 0.20 !*SIN((3.14159/12.)*(itimestep/3600.)) qfx(i,j) = 0. !CROSMAN NOV 2009 ! We do not want the land surface to be "free-slip" (no friction) lower boundary layer ! condition that is the default for WRF, but since we are not using a LSM, we need to hard-wire the ! surface roughness lenght (ZNT) that is part of the formulation for the USTAR calculation that gets input into the diffusion module and the ! surface layer M-O formulation. ! Over sea, roughness length is very low (0.0001-0.00001). We will use 0.0001 ! over land, we will use value for "savannah" of 0.4 znt(i,j) = 0.4 !heat_flux = heatflux0 IF (i .le. 550) THEN count5 = -i + 550. znt = znt*(TANH(REAL(count5)/5.)) ENDIF ! CROSMAN 2009 roughness length over lake virtually zero IF ( (i .gt. 550) .and. (i .lt. 850)) THEN znt = 0.0001 ENDIF ! CROSMAN 2009 Roughness on other side of lake IF ( (i .ge. 850) ) THEN count6 = i - 850. znt = znt*(TANH(REAL(count6)/5.)) ENDIF ENDDO ENDDO ENDDO ######################################################################################################################################### line 215 module_initialize_LES.F ! CROSMAN NOV 2009 ! filling in a bogus lat-lon grid so that we can output data at a point grid%xlat(i,j) = 45. -j*0.01 grid%xlong(i,j) = -145. + i*0.01 line 234 module_initialize_LES.F ! set up the grid ! CROSMAN NOV 2009 ! Manually put in eta grid levels such that grid 2-11 are at ~ 25 m vertical resolution ! eta grid levels between 12 and 18 are ~ 35 m resolution ! eta grid levels between 19 and 28 are ~ 50 m reslolution ! eta grid levels between 29 and 58 are 100 m resolution IF (stretch_grid) THEN ! exponential stretch for eta (nearly constant dz) DO k=1, kde grid%znw(k) = (exp(-(k-1)/float(kde-1)/z_scale) - exp(-1./z_scale))/ & (1.-exp(-1./z_scale)) ENDDO ELSE DO k=1, kde grid%znw(1) = 1. grid%znw(2) = .99375 grid%znw(3) = .9875 grid%znw(4) = .98125 grid%znw(5) = .975 grid%znw(6) = .96875 grid%znw(7) = .9625 grid%znw(8) = .95625 grid%znw(9) = .95 grid%znw(10) = .94375 grid%znw(11) = .9375 grid%znw(12) = .9286 grid%znw(13) = .9196 grid%znw(14) = .9107 grid%znw(15) = .90178 grid%znw(16) = .8929 grid%znw(17) = .88392 grid%znw(18) = .875 grid%znw(19) = .8625 grid%znw(20) = .85 grid%znw(21) = .8375 grid%znw(22) = .825 grid%znw(23) = .8125 grid%znw(24) = .8 grid%znw(25) = .7875 grid%znw(26) = .775 grid%znw(27) = .7625 grid%znw(28) = .75 grid%znw(29) = .725 grid%znw(30) = .70 grid%znw(31) = .675 grid%znw(32) = .65 grid%znw(33) = .625 grid%znw(34) = .6 grid%znw(35) = .575 grid%znw(36) = .55 grid%znw(37) = .525 continues... #################################################################################################################################### Line 3384 module_diffusion.F ! CROSMAN NOV 2009 ! Modified so that the CASE (1) really uses sinusoidal "prescribed" heat flux forced in the edited surface_driver.F ! This is where "lake" is forced spatially by varying the flux across the i and j points ! cpm is taken out because the heat flux coming in from hfx is now in the same form as the CASE(0,2) above ! using the TANH function makes the heat flux have a resolved gradient at the coastline. CASE (1) ! use surface heat flux computed from surface routine (not in this case, CROSMAN 2009) DO j = j_start, j_end DO i = i_start, i_end !cpm = cp * (1. + 0.8 * moist(i,kts,j,P_QV)) !heat_flux = hfx(i,j)/cpm/rho(i,1,j) heat_flux0 = hfx(i,j) !heat_flux = heatflux0 IF (i .le. 550) THEN count1 = -i + 550. heat_flux = heat_flux0*(TANH(REAL(count1)/5.)) ENDIF ! CROSMAN 2009 Heat flux over lake virtually zero IF ( (i .gt. 550) .and. (i .lt. 850)) THEN heat_flux = 0.001*heat_flux0 ENDIF ! CROSMAN 2009 Heat flux on other side of lake IF ( (i .ge. 850) ) THEN count2 = i - 850. heat_flux = heat_flux0*(TANH(REAL(count2)/5.)) ENDIF ! old heat flux without shoreline added ! heat_flux = 0.5*heat_flux0*(TANH(REAL(i-500)/100)+1) !heat_flux = 1.0*heat_flux0 ! print*, heat_flux, i ! ELSE !heat_flux = 0.01*heat_flux0 !ENDIF rt_tendf(i,kts,j)=rt_tendf(i,kts,j) & +mu(i,j)*heat_flux*rdzw(i,kts,j) ENDDO ENDDO Line 4800 module_diffusion.F ! CROSMAN NOV 2009 ! ADDED SPATIALLY-VARYING HEAT FLUX TO THE TKE SGS MODEL PREDICTION TKE TENDENCY CASE (1) ! use surface heat flux computed from surface routine K=KTS DO j = j_start, j_end DO i = i_start, i_end ! cpm = cp * (1. + 0.8*qv(i,k,j)) heat_flux0 = hfx(i,j) ! heat_flux = (hfx(i,j)/cpm)/rho(i,k,j) !heat_flux = heatflux0 IF (i .le. 550) THEN count3 = -i + 550. heat_flux = heat_flux0*(TANH(REAL(count3)/5.)) ENDIF ! CROSMAN 2009 Heat flux over lake virtually zero IF ( (i .gt. 550) .and. (i .lt. 850)) THEN heat_flux = 0.001*heat_flux0 ENDIF ! CROSMAN 2009 Heat flux on other side of lake IF ( (i .ge. 850) ) THEN count4 = i - 850. heat_flux = heat_flux0*(TANH(REAL(count4)/5.)) ENDIF tendency(i,k,j)= tendency(i,k,j) - & mu(i,j)*((xkhv(i,k,j)*BN2(i,k,j))- (g/theta(i,k,j))*heat_flux)/2. ENDDO ENDDO ###############################################################################################################################