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

UMich improved LW radiative treatments #3392

Closed
wants to merge 10 commits into from
Closed

Conversation

wlin7
Copy link
Contributor

@wlin7 wlin7 commented Jan 14, 2020

Porting of the first implementation of University of Michigan's
improved longwave radiative treatments.

The new features include the use of surface spectral emissivity,
a new ice-cloud optics scheme (MC6), and a hybrid LW scattering solver.

Special note: This PR is created to aid the browsing of the updated codes. Not to be merged for now. No reviewer needs to be assigned either.

Porting of the first implementation of University of Michigan's
improved longwave radiative treatment.

The new features include the use of surface spectral emissivity,
a new ice-cloud optics scheme, and a hybrid LW scattering solver.

Files modified:

  components/cam/src/control/camsrfexch.F90
  components/cam/src/cpl/atm_comp_mct.F90
  components/cam/src/cpl/atm_import_export.F90
  components/cam/src/cpl/cam_cpl_indices.F90
  components/cam/src/physics/rrtmg/cloud_rad_props.F90
  components/cam/src/physics/rrtmg/ext/rrtmg_lw/rrlw_cld.f90
  components/cam/src/physics/rrtmg/ext/rrtmg_lw/rrtmg_lw_init.f90
  components/cam/src/physics/rrtmg/ext/rrtmg_mcica/mcica_subcol_gen_lw.f90
  components/cam/src/physics/rrtmg/ext/rrtmg_mcica/rrtmg_lw_rad.f90
  components/cam/src/physics/rrtmg/ext/rrtmg_mcica/rrtmg_lw_rtrnmc.f90
  components/cam/src/physics/rrtmg/radiation.F90
  components/cam/src/physics/rrtmg/radlw.F90
  components/cam/src/physics/rrtmg/rrtmg_state.F90
@rljacob rljacob assigned singhbalwinder and wlin7 and unassigned wlin7 Jan 15, 2020
@rljacob rljacob requested review from golaz and removed request for golaz January 15, 2020 02:20
@rljacob
Copy link
Member

rljacob commented Jan 15, 2020

Is this supposed to eventually be in v2?

@golaz
Copy link
Contributor

golaz commented Jan 15, 2020

This is a set of change that is under consideration for v2. By default, it needs to be off and BFB, with namelist flags to be turned on later.

Copy link
Contributor

@golaz golaz left a comment

Choose a reason for hiding this comment

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

  • This needs to be off and BFB by default.
  • From a very quick glance at the code modifications, it was not obvious to me what what the namelist options are to turn them on.
  • We also need a design document summarizing the changes, motivations, ...

real(r8) :: lons2(ncols) ! array of chunk longitude
real :: surface_emis(ncols, nbndlw), minvalue

filename = "/global/cscratch1/sd/xianwen/data/surface_emissivity_1x1_RRTMG_53deg.nc"
Copy link
Contributor

Choose a reason for hiding this comment

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

We cannot had stuff hard-coded like that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Totally agreed, @golaz . All these will be taken care of soon. Note that the input of this climatology surface emissivity data also need to be reworked.

@brhillman
Copy link
Contributor

Why are these changes being developed for RRTMG instead of RRTMGP?

@wlin7
Copy link
Contributor Author

wlin7 commented Jan 15, 2020

Good point, @brhillman . Need to keep that in mind. The developer has not worked with RRTMGP. Also, the current E3SM (v1 and v2alpha) is using RRTMG by default. We have to go with RRTMG for now.

@brhillman
Copy link
Contributor

brhillman commented Jan 15, 2020

For what it's worth, I believe RRTMGP already has the flexibility to do scattering in the LW (would have to check with Robert), and surface emissivity input already has a spectral band dimension (although the current EAM treats every band the same so this is passed as a uniform array, but RRTMGP itself will handle spectral emissivity). It should also be straightforward to bring the new ice cloud optics scheme implemented here into the RRTMGP interface. What concerns me about what is going on here is that the active external/community development has shifted to RRTMGP, but here we are continuing to add new features to the older RRTMG code. Just something to think about.

@rljacob
Copy link
Member

rljacob commented Jan 15, 2020

Should switching to RRTMGP be a consideration for v2?

@brhillman
Copy link
Contributor

brhillman commented Jan 15, 2020

@rljacob I don't see why not. The code is a lot more flexible and probably easier to add these types of things to, it uses mostly the same assumptions as RRTMG under the hood, and the code itself is more efficient. I think the only downside is the current configuration will run slightly slower due to the fact that the absorption coefficient data has twice the spectral resolution of the RRTMG version we have, but this is something that Robert Pincus and I are planning to work on once I finish the GPU implementation of RRTMGP in E3SM-MMF. If this is a dealbreaker for v2 we can take that on sooner, but it's only a small penalty at the moment. Also, RRTMGP is the only configuration that works with the RCE compset that @whannah1 recently implemented (not sure if the aquaplanet configuration requires it, I think it's just RCE that needs it).

@whannah1
Copy link
Contributor

@brhillman aqua planet does not require any specific rad package.

Adding my 2 cents, I'm also very surprised that RRTMG is being used for v2. Makes me think there's a disconnect between the developers and the decision makers...

@golaz
Copy link
Contributor

golaz commented Jan 15, 2020

Water Cycle has had many discussions about what should be included in v2, and RRTMG has not been mentioned. I remember it being discussed as a possibility during an E3SM meeting maybe 18 or 24 months ago, but I don't recall of any follow-up after that.

@brhillman
Copy link
Contributor

@golaz maybe that's my fault for not being a strong enough advocate for that. Regarding including RRTMGP in v2, the main advantage is just that it's a more maintainable codebase and it's rigorously tested, but I don't think it changes answers substantially so I don't think anyone has really pushed for it's inclusion on science merits. But, the code is in master, and ready to go, and I suppose we should talk more about this offline and not dominate the PR thread. My concern here (related to this PR) is just the divergent development efforts.

@cauchyhk
Copy link

cauchyhk commented Jan 15, 2020

Hi everyone, this is Xianglei Huang from Michigan. As the PI who led the team to develop these schemes, I just want to make a couple of points here

  1. Not all scattering treatments are equally efficient and accurate. Our implementation of a hybrid 2S/4S scheme is based on extensive comparison summarized in a paper published last year by our team (led by co-I Ping Yang's group) https://www.sciencedirect.com/science/article/pii/S0022407319305606
  2. The surface emissivity feature was included in the original RRTM code, not a new feature in the RRTMGP. All we did is to provide the surface emissivity file (which itself is not a trivial task, Huang et al. JAS 2016) and, what's more important, to ensure no addition or reduction of LW energy when upward LW flux is passed from surface modules to the atmospheric module. In other words, to recalculate skin-temperature in a way consistent with the spectral emissivity data and with the broadband LW flux passed from the surface module (appendix in Huang et al., J Climate, 2018). This is not something readily available in the RRTMGP.
    With these being said, if there is a V2 version available with RRTMGP, we will be happy to play with that code and put our modifications in. My estimate is about 1-2 weeks that we can get this done.

Wuyin N Lin added 3 commits January 19, 2020 09:57
Following four namelist variables are added

umich_flag_emis, umich_flag_rtr2, umich_flag_mc6, umich_flag_scat_mc6
Files that are changed

   cime/src/drivers/mct/shr/seq_flds_mod.F90
   components/clm/src/cpl/clm_cpl_indices.F90
   components/clm/src/cpl/lnd_import_export.F90
   components/clm/src/main/atm2lndType.F90
   components/clm/src/main/clm_driver.F90
   components/clm/src/main/lnd2atmMod.F90
   components/clm/src/main/lnd2atmType.F90
As no mpishorthand is used, change mpichar to mpi_character
@rljacob
Copy link
Member

rljacob commented Jan 23, 2020

@cauchyhk , we will be moving to RRTMGP. In E3SM, it is located in components/cam/src/physics/rrtmgp/external. Note that this is a git submodule pulled directly from the develop branch of https://github.com/RobertPincus/rte-rrtmgp so ideally your changes would go there first and we would then update the version we are using.

@wlin7
Copy link
Contributor Author

wlin7 commented Feb 20, 2020

The implementation currently has restart non-BFB issue when all the new features are on. It is under investigation.

@jgfouca jgfouca added the CIME label Mar 16, 2020
@rljacob
Copy link
Member

rljacob commented Apr 2, 2020

Notes from IG telecon: restart still being worked on.

@cauchyhk
Copy link

cauchyhk commented Apr 2, 2020

Notes from IG telecon: restart still being worked on.

Hi Robert,

  I believe my group has solved the non-BFB issue for the restart. My postdoc Xianwen Jing has communicated it to Wuyin. The code can be cloned from https://github.com/jingxianwen/E3SM_v2_alpha

     Let me know if you have more questions. 

      Xianglei

@rljacob
Copy link
Member

rljacob commented Apr 23, 2020

update from IG telecon: this will still be integrated for RRTMG support.

@cauchyhk
Copy link

@rljacob Thanks for the update. Is there anything that we can do at Michigan's side to help this integration? Just let us know.

wlin7 added 2 commits May 19, 2020 14:19
…tions

A fix for the calculation of effective diameter (dei) to address
low-biased global LWCF to account for the difference between density of
ice crystals and density of solid ice. This is done by a multiplier of
rhoi/rhows in dei_grid = rei_grid * rhoi/rhows * 2._r8.

Three options for iceflag are now implemented. iceflag=3 is recommended
(default) to use MC6 ice cloud optics along with observed particle size
distribution. iceflag=1 is for MC6 ice cloud optics with 0.1 variance of
Gamma particle size distribbution.

[BFB] for default configuration, i.e., all umich flags are off.
@rljacob
Copy link
Member

rljacob commented May 27, 2020

@wlin7 is this ready?

@wlin7
Copy link
Contributor Author

wlin7 commented May 27, 2020

@rljacob , The codes can go in with no effect on existing tests. But the way reading the prescribed surface spectral emissivity is not suitable for production run. I am working on that. I would prefer waiting for that update. Meanwhile, we look to include the relevant implementation for RRTMGP in this PR.

@rljacob
Copy link
Member

rljacob commented May 28, 2020

I think the RRTMG and RRTMGP changes should be separate PRs since they touch different parts of the code. Is there a reason to combine in to one PR?

@rljacob
Copy link
Member

rljacob commented May 28, 2020

Also please update the PR description. You don't need a file list because that is provided by github and can be found by git commands.

@wlin7
Copy link
Contributor Author

wlin7 commented May 28, 2020

No, Rob, the changes for RRTMG and RRTMGP do not have to combine. The changes in this PR outside of RRTMG will work for both. BTW, I will finalize the PR description when it is about ready to be merged.

@rljacob
Copy link
Member

rljacob commented Jun 4, 2020

note from telecon: this is being updated for I/O and code structure.

@rljacob
Copy link
Member

rljacob commented Jun 22, 2020

@wlin7 what is the status of this PR?

@wlin7
Copy link
Contributor Author

wlin7 commented Jun 23, 2020

Not finished yet, @rljacob .

@rljacob
Copy link
Member

rljacob commented Jul 9, 2020

Notes from telecon: a few more updates are coming. I/O needs to be optimized.

@rljacob
Copy link
Member

rljacob commented Jul 30, 2020

Update from call: testing new I/O strategy is in progress.

@rljacob
Copy link
Member

rljacob commented Aug 14, 2020

What is the status of this PR?

@rljacob
Copy link
Member

rljacob commented Sep 3, 2020

This won't be ready for v2.

@rljacob
Copy link
Member

rljacob commented Jan 21, 2021

update from IG telecon: waiting on integrator

@rljacob
Copy link
Member

rljacob commented Feb 18, 2021

notes from telecon: waiting on code changes.

@wlin7
Copy link
Contributor Author

wlin7 commented Mar 11, 2021

To be updated. Closed for now.

@wlin7 wlin7 closed this Mar 11, 2021
rljacob pushed a commit that referenced this pull request Apr 16, 2021
separation of mct and nuopc data, xcpl and stub compoents
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

8 participants