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

Problem With WRF-Solar Output SWDDNI and SWDDIF.

firmanshhh_13

New member
"I am running WRF-Solar with this configuration, but in the output there is no SWDNI,SWDIF, SWDOWNC and SWDDNIC variabel. There are only SWDOWN, SWDOWN2, SWDOWNC2, GLW, SWNORM and SWDNIC2. "
 

Attachments

  • namelist.input
    2.6 KB · Views: 60
Please edit the Registry/Registry.EM_COMMON file and replace
this line
state real swddni ij misc 1 - rd "SWDDNI" "Shortwave surface downward direct normal irradiance" "W m-2" ""
with this one
state real swddni ij misc 1 - rdh "SWDDNI" "Shortwave surface downward direct normal irradiance" "W m-2" ""
Note the only change is to add the h character highlighted in bold.

Do the same for the other variables you would like to have in the output.

Finally you will need to recompile WRF.
 
Hello Tim,

Thank you very much, this is very, very helpful for the research I am doing.
Hello.

Were you able to get the SWDNI,SWDIF, SWDOWNC and SWDDNIC variables by following the suggested approach? I followed the same procedure, but I could not find these variables in the wrfout file.

The following changes I have done in Registry.EM_COMMON and recompiles the WRF (I haven't reconfigured again).

# WRF-Solar
state real swddir ij misc 1 - rdh "SWDDIR" "Shortwave surface downward direct irradiance" "W m-2" ""
state real swddir2 ij misc 1 - rdh "SWDDIR2" "Shortwave surface downward direct irradiance from FARMS" "W m-2" ""
state real swddirc ij misc 1 - rdh "SWDDIRC" "Clear-sky Shortwave surface downward direct irradiance" "W m-2" ""
state real swddni ij misc 1 - rdh "SWDDNI" "Shortwave surface downward direct normal irradiance" "W m-2" ""
state real swddni2 ij misc 1 - rdh "SWDDNI2" "Shortwave surface downward direct normal irradiance from FARMS" "W m-2" ""
state real swddnic ij misc 1 - rdh "SWDDNIC" "Clear-sky Shortwave surface downward direct normal irradiance" "W m-2" ""
state real swddnic2 ij misc 1 - rhd "SWDDNIC2" "Clear-sky Shortwave surface downward direct normal irradiance from FARMS" "W/m^2" ""
state real swddif ij misc 1 - rdh "SWDDIF" "Shortwave surface downward diffuse irradiance" "W m-2" ""
state real swddif2 ij misc 1 - rdh "SWDDIF2" "Shortwave surface downward diffuse irradiance from FARMS" "W m-2" ""

Here is my namelist.input.

&time_control
start_year = 1989
start_month = 12
start_day = 31
start_hour = 00
start_minute = 00, 00, 00, 00,
start_second = 00, 00, 00, 00,
end_year = 1989
end_month = 12
end_day = 31
end_hour = 03
end_minute = 00, 00, 00, 00,
end_second = 00, 00, 00, 00,
interval_seconds = 10800
input_from_file = .true.,.true.,.true.,.true.,
history_interval = 10, 60, 15, 10,
frames_per_outfile = 10000, 1000, 1000, 1,
restart = .false.,
restart_interval = 50000,
io_form_history = 2
io_form_restart = 2
io_form_input = 2
io_form_boundary = 2
debug_level = 500
iofields_filename = "myoutfields.txt",
ignore_iofields_warning = .true.,
auxinput4_inname = "wrflowinp_d<domain>"
auxinput4_interval = 360, 360, 360, 360,
io_form_auxinput4 = 2,
/

&domains
time_step = 3,
time_step_fract_num = 0,
time_step_fract_den = 1,
use_adaptive_time_step = .true.,
step_to_output_time = .true.,
target_hcfl = .84,.84
target_cfl = 0.8,0.8,
max_step_increase_pct = 5,51
starting_time_step = -1,-1,-1,
max_time_step = -1,-1,-1,
min_time_step = -1,-1,-1,
max_dom = 1,
e_we = 256, 244, 301,
e_sn = 128, 244, 301,
e_vert = 51, 51, 51, 51,
p_top_requested = 10000,
num_metgrid_levels = 30,
num_metgrid_soil_levels = 4,
dx = 500,
dy = 500,
grid_id = 1, 2, 3, 4,
parent_id = 1, 1, 2, 3,
i_parent_start = 1, 80, 40, 90,
j_parent_start = 1, 65, 40, 15,
parent_grid_ratio = 1, 3, 3, 3,
parent_time_step_ratio = 1, 2, 3, 3,
feedback = 0,
smooth_option = 0,
max_ts_level = 51,
eta_levels = 1.0000, 0.9980, 0.9955, 0.9925, 0.9890, 0.9850,
0.9805, 0.9755, 0.9700, 0.9640, 0.9575, 0.9505,
0.9430, 0.9350, 0.9265, 0.9170, 0.9060, 0.8930,
0.8775, 0.8590, 0.8363, 0.8104, 0.7803, 0.7456,
0.7059, 0.6615, 0.6126, 0.5594, 0.5041, 0.4479,
0.3919, 0.3384, 0.2897, 0.2474, 0.2107, 0.1792,
0.1523, 0.1293, 0.1093, 0.0917, 0.0763, 0.0629,
0.0513, 0.0413, 0.0328, 0.0255, 0.0194, 0.0144,
0.0104, 0.0071, 0.0000,
/

&physics
mp_physics = 4, 4, 4, 4,
ra_lw_physics = 4, 4, 4, 4,
ra_sw_physics = 4, 4, 4, 4,
radt = 1, 3, 1, 1,
sf_sfclay_physics = 1, 1, 1, 5,
sf_surface_physics = 2, 2, 2, 2,
bl_pbl_physics = 11, 11, 11, 5,
mfshconv = 0, 0, 0, 0,
bldt = 0, 0, 0, 0,
cu_physics = 1, 1, 0, 0,
cudt = 5, 5, 5, 5,
isfflx = 1,
ifsnow = 0,
icloud = 1,
surface_input_source = 1,
num_soil_layers = 4,
sf_urban_physics = 0,
maxiens = 1,
maxens = 3,
maxens2 = 3,
maxens3 = 16,
ensdim = 144,
windfarm_opt = 0, 1, 1, 1,
sst_update = 1,
swint_opt = 2,
aer_opt = 1,
/

&fdda
grid_fdda = 1, 1, 1, 1,
gfdda_inname = "wrffdda_d<domain>"
gfdda_interval_m = 360, 360, 360, 360,
gfdda_end_h = 336, 336, 336, 336,
io_form_gfdda = 2,
fgdt = 0, 0, 0, 0,
if_zfac_uv = 1, 1, 1, 1,
if_zfac_t = 1, 1, 1, 1,
if_zfac_q = 1, 1, 1, 1,
k_zfac_uv = 23, 23, 23, 23,
k_zfac_t = 23, 23, 23, 23,
k_zfac_q = 23, 23, 23, 23,
guv = 0.0003, 0.0003, 0.0003, 0.0003,
gt = 0.0003, 0.0003, 0.0003, 0.0003,
gq = 0.0003, 0.0003, 0.0003, 0.0003,
if_ramping = 0,
dtramp_min = 60.0,
/

&dynamics
w_damping = 0,
diff_opt = 1, 1, 1, 1,
km_opt = 4, 4, 4, 4,
diff_6th_opt = 0, 0, 0, 0,
diff_6th_factor = 0.12, 0.12, 0.12, 0.12,
base_temp = 290.
damp_opt = 0,
zdamp = 5000., 5000., 5000., 5000.,
dampcoef = 0.2, 0.2, 0.2, 0.2,
khdif = 0, 0, 0, 0,
kvdif = 0, 0, 0, 0,
non_hydrostatic = .true., .true., .true., .true.,
moist_adv_opt = 1, 1, 1, 1,
scalar_adv_opt = 1, 1, 1, 1,
/

&bdy_control
spec_bdy_width = 5,
spec_zone = 1,
relax_zone = 4,
specified = .true., .false.,.false.,.false.,
nested = .false., .true., .true.,.true.,
/

&grib2
/

&namelist_quilt
nio_tasks_per_group = 0,
nio_groups = 1,
/

&diags
solar_diagnostics = 1,
/
 
Last edited:
After you make changes in Registry, please recompile the entire model system, i.e.,

./clean -a
./configure
./compile em_real

Then rerun the case. I suppose you should have all the variables in wrfout.
 
Hello.

Were you able to get the SWDNI,SWDIF, SWDOWNC and SWDDNIC variables by following the suggested approach? I followed the same procedure, but I could not find these variables in the wrfout file.

The following changes I have done in Registry.EM_COMMON and recompiles the WRF (I haven't reconfigured again).

# WRF-Solar
state real swddir ij misc 1 - rdh "SWDDIR" "Shortwave surface downward direct irradiance" "W m-2" ""
state real swddir2 ij misc 1 - rdh "SWDDIR2" "Shortwave surface downward direct irradiance from FARMS" "W m-2" ""
state real swddirc ij misc 1 - rdh "SWDDIRC" "Clear-sky Shortwave surface downward direct irradiance" "W m-2" ""
state real swddni ij misc 1 - rdh "SWDDNI" "Shortwave surface downward direct normal irradiance" "W m-2" ""
state real swddni2 ij misc 1 - rdh "SWDDNI2" "Shortwave surface downward direct normal irradiance from FARMS" "W m-2" ""
state real swddnic ij misc 1 - rdh "SWDDNIC" "Clear-sky Shortwave surface downward direct normal irradiance" "W m-2" ""
state real swddnic2 ij misc 1 - rhd "SWDDNIC2" "Clear-sky Shortwave surface downward direct normal irradiance from FARMS" "W/m^2" ""
state real swddif ij misc 1 - rdh "SWDDIF" "Shortwave surface downward diffuse irradiance" "W m-2" ""
state real swddif2 ij misc 1 - rdh "SWDDIF2" "Shortwave surface downward diffuse irradiance from FARMS" "W m-2" ""

Here is my namelist.input.

&time_control
start_year = 1989
start_month = 12
start_day = 31
start_hour = 00
start_minute = 00, 00, 00, 00,
start_second = 00, 00, 00, 00,
end_year = 1989
end_month = 12
end_day = 31
end_hour = 03
end_minute = 00, 00, 00, 00,
end_second = 00, 00, 00, 00,
interval_seconds = 10800
input_from_file = .true.,.true.,.true.,.true.,
history_interval = 10, 60, 15, 10,
frames_per_outfile = 10000, 1000, 1000, 1,
restart = .false.,
restart_interval = 50000,
io_form_history = 2
io_form_restart = 2
io_form_input = 2
io_form_boundary = 2
debug_level = 500
iofields_filename = "myoutfields.txt",
ignore_iofields_warning = .true.,
auxinput4_inname = "wrflowinp_d<domain>"
auxinput4_interval = 360, 360, 360, 360,
io_form_auxinput4 = 2,
/

&domains
time_step = 3,
time_step_fract_num = 0,
time_step_fract_den = 1,
use_adaptive_time_step = .true.,
step_to_output_time = .true.,
target_hcfl = .84,.84
target_cfl = 0.8,0.8,
max_step_increase_pct = 5,51
starting_time_step = -1,-1,-1,
max_time_step = -1,-1,-1,
min_time_step = -1,-1,-1,
max_dom = 1,
e_we = 256, 244, 301,
e_sn = 128, 244, 301,
e_vert = 51, 51, 51, 51,
p_top_requested = 10000,
num_metgrid_levels = 30,
num_metgrid_soil_levels = 4,
dx = 500,
dy = 500,
grid_id = 1, 2, 3, 4,
parent_id = 1, 1, 2, 3,
i_parent_start = 1, 80, 40, 90,
j_parent_start = 1, 65, 40, 15,
parent_grid_ratio = 1, 3, 3, 3,
parent_time_step_ratio = 1, 2, 3, 3,
feedback = 0,
smooth_option = 0,
max_ts_level = 51,
eta_levels = 1.0000, 0.9980, 0.9955, 0.9925, 0.9890, 0.9850,
0.9805, 0.9755, 0.9700, 0.9640, 0.9575, 0.9505,
0.9430, 0.9350, 0.9265, 0.9170, 0.9060, 0.8930,
0.8775, 0.8590, 0.8363, 0.8104, 0.7803, 0.7456,
0.7059, 0.6615, 0.6126, 0.5594, 0.5041, 0.4479,
0.3919, 0.3384, 0.2897, 0.2474, 0.2107, 0.1792,
0.1523, 0.1293, 0.1093, 0.0917, 0.0763, 0.0629,
0.0513, 0.0413, 0.0328, 0.0255, 0.0194, 0.0144,
0.0104, 0.0071, 0.0000,
/

&physics
mp_physics = 4, 4, 4, 4,
ra_lw_physics = 4, 4, 4, 4,
ra_sw_physics = 4, 4, 4, 4,
radt = 1, 3, 1, 1,
sf_sfclay_physics = 1, 1, 1, 5,
sf_surface_physics = 2, 2, 2, 2,
bl_pbl_physics = 11, 11, 11, 5,
mfshconv = 0, 0, 0, 0,
bldt = 0, 0, 0, 0,
cu_physics = 1, 1, 0, 0,
cudt = 5, 5, 5, 5,
isfflx = 1,
ifsnow = 0,
icloud = 1,
surface_input_source = 1,
num_soil_layers = 4,
sf_urban_physics = 0,
maxiens = 1,
maxens = 3,
maxens2 = 3,
maxens3 = 16,
ensdim = 144,
windfarm_opt = 0, 1, 1, 1,
sst_update = 1,
swint_opt = 2,
aer_opt = 1,
/

&fdda
grid_fdda = 1, 1, 1, 1,
gfdda_inname = "wrffdda_d<domain>"
gfdda_interval_m = 360, 360, 360, 360,
gfdda_end_h = 336, 336, 336, 336,
io_form_gfdda = 2,
fgdt = 0, 0, 0, 0,
if_zfac_uv = 1, 1, 1, 1,
if_zfac_t = 1, 1, 1, 1,
if_zfac_q = 1, 1, 1, 1,
k_zfac_uv = 23, 23, 23, 23,
k_zfac_t = 23, 23, 23, 23,
k_zfac_q = 23, 23, 23, 23,
guv = 0.0003, 0.0003, 0.0003, 0.0003,
gt = 0.0003, 0.0003, 0.0003, 0.0003,
gq = 0.0003, 0.0003, 0.0003, 0.0003,
if_ramping = 0,
dtramp_min = 60.0,
/

&dynamics
w_damping = 0,
diff_opt = 1, 1, 1, 1,
km_opt = 4, 4, 4, 4,
diff_6th_opt = 0, 0, 0, 0,
diff_6th_factor = 0.12, 0.12, 0.12, 0.12,
base_temp = 290.
damp_opt = 0,
zdamp = 5000., 5000., 5000., 5000.,
dampcoef = 0.2, 0.2, 0.2, 0.2,
khdif = 0, 0, 0, 0,
kvdif = 0, 0, 0, 0,
non_hydrostatic = .true., .true., .true., .true.,
moist_adv_opt = 1, 1, 1, 1,
scalar_adv_opt = 1, 1, 1, 1,
/

&bdy_control
spec_bdy_width = 5,
spec_zone = 1,
relax_zone = 4,
specified = .true., .false.,.false.,.false.,
nested = .false., .true., .true.,.true.,
/

&grib2
/

&namelist_quilt
nio_tasks_per_group = 0,
nio_groups = 1,
/

&diags
solar_diagnostics = 1,
/
I have the same difficulty printing SWDDIF2,SWDDIR2 variables. Did you manage to solve?
 
Please edit the Registry/Registry.EM_COMMON file and replace
this line
state real swddni ij misc 1 - rd "SWDDNI" "Shortwave surface downward direct normal irradiance" "W m-2" ""
with this one
state real swddni ij misc 1 - rdh "SWDDNI" "Shortwave surface downward direct normal irradiance" "W m-2" ""
Note the only change is to add the h character highlighted in bold.

Do the same for the other variables you would like to have in the output.

Finally you will need to recompile WRF.
I did exactly that and did not get it from my output. Am I doing it wrong?
 
Which radiation scheme did you use in your case? Note that some variables are not available for all radiation schemes. For example, SWDDNI is only available in CAM, Goddard, RRTMG, and FLW radiation schemes. Please make sure you use the correct radiation options.
 
Top