-
Notifications
You must be signed in to change notification settings - Fork 157
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
[PULL REQUEST] Change 4D State_Chm%Species array to vector of 3D concentration arrays #990
Conversation
Thanks @lizziel, now I understand how this is being implemented. When we add this in, this will likely necessitate a version number change to 14.0.0, as we've broken backwards compatibility. |
…on arrays Species_mod now contains type SpcConc which is a pointer to a 3D REAL(fp) array. State_chm_mod now contains a 1D vector called SpeciesVec that points to type SpcConc. The 4D array Species is removed. An example of the usage change is: old: State_Chm%Species(I,J,L,N) new: State_Chm%SpeciesVec(N)%Conc(I,J,L) Where pointer Spc was used locally to point to State_Chm%Species, it now points to State_Chm%SpeciesVec. For example: old: Spc(I,J,L,N) new: Spc(N)%Conc(I,J,L) Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
44e4a65
to
d3a3311
Compare
# Conflicts: # GeosCore/convection_mod.F90 # GeosCore/fullchem_mod.F90 # GeosCore/mercury_mod.F90 # GeosCore/mixing_mod.F90 # GeosCore/tpcore_fvdas_mod.F90 # Headers/state_chm_mod.F90 # KPP/fullchem/fullchem_SulfurChemFuncs.F90 Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
78ebd60
to
5bfa3dd
Compare
5bfa3dd
to
7f65a69
Compare
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
7f65a69
to
6ff0554
Compare
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
The update this commit reverts causes small number differences due to change in the order of operations in the unit conversions. Removing it for now allows bitwise zero difference testing for the 4d to 3d species concentration array update. Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
This fix is not ideal because it introduces a large local array in subroutine TPCORE_WINDOW. However, it eliminates the differences introduced in the previous implementation using a pointer. The nested grid advection should be reworked to reduce memory requirement.
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
… sims Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Updates include: - Remove unused variables and arguments - Remove binary diagnostic code for global simulations - Comment out binary diagnostic code for nested grid simulations (netcdf diagnostics not yet implemented for nested grid) Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
# Conflicts: # GeosCore/global_ch4_mod.F90 # GeosCore/mercury_mod.F90 # GeosCore/seasalt_mod.F90 # GeosCore/tagged_o3_mod.F90 # GeosCore/vdiff_mod.F90 # KPP/fullchem/fullchem_SulfurChemFuncs.F90
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
This bug was introduced when adding the q_ptr field within a parallel do loop to point to the new Species vector containing 3D concentration arrays. Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
This PR is now good to go, pending review. I did integration tests for both GCHP and GC-Classic before and after the updates and get zero diffs with the exception of GC-Classic APM (Metrics and SpeciesConc collections) and RRTMG (RRTMG collection only) simulations. I also did two integration test runs of my ref (13.4.0-alpha.27) and compared them. Those also had diffs in the same places, indicating a parallelization issue separate from my updates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a straightforward PR that swaps out State_Chm%Species(I,J,L,N) for State_Chm%Species(N)%Conc(I.J,L). Good to merge.
Great, I thought those were accounted for. Good to go! |
This is a no-diff structural update that changes the container in which we store species concentrations throughout GEOS-Chem. Species concentrations are currently stored in a 4D array called State_Chm%Species which is allocated with dimensions State_Grid%NX, State_Grid%NY, State_Grid%NZ, and State_Chm%nSpecies. This PR changes that to store species concentrations in one 3D array per species (derived type SpcConc). Pointers to the concentration arrays are stored in a 1D vector (State_Chm%SpeciesVec) of size State_Chm%nSpecies. This work is in progress and names are subject to change.
The motivation of this update is to make the species concentration containers the same size as those stored in MAPL when using GEOS or GEOSgcm. Having them the same size will allow (1) pointing to the concentration arrays in the internal state and (2) avoidance of allocating 3D concentration arrays to contain duplicate information. This will reduce the memory requirement for the model. The update to point to the internal state concentration arrays from the new species vector will be a separate PR.