Difference between revisions of "Talk:Coupling with WRF-Chem"
Line 36: | Line 36: | ||
==ch4 and h2 nuked== | ==ch4 and h2 nuked== | ||
− | Even if we set ch4 and h2 in they get nuked in WRF-Chem in subroutine [https://github.com/jbeezley/wrf-fire/blob/e9051dc5ba0c59e1d7e4d59b47965d891c090142/wrfv2_fire/chem/module_input_chem_data.F#L3540 mozcart_lbc_set] called from [https://github.com/jbeezley/wrf-fire/blob/e9051dc5ba0c59e1d7e4d59b47965d891c090142/wrfv2_fire/chem/chem_driver.F#L885 chem_driver] because [https://github.com/jbeezley/wrf-fire/blob/e9051dc5ba0c59e1d7e4d59b47965d891c090142/wrfv2_fire/chem/chem_driver.F#L799 emiss_inpt_opt>0]. But the [https://github.com/jbeezley/wrf-fire/blob/e9051dc5ba0c59e1d7e4d59b47965d891c090142/wrfv2_fire/Registry/registry.chem#L2393 default] is | + | Even if we set ch4 and h2 in they get nuked in WRF-Chem in subroutine [https://github.com/jbeezley/wrf-fire/blob/e9051dc5ba0c59e1d7e4d59b47965d891c090142/wrfv2_fire/chem/module_input_chem_data.F#L3540 mozcart_lbc_set] called from [https://github.com/jbeezley/wrf-fire/blob/e9051dc5ba0c59e1d7e4d59b47965d891c090142/wrfv2_fire/chem/chem_driver.F#L885 chem_driver] because [https://github.com/jbeezley/wrf-fire/blob/e9051dc5ba0c59e1d7e4d59b47965d891c090142/wrfv2_fire/chem/chem_driver.F#L799 emiss_inpt_opt>0]. But the [https://github.com/jbeezley/wrf-fire/blob/e9051dc5ba0c59e1d7e4d59b47965d891c090142/wrfv2_fire/Registry/registry.chem#L2393 default] is emiss_inpt_opt=1. This selection also calls emissions_driver, which seems unnecessary because we provide our own emissions. Specify emiss_inp_opt=0 in namelist.input. Not sure about call to [https://github.com/jbeezley/wrf-fire/blob/e9051dc5ba0c59e1d7e4d59b47965d891c090142/wrfv2_fire/chem/module_ltng_cpm.F#L211 adjust_ktop] which no longer gets called. [[User:Jmandel|Jmandel]] ([[User talk:Jmandel|talk]]) 00:02, 27 April 2014 (UTC) |
Revision as of 00:08, 27 April 2014
Initial development notes
As of April 21, 2012, the tracer is simply copied from the heat flux at the surface on the atmospheric mesh (GRNHFX). A call to fire_emission has been added to module_fr_sfire_driver_wrf.F just after calculation of heat flux tendencies. This subroutine has been added to the fire atmospheric module and is preprocessed out of the source when WRF-Chem is not being compiled.
WRF-Chem contains a multitude of arrays representing concentrations of chemical species. The typical method of injecting data into the simulation involves generating emission input data files from standard sources. These sources are read into the code using auxiliary input streams and interpolated into the species arrays in the emissions module. For the coupling with SFire, turning off file input in the namelist seems to initialize the emission arrays to zero. This eliminates the need to generate useless emission files.
WRF-Chem stores its state in several large arrays called *_emis, chem, and tracer. These arrays are four dimensional indexed like (x,z,y,s), where s is the chemical species. The chem and tracer arrays are located on the standard atmospheric grid, while the *_emis arrays have an alternate vertical grid indexed to config%kemit. An internal table keeps track of where each species is stored in these arrays. The domain structure contains scalars such as p_smoke and p_e_so4 that give the species index for each type. The species quantities are specific to different chemistry options (chem_opt) from the registry. We should eventually test that a compatible namelist option has been chosen to avoid errors. The dynamics section of the namelist has an option for tracer_opt. This controls what tracers are generated for Chem. For example, trace_opt = 1 creates a single tracer called smoke, see the registry for package definitions.
For the passive tracer scheme (chem_opt = 14), it appears to be sufficient just to add the fire emission directly into the tracer array. If we want to fully utilize WRF-Chem in the future, we may need to do something more complicated. The User's guide mentions that there is code to handle wildfire emissions data from MODIS satellites. This may be helpful either directly or as a guide in how to inject the chemical species from the SFire model.
According to some comments in Registry.EM, basic tracer support exists in WRF without Chem. It is possible we may be able to add smoke the WRF even without compile for Chem. I have not explored this yet, though.
From Jon's text April 21 2012. Jmandel 16:34, 23 December 2012 (UTC)
ch4 and h2 nuked
Even if we set ch4 and h2 in they get nuked in WRF-Chem in subroutine mozcart_lbc_set called from chem_driver because emiss_inpt_opt>0. But the default is emiss_inpt_opt=1. This selection also calls emissions_driver, which seems unnecessary because we provide our own emissions. Specify emiss_inp_opt=0 in namelist.input. Not sure about call to adjust_ktop which no longer gets called. Jmandel (talk) 00:02, 27 April 2014 (UTC)