Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCHP Aerosol Mass Cannot Simulate own Emission Inventories #423

Open
shekyts opened this issue Jul 9, 2024 · 20 comments
Open

GCHP Aerosol Mass Cannot Simulate own Emission Inventories #423

shekyts opened this issue Jul 9, 2024 · 20 comments
Assignees
Labels
category: Debug Help Request for help debugging GCHP stale No recent activity on this issue topic: Run Directories Related to GCHP run directories

Comments

@shekyts
Copy link

shekyts commented Jul 9, 2024

Your name

Stephen Shek

Your affiliation

CUHK

Please provide a clear and concise description of your question or discussion topic.

I am recently simulating global PM2.5 concentrations under different ammonia emissions. I added my ammonia inventory to the global inventory in HEMCO_Config by the line below :

(((Future_NH3
0 Future_NH3             /path/to/file       NH3_agr                2019/1-12/1/0 C xy kg/m2/s NH3   -  1 70
)))Future_NH3

However, it was found that no matter what my emission flux is, or even if my inventory is completely switched off, the output aerosol mass file is the same. The model can run without error, and the emission file indicates that the model reads my emissions correctly. Would anyone know what is possibly causing this issue? Thanks a lot!

@shekyts shekyts added the category: Question Further information is requested label Jul 9, 2024
@yantosca
Copy link
Contributor

yantosca commented Jul 9, 2024

Thanks for writing @shekyts. Could you post your HEMCO_Config.rc, HEMCO_Diagn.rc, and ExtData.rc files to this issue? We'll take a look.

@yantosca yantosca added category: Debug Help Request for help debugging GCHP topic: Run Directories Related to GCHP run directories and removed category: Question Further information is requested labels Jul 9, 2024
@shekyts
Copy link
Author

shekyts commented Jul 9, 2024

Thanks a lot for helping - the files are attached below. In the file, the name of inventory is AMY instead of FUTURE_NH3, and this is the only difference. Thanks again!
ExtData_HEMCO_Config.zip

@lizziel
Copy link
Contributor

lizziel commented Jul 9, 2024

@shekyts Have you checked the species concentrations file to see if NH3 changes?

@lizziel lizziel self-assigned this Jul 9, 2024
@yantosca
Copy link
Contributor

yantosca commented Jul 9, 2024

@shekyts, also the HEMCO_Diagn.rc file is not used for GCHP, since the diagnostic averaging is handled by the MAPL HISTORY component and not by HEMCO. You would need to add an entry to the Emissions collection for your new emissions source.

I also noticed another thing in your ExtData.rc file. You have:

#--------|-------|------|------------|---------------|--------|-------|---------------------|
# Export |       |      |            |___ Refresh ___|____ Factors ___|___ External File ___|
# Name   | Units | Clim |Conservative| Time Template | Offset | Scale | Variable | Template |
#--------|-------|------|------------|---------------|--------|-------|----------|----------|

... etc ...

#
#==============================================================================
# --- AMY ---
#==============================================================================
#
AMY kg/m2/s N Y F2019-%m2-01T00:00:00 none none NH3_agr /project/TGABI/s1155192335/research_run_2023/Scenario/flux_fixed_bau_kgsunit_2050_monthlyprop.nc

but the climatology setting is set to N. I think this should be set to Y since your data only has monthly values for a single year (2019)... I presume you want to apply the monthly values to other years as well.

There is another similarly-formatted data set:

GEOSCCM_Br_DAY      pptv  Y Y F2007-%m2-01T00:00:00 none none BR     ./HcoDir/STRAT/v2015-01/Bry/GEOSCCM_Bry.2007%m2.day.nc

so this has monthly values for the year 2007, but to cycle them they have set the climatology flag to Y.

@shekyts
Copy link
Author

shekyts commented Jul 10, 2024

Thank you very much! @lizziel @yantosca !
@lizziel Yes, I have checked the SpeciesConc. NH3 indeed has not changed as well.
@yantosca Let me add my directory to HEMCO_Diagn emissions and re-run it. For the climatology, as I am only using 2019 meteorology to drive simulation, I have set it to the single year of 2019.
Thanks a lot

@lizziel
Copy link
Contributor

lizziel commented Jul 10, 2024

