&share
wrf_core = 'ARW', max_dom = 1,
start_date = '2020-04-22_00:00:00','2017-03-01_12:00:00' end_date = '2020-05-27_00:00:00','2017-05-10_06:00:00' interval_seconds = 21600
io_form_geogrid = 2,
! The default datasets used to produce the MAXSNOALB and ALBEDO12M
! fields have changed in WPS v4.0. These fields are now interpolated
! from MODIS-based datasets.
! ! To match the output given by the default namelist.wps in WPS v3.9.1,
! the following setting for geog_data_res may be used:
! ! geog_data_res = 'maxsnowalb_ncep+albedo_ncep+default', 'maxsnowalb_ncep+albedo_ncep+default',
! !!!!!!!!!!!!!!!!!!!!!!!!!!!! IMPORTANT NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!
58
geog_data_path = '/home/user/user_WRF/Build_WRF/WPS_GEOG' !Change this to personal pathway / &ungrib remove_data_above_qc_flag = 32768 remove_unverified_data = .TRUE. / trim_domain = .TRUE. trim_value = 5 &record3
59 qc_test_vert_consistency = .TRUE. qc_test_convective_adj = .FALSE.
60 radius_influence_sfc_mult = 0.4 oa_psfc = .FALSE.
61
62
63 gq = 0.00001, 0.00001, 0.00001, if_ramping = 1,
dtramp_min = 60, grid_sfdda = 1, 0, 0,
sgfdda_inname = "wrfsfdda_d<domain>", sgfdda_end_h = 99999999,
64 diff_6th_opt = 0, 0, 0,
diff_6th_factor = 0.12, 0.12, 0.12, base_temp = 290.
damp_opt = 3,
zdamp = 5000., 5000., 5000., dampcoef = 0.2, 0.2, 0.2 khdif = 0, 0, 0, kvdif = 0, 0, 0, non_hydrostatic = .true., .true., .true., moist_adv_opt = 1, 1, 1, scalar_adv_opt = 1, 1, 1, gwd_opt = 1,
epssm = .1,
/ &bdy_control
spec_bdy_width = 5, specified = .true.
/ &grib2
/ &namelist_quilt
nio_tasks_per_group = 0,
nio_groups = 1,
/
65
Appendix B. OBSGRID scripts B.1 obs_dates.csh
obs_dates.csh
#!/bin/csh
## Run this script to rename observation files and fix the date format
## Use after downloading the data from UCAR into OBSGRID folder
## Given format: SURFACE_OBS:2021022706
## Desired format: SURFACE_OBS:2021-02-27_06
## Change dates according to your case study, if you need more than three months (or less) just copy and paste (or delete) a row
## Also change SURFACE_OBS if naming convention is different
mmv '*SURFACE_OBS:2010*' '#1SURFACE_OBS:2010-#2'
mmv '*SURFACE_OBS:2010-03*' '#1SURFACE_OBS:2010-03-#2' mmv '*SURFACE_OBS:2010-04*' '#1SURFACE_OBS:2010-05-#2'
#mmv '*SURFACE_OBS:2010-05*' '#1SURFACE_OBS:2010-05-#2'
#DO NOT touch these four rows (Only needs to be changed if you have more frequent than 6 hours)
mmv '*00' '#1_00' mmv '*06' '#1_06' mmv '*12' '#1_12' mmv '*18' '#1_18'
66
B.2 remove_oa.csh
remove_oa.csh
#!/bin/csh
## Run this script to rename metoa files and link into em_real
## Must be run inside the em_real directory to work properly. Can change pathways though
## Should not have old metoa files in the OBSGRID directory or else they will also be linked
ln -sf ~/user_WRF/OBSGRID/metoa* ~/user_WRF/WRF/test/em_real
mmv '*metoa*' '#1met#2'
rm wrfsfdda_d01 #removes the old versions rm OBS_DOMAIN101
ln -sf ~/user_WRF/OBSGRID/wrfsfdda_d01 \
~/user_WRF/WRF/test/em_real
ln -sf ~/user_WRF/OBSGRID/OBS_DOMAIN101 \
~/user_WRF/WRF/test/em_real
67
Appendix C. wind.ncl
; Example script to produce plots for a WRF real-data run,
; with the ARW coordinate dynamics option.
; Interpolating to specified pressure levels
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl" ; do NOT change WRFUserARW begin
; ; The WRF ARW input file.
; This needs to have a ".nc" appended, so just do it.
a = addfile("/home/user/user_WRF/WRF/test/em_real/wrfout_d01_2020-04-22_00:00:00.nc","r")
; We generate plots, but what kind do we prefer?
type = "x11"
; type = "pdf"
; type = "ps"
; type = "ncgm"
wks = gsn_open_wks(type,"plt_PressureLevel1")
; Set some Basic Plot options res = True
res@MainTitle = "WRF WIND SPEED PREDICTIONS"
res@Footer = False pltres = True mpres = True
mpres@mpGeophysicalLineColor = "Black"
mpres@mpNationalLineColor = "Black"
mpres@mpUSStateLineColor = "Black"
;mpres@mpGridLineColor = "Black"
mpres@mpLimbLineColor = "Black"
mpres@mpPerimLineColor = "Black"
mpres@mpGeophysicalLineThicknessF = 2.0 mpres@mpGridLineThicknessF = 2.0 mpres@mpLimbLineThicknessF = 3.0 mpres@mpNationalLineThicknessF = 2.0 mpres@mpUSStateLineThicknessF = 3.0
68
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; What times and how many time steps are in the data set?
times = wrf_user_getvar(a,"times",-1) ; get all times in the file ntimes = dimsizes(times) ; number of times in the file
; The specific pressure levels that we want the data interpolated to.
pressure_levels = (/ 850., 800.,750., 700.,600., 500.,400.,300., 200./) ; pressure levels to plot nlevels = dimsizes(pressure_levels) ; number of pressure levels
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
do it = 0,ntimes-1,1 ; TIME LOOP, change first number from 0 if not wanting to start at beginning print("Working on time: " + times(it) )
res@TimeLabel = times(it) ; Set Valid time to use on plots
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; First get the variables we will need
u = wrf_user_getvar(a,"ua",it) ; u averaged to mass points v = wrf_user_getvar(a,"va",it) ; v averaged to mass points
p = wrf_user_getvar(a, "pressure",it) ; pressure is our vertical coordinate z = wrf_user_getvar(a, "z",it) ; grid point height
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
do level = 0,nlevels-1 ; LOOP OVER LEVELS pressure = pressure_levels(level)
z_plane = wrf_user_intrp3d( z,p,"h",pressure,0.,False) u_plane = wrf_user_intrp3d( u,p,"h",pressure,0.,False) v_plane = wrf_user_intrp3d( v,p,"h",pressure,0.,False) spd = (u_plane*u_plane + v_plane*v_plane)^(0.5) ; m/sec spd@description = "Wind Speed"
spd@units = "m/s"
u_plane = u_plane
69 v_plane = v_plane
u_plane@units = "m/s"
v_plane@units = "m/s"
; Plotting options for Wind Speed ; opts = res
; opts@cnLineColor = "MediumSeaGreen"
; opts@ContourParameters = (/ 10. /)
; opts@cnInfoLabelOrthogonalPosF = 0.07 ; offset second label information ; opts@gsnContourLineThicknessesScale = 3.0
; contour_spd = wrf_contour(a,wks,spd,opts) ; delete(opts)
; Plotting options for Wind Speed opts = res
opts@cnFillOn = True opts@cnLinesOn = True opts@cnLineLabelsOn = True
opts@ContourParameters = (/ 0., 30., 5./) opts@cnLineLabelBackgroundColor = -1
;opts@gsnSpreadColorEnd = -3 ; End third from the last color in color map contour_spd = wrf_contour(a,wks,spd,opts)
delete(opts)
; Plotting options for Wind Vectors opts = res
opts@FieldTitle = "Wind" ; overwrite Field Title opts@NumVectors = 25 ; wind barb density vector = wrf_vector(a,wks,u_plane,v_plane,opts) delete(opts)
; Plotting options for Geopotential Heigh opts_z = res
opts_z@cnLineColor = "Blue"
opts_z@gsnContourLineThicknessesScale = 3.0
70 ; MAKE PLOTS
if ( pressure .eq. 600 ) then ; plot windspeed, height, wind barbs opts_z@ContourParameters = (/ 60.0 /)
contour_height = wrf_contour(a,wks, z_plane,opts_z) plot = wrf_map_overlays(a,wks,(/contour_spd, \ vector/),pltres,mpres)
end if
delete(opts_z)
end do ; END OF LEVEL LOOP
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
end do ; END OF TIME LOOP end