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

Make CO2 a function of year instead of a single constant #1173

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

weiwangncar
Copy link
Contributor

This PR makes CO2 a function of the year following what's done in WRF since v4.2, instead of using a single constant of 379, which is valid for 2005. The value for the year is approximately the same as what's observed. For example, for 2020, the observed and computed value is about 414.

@mgduda
Copy link
Contributor

mgduda commented May 29, 2024

@weiwangncar I appreciate that we may be trying to mirror changes from the WRF versions of module_ra_rrtmg_lw.F and module_ra_rrtmg_sw.F, but just in case any possibilities come to mind, I think it would be better if we didn't need to define the CO2 function identically in two separate places. Is there any possibility of a shared function, co2_concentration(year) or similar that would define:

co2 = (280. + 90.*exp(0.02*(year-2000)))*1.e-6

@weiwangncar
Copy link
Contributor Author

@mgduda This can certainly be done. Does it matter which module the function will reside in?

@mgduda
Copy link
Contributor

mgduda commented May 29, 2024

@mgduda This can certainly be done. Does it matter which module the function will reside in?

I suppose it would be ideal if neither SW nor LW "owned" the function, since it would be used by both and there doesn't seem to be a precedent for one of the modules (SW or LW) depending on the other. Would it make sense to have a new "radiation utils" module? That would eliminate significant build dependencies, too. If not, then maybe the function could go in the LW module (assuming CO2 is more relevant there)?

In any case, we should probably get @ldfowler58's input.

@ldfowler58
Copy link
Contributor

Is there a reference for this equation. I find it a little curious that CO2 changes on January 1st every year? As Michael and I talked about last week, is it just a step function? Thanks.

@weiwangncar
Copy link
Contributor Author

@ldfowler58 Jimy came up with this equation. Yes, it would be changed every year. We could do a linear interpolation like what CAM and ghg_input = 1 in WRF does so that CO2 would vary smoothly in time.
@dudhia Comment?

@dudhia
Copy link

dudhia commented Jun 4, 2024

The annual increments are small (0.5%), and the steps would hardly be noticeable in my view. We have not needed interpolation in WRF.

@ldfowler58
Copy link
Contributor

PR 1071 does exactly what you are planning to do, but in a more complete manner. I think that we should go that route after I review the PR.

@weiwangncar
Copy link
Contributor Author

@mgduda @ldfowler58 Based on some discussion I had with Michael, the co2 equation is now added to the model via a function call. Because the function can deal with fractional years, that capability is added to the function. This will smooth out the change of co2 from one day to the next, and from one year to the next.

@ldfowler58
Copy link
Contributor

I still think that we should consider PR 1071 since it also includes N2O and CH4 and is user driven.

@weiwangncar
Copy link
Contributor Author

@ldfowler58 While solution proposed in this PR isn't perfect, it offers a way to update CO2 for long simulations. PR1071 isn't general either. It lets user set values for the four gases in the namelist, but it won't change during the simulations. Again it is probably not ideal for long simulations.

@dudhia
Copy link

dudhia commented Jun 18, 2024 via email

@ldfowler58
Copy link
Contributor

In all fairness to users, I also think that we should review "related" PRs in the order that they have been submitted. I really suggest to review the GHG PR first and then to review your PR.

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

Successfully merging this pull request may close these issues.

None yet

4 participants