geoschem / geos-chem

GEOS-Chem "Science Codebase" repository. Contains GEOS-Chem science routines, run directory generation scripts, and interface code. This repository is used as a submodule within the GCClassic and GCHP wrappers, as well as in other modeling contexts (external ESMs).
http://geos-chem.org
Other
168 stars 165 forks source link

[BUG/ISSUE] Problem replacing default Br concentrations for Hg simulation with new hourly data #188

Closed yantosca closed 4 years ago

yantosca commented 4 years ago

I am adding this issue on behalf of userakerman 18795877818@163.com:

The GEOS-Chem version I am using is 12.2.0, and I want to run the Hg model by replacing the original Br_GC concentration file in the BrOx fields of HEMCO_Config.rc with my hourly Br-concentration files in 2013(one file an hour). But I found that the concentration fields of ConcBr & ConcBrO exported from MercuryChem after compilation were quite different from those in my hourly Br-concentration file, so maybe the simulated Hg concentration were also inaccurate. after that, I attempted to make several revisions to mercury_mod.F, but the results have not improved.

One thing is certain is that the hourly Br-concentration file was successfully update each hour during the compilation process(as expected), but may not have been read correctly. So I don't know which caused the mistake, HEMCO_Config.rc , or mercury_mod.F?

I checked wiki but can't find the solution for this situation, so I wonder if you could give me some advice on it.

My HEMCO_Config.rc, mercury_mod.F, and the result of compilation are attached.

yantosca commented 4 years ago

Thanks for writing. I think the issue is that HEMCO is just reading the first hour in each file. You might need to do this instead:

(((BrOx_GC
* Br_GC      /data/home/ympeng/GEOS-Chem/ProcessBr/ts2013$MM$DD$HH.nc    IJ_AVG_S__Br   2013/$MM/$DD/$HH+30minutes C xyz ppbv * - 1 1
* BrO_GC     -                                                           IJ_24H_S__BrO  -                              - -   ppbv * - 1 1
)))BrOx_GC

which will use the exact values of HH, MM, DD.

Also note: opening and closing a new file each hour will probably slow down your simulation, as there is a lot of overhead in the netCDF file open/close. You might want to concatenate all of the hourly files into one file per each day. HEMCO can then open the file once per day (it'll keep the file open for the whole day).

yantosca commented 4 years ago

Also, I would recommend doing a short test run with VERBOSE: 3 and WARNINGS: 3 set in the HEMCO_Config.rc file. This will print out information about when the files are opened and closed. You will then see when your Br files are opened and closed by searching in HEMCO.log. In this way you can verify if the fix listed in the prior comment now causes the desired behavior.

ackerman1225 commented 4 years ago

The problem was solved after modification, thanks for your reply!

yantosca commented 4 years ago

Thanks. I will go ahead and close out this issue. Let us know if you still have problems.