E3SM-Project / E3SM

Energy Exascale Earth System Model source code. NOTE: use "maint" branches for your work. Head of master is not validated.
https://docs.e3sm.org/E3SM
Other
343 stars 352 forks source link

Conservation problems for non-water species #2704

Closed golaz closed 5 years ago

golaz commented 5 years ago

From Peter Lauritzen via @PeterCaldwell:

The bugs we found for CAM were related to all non-water tracers (i.e. not Q,CLDLIQ,CLDICE, ...) that were not diffused mass-conservatively in the vertical diffusion (CLUBB) and gravity wave drag. Modal aerosols were not updated correctly with surface flux (i.e. modal aerosol mass budget not closed). Below is a summary of the bug fixes for the incorrect mixing ratios based on a CESM2 release tag:

  1. Remove wet conversion in chemistry/mozart/chemistry.F90 (bad code)

  2. physics/cam/constituents.F90: make cnst_type (identifier for wet or dry mixing ratio) a protected type (so 0. is now impossible).

2a. physics/cam/vertical_diffusion.F90: vertical diffusion code did not conserve mass for dry tracers. Fixed by converting all mixing ratios to wet inside vertical diffusion code!

2b. physics/cam/vertical_diffusion.F90: For modal aerosol the surface flux was added to state assuming state was wet. Fixed with 1a code change!

  1. physics/cam/clubb_intr.F90: CLUBB expects all tracers to be wet and hence (in CAM) its vertical diffusion of non-water variables was not mass-conserving. Fixed by converting to wet in CLUBB interface code!

  2. physics/cam/gw_drag.F90: Gravity wave drag assumes that all tracers are wet. Fixed by converting to wet inside gravity wave code!

PeterCaldwell commented 5 years ago

It was really @beharrop that found this bug in E3SM, though I found out about it independently from my CESM co-chair status...

susburrows commented 5 years ago

This is a critical bug for longer prognostic CO2 simulations. We will need it fixed for v2. Flagging @kvcalvin .

kvcalvin commented 5 years ago

Yes, we will definitely need this one fixed.

rljacob commented 5 years ago

Updating title so its a bug and not a task. See also https://acme-climate.atlassian.net/wiki/spaces/EBGC/pages/915571720/Conservation+problems+for+non-water+species+aerosol+trace+gases

mt5555 commented 5 years ago

@wlin7 : here is the issue w.r.t. tracer conservation in the atmosphere.

AaronDonahue commented 5 years ago

@beharrop , does PR #2883 also fix issue #2765?

beharrop commented 5 years ago

I didn't check, but I wouldn't think so. Energy depends on the water species, but those are always kept as wet mixing ratios, so were not subject to this bug. Though the fact that it was the same two parameterizations for both issues is suspicious.

I can try a quick run with print_energy_errors = .true. set. Does the error show up immediately? Can I get away with running just a few time steps?

AaronDonahue commented 5 years ago

@beharrop , yes, the conservation errors pop up in the first few steps so you should be able to see what happens with print_energy_error = .true. right away.

beharrop commented 5 years ago

@AaronDonahue, great. I will try that and report back.

beharrop commented 5 years ago

@AaronDonahue, Nope. #2883 still yields energy conservation error printouts from gwdrag. I only ran out 14 timesteps and didn't see any errors from CLUBB.

AaronDonahue commented 5 years ago

@beharrop , thanks for checking. I wonder if the CLUBB energy errors have been remedied. It is on my todo list to re-simulate the errors and put together a more comprehensive explanation of what is going on. I'll report back about the CLUBB errors when I do.