@shekyts, @yantosca A couple things to note:

  1. HEMCO_Diagn.rc is used by GCHP in addition to HISTORY.rc. Only output emissions diagnostics defined in HEMCO_Diagn.rc and also listed in HISTORY.rc will be output. See also the HEMCO_Diagn.rc page on GCHP ReadTheDocs.
  2. Technically you don't need to put Y for climatology if you specify the fixed year and variable month in the time template. However, it is good practice to use it since it can improve performance.

Copy link
Contributor

Thanks @lizziel!

@shekyts
Copy link
Author

shekyts commented Jul 11, 2024

Thank you very much! @lizziel

@shekyts
Copy link
Author

shekyts commented Jul 12, 2024

I have just performed the simulation again with the line added to the HEMCO_Diagn.rc as attached below.
#=============================
#AMY
#============================
#NH3_agr NH3 -1 -1 70 2 kg/m2/s agricultural_ammonia_emission_in_TSS_scenario
However, the aerosol mass (and Species Conc) still does not change and respond to my own inventory. It is still the result as before
HEMCO_Diagn.zip

@lizziel
Copy link
Contributor

lizziel commented Jul 12, 2024

@shekyts, try turning on HEMCO verbose in HEMCO_Config.rc and also enable ExtData debug prints in GCHP in logging.yml (see below).

   CAP.EXTDATA:
       handlers: [mpi_shared]
       level: WARNING
       root_level: INFO   <=== Change this to DEBUG 

Then do a very short run and share the GCHP log and the log file called allPEs.log.

@shekyts
Copy link
Author

shekyts commented Jul 16, 2024

allPEs.zip
Sorry for replying late - the job was in pending.
The allPEs.log is attached below. Thank you very much

@lizziel
Copy link
Contributor

lizziel commented Jul 16, 2024

Thanks @shekyts. Can you also include the GCHP log? It should contain HEMCO log information.

@shekyts
Copy link
Author

shekyts commented Jul 16, 2024

All_Logs.zip
Sure. I do not see an explicit GCHP log, so I have attached all the log files here, including HEMCO log and print out log. Thanks a lot! @lizziel

@lizziel
Copy link
Contributor

lizziel commented Jul 17, 2024

Hi @shekyts, here are a few things to try:

  1. It looks like HEMCO is not printing out everything it could be. Since you have a HEMCO.log file that means you are using an older version of GCHP. Which version are you using? To maximize HEMCO prints in that version you will need to change both the Verbose and Warnings setting at the top of HEMCO_Config.rc to 3. This should then make HEMCO print information about the values read from the file. In newer versions we do not have a HEMCO.log file and all HEMCO log info is sent to the stdout file instead.

  2. You have the below entry in your HEMCO_Diagn.rc. Prefixing the line with # means that the entry will not actually be read since it is a comment character.

#=============================
#Amy
#============================
#NH3_agr              NH3    -1    -1   70  2   kg/m2/s  agricultural_ammonia_emission_in_TSS_scenario 

To output your new emissions inventory it should be set like this in HEMCO_Diagn.rc:
InvAMY_NH3 NH3 0 1 70 2 kg/m2/s agricultural_ammonia_emission_in_TSS_scenario

In this entry 0 means base emissions and 1 is the category. The name starts with Inv since that is the standard name expected by GCHP for all emissions inventory diagnostics.

Then add InvAMY_NH3 to the Emissions diagnostic collection in HISTORY.rc. For your short run, update setCommonRunSettings.sh so that monthly diagnostics are turned off (change 1 to 0) and auto-update is turned on. This will result in getting hourly diagnostics. You can change this to daily if you want to do a one day run instead of 1hr.

@shekyts
Copy link
Author

shekyts commented Jul 18, 2024

@lizziel Thanks a lot for the help. Let me try them accordingly!
For 1, I am using GCHP version 13.3.2. Let me attach the HEMCO log file again after changing the settings.
For 3, the version 13.3.2 does not contain setCommonRunSettings.sh. I will change it on runConfig.sh instead
Thank you very much.

@shekyts
Copy link
Author

shekyts commented Jul 20, 2024

@lizziel ,
I have changed my setting and the attached log files should have printed out all content. However, after changing the above settings, it seems that the model is still not reading into my inventory for a long original run(the output is still the past simulation result). Thanks!
All_Logs_20240720.zip

