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

Discussion: Species units metadata and species unit conversion #1820

Closed
1 task done
yantosca opened this issue Jun 5, 2023 · 4 comments · Fixed by #2072
Closed
1 task done

Discussion: Species units metadata and species unit conversion #1820

yantosca opened this issue Jun 5, 2023 · 4 comments · Fixed by #2072
Assignees
Labels
never stale Never label this issue as stale topic: Structural Modifications Related to GEOS-Chem structural modifications (as opposed to scientific updates)
Milestone

Comments

@yantosca
Copy link
Contributor

yantosca commented Jun 5, 2023

Name and Institution (Required)

Name: Bob Yantosca
Institution: Harvard + GCST

Confirm you have reviewed the following documentation

New GEOS-Chem discussion

Updates for the TransportTracers simulation (see PR #1816) have introduced a units string into the species database (e.g. for age of air)

aoa:
  FullName: Age of air uniform source tracer
  Is_Advected: true
  Is_Gas: true
  Is_Tracer: true
  Snk_Horiz: all
  Snk_Mode: constant
  Snk_Value: 0
  Snk_Vert: surface
  Src_Add: true
  Src_Horiz: all
  Src_Mode: constant
  Src_Units: timestep
  Src_Value: 1
  Src_Vert: all
  Units: days

However, we might also be well-served by adding a units (and previous units) fields to the State_Chm%Species object:

State_Chm%Species(N)%Conc(I,J,L)
State_Chm%Species(N)%Units
State_Chm%Species(N)%PreviousUnits

We may also need to be cognizant of any special handling for operating in the MPI environment (e.g. the species database in CESM-GC is only read on the first core, and then a pointer is kept for the other cores).

Thoughts: @msulprizio @lizziel @jimmielin

@yantosca yantosca added never stale Never label this issue as stale topic: Structural Modifications Related to GEOS-Chem structural modifications (as opposed to scientific updates) labels Jun 5, 2023
@lizziel
Copy link
Contributor

lizziel commented Jun 6, 2023

Thanks for creating this @yantosca. I think we should reserve the species database units field for fixed units only. Things get tricky for concentrations since it is unclear what the units are referring to, e.g. restart file only? If they are the restart file units then we will get into trouble with GCHP versus GEOS since those units are different. We don't want to have separate species databases just for a unit difference.

One idea would be to have a species database logical field for whether units are fixed or not, and a string field for fixed units. If units are not fixed then the units would not be included in the species database since they are model-dependent and change. The units string could be in State_Chm%Species(N)%Units so it could be accessed the same as State_Chm%Species(N)%Conc (i.e. no need to get a pointer to the species database entry).

State_Chm%Species(N)%Units could be initialized to the species database units string at start-up for all species with fixed units. If the units are not fixed for a species then they would be initialized to the units string that is hard-coded based on the model you are using (v/v dry for GC, kg/kg total for GEOS).

@jimmielin
Copy link
Contributor

Hi @yantosca, I agree with @lizziel. This could be problematic with unit conversions, and sometimes in external model environments the concentration values are directly updated by setting State_Chm%Units = ... and replacing State_Chm%Species(N)%Conc directly. If each individual species has its own unit it could get a little tricky to implement, but I'm always happy to discuss this in more detail and find a solution that works for the transport tracer simulation.

@yantosca
Copy link
Contributor Author

Closed by #2072

@yantosca yantosca added this to the 14.4.0 milestone Apr 23, 2024
@yantosca
Copy link
Contributor Author

PR #2072 has been merged, so we can close out this discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
never stale Never label this issue as stale topic: Structural Modifications Related to GEOS-Chem structural modifications (as opposed to scientific updates)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants