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

modify module_mp_lin.F

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

maosier

New member
Dear,

I want to fix the qndrop variable to a constant value, thus I made some modifications in module_mp_lin.F using mp_physics=2:

IF (flag_qndrop .AND. PRESENT( qndrop )) THEN
DO k = kts, kte
qndropz(k)=qndrop(i,k,j)
ENDDO
ELSE
DO k = kts, kte
qndropz(k)=qndropconst
ENDDO
ENDIF

change to :
IF (flag_qndrop .AND. PRESENT( qndrop )) THEN
DO k = kts, kte
qndropz(k)=qndropconst
ENDDO
ELSE
DO k = kts, kte
qndropz(k)=qndropconst
ENDDO
ENDIF

Then I recompiled WRF again, however the qndrop variable is still not a constant value. Is there something wrong? Below is my namelist.

&time_control
run_days = 1,
run_hours = 0,
run_minutes = 0,
run_seconds = 0,
start_year = 2017, 2017, 2017, 2017,
start_month = 09, 09, 09, 09,
start_day = 24, 24, 24, 24,
start_hour = 00, 00, 00, 00,
end_year = 2017, 2017, 2017, 2017,
end_month = 09, 09, 09, 09,
end_day = 25, 25, 25, 25,
end_hour = 00, 00, 00, 00,
interval_seconds = 21600,
input_from_file = .true.,.false.,.false.,
history_interval = 60, 60, 60,
frames_per_outfile = 24, !specify output num!72, 1000, 1000,
restart = .false.,
restart_interval = 1440,
write_hist_at_0h_rst = .true.,
io_form_history = 2, !no wrfout if set to 0
io_form_restart = 0
io_form_input = 2,
io_form_boundary = 2,
io_form_auxinput4 = 0, !lowinp
io_form_auxinput5 = 2, !anthropogenic emissions
io_form_auxinput6 = 2, !MEGAN input
io_form_auxinput12 = 2, !initial condition
auxinput1_inname = "met_em.d<domain>.<date>",
auxinput4_inname = "wrflowinp_d<domain>",
auxinput6_inname = "wrfbiochemi_d01",
auxinput12_inname = "wrf_chem_input",
auxinput5_interval_m = 60, 86400, 60,
frames_per_auxinput5 = 1,
iofields_filename = "my_file_d01.txt",
!io_form_auxhist24 = 2,
!auxhist24_interval = 60,
!debug_level = 100,
/


&domains
time_step = 180,
time_step_fract_num = 0,
time_step_fract_den = 1,
max_dom = 1,
e_we = 173, 41, 94,
e_sn = 128, 41, 91,
e_vert = 24, 31, 28,
num_metgrid_levels = 32,
num_metgrid_soil_levels = 4,
dx = 36000, 4000, 3333.33,
dy = 36000, 4000, 3333.33,
grid_id = 1, 2, 3,
parent_id = 0, 1, 2,
i_parent_start = 1, 6, 30,
j_parent_start = 1, 65, 30,
parent_grid_ratio = 1, 5, 3,
parent_time_step_ratio = 1, 5, 3,
p_top_requested = 10000,
feedback = 0,
smooth_option = 0,
zap_close_levels = 500,
eta_levels = 1.000,0.995,0.988,0.980,0.970,0.956,0.938,0.916,0.893,0.868,0.839,0.808,0.777,0.744,0.702,0.648,0.582,0.500,0.400,0.300,0.200,0.120,0.052,0.000
/

&physics
mp_physics = 2,
mp_zero_out = 2,
mp_zero_out_thresh = 1.e-8,
progn = 1,
ra_lw_physics = 4,
ra_sw_physics = 4,
radt = 30,
sf_sfclay_physics = 1, 1, 1,
sf_surface_physics = 2, 2, 1,
bl_pbl_physics = 1, 1, 1,
bldt = 0, 0, 0,
cu_physics = 3, 5, 0,
cu_diag = 1,
cudt = 0, 0, 0,
cugd_avedx = 1,
isfflx = 1,
icloud = 1,
surface_input_source = 3,
num_soil_layers = 4,
sf_urban_physics = 1, 0, 0,
maxiens = 1,
maxens = 3,
maxens2 = 3,
maxens3 = 16,
ensdim = 144,
cu_rad_feedback = .true.,
sst_update = 0,
num_land_cat = 21,
topo_wind = 1,
/

&fdda !add wind vector grid nudging in PBL
grid_fdda = 1,
gfdda_inname = "wrffdda_d<domain>",
gfdda_interval_m = 360,
gfdda_end_h = 132,
io_form_gfdda = 2,
if_no_pbl_nudging_uv = 0,
if_no_pbl_nudging_t = 1,
if_no_pbl_nudging_q = 1,
if_zfac_uv = 0
k_zfac_uv = 10
if_zfac_t = 0
k_zfac_t = 10
if_zfac_q = 0
k_zfac_q = 10
guv = 0.0003
gt = 0.0003
gq = 0.00001
if_ramping = 0
dtramp_min = 60.0,
/

!Diffusion, damping options, advection options
&dynamics
rk_ord = 3,
diff_opt = 1,
km_opt = 4,
damp_opt = 0,
diff_6th_opt = 0,
diff_6th_factor = 0.12,
zdamp = 5000., 5000., 5000.,
w_damping = 0,
base_temp = 290.
khdif = 3000, 0, 0,
kvdif = 100, 0, 0,
smdiv = 0.1,
emdiv = 0.01,
epssm = 0.1,
non_hydrostatic = .true., .true., .true.,
moist_adv_opt = 2,
scalar_adv_opt = 2,
chem_adv_opt = 2,
tke_adv_opt = 2,
/

!boundary condition control
&bdy_control
spec_bdy_width = 5,
spec_zone = 1,
relax_zone = 4,
specified = .true., .false.,.false.,
/

&grib2
/

&namelist_quilt
nio_tasks_per_group = 0,
nio_groups = 1,
/

&chem
kemit = 7,
chem_opt = 9
bioemdt = 30,
photdt = 30,
chemdt = 1,
io_style_emissions = 2,
emiss_inpt_opt = 101,
emiss_opt = 4, 0,
chem_in_opt = 1, 0,
phot_opt = 2,
gas_drydep_opt = 1,
aer_drydep_opt = 1,
bio_emiss_opt = 3
ne_area = 200
dust_opt = 3,
dmsemis_opt = 0,
seas_opt = 0,
!depo_fact = 0.25
gas_bc_opt = 1
gas_ic_opt = 1
aer_bc_opt = 1, 0,
aer_ic_opt = 1, 0,
gaschem_onoff = 1, 0,
aerchem_onoff = 1, 0,
wetscav_onoff = 1,
cldchem_onoff = 1, 0,
vertmix_onoff = 1, 0,
chem_conv_tr = 1, 0,
have_bcs_chem = .true.,
aer_ra_feedback = 1,
aer_op_opt = 1,
opt_pars_out = 1,
diagnostic_chem = 1,
chemdiag = 1,
/

Best regards
Maosier
 
Hi Maosier.
I take a quick look at the code phys/module_mp_lin.F. QNDROPZ is a local variable that is updated in the subroutine "clphy1d". Therefore, even if you specify constant value to this variable at the right beginning of the subroutine "lin_et_al", it will be changed later once "clphy1d" is called.
 
Top