@lizziel
Copy link
Contributor

lizziel commented Jul 22, 2024

The HEMCO and ExtData log files indicate that the file is being read and applied with non-zero values.

Reading from ExtData: AMY
HEMCO: Leaving HCOIO_READ (hcoio_read_mapl_mod.F90) ( 5)
HEMCO: Leaving HCOIO_DataRead (hcoio_dataread_mod.F90) ( 4)
HEMCO: Entering tIDx_Assign (hco_tidx_mod.F90) ( 4)
HEMCO: Leaving tIDx_Assign (hco_tidx_mod.F90) ( 4)
HEMCO: Entering EmisList_Pass (hco_emislist_mod.F90) ( 4)
HEMCO: Entering EmisList_Add (hco_emislist_mod.F90) ( 5)
HEMCO: Entering Add2EmisList ( 6)
HEMCO: Leaving Add2EmisList ( 6)
Container added to EmisList:
Container AMY
    -->Data type       :            1
    -->Container ID    :           66
    -->Target ID       :           66
    -->File data home?              1
    -->Source file     : AMY
    -->ncRead?            T
    -->Shared data file?  F
    -->Source parameter: NH3_agr
    -->Year range      :         2019        2019
    -->Month range     :            1          12
    -->Day range       :            1           1
    -->Hour range      :            0           0
    -->SpaceDim        :            2
    -->Array dimension :           48          10
    -->Array sum       :   2.0941096E-09
    -->Array min & max :   0.0000000E+00  6.9242514E-11
    -->Time dimension  :            1
    -->Delta t[h]      :            0
    -->Local time?        F
    -->Tempres         : Constant
    -->OrigUnit        : kg/m2/s
    -->Concentration?     F
    -->Coverage        :         -999
    -->Extension Nr    :            0
    -->Species name    : NH3
    -->HEMCO species ID:          157
    -->Category        :            1
    -->Hierarchy       :           70
    -->2D emitted into :    1.00000000000000       and    1.00000000000000

Can you confirm that your Emissions collection now includes InvAmy_NH3? Strangely the HEMCO log file shows that CEDS are being added to that emission in addition to the AMY inventory. What does your entry in HEMCO_Diagn.rc look like for it?

-------------------------------------------------------------------------------
 Calculating emissions for species NH3
-------------------------------------------------------------------------------
HEMCO: Entering GET_CURRENT_EMISSIONS ( 3)
                                                                               
 Evaluate field AMY
HEMCO: Leaving GET_CURRENT_EMISSIONS ( 3)
 ThisDiagn%cName:    InvAMY_NH3
 ThisDiagn%AvgFlag:            -1
 ThisDiagn%SpaceDim:            2
Successfully updated diagnostics: InvAMY_NH3 (counter:  1)
HEMCO: Entering GET_CURRENT_EMISSIONS ( 3)
                                                                               
 Evaluate field CEDS_NH3_ENE
HEMCO: Leaving GET_CURRENT_EMISSIONS ( 3)
 ThisDiagn%cName:    InvAMY_NH3
 ThisDiagn%AvgFlag:            -1
 ThisDiagn%SpaceDim:            2
Successfully updated diagnostics: InvAMY_NH3 (counter:  1)
HEMCO: Entering GET_CURRENT_EMISSIONS ( 3)
                                                                               
 Evaluate field CEDS_NH3_IND
HEMCO: Leaving GET_CURRENT_EMISSIONS ( 3)
 ThisDiagn%cName:    InvAMY_NH3
 ThisDiagn%AvgFlag:            -1
 ThisDiagn%SpaceDim:            2
Successfully updated diagnostics: InvAMY_NH3 (counter:  1)
HEMCO: Entering GET_CURRENT_EMISSIONS ( 3)
                                                                               
 Evaluate field CEDS_NH3_TRA
HEMCO: Leaving GET_CURRENT_EMISSIONS ( 3)
 ThisDiagn%cName:    InvAMY_NH3
 ThisDiagn%AvgFlag:            -1
 ThisDiagn%SpaceDim:            2
Successfully updated diagnostics: InvAMY_NH3 (counter:  1)
HEMCO: Entering GET_CURRENT_EMISSIONS ( 3)
                                                                               
 Evaluate field CEDS_NH3_RCO
