-
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
Add function for NO photolysis calculation #191
Add function for NO photolysis calculation #191
Conversation
real(dk) :: delta_z(size(dry_air_density)+1) ! layer thickness (cm) | ||
real(dk) :: jNO(size(dry_air_density)) ! final photolysis rate |
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 @K20shores, @mattldawson, what do you think about renaming these variables such as?
delta_z
->layer_thickness
jNO
-> photolysis_rate_NO
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.
I like that
N2_densities(1) = N2_densities(2) * 0.9_dk | ||
|
||
call convert_mixing_ratio_to_molecule_cm3(constituents(:,O2_index), dry_air_density, molar_mass_O2, o2_dens(2:)) | ||
o2_dens(1) = o2_dens(2) * 7.0_dk / ( height_at_interfaces(1) - height_at_interfaces(2) ) | ||
call convert_mixing_ratio_to_molecule_cm3(constituents_O2, & | ||
dry_air_density, MOLAR_MASS_O2, O2_densities(2:)) | ||
O2_densities(1) = O2_densities(2) * 7.0_dk / ( height_at_interfaces(1) - height_at_interfaces(2) ) | ||
|
||
call convert_mixing_ratio_to_molecule_cm3(constituents(:,O3_index), dry_air_density, molar_mass_O3, o3_dens(2:)) | ||
o3_dens(1) = o3_dens(2) * 7.0_dk / ( height_at_interfaces(1) - height_at_interfaces(2) ) | ||
call convert_mixing_ratio_to_molecule_cm3(constituents_O3, & | ||
dry_air_density, MOLAR_MASS_O3, O3_densities(2:)) | ||
O3_densities(1) = O3_densities(2) * 7.0_dk / ( height_at_interfaces(1) - height_at_interfaces(2) ) | ||
|
||
call convert_mixing_ratio_to_molecule_cm3(constituents(:,NO_index), dry_air_density, molar_mass_NO, no_dens(2:)) | ||
no_dens(1) = no_dens(2) * 0.9_dk | ||
call convert_mixing_ratio_to_molecule_cm3(constituents_NO_photolysis(:,index_NO), & | ||
dry_air_density, MOLAR_MASS_NO, NO_densities(2:)) | ||
NO_densities(1) = NO_densities(2) * 0.9_dk |
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, @K20shores, I checked that in the CAM code, these (7.0_dk
, 0.9_dk
, and so on) also appear to be magic numbers without explanation. Is there a way to figure out what they represent so we can define them as constexpr variables?
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.
I also don't know. I wonder if they are scale heights, but I don't understand why they would be different. The original paper also didn't really indicate anything about this. We may have to ask Doug.
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.
Great, I asked him about it
5399a16
into
101-calculate-no-photolysis-rate-constants
No description provided.