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

Query on the namelist.input file for running WRF-Chem using two domains

Ankan

Member
Dear all,
I have gone through the WRF-Chem User's Guide and I have some queries on the namelist.input file before running wrf.exe.

1. 'Kemit' is either 1 or 8 on the sample name list in the tutorials provided on the WRF-Chem official website. I am using the EDGARv5_MOZART_dataset (from EDGAR v5.0 emissions inventory speciated for the MOZART chemical mechanism). So, what should I use? kemit=1 or kemit=8?

2. It is mentioned in the tutorial presentation named 'Best Practices for Applying WRF-Chem 3.9.1.1' given on the official webpage that if I am using FINN fire emission dataset then I also have to set 'scale_fire_emiss = .true.'. I checked the Registry/registry.chem and saw that it is mentioned 'max domain' beside this option. That means it should be set for both the domains. So, my question is what should I set? Should I set true for the both domain i.e., 'scale_fire_emiss = .true., .true.'? Or should I set true for parent domain and false for nested domain i.e., 'scale_fire_emiss = .true., .false.'?
3. In the page 34 of 'WRF-Chem Version 3.9.1.1 User’s Guide', the following lines are written:
"These files are named:ubvals_b40.20th.track1_1950-1959.nc, ubvals_b40.20th.track1_1980-1989.nc, ubvals_b40.20th.track1_1996-2005.nc, and ubvals_rcp4_5.2deg_2020-2029.nc where the years used to produce the climatology are specified in the file names. Additional output variables are included in the model when using the upper boundary conditions. These tropopause diagnostics (TROPO_P, TROPO_Z, TROPO_LEV) are listed in the registry and a user should verify that they will included in the output file before running the model."
I have 'clim_p_trop.nc' and 'ubvals_*' files. But, I don't understand the last two lines. Do I need another output files 'tropopause diagnostics'? Or are these already included in the 'ubvals_*' files?

4. I checked the registry.chem and found this:

rconfig character trop_lev_inname namelist,chem 1 "clim_p_trop.nc" h "name of trop lev infile" "" ""

Is it necessary to include the 'trop_lev_inname' variable in the namelist?
5. If I have two domains, then what should I set for the variables 'have_bcs_chem' and 'have_bcs_upper' for nested domain? Should I set 'true' or Should I set 'false'? That means which should be the correct way:
have_bcs_chem = .true., .true.,
have_bcs_upper = .true., .true.,

or,
have_bcs_chem = .true., .false.,
have_bcs_upper = .true., .false., ?

Can anyone please guide me about this? That will be greatly appreciated. Thank you.

With regards,

Ankan
 
Hi Ankan,

1) You need to use whatever the dimension is in your wrfchemi_* files.
2) I don't know the specifics of your experiment, but I would assume you'd want to do the same thing to both domains.
3) No, ubvals* and clim_p_trop.nc are input files. Look in the registry, you'll find the TROPO* variables there indicated they are WRF variables. To output, you need to add an "h" to add to the history stream (and ./clean -a and recompile) or add the fields to your my_iofields file.
4) No, all namelist options have a default value. If you have a file with a name different to that, you need to change the namelist. Please look through the WRF tutorials to understand the how the registry works if you are unclear.
5) Again, I don't know the specifics of your simulation. Do you want the the inner domain to receive BCs from the outer domain? Do you have upper boundary conditions for both domains? Please read the userguide to understand how nested domains work.

Jordan
 
Hello @jordanschnell,
Thank you for your response. How can I know the vertical dimension of my wrfchemi_* files? Is there a command or another way to find out? I didn't understand these lines "To output, you need to add an "h" to add to the history stream (and ./clean -a and recompile) or add the fields to your my_iofields file". Can you please illustrate a little bit more? And I want the inner domain to receive BCs from the outer domain. I checked my output from mozbc run, and these lines are written there:
main_bc_wrfchem: can only set boundary conditions for domain 1
main_bc_wrfchem: will set initial condition in wrfinput_d02
So what should I set?
have_bcs_chem = .true., .false.,

