-
Notifications
You must be signed in to change notification settings - Fork 20
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
Set gas-species profiles in TUV-x and map indices between constituents and MICM #184
Conversation
! Constants | ||
! Clould liquid water | ||
character(len=*), parameter, public :: CLOUD_LIQUID_WATER_CONTENT_LABEL = & | ||
'cloud_liquid_water_mixing_ratio_wrt_moist_air_and_condensed_water' | ||
character(len=*), parameter, public :: CLOUD_LIQUID_WATER_CONTENT_LONG_NAME = & | ||
'cloud water mass mixing ratio with respect to moist air plus all airborne condensates' | ||
character(len=*), parameter, public :: CLOUD_LIQUID_WATER_CONTENT_UNITS = 'kg kg-1' | ||
real(kind_phys), parameter, public :: CLOUD_LIQUID_WATER_CONTENT_MOLAR_MASS = 0.018_kind_phys ! kg mol-1 | ||
! Gas species - dry air, O2, O3 | ||
character(len=*), parameter, public :: DRY_AIR_LABEL = 'air' | ||
character(len=*), parameter, public :: O2_LABEL = 'O2' | ||
character(len=*), parameter, public :: O3_LABEL = 'O3' | ||
character(len=*), parameter, public :: TUVX_GAS_SPECIES_UNITS = 'molecule cm-3' | ||
real(kind_phys), parameter, public :: SCALE_HEIGHT_DRY_AIR = 8.01_kind_phys ! km | ||
real(kind_phys), parameter, public :: SCALE_HEIGHT_O2 = 7.0_kind_phys ! km | ||
real(kind_phys), parameter, public :: SCALE_HEIGHT_O3 = 7.0_kind_phys ! km | ||
!> Molar mass value of dry air is obtained from 'CAM-SIMA/src/utils/std_atm_profile.F90' | ||
real(kind_phys), parameter, public :: MOLAR_MASS_DRY_AIR = 0.0289644_kind_phys ! kg mol-1 | ||
real(kind_phys), parameter, public :: MOLAR_MASS_O2 = 0.0319988_kind_phys ! kg mol-1 | ||
real(kind_phys), parameter, public :: MOLAR_MASS_O3 = 0.0479982_kind_phys ! kg mol-1 |
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.
Hi @mattldawson, @nusbaume, after discussing with Kyle, I decided not to include the TUV-x gas species in the MICM configuration, as we are planning to move the parsing features to OpenAtmos, which will offer more flexibility. Currently, the MICM parser requires species and reaction JSON files, but TUV-x does not have reaction file. I think it would be more efficient to use a separate configuration for TUV-x, as it requires additional component including cloud liquid water content and specific gas species such as O2, O3, and dry air. This module includes the constituents (or species) needed by TUV-x, with molar masses and scale heights hard-coded, as this file functions as a configuration. However, this setup may change in the future as the parser is moved to OpenAtmos.
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.
Thanks for letting me know @boulderdaze! I think as long as MUSICA can tell CAM-SIMA what the composition of the atmosphere is (ignoring physics or dynamics-specific constituents) then whatever method(s) you all choose is fine with me!
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.
Sounds good to me too! We can discuss a longer-term solution when we move the parsing to OpenAtmos
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.
Hi @boulderdaze, thanks for requesting my review. I have some minor comments and a few questions about the code.
end if | ||
end do | ||
|
||
! TODO(jiwon) Check molar mass is non zero as it becomes a denominator for unit converison |
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.
Is this TODO still needed? Or (reading from the review context) maybe replaced with a note that the framework should handle this in the future?
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.
Yes, I added the comment. Could you review it?
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.
looks good!
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.
Thanks @boulderdaze for addressing my comments!
Originator(s): @boulderdaze
Summary (include the keyword ['closes', 'fixes', 'resolves'] and issue number):
Describe any changes made to the namelist: N/A
List all files eliminated and why: N/A
List all files added and what they do:
List all existing files that have been modified, and describe the changes:
List any test failures: N/A
Is this a science-changing update? New physics package, algorithm change, tuning changes, etc? No