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

Add CAMtr_volume_mixing_ratio for SSPs #1553

Merged
merged 3 commits into from
Sep 27, 2021

Conversation

jesusff
Copy link
Contributor

@jesusff jesusff commented Sep 10, 2021

TYPE: enhancement

KEYWORDS: CMIP6, GHG, SSP, climate, radiation

SOURCE: Jesus Fernandez (Instituto de Fisica de Cantabria CSIC-UC, Santander, Spain)

DESCRIPTION OF CHANGES:
Problem:
Missing GHG concentration files for the new Shared Socioeconomic Pathways used in CMIP6 and IPCC AR6
(Meinshausen et al. 2020). They are required to nest WRF into
CMIP6 global models for future regional climate simulation.

Solution:
Add corresponding GHG concentration files using global average data provided via input4MIP (namely, via CSV files
provided by https://greenhousegases.science.unimelb.edu.au). Note that yearly hemispheric averages are also
available from this source, and also 15-degree resolution monthly values. These could be used to tailor GHG
evolution files for a particular WRF domain (see the code used to generate these files in
https://github.com/SantanderMetGroup/wrf-ghg-files/tree/v0.1.2). The files included in this PR are global averages,
consistent with previous CAMtr RCP files.

The files are used as the existing RCP CAMtr files, by renaming or linking the appropriate file with the exact name
CAMtr_volume_mixing_ratio in the WRF running directory. For this to work, WRF needs to be compiled with the macro
-DCLWRFGHG and the long-wave radiation parameterization set to one of: RRTM, CAM, RRTMG (ra_lw_physics = 1,
3, 4).

A successful reading of the files leads to messages such as the following at the beginning of the WRF standard output log:

d01 2033-12-27_00:00:00  CLWRF reading...: istatus:  0 idata: 1 year: 1765 co2:    277.913000000000      n2o:    274.372000000000      ch4:   738.986000000000
d01 2033-12-27_00:00:00  CLWRF reading...: istatus:  0 idata: 2 year: 1766 co2:    277.958000000000      n2o:    274.392000000000      ch4:   739.831000000000
d01 2033-12-27_00:00:00  CLWRF reading...: istatus:  0 idata: 3 year: 1767 co2:    278.017000000000      n2o:    274.426000000000      ch4:   740.729000000000
d01 2033-12-27_00:00:00  CLWRF reading...: istatus:  0 idata: 4 year: 1768 co2:    278.078000000000      n2o:    274.447000000000      ch4:   741.222000000000

LIST OF MODIFIED FILES:

M run/README.physics_files
A run/CAMtr_volume_mixing_ratio.SSP119
A run/CAMtr_volume_mixing_ratio.SSP126
A run/CAMtr_volume_mixing_ratio.SSP245
A run/CAMtr_volume_mixing_ratio.SSP370
A run/CAMtr_volume_mixing_ratio.SSP585

TESTS CONDUCTED:

  1. Model runs with the new files, which are just ASCII files formatted exactly as the existing ones for RCPs used in
    CMIP5.
  2. The new files were compared to the existing ones for RCPs to ensure a consistent order of magnitude and
    evolution of the concentration values. No long-term climate simulation has been yet conducted with the new data
    files, but the files are within the order of magnitude of existing RCP files, which were extensively tested.
    CAMtr file comparison

RELEASE NOTE: Added new CAMtr_volume_mixing_ratio data files for CMIP6 SSPs (https://doi.org/10.5281/zenodo.5507554) containing yearly global average concentrations from input4MIPs (v1.2.0 for historical part and v1.2.1 for scenario evolution).

New CAMtr_volume_mixing_ratio files were generated following the Shared
Socioeconomic Pathways (SSP) used in CMIP6 scenarioMIP simulations. This
files allow for a consistent GHG concentration in the driving CMIP6 GCM
fields and a nested WRF climate simulation.

See https://github.com/SantanderMetGroup/wrf-ghg-files for more details
on these files, the source code used to generate them, and a comparison
with the existing RCP files. These files correspond to release v0.1 in
that repo (v1.2.0/historical and v1.2.1/scenario in the original input4MIP
source).
@jesusff jesusff requested a review from a team as a code owner September 10, 2021 10:57
@dudhia
Copy link
Collaborator

dudhia commented Sep 10, 2021 via email

@jesusff jesusff changed the base branch from master to develop September 10, 2021 15:27
@jesusff
Copy link
Contributor Author

jesusff commented Sep 10, 2021

Ups, sorry. I branched off from master. It should merge cleanly on any branch, though, since these are just new files. I aimed it now to develop, so you can include it in any future release at your convenience.
The details on how the files were generated are in https://github.com/SantanderMetGroup/wrf-ghg-files, along with scripts which could also generate hemispheric or domain-specific concentrations.

@dudhia
Copy link
Collaborator

dudhia commented Sep 10, 2021

We have to check which tests fail, but it may be something we can ignore and will confirm that later.

@weiwangncar
Copy link
Collaborator

@jesusff If you receive any test results from [email protected], please post it in the comments for others to see. Check your spam folder if necessary.

@jesusff
Copy link
Contributor Author

jesusff commented Sep 13, 2021

Dear @weiwangncar , I didn't receive any jenkins results (spam checked also). The "details" link to the failing test in this conversation keeps timing out.

@dudhia
Copy link
Collaborator

dudhia commented Sep 13, 2021 via email

@dudhia
Copy link
Collaborator

dudhia commented Sep 13, 2021

@davegill could you check what happened in the tests here? Thanks. It is just adding files.

@davegill davegill changed the base branch from develop to release-v4.3.1 September 14, 2021 16:15
@davegill
Copy link
Contributor

davegill commented Sep 14, 2021

@jesusff @dudhia @weiwangncar
Wei and Jimy,
This is just adding some files, but not technically a bug fix. Do we want this slated for release v4.3.1 or develop?

Jesus,
Would you please add a bit more information under the "Solution", "TESTS CONDUCTED", and "RELEASE NOTE" sections. For example, what schemes do these files work with? Is there a mechanism to activate these files? For example, what file names and locations are these copied to? Can you show some imagery that indicates these files have been used correctly? The RELEASE NOTE section needs to be a stand-alone description of the modification. It is typical for that information to be a bit redundant (already mentioned in the PR commit message).

@dudhia
Copy link
Collaborator

dudhia commented Sep 14, 2021 via email

@davegill
Copy link
Contributor

jenkins:

Please find result of the WRF regression test cases in the attachment. This build is for Commit ID: 2fcfe751e7939346b89750f4b7c3ec3747692de7, requested by: jesusff for PR: https://github.com/wrf-model/WRF/pull/1553. For any query please send e-mail to David Gill.

    Test Type              | Expected  | Received |  Failed
    = = = = = = = = = = = = = = = = = = = = = = = =  = = = =
    Number of Tests        : 19           18
    Number of Builds       : 48           46
    Number of Simulations  : 163           161        0
    Number of Comparisons  : 103           102        0

    Failed Simulations are: 
    None
    Which comparisons are not bit-for-bit: 
    None

@jesusff
Copy link
Contributor Author

jesusff commented Sep 14, 2021

I added more information to the first post in this conversation, as suggested by @davegill

smileMchen
smileMchen previously approved these changes Sep 15, 2021
Copy link
Collaborator

@smileMchen smileMchen left a comment

Choose a reason for hiding this comment

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

run a test case using the data CAMtr_volume_mixing_ratio.SSP119. It works as expected.

Add new SSP GHG concentration files to README
@jesusff
Copy link
Contributor Author

jesusff commented Sep 16, 2021

Sorry, I just updated the run/README.physics_files to include the new data files. I also took the freedom to briefly explain that the corresponding file needs to be renamed in order to work (this is different to other data files in this README):

https://github.com/jesusff/WRF/blob/0e617c6e2470a1e9c2a939ce2692d6fa7196bcbd/run/README.physics_files#L96

Copy link
Collaborator

@dudhia dudhia left a comment

Choose a reason for hiding this comment

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

Checked the README and this looks fine too. It was good to have the graphed functions as a check.

@davegill davegill merged commit 30b7ad6 into wrf-model:release-v4.3.1 Sep 27, 2021
@weiwangncar
Copy link
Collaborator

weiwangncar commented Dec 10, 2021

@jesusff Are you aware that the gas data are not getting into rrtmg shortwave routine? Is that intentional?

@jesusff
Copy link
Contributor Author

jesusff commented Dec 10, 2021

I'd say it is intentional, but not ideal. If I remember correctly, GHG variation was started by us in U. Cantabria, where Lluis Fita modified the CAM radiation code (thus, the CAMtr naming of the GHG files), which included both SW and LW. This procedure was ported to RRTM in UNSW (Australia), which only handled LW radiation and was typically used in combination with the Dudhia SW scheme. I guess this moved to the LW component of RRTMG when this scheme appeared.

I think there is a need to define the forcings in a consistent way across all physics schemes. E.g. there are also inconsistencies with the NoahMP CO2 levels (SantanderMetGroup/WRF4G#30), which may affect evapotranspiration through stomatal resistance.

This PR only updated the static files with the GHG concentrations, though. No changes were done to the code. Maybe this discussion should be moved to a new issue.

@weiwangncar
Copy link
Collaborator

@jesusff Thanks for your comment. I've moved this to Issue #1597.

@dudhia
Copy link
Collaborator

dudhia commented Dec 10, 2021 via email

davegill added a commit that referenced this pull request Jan 19, 2022
TYPE: enhancement

KEYWORDS: GHG, run-time, radiation, green house gas

SOURCE: internal

DESCRIPTION OF CHANGES:
This PR improves the way to handle green house gases in radiation schemes (CAM, RRTMG, RRTMGF, RRTM). Previously green house gases (GHGs) were either specified to be constant values or read from historical gas concentration datasets (CAMtr). Note that the latter only worked when the WRF code was compiled with the macro flag `-DCLWRFGHG`. This PR modifies the radiation schemes so that input of GHG concentration from CAMtr becomes a run-time option. The old approach of specifying a time invariant value for the GHG concentrations remains available for backward consistency. 

This PR is a reworking of "Run-time option of GHG concentration from various climate RCPs" #1611.

ISSUE: CLWRF tracer gases are not used in RRTMG shortwave code
Fixes #1597

LIST OF MODIFIED FILES:
M       Makefile
M       Registry/Registry.EM_COMMON
M       clean
M       dyn_em/module_first_rk_step_part1.F
M       dyn_em/start_em.F
M       main/depend.common
M       phys/module_physics_init.F
M       phys/module_ra_cam.F
M       phys/module_ra_cam_support.F
M       phys/module_ra_clWRF_support.F
M       phys/module_ra_rrtm.F
M       phys/module_ra_rrtmg_lw.F
M       phys/module_ra_rrtmg_lwf.F
M       phys/module_ra_rrtmg_sw.F
M       phys/module_ra_rrtmg_swf.F
M       phys/module_ra_sw.F
M       phys/module_radiation_driver.F
M       run/README.namelist
M       share/module_check_a_mundo.F
M       share/output_wrf.F

TESTS CONDUCTED:
After all of the commits, testing conducted by Ming Chen:
1. Shown below are differences in T2, LWDNB and SWDNB between RRTMG runs with GHG_INPUT=1 and 
GHG_INPUT=0 after 18 hours of integration. This is a case initialized at 00 UTC 23 February 
2017. We do see impacts caused by GHG changes.  

<img width="372" alt="T2" src="https://user-images.githubusercontent.com/17932265/149973558-4f654474-f107-4118-9ec4-132f43efd59b.png">
<img width="399" alt="LWDNB" src="https://user-images.githubusercontent.com/17932265/149973580-fa0415d0-96d5-4fad-9a5f-7c2d70e73969.png">
<img width="343" alt="SWDNB" src="https://user-images.githubusercontent.com/17932265/149973603-0f1fce93-e944-4d53-aaa4-46d3639365df.png">

2. Results here show the differences in T2 and LWDNB after 1-hour of integration between runs with specified and time-varying  greenhouse gases, respectively. This is a case using RRTMG radiation scheme. 
<img width="435" alt="t2new" src="https://user-images.githubusercontent.com/17932265/150200146-4483eb33-3e3c-452b-a3d7-4dc4e26fda24.png">
<img width="445" alt="lwdnbnew" src="https://user-images.githubusercontent.com/17932265/150200167-fb4ef228-4434-4397-9c30-e17825343b7f.png">
 

RELEASE NOTE: Climatology green house gas (GHG) concentrations from a number of RCPs and newer SSPs are now a run-time option in the WRFV4.4 (previously, they were a compile-time option). This serves two purposes: 1) Since the data files provide compiled global climatological values for co2, n2o, ch4, cfc11 and cfc12 up to 2006 for RCPs and 2014 for SSPs, they are better estimates for historical and current runs. 2) If users have values of their own, they can be easily added to the data file. The user specifies `ghg_input=1` in the physics namelist record for climatology, which is the default in v4.4, or `ghg_input=0` for constant values for backward compatibility. The default file used is CAMtr_volume_mixing_ratio.SSP245, added to the model via PR#[1553](#1553). A simple function for CO2 is now the default when choosing to not use the climo GHG files for RRTM - previously this function is only in RRTMG schemes. This option is only available for radiation schemes of CAM, RRTMG, RRTMGF and RRTM.
vlakshmanan-scala pushed a commit to scala-computing/WRF that referenced this pull request Apr 4, 2024
TYPE: enhancement

KEYWORDS: CMIP6, GHG, SSP, climate, radiation

SOURCE: Jesus Fernandez (Instituto de Fisica de Cantabria CSIC-UC, Santander, Spain)

DESCRIPTION OF CHANGES:
Problem:
Missing GHG concentration files for the new Shared Socioeconomic Pathways used in CMIP6 and IPCC AR6 
([Meinshausen et al. 2020](https://doi.org/10.5194/gmd-13-3571-2020)). They are required to nest WRF into 
CMIP6 global models for future regional climate simulation.

Solution:
Add corresponding GHG concentration files using global average data provided via input4MIP (namely, via CSV files 
provided by https://greenhousegases.science.unimelb.edu.au). Note that yearly hemispheric averages are also 
available from this source, and also 15-degree resolution monthly values. These could be used to tailor GHG 
evolution files for a particular WRF domain (see the code used to generate these files in 
https://github.com/SantanderMetGroup/wrf-ghg-files/tree/v0.1.2). The files included in this PR are global averages, 
consistent with previous CAMtr RCP files.

The files are used as the existing RCP CAMtr files, by renaming or linking the appropriate file with the exact name 
CAMtr_volume_mixing_ratio in the WRF running directory. For this to work, WRF needs to be compiled with the macro 
`-DCLWRFGHG` and the long-wave radiation parameterization set to one of: RRTM, CAM, RRTMG (ra_lw_physics = 1, 
3, 4).

A successful reading of the files leads to messages such as the following at the beginning of the WRF standard output log:
```
d01 2033-12-27_00:00:00  CLWRF reading...: istatus:  0 idata: 1 year: 1765 co2:    277.913000000000      n2o:    274.372000000000      ch4:   738.986000000000
d01 2033-12-27_00:00:00  CLWRF reading...: istatus:  0 idata: 2 year: 1766 co2:    277.958000000000      n2o:    274.392000000000      ch4:   739.831000000000
d01 2033-12-27_00:00:00  CLWRF reading...: istatus:  0 idata: 3 year: 1767 co2:    278.017000000000      n2o:    274.426000000000      ch4:   740.729000000000
d01 2033-12-27_00:00:00  CLWRF reading...: istatus:  0 idata: 4 year: 1768 co2:    278.078000000000      n2o:    274.447000000000      ch4:   741.222000000000
```

LIST OF MODIFIED FILES: 

M       run/README.physics_files
A       run/CAMtr_volume_mixing_ratio.SSP119
A       run/CAMtr_volume_mixing_ratio.SSP126
A       run/CAMtr_volume_mixing_ratio.SSP245
A       run/CAMtr_volume_mixing_ratio.SSP370
A       run/CAMtr_volume_mixing_ratio.SSP585

TESTS CONDUCTED: 
1. Model runs with the new files, which are just ASCII files formatted exactly as the existing ones for RCPs used in 
CMIP5.
2. The new files were compared to the existing ones for RCPs to ensure a consistent order of magnitude and 
evolution of the concentration values. No long-term climate simulation has been yet conducted with the new data 
files, but the files are within the order of magnitude of existing RCP files, which were extensively tested. 
![CAMtr file comparison](https://raw.githubusercontent.com/SantanderMetGroup/wrf-ghg-files/v0.1.2/CAMtr_files.png)
  
RELEASE NOTE: Added new CAMtr_volume_mixing_ratio data files for CMIP6 SSPs (https://doi.org/10.5281/zenodo.5507554) containing yearly global average concentrations from input4MIPs (v1.2.0 for historical part and v1.2.1 for scenario evolution).
vlakshmanan-scala pushed a commit to scala-computing/WRF that referenced this pull request Apr 4, 2024
TYPE: enhancement

KEYWORDS: GHG, run-time, radiation, green house gas

SOURCE: internal

DESCRIPTION OF CHANGES:
This PR improves the way to handle green house gases in radiation schemes (CAM, RRTMG, RRTMGF, RRTM). Previously green house gases (GHGs) were either specified to be constant values or read from historical gas concentration datasets (CAMtr). Note that the latter only worked when the WRF code was compiled with the macro flag `-DCLWRFGHG`. This PR modifies the radiation schemes so that input of GHG concentration from CAMtr becomes a run-time option. The old approach of specifying a time invariant value for the GHG concentrations remains available for backward consistency. 

This PR is a reworking of "Run-time option of GHG concentration from various climate RCPs" wrf-model#1611.

ISSUE: CLWRF tracer gases are not used in RRTMG shortwave code
Fixes wrf-model#1597

LIST OF MODIFIED FILES:
M       Makefile
M       Registry/Registry.EM_COMMON
M       clean
M       dyn_em/module_first_rk_step_part1.F
M       dyn_em/start_em.F
M       main/depend.common
M       phys/module_physics_init.F
M       phys/module_ra_cam.F
M       phys/module_ra_cam_support.F
M       phys/module_ra_clWRF_support.F
M       phys/module_ra_rrtm.F
M       phys/module_ra_rrtmg_lw.F
M       phys/module_ra_rrtmg_lwf.F
M       phys/module_ra_rrtmg_sw.F
M       phys/module_ra_rrtmg_swf.F
M       phys/module_ra_sw.F
M       phys/module_radiation_driver.F
M       run/README.namelist
M       share/module_check_a_mundo.F
M       share/output_wrf.F

TESTS CONDUCTED:
After all of the commits, testing conducted by Ming Chen:
1. Shown below are differences in T2, LWDNB and SWDNB between RRTMG runs with GHG_INPUT=1 and 
GHG_INPUT=0 after 18 hours of integration. This is a case initialized at 00 UTC 23 February 
2017. We do see impacts caused by GHG changes.  

<img width="372" alt="T2" src="https://user-images.githubusercontent.com/17932265/149973558-4f654474-f107-4118-9ec4-132f43efd59b.png">
<img width="399" alt="LWDNB" src="https://user-images.githubusercontent.com/17932265/149973580-fa0415d0-96d5-4fad-9a5f-7c2d70e73969.png">
<img width="343" alt="SWDNB" src="https://user-images.githubusercontent.com/17932265/149973603-0f1fce93-e944-4d53-aaa4-46d3639365df.png">

2. Results here show the differences in T2 and LWDNB after 1-hour of integration between runs with specified and time-varying  greenhouse gases, respectively. This is a case using RRTMG radiation scheme. 
<img width="435" alt="t2new" src="https://user-images.githubusercontent.com/17932265/150200146-4483eb33-3e3c-452b-a3d7-4dc4e26fda24.png">
<img width="445" alt="lwdnbnew" src="https://user-images.githubusercontent.com/17932265/150200167-fb4ef228-4434-4397-9c30-e17825343b7f.png">
 

RELEASE NOTE: Climatology green house gas (GHG) concentrations from a number of RCPs and newer SSPs are now a run-time option in the WRFV4.4 (previously, they were a compile-time option). This serves two purposes: 1) Since the data files provide compiled global climatological values for co2, n2o, ch4, cfc11 and cfc12 up to 2006 for RCPs and 2014 for SSPs, they are better estimates for historical and current runs. 2) If users have values of their own, they can be easily added to the data file. The user specifies `ghg_input=1` in the physics namelist record for climatology, which is the default in v4.4, or `ghg_input=0` for constant values for backward compatibility. The default file used is CAMtr_volume_mixing_ratio.SSP245, added to the model via PR#[1553](wrf-model#1553). A simple function for CO2 is now the default when choosing to not use the climo GHG files for RRTM - previously this function is only in RRTMG schemes. This option is only available for radiation schemes of CAM, RRTMG, RRTMGF and RRTM.
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.

5 participants