Can you please clarify these? That will help me a lot. Thank you.
With regards,
Ankan
 
Last edited:
Hi Ankan,

There are many tools you can use to examine netcdf files (e.g., ncdump, ncview, python, MATLAB) and it is almost crucial for you to understand how to view and/or manipulate them.

To add to the history stream, e.g., in Registry/registry.chem, change:

state real tropo_p ij misc 1 - r "tropo_p" "Tropopause pressure" "Pa"
to
state real tropo_p ij misc 1 - rh "tropo_p" "Tropopause pressure" "Pa"

Please search the user guides and tutorials. The option to use a my_io file is described in the WRF user guide.

MOZBC puts chemical information at the boundaries of your outer domain (d01) and the initial conditions of d02. If you want d01 to inform d02, you need to tell the model d02 has BCs also, i.e., have_bcs_chem = .true., .true.,

Please continue to utilize the tutorials and user guides.

Jordan
 
Hello @jordanschnell,
Thank you for the response. I just want a little clarification about the TROPO* variables. Is it sufficient to simply insert "h" between the lines "state real tropo_p ij misc 1 - r "tropo_p" "Tropopause pressure" "Pa"? Or do I need to run "./clean -a" and recompile WRF-Chem after that? And if I add the fields to my_iofields, then is there any need to insert "h" also in registry.chem? I found this in the WRF User's Guide:
iofields_filename (max_dom) "my_iofields_list.txt" an option to request particular variables to appear in output, if they are not already, or to not appear if they do and you do not want them to. You must also create a text file (my_iofields_list.txt) in which you will declare the variables to be output. It will be a single line of text, e.g.:+:h:7:RAINC,RAINNC or -:h:0:RAINC,RAINNC
You were talking about this. Right? If it is, then does that mean I have to create a text file that contains only a single line "+:h:TROPO_P, TROPO_Z, TROPO_LEV"? I don't understand the number "7" in "+:h:7:RAINC, RAINNC.". What does it mean? What should I give for TROPO* variables then?

With regards,
Ankan
 
Last edited:
Hello @jordanschnell,
Can you please clarify just my last question when you will be available? That will be very helpful for me. Thank you in advance for your time.
With regards,
Ankan
 
Hi Ankan,

You only need to do one or the other (i.e., add an 'h' or create a my_iofields file).

If you use the h in the registry, you will need to "./clean -a" and recompile.
If you use the iofields option, yes, you will need to create a file with at least these lines in it to get those three variables.

+:h:#:TROPO_P, TROPO_Z, TROPO_LEV

where "#" is the history stream value (typically 0, but you could use 7).

You can add any variables to this as you'd like.

Whatever you name the file, you just need to add that to the namelist.

Jordan
 
Hi Ankan,

You only need to do one or the other (i.e., add an 'h' or create a my_iofields file).

If you use the h in the registry, you will need to "./clean -a" and recompile.
If you use the iofields option, yes, you will need to create a file with at least these lines in it to get those three variables.

+:h:#:TROPO_P, TROPO_Z, TROPO_LEV

where "#" is the history stream value (typically 0, but you could use 7).

You can add any variables to this as you'd like.

Whatever you name the file, you just need to add that to the namelist.

Jordan
Thanks a lot Jordan for the clarification. Thank you so much.
Regards,
Ankan
 
Hello @jordanschnell,
I am running wrf.exe after adding the following line in the '&time_control' section of the 'namelist.input' file:
iofields_filename = 'my_iofields_list.txt', 'my_iofields_list.txt',
When I checked rsl.error file, I saw these lines:
Domain 1 Setting history stream 7 for tropo_p
W A R N I N G : Unable to modify mask for tropo_z. Variable not found. File: my_iofields_list.txt at line 1
W A R N I N G : Unable to modify mask for tropo_lev. Variable not found. File: my_iofields_list.txt at line 1
W A R N I N G : Unable to modify mask for tropo_lev. Variable not found. File: my_iofields_list.txt at line 1
Ignoring problems reading my_iofields_list.txt
Continuing. To make this a fatal error, set ignore_iofields_warn to false in namelist

