Code for reading emission files

Post Reply
neyestani
Posts: 7
Joined: Thu Feb 06, 2020 8:09 pm

Code for reading emission files

Post by neyestani » Wed Aug 12, 2020 8:37 pm

Hi there,

I appreciate it if someone could help me to find the code (module) for reading emission files.
I'm adding a new aerosol species in my emission files (created externally, not with Convert_Emiss). So I want to edit the code/module responsible for reading the emission files to add the new species. I checked "chem/module_emissions_anthropogenics.F", but it seems this module only converts emissions array (emis_ant) to mixing ratios (chem array). However, I cannot find the code that creates this emissions array (emis_ant) based on my emission files (wrfchemi*).
Simply, I want to find the code that opens and reads my emission files.


Thank you,
Soroush

jordanschnell
Posts: 132
Joined: Thu Feb 27, 2020 10:58 pm

Re: Code for reading emission files

Post by jordanschnell » Wed Aug 19, 2020 4:49 pm

Hi Soroush,

To add an emitted species, you need to first add it to the Registry/registry.chem under the emiss_opt that you are using. For example, if you are using emiss_opt=3 (eradmsorg) and you wanted to emit species XXX, you would need to add e_XXX under the emiss_opt==3 package. You additionally need to define it as an emission array (e.g., for emissions of no there is a line: state real e_no i+jf emis_ant 1 Z i5r "E_NO" "EMISSIONS" "mol km^-2 hr^-1"). By adding the species to the emission package, the code expects your wrfchemi files to have that variable and will automatically add it to the emis_ant array. Finally, in module_emissions_anthropgenics.F, you add the emis_ant of XXX to the XXX chemical tendency array (with some conversion from rate to increase in mixing ratio in bottom layer). Hope this helps.

Jordan

neyestani
Posts: 7
Joined: Thu Feb 06, 2020 8:09 pm

Re: Code for reading emission files

Post by neyestani » Mon Aug 31, 2020 11:38 pm

Thank you Jordan!

neyestani
Posts: 7
Joined: Thu Feb 06, 2020 8:09 pm

Re: Code for reading emission files

Post by neyestani » Wed Sep 09, 2020 9:56 pm

Hi Jordan,

I have one more question, please.
I followed the steps you mentioned. However, when I try to compile it, I receive an error for new variable index declaration:
Error: Symbol 'p_e_eci_a' at (1) has no IMPLICIT type
However, I've added the new emitted species to registry.chem as admission array and under emiss_opt package (=10).

Am I missing something here?


Thank you,
Soroush

jordanschnell
Posts: 132
Joined: Thu Feb 27, 2020 10:58 pm

Re: Code for reading emission files

Post by jordanschnell » Thu Sep 10, 2020 7:26 pm

Hi Soroush,

Can you attach your registry.chem? And did you also add the species as a state variable in the emis_ant array? For example, see emissions of so2:

state real e_so2 i+jf emis_ant 1 Z i5r "E_SO2" "EMISSIONS" "mol km^-2 hr^-1"

Jordan

neyestani
Posts: 7
Joined: Thu Feb 06, 2020 8:09 pm

Re: Code for reading emission files

Post by neyestani » Thu Sep 10, 2020 8:05 pm

Hi Jordan,

Please find registry.chem file attached (I added txt extension, only for attaching here).
Yes, I did. I copied e_eci and e_ecj state variables (lines 74 & 75) as new variables (e_eci_a, e_eci_bb, e_ecj_a, and e_ecj_bb) in lines 154 ~ 157.


Thanks,
Soroush
Attachments
registry.chem.txt
(592.8 KiB) Downloaded 28 times

jordanschnell
Posts: 132
Joined: Thu Feb 27, 2020 10:58 pm

Re: Code for reading emission files

Post by jordanschnell » Thu Sep 10, 2020 8:48 pm

Hi Soroush,

Everything looks fine with the registry. After you changed the registry, did you perform a ./clean -a ? That is required any time the registry is changed. Otherwise, can you attach your full compile log, and if the compile aborted for a specific program, please also attach that file (.F)

Jordan

neyestani
Posts: 7
Joined: Thu Feb 06, 2020 8:09 pm

Re: Code for reading emission files

Post by neyestani » Mon Sep 14, 2020 3:41 pm

Hi Jordan,

Thank you for the help.
That's right, the problem was that I didn't perform ./clean -a after changing registry.chem file.
Now it's working.


Best,
Soroush

Post Reply

Return to “Emissions”