-
Notifications
You must be signed in to change notification settings - Fork 163
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
Move in-module variables to State_Chm_Mod #7
Conversation
This commit replaces all existing instances of DEPSAV across mainline GEOS-Chem code with State_Chm%DEPSAV, as part of moving all grid-size dependent code out of modules and into the State_Chm% derived type object. Signed-off-by: Haipeng Lin <linhaipeng@pku.edu.cn>
Move DEPSAV which is grid-size dependent from the drydep module to State_Chm%DEPSAV. Signed-off-by: Haipeng Lin <linhaipeng@pku.edu.cn>
This update moves all in-module variables in aerosol_mod to State_Chm, as they are dependent on grid size (IIPAR, JJPAR, LLPAR). Dependencies have been updated as necessary. Signed-off-by: Haipeng Lin <linhaipeng@pku.edu.cn>
as they are dependent on grid size (IIPAR, JJPAR, LLPAR). It also updates CEHM_BCPO,BCPI,OCPO,OCPI, OHNO3TIME, EMISSCARBON in CARBON_MOD to accept the State_Chm derived type object. Dependencies have been updated as necessary. Signed-off-by: Haipeng Lin <linhaipeng@pku.edu.cn>
# Conflicts: # GeosCore/aerosol_mod.F
Cleanup routines for CARBON_MOD arrays are now called in CLEANUP_ STATE_CHM. Signed-off-by: Haipeng Lin <linhaipeng@pku.edu.cn>
This update moves all in-module variables into State_Chm_Mod, as they are dependent on grid size (IIPAR, JJPAR, LLPAR) The entry-point to INIT_DIAG_OH has added State_Chm as argument. The entry-point to DO_DIAG_OH_CH4 has added State_Chm as argument. Dependencies have been updated as necessary. Signed-off-by: Haipeng Lin <linhaipeng@pku.edu.cn>
Bob, Lizzie, and I finally had a chance to go through this pull request. We have some thoughts and suggestions:
@yantosca @lizziel Feel free to add more if I forgot anything! @jimmielin - We're happy to continue the discussion and/or assist you with some of these updates. Please let us know what works for you. |
Hi Haipeng, Thanks for the pull request, this is a great step. To expand on the point #1 that Melissa made,
|
@jimmielin |
Thanks all for the comments and thoughts. It indeed makes sense to use pointers on top of subroutines to minimize code changes. I'll rework the patches to do this as it seems more in-line with the migration procedures for @msulprizio @yantosca @lizziel I agree with 5 but not all modules have their use-associated arrays as dimension-dependent (some are fixed rates for species, especially for I will work on the changes and make sure to test them with difference tests and unit tests, to make sure there is no impact to the overall output. Thanks all for your suggestions! |
Bob, Lizzie, and I met yesterday to discuss setting up a naming convention for new variables in State_Chm. However, we decided it's probably easiest to use your/our best judgement for now. In general, we use camel case names and try to be as concise as possible. We also want to make sure the names aren't too similar to other fields in State_Chm, and if they are to try to make one or both of those names more descriptive. For example, I have moved several module variables to State_Chm to facilitate saving those fields to the restart (this will go into 12.1.0). The old and new names are summarized below:
I don't think my changes above conflict with any of the changes you've made in this pull request, however there may be other updates going into 12.1.0 that remove module-level arrays. Therefore, it might make sense to move these updates/this pull request to a branch off of master once 12.1.0 is released so you have all of these updates. We'd like to eventually remove the Dev branch, off of which this pull request is based but we can't do that until this request is closed. We've essentially abandoned Dev and moved to a new branch naming convention using dev/12.0.3, dev/12.1.0, feature/FlexGrid, etc. |
Hi Melissa & GCST, Thanks for the update! Due to the new coding & branch requirements and probably a newer naming scheme, it might make sense to close this pull request without merging so you can remove the There is a minor request I'd like to mention here that's related to removal of the Thanks! |
Hi Haipeng, We can certainly pull in your The rest of your plan - to close this pull request and create a new one off of the latest development branch - sounds good to us. Thanks! |
Hi Melissa, Sure, please do pull the updates into I'll close this pull request and open a new one as updates for moving Haipeng |
Hi Haipeng, The Best, |
run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.CH4 run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.tagCH4 - Following geoschem/geos-chem PR #1540, we have now updated the EDGARv6 CH4_RICE entries. CH4 rice emissions should now go into HEMCO category #7 rather than being lumped into other emissions. run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.carboncycle run/GCHP/HEMCO_Config.rc.templates/HEMCO_Config.rc.carboncycle - Add fix for EDGARv6 CH4_RICE entries, described above - Read fixed netCDF files from ./HcoDir/CH4/v2022-11/GEPA - Read fixed netCDF files from ./HcoDir/CH4/v2022-11/Scarpelli_Mexico - Read fixed netCDF files from ./HcoDir/CH4/v2022-11/Lakes - Read fixed netCDF files from ./HcoDir/CH4/v2022-11/4x5 - Read fixed netCDF files from ./HcoDir/CO2/v2022-11/OCEAN run/GCHP/ExtData.rc.templates/ExtData.rc.carboncycle - Add same file path updates as for HEMCO_Config.rc templates (above) - Change time refresh for GFEIv2 to "-" (only read once) - Change time refresh for CH4_SEEPS to "-" (only read once) Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
I am revisiting this old PR since I am looking at aerosol_mod.F90 module variables and thinking we should move them to State_Chm. I searched around and found this old work. @jimmielin, did you ever revisit this? |
Hi @lizziel, I don't think I've redone the work in |
I'll make the updates in |
Warning: This update contains very extensive and major structural changes to the GEOS-Chem Core.
This update is the first in a series of significant architectural changes for WRF-to-GC coupling, and more generically, moving GEOS-Chem away from the
USE
-associated arrays that are generally dependent on(I, J, L)
coordinates. Having these arrays inside modules and not inside a "bucket" derived-type object bars running multiple GEOS-Chem instances in the same CPU, as in run-time switching of grid dimensions.This update moves
DRYDEP_MOD
'sDEPSAV
, all allocatable arrays inAEROSOL_MOD
,CARBON_MOD
, andDIAG_OH_MOD
into theState_Chm%
derived type object directly. (More modules coming in a future update as I go through all module variables)State_Chm
, if not previously;State_Chm
asPOINTER
s, keeping consistency with existing code;Cleanup_State_Chm
has been updated accordinglyState_Chm%
variants insteadI have tested this update on GCHP, but more extensive testing is probably necessary for this series of updates as they affect a large percentage of GEOS-Chem source code.
Signed-off-by: Haipeng Lin linhaipeng@pku.edu.cn