Again, after some lines (after reading 'ubvals_b40.20th.track1_1996-2005.nc' and 'clim_p_trop.nc' files), I saw these lines:
d01 2015-12-22_00:00:00 alloc_space_field: domain 2 , 81260436 bytes allocated
d01 2015-12-22_00:00:00 alloc_space_field: domain 2 , 1923439020 bytes allocated
d01 2015-12-22_00:00:00 *** Initializing nest domain # 2 from an input file. ***
d01 2015-12-22_00:00:00 med_initialdata_input: calling input_input
Domain 2 Setting history stream 7 for tropo_p
W A R N I N G : Unable to modify mask for tropo_z. Variable not found. File: my_iofields_list.txt at line 1
W A R N I N G : Unable to modify mask for tropo_lev. Variable not found. File: my_iofields_list.txt at line 1

Again, after some lines, these lines appear:
d01 2015-12-22_00:00:00 call upper boundary initialization
W A R N I N G : Unable to modify mask for tropo_z. Variable not found. File: my_iofields_list.txt at line 1
W A R N I N G : Unable to modify mask for tropo_lev. Variable not found. File: my_iofields_list.txt at line 1
W A R N I N G : Unable to modify mask for tropo_z. Variable not found. File: my_iofields_list.txt at line 1
W A R N I N G : Unable to modify mask for tropo_lev. Variable not found. File: my_iofields_list.txt at line 1
Timing for Writing /data/ANKAN/MODELOUTPUT/wrfout_d01_2015-12-22_00:00:00 for domain 1: 44.77866 elapsed seconds
mediation_integrate: med_read_wrf_chem_emissions: Read emissions for time 2015-12-22_00:00:00
mediation_integrate: med_read_wrf_chem_emissions: Open file wrfchemi_d01_2015-12-22_00:00:00
W A R N I N G : Unable to modify mask for tropo_z. Variable not found. File: my_iofields_list.txt at line 1
W A R N I N G : Unable to modify mask for tropo_lev. Variable not found. File: my_iofields_list.txt at line 1
W A R N I N G : Unable to modify mask for tropo_z. Variable not found. File: my_iofields_list.txt at line 1
W A R N I N G : Unable to modify mask for tropo_lev. Variable not found. File: my_iofields_list.txt at line 1
W A R N I N G : Unable to modify mask for tropo_z. Variable not found. File: my_iofields_list.txt at line 1
W A R N I N G : Unable to modify mask for tropo_lev. Variable not found. File: my_iofields_list.txt at line 1
d01 2015-12-22_00:00:00 Input data processed for aux input 6 for domain 1
W A R N I N G : Unable to modify mask for tropo_z. Variable not found. File: my_iofields_list.txt at line 1
W A R N I N G : Unable to modify mask for tropo_lev. Variable not found. File: my_iofields_list.txt at line 1
W A R N I N G : Unable to modify mask for tropo_z. Variable not found. File: my_iofields_list.txt at line 1
W A R N I N G : Unable to modify mask for tropo_lev. Variable not found. File: my_iofields_list.txt at line 1
W A R N I N G : Unable to modify mask for tropo_z. Variable not found. File: my_iofields_list.txt at line 1
W A R N I N G : Unable to modify mask for tropo_lev. Variable not found. File: my_iofields_list.txt at line 1
Timing for processing lateral boundary for domain 1: 1.92949 elapsed seconds

Can you tell me why it is occurring and how to resolve it? Is my 'my_iofields_list.txt' file wrong? I am attaching the 'my_iofields_list.txt' file for your convenience. Thank you.
With regards,
Ankan
 

Attachments

  • my_iofields_list.txt
    34 bytes · Views: 23
Top