Difference between revisions of "User:Jmandel/chem"

From openwfm
Jump to navigation Jump to search
Line 21: Line 21:
  
 
Call chain:
 
Call chain:
[https://github.com/jbeezley/wrf-fire/blob/master/wrfv2_fire/chem/chem_driver.F chem_driver.F] ->
+
[https://github.com/jbeezley/wrf-fire/blob/6a4a405d2c8ad0c148cacb3b72d9291c17308b34/wrfv2_fire/chem/chem_driver.F chem_driver.F] ->
[https://github.com/jbeezley/wrf-fire/blob/master/wrfv2_fire/chem/emissions_driver.F emissions_driver.F]
+
[https://github.com/jbeezley/wrf-fire/blob/6a4a405d2c8ad0c148cacb3b72d9291c17308b34/wrfv2_fire/chem/emissions_driver.F emissions_driver.F]
-> [https://github.com/jbeezley/wrf-fire/blob/master/wrfv2_fire/chem/module_add_emiss_burn.F add_emiss_burn.F],  [https://github.com/jbeezley/wrf-fire/blob/master/wrfv2_fire/chem/module_plumerise1.F plumerise_driver] -> [https://github.com/jbeezley/wrf-fire/blob/master/wrfv2_fire/chem/module_chem_plumerise_scalar.F plumerise] [https://github.com/jbeezley/wrf-fire/blob/master/wrfv2_fire/chem/module_emissions_anthropogenics.F#L77 module_emissions_anthropogenics]
+
-> [https://github.com/jbeezley/wrf-fire/blob/6a4a405d2c8ad0c148cacb3b72d9291c17308b34/wrfv2_fire/chem/module_add_emiss_burn.F add_emiss_burn.F],  [https://github.com/jbeezley/wrf-fire/blob/master/wrfv2_fire/chem/module_plumerise1.F plumerise_driver] -> [https://github.com/jbeezley/wrf-fire/blob/6a4a405d2c8ad0c148cacb3b72d9291c17308b34/wrfv2_fire/chem/module_chem_plumerise_scalar.F plumerise] [https://github.com/jbeezley/wrf-fire/blob/6a4a405d2c8ad0c148cacb3b72d9291c17308b34/wrfv2_fire/chem/module_emissions_anthropogenics.F#L77 module_emissions_anthropogenics]
  
 
gas emissions are converted to the concentration changes in module_emissions_anthropogenics.F located in WRFV3/chem.  
 
gas emissions are converted to the concentration changes in module_emissions_anthropogenics.F located in WRFV3/chem.  
Line 41: Line 41:
  
 
Both [https://github.com/jbeezley/wrf-fire/blob/master/wrfv2_fire/Registry/Registry.EM_COMMON#L1270 rho_phy](I,k,J) and dz8w(i,k,j) are WRF variables responding to the change in the pressure and temperature so the plume expansion is taken care of automatically.
 
Both [https://github.com/jbeezley/wrf-fire/blob/master/wrfv2_fire/Registry/Registry.EM_COMMON#L1270 rho_phy](I,k,J) and dz8w(i,k,j) are WRF variables responding to the change in the pressure and temperature so the plume expansion is taken care of automatically.
 +
 +
So, the code should be
 +
 +
k=1
 +
conv_rho= dtstep*8.047E-6/(rho_phy(I,k,J)*dz8w(i,k,j))    ! conversion factor
 +
E =

Revision as of 07:03, 29 November 2012

Coupling with WRF-Chem

Tracer accessed as grid%tracer(i,k,j,p_smoke) real,intent(inout),dimension( ims:ime,kms:kme,jms:jme,num_tracer ) :: tracer

from use module_state_description , only: num_tracer, p_smoke

which has INTEGER, PARAMETER :: tracer_smoke = 1

similar code in chem/module_add_emiss_burn.F: chem(i,k,j,p_smoke) = chem(i,k,j,p_smoke)+ebu(i,k,j,p_ebu_co)*conv_rho

defined in ./inc/scalar_indices.inc: P_smoke = 1 ; F_smoke = .FALSE.

from registry.chem: package radm2sorg chem_opt==2 - chem:so2,sulf,no2,no,o3,hno3,h2o2,ald,hcho,op1,op2,paa,ora1,ora2,nh3,n2o5,no3,pan,hc3,hc5,hc8,eth,co,ol2,olt,oli,tol,xyl,aco3,tpan,hono,hno4,ket,gly,mgly,dcb,onit,csl,iso,hcl,ho,ho2,so4aj,so4ai,nh4aj,nh4ai,no3aj,no3ai,naaj,naai,claj,clai,orgaro1j,orgaro1i,orgaro2j,orgaro2i,orgalk1j,orgalk1i,orgole1j,orgole1i,orgba1j,orgba1i,orgba2j,orgba2i,orgba3j,orgba3i,orgba4j,orgba4i,orgpaj,orgpai,ecj,eci,p25j,p25i,antha,seas,soila,nu0,ac0,corn

state real so2 ikjftb chem 1 - i0{12}rhusdf=(bdy_interp:dt) "so2" "SO2 concentration" "ppmv"

Call chain: chem_driver.F -> emissions_driver.F -> add_emiss_burn.F, plumerise_driver -> plumerise module_emissions_anthropogenics

gas emissions are converted to the concentration changes in module_emissions_anthropogenics.F located in WRFV3/chem. Basically, since each gas occupies the same volume under the same P and T, all gass species are converted from mole/km2h to delta ppmv (which is 1E6 times mixing ratio in mole/mole) in the same way.

The conversion looks like that:

                    E    is emission [mole/(km^2 hr)] 
     conv_rho    is converted emission in ppmv [-]
    rho_phy(i,jk)    is air density [kg/m3}
   dz8w(i,j,k)    is vertical grid spacing for the lowest model layer [m] 
         dtstep     is model time step [s]

8.047e-6 is conversion factor – km^2 hr to m2/s (2.7778e-10) * molecular mass of air 0.02897 * 1e6 (mol/mol -> part per million) = 8.047e-6

conv_rho= E*dtstep*8.047E-6/(rho_phy(I,k,J)*dz8w(i,k,j))

Both rho_phy(I,k,J) and dz8w(i,k,j) are WRF variables responding to the change in the pressure and temperature so the plume expansion is taken care of automatically.

So, the code should be

k=1
conv_rho= dtstep*8.047E-6/(rho_phy(I,k,J)*dz8w(i,k,j))     ! conversion factor
E =