HEMCO: Leaving GET_CURRENT_EMISSIONS ( 3)
 ThisDiagn%cName:    InvAMY_NH3
 ThisDiagn%AvgFlag:            -1
 ThisDiagn%SpaceDim:            2
Successfully updated diagnostics: InvAMY_NH3 (counter:  1)
HEMCO: Entering GET_CURRENT_EMISSIONS ( 3)
                                                                               
 Evaluate field CEDS_NH3_SLV
HEMCO: Leaving GET_CURRENT_EMISSIONS ( 3)
 ThisDiagn%cName:    InvAMY_NH3
 ThisDiagn%AvgFlag:            -1
 ThisDiagn%SpaceDim:            2
Successfully updated diagnostics: InvAMY_NH3 (counter:  1)
HEMCO: Entering GET_CURRENT_EMISSIONS ( 3)
                                                                               
 Evaluate field CEDS_NH3_WST
HEMCO: Leaving GET_CURRENT_EMISSIONS ( 3)
 ThisDiagn%cName:    InvAMY_NH3
 ThisDiagn%AvgFlag:            -1
 ThisDiagn%SpaceDim:            2
Successfully updated diagnostics: InvAMY_NH3 (counter:  1)
 Added category emissions to species array:
 Species       :          157
 Category      :            1
 Cat. emissions:   2.481557543201180E-009
 Spc. emissions:   2.481557543201180E-009
 ThisDiagn%cName:    EmisNH3_Anthro
 ThisDiagn%AvgFlag:            -1
 ThisDiagn%SpaceDim:            3
Successfully updated diagnostics: EmisNH3_Anthro (counter:  1)
HEMCO: Entering GET_CURRENT_EMISSIONS ( 3)

Notice above it shows the value of the anthropogenic NH3 emissions applied. You could try a run without CEDS NH3 and see if it is non-zero. You could also try runs with and without AMY turned on and compare the values printed.

@shekyts
Copy link
Author

shekyts commented Jul 22, 2024

@lizziel
Yes, my HISTORY.rc has included the AMY emission by including this line under EMISSIONS collection :

InvAMY_NH3           ', 'GCHPchem',
My HEMCO.Diagn.rc is as following (the line for AMY and CEDS): 
#=============================
#AMY
#============================
InvAMY_NH3              NH3    0   1   70  2   kg/m2/s  agricultural_ammonia_emission_in_TSS_scenario
#=============================
# CEDS
#=============================
(...skipped lines for other species...)
InvCEDS_NH3          NH3    0    1   5   3   kg/m2/s  NH3_emission_flux_from_CEDS_inventory.

Thanks a lot! Let me try running accordingly to see what the value looks like.

@shekyts
Copy link
Author

shekyts commented Aug 24, 2024

I have tested 3 simulations with the following settings (anthro. NH3 emission documented in HEMCO log in bracket):
Test 1 : CEDS on ; AMY on (2.48x10^-9)
Test 2 : CEDS off ; AMY on (2.09x10^-9)
Test 3 : CEDS on ; AMY off (3.87x10^-10)
The printed emission of anthro NH3 varies in all the simulations, and I guess the model should have read the inventories correctly.
However, the PM25 in Aerosol Mass output still does not vary much for my own AMY directory. There is large difference between test 1 and test 2 (as expected), as all the components of CEDS have shut down. For test 1 and test 3, the difference in PM25 mass concentration is merely to the order of magnitude of 0.001 to 0.01 ug/m3, which is unreasonably insensitive to a 90% reduction in anthro NH3. Therefore, I guess the situation is the model did not 'actually' read the AMY inventory even though the Emission Output and the HEMCO log file indicated it did. Would I ask if this might be the case? Thanks a lot!

Copy link

This issue has been automatically marked as stale because it has not had recent activity. If there are no updates within 7 days it will be closed. You can add the "never stale" tag to prevent the issue from closing this issue.

@github-actions github-actions bot added the stale No recent activity on this issue label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Debug Help Request for help debugging GCHP stale No recent activity on this issue topic: Run Directories Related to GCHP run directories
Projects
None yet
Development

No branches or pull requests

3 participants