geoschem / GCHP

The "superproject" wrapper repository for GCHP, the high-performance instance of the GEOS-Chem chemical-transport model.
https://gchp.readthedocs.io
Other
21 stars 25 forks source link

Using a new inventory in ExtData.rc #412

Closed YanshunLi-washu closed 1 month ago

YanshunLi-washu commented 3 months ago

Name: Yanshun Li Institution: WashU

Hi GCST,

I'm trying to use the hourly NEI 2011 version in GCHP 14.3.1. As it is not default in GCHP 14.3.1, I guess I need to update both HEMCO_Config.rc and ExtData.rc.

For example, I have one item in HEMCO_Config.rc:

0 NEI11_SURFACE_NO ./NEI2011/v2015-03/$MM/NEI11_0.1x0.1_2011$MM$DD.nc NO 2011-2021/1-12/1-31/* C xy kg/m2/s NO 2501/1007 1 50

Could you help to show me how should I update the corresponding item in ExtData.rc following the below format? "Export Name Units Clim Conservative Refresh Time Template Offset Scale External file variable External file template"

I'm not so sure about it, especially for the refresh Time Template.

I'm also confused why we need both ExtData.rc and HEMCO_Config.rc to control the input for HEMCO. What are their responsibilities respectively?

Thanks, Yanshun

lizziel commented 2 months ago

Hi @YanshunLi-washu, thanks for reaching out about this. The time template for daily input data would look like this, assuming you are not time-interpolating between data entries in the file.

F%y4-%m2-%d2T00:00:00

If you want to time-interpolate then you can drop the F at the start of the string. Since this is not monthly climatology you should put N in the clim column.

Do you need help with any additional columns? It may be helpful to look at the example of AEIC which is daily data, although that inventory is monthly climatology so slightly different. There are also instructions for setting entries in ExtData.rc on the ExtData.rc page of GCHP ReadTheDocs, as well as at the top of the ExtData.rc file itself. You can also post what you are putting in ExtData.rc and we can let you know if we see any issues.

Several of the fields in HEMCO_Config.rc are ignored in GCHP since MAPL handles file input and data regridding. However, the file is still needed for the masking, scaling, and hierarchy information which HEMCO will apply online. The ignored columns are also still needed to avoid a parsing problem in HEMCO. A complete list of what is used versus what is not is on the HEMCO_Config.rc page of GCHP ReadTheDocs.

YanshunLi-washu commented 2 months ago

Hi @lizziel , thanks for the helpful response!

(1)To clarify, the example line I showed is a hourly inventory just organized as daily files, there is the info doing ncdump for one of the NEI2011 hourly inventory file:

ncdump -h NEI11_0.1x0.1_20110116.nc
netcdf NEI11_0.1x0.1_20110116 {
dimensions:
    time = 24 ;
    lat = 400 ;
    lon = 900 ;
variables:
    float time(time) ;
        time:calendar = "standard" ;
        time:units = "hours since 2011-01-16 00:00:00" ;
        time:long_name = "Time" ;
    float CO(time, lat, lon) ;
        CO:molecular_weight_g_mol = "28" ;
        CO:NEI11_name = "CO" ;
        CO:var_desc = "Model species CO                                                                " ;
        CO:units = "kg/m2/s" ;
        CO:long_name = "CO              " ;
        CO:remap = "remapped via ESMF_regrid_with_weights: Conservative remapping" ;

As you can see the time dimension is 24.

So I'm still interested in how to set refresh time template, I believe F%y4-%m2-%d2T00:00:00 is probably not the case for this one.

(2)Also thanks for mentioning the monthly climatology column and the AEIC example, such as below.

AEIC19_DAILY_NO     kg/m2/s **2019** Y F%y4-%m2-%d2T00:00:00 none none NO       ./HcoDir/AEIC2019/v2022-03/2019/%m2/AEIC_2019%m2%d2.0.5x0.625.36L.nc

I'm confused why can it put '2019' to a yes or no column.

Besides, for CEDSv2, as below:

CEDS_NO_AGR  kg/m2/s **N** Y F%y4-%m2-01T00:00:00 none none NO_agr  ./HcoDir/CEDS/v2021-06/%y4/NO-em-anthro_CMIP_CEDS_%y4.nc

I'm also curious why CEDS is not a monthly climatology, as CEDS is a typical monthly inventory to me. Maybe I misunderstood what monthly climatology mean here. Happy to know more about it.

Anyway for the NEI2011 hourly I mentioned, I guess I should put a N for the monthly climatology column?

Yanshun

lizziel commented 2 months ago

Hi Yanshun, for hourly you can use the hourly token %h2 in place of 00 for hour. Please let me know if this is not clear from the docs. It should be shown at the top of ExtData.rc in the comments as well as on ReadTheDocs.

Climatology is a bit confusing in MAPL. Climatology is defined as an annual data set that is used for all years. The case of CEDS has monthly values but files for different years, and so is not considered climatology. There are two ways of specifying climatology in ExtData.rc, either putting year in the clim column (used for daily data) or putting Y. If Y is used then the year should be hard-coded in the time template, e.g. F2019-%m2-01T00:00:00. Again, let me know if this is not clear in the docs. It is discussed in the "Refresh" section of the ExtData.rc page on GCHP ReadTheDocs.

Please note that the rather illogical way of configuring ExtData is due to historical baggage as additional features were added to MAPL. When we update to MAPL 3 in GCHP v15 we will used ExtData2G (2nd generation ExtData) which was written to be more logical and easy to configure via a yaml file.

For your hourly NEI data, do you have multiple years or files for different years?

YanshunLi-washu commented 2 months ago

Hi @lizziel Thanks for the explanation. For my hourly NEI data I only have daily files with hourly emission fields for 2011, but I intended to use annual scaling factors in HEMCO_Config.rc to scale to my target year, probably be 2019 or 2021.

In this case, not sure if I should put Y or N or just 2011?

In the docs, I think they're clear. It can be better if there are more examples.

lizziel commented 2 months ago

Hi @YanshunLi-washu, you can put N for climatology and use 2011 in the Refresh string. You can actually do this for monthly climatology too, but I believe the climatology option is written to improve performance.

lizziel commented 2 months ago

@YanshunLi-washu, are you all set with this issue?

YanshunLi-washu commented 2 months ago

Hi @lizziel Thank you so much for your suggestions! I'm conducting a test running following your suggestions! Should be all good if the results of the model makes sense.

lizziel commented 1 month ago

I will close out this issue now. @YanshunLi-washu, if there are still problems let us know.