Skip to content

Conversation

@fvitt
Copy link

@fvitt fvitt commented Aug 18, 2025

This provides the option for an extended parameterization of CO2 cooling. See issue #1358.

Closes #1358

fvitt added 14 commits January 13, 2025 12:51
	modified:   bld/configure
	modified:   src/physics/waccm/nlte_lw.F90
	new file:   src/physics/waccm/co2cool_modules/co2cool.f90
	new file:   src/physics/waccm/co2cool_modules/coedat.f90
	new file:   src/physics/waccm/co2cool_modules/constants.f90
	new file:   src/physics/waccm/co2cool_modules/precision.f90
	new file:   src/physics/waccm/co2cool_modules/varsub.f90
	new file:   src/physics/waccm/nlte_extco2.F90
	modified:   src/physics/waccm/nlte_extco2.F90
	modified:   src/physics/waccm/nlte_lw.F90
	modified:   src/physics/waccm/co2cool_modules/co2cool.f90
	modified:   src/physics/waccm/nlte_extco2.F90

	new file:   cime_config/testdefs/testmods_dirs/cam/outfrq9s_co2ext/shell_commands
	new file:   cime_config/testdefs/testmods_dirs/cam/outfrq9s_co2ext/user_nl_cam
	new file:   cime_config/testdefs/testmods_dirs/cam/outfrq9s_co2ext/user_nl_clm
	modified:   bld/namelist_files/namelist_definition.xml
	modified:   cime_config/testdefs/testmods_dirs/cam/outfrq9s_co2ext/user_nl_cam
	modified:   src/physics/waccm/co2cool_modules/co2cool.f90
	modified:   src/physics/waccm/nlte_lw.F90
	modified:   src/physics/waccm/radheat.F90
	modified:   src/physics/waccm/co2cool_modules/co2cool.f90
	modified:   src/physics/waccm/co2cool_modules/co2cool.f90
	modified:   src/physics/waccm/co2cool_modules/coedat.f90
	modified:   src/physics/waccm/nlte_extco2.F90
	modified:   src/physics/waccm/nlte_lw.F90
	modified:   src/physics/waccm/nlte_extco2.F90
	modified:   src/physics/waccm/nlte_extco2.F90
	modified:   src/physics/waccm/nlte_extco2.F90
	modified:   src/physics/waccm/nlte_lw.F90
	renamed:    src/physics/waccm/nlte_extco2.F90 -> src/physics/nlte_extco2/nlte_extco2.F90
	renamed:    src/physics/waccm/co2cool_modules/co2cool.f90 -> src/physics/nlte_extco2/src/co2cool.f90
	renamed:    src/physics/waccm/co2cool_modules/coedat.f90 -> src/physics/nlte_extco2/src/coedat.f90
	renamed:    src/physics/waccm/co2cool_modules/constants.f90 -> src/physics/nlte_extco2/src/constants.f90
	renamed:    src/physics/waccm/co2cool_modules/precision.f90 -> src/physics/nlte_extco2/src/precision.f90
	renamed:    src/physics/waccm/co2cool_modules/varsub.f90 -> src/physics/nlte_extco2/src/varsub.f90
	modified:   bld/configure
	modified:   src/physics/cam/radheat.F90
	modified:   src/physics/nlte_extco2/nlte_extco2.F90
@fvitt fvitt self-assigned this Aug 18, 2025
fvitt added 2 commits August 18, 2025 17:55
	new file:   cime_config/testdefs/testmods_dirs/cam/outfrq9s_extco2_nonlte/shell_commands
	new file:   cime_config/testdefs/testmods_dirs/cam/outfrq9s_extco2_nonlte/user_nl_cam
	new file:   cime_config/testdefs/testmods_dirs/cam/outfrq9s_extco2_nonlte/user_nl_clm
	modified:   cime_config/testdefs/testlist_cam.xml
	modified:   cime_config/testdefs/testmods_dirs/cam/outfrq1d_aoa/user_nl_cam
Copy link
Collaborator

@cacraigucar cacraigucar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

During my review, I came across code which has LGPL licensing. I believe this is not permitted, but @briandobbins can confirm this. Because of this, I don't believe this PR can move forward. (See my inline comment for one of the specific modules)

Comment on lines +7997 to +7998
If TRUE, then use the extended CO2 scheme of Lopez-Puertas et al. 2024 as an alternative method of computing non-LTE
CO2 cooling rates in the upper atmosphere.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the DOI be included here as well?

Comment on lines +26 to +30
! COPYRIGHT: (C) 2024-2024 Instituto de Astrofisica de Andalucia (IAA) !
!----------------------------------------------------------------------!
! LICENSE: GNU Lesser General Public License (LGPL) version 2.1 !
! (see file LICENSE_LGPLv2.1) !
!----------------------------------------------------------------------!
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what the legality of bringing this code into CAM is (since it already has its own license and copyright). This is one file of several in this PR with this information. I spoke with @nusbaume, and he believes that we are unable to bring in code with this licensing. @briandobbins, can you confirm this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The corresponding repo is https://github.com/fedef17/CO2_cool_fort

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@briandobbins , Would you be willing to articulate the license issue to the authors?

I have asked the authors if they are willing to switch to Apache2 license. This is the response from the lead author, Manuel Lopez-Puertas (email [email protected]):

"We have been in touch with our colleague expert in those matters. Here are his suggestions and our views.

It would not be straightforward, as there are parts of the code (although not very relevant) taken from otehr software which is licensed under LGPL v2.
We have been told that if the parameterization (licensed under LGPL v2 l) is used as a module library, there should not be any incompatibility. Would exactly is the problem for you?"

CC
Federico Fabiano [email protected]
Daniel Marsh [email protected]
Hanli Liu [email protected]
Bernd Funke [email protected]

Comment on lines +24 to +32
real(dp), parameter :: kboltz = 1.38064853e-23_dp ! Boltzmann constant [J K-1]
real(dp), parameter :: hplanck = 6.62606876e-19_dp ! Planck constant [J * s]
real(dp), parameter :: clight = 2.99792458e+08_dp ! vacuum speed of light [m * s-1]
real(dp), parameter :: Nav = 6.02214076e+23_dp ! Avogadro constant [mol-1]
real(db),parameter :: rgasuni = 8.31441_dp ! molar gas constant R [J/(mol*K)]
real(dp), parameter :: E_fun = 667.3799_dp ! Energy of CO2 fundamental (01101-00001) band
real(dp), parameter :: cp_0 = 1.005e7_dp ! specific enthalpy dry air - erg g-1 K-1
real(dp), parameter :: sperday = 86400.0_dp ! seconds per day
real(dp), parameter :: mo2 = 32.0_db, mo = 16.0_dp, mn2 = 28.0_dp !molecular masses
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A number of these are elements in utils/physconst.F90. Should they come from there to be consistent with CAM?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants