wrfchem-leeds / WRFotron

Tools to automatise WRF-Chem runs with re-initialised meteorology
https://wrfchem-leeds.github.io/WRFotron/
GNU Affero General Public License v3.0
21 stars 7 forks source link

Adding variable calculated in module to wrfout files #17

Closed chmltf closed 4 years ago

chmltf commented 4 years ago

I am hoping to add a variable, aerosol surface area (A), which I believe is calculated in MOSAIC already, to a wrfout files. It is calculated (or estimated) in the "module_mosaic_gly" module for the purposes of calculating glysoa_sfc_a0X species and is located in the .../WRFChem/chem/ directory.

So far I have added it to the registry.chem file under "Additional MOSAIC aerosol variables inside the chem array" state real A ikjftb chem 1 - i0{12}rhusdf=(bdy_interp:dt) "A" "aerosol surface area" "cm^2/cm^3"

I have also added it to the iofields.chem file in the wrfotron. +:h:0:PHOTR4,PHOTR7,A

I was just wondering if anybody had experience with this. Thanks!

lukeconibear commented 4 years ago

Hmm the steps looks right to me.

My guess would be to test different values for dimensions i.e. ikjftb and input/output i.e. i0{12}rhusdf=(bdy_interp:dt).

If this variable is only needed in the wrfout files, then you could simplify the input/output to h.

Also, I don't fully understand all of the dimension variable, though you could simplify this to ikj.

This is what CCN concentrations use, which also have units of something per cm3.

chmltf commented 4 years ago

I made both of these changes to the registry file so it now looks like this:

state real A ikj chem 1 - h "A" "aerosol surface area" "cm^2/cm^3"

I recompiled and now have an A variable in my wrfout files. The output is always zero, and I'm not sure it is because of the options or not. I will play around with this a bit, but in general it worked. Thanks for your help.

lukeconibear commented 4 years ago

Great, thanks for the update and I'm glad this at least creates the variable.

Sorry, I'm not sure why the output would be zero. Let me know if you figure out if this is caused by a bug anywhere.