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
346 stars 353 forks source link

Spurious zonal oscillation of daily insolation #537

Closed cecilehannay closed 8 years ago

cecilehannay commented 8 years ago

Reported in cam5_3_80. I expect this bug to be in ACME too.

Bug was reported in Minghua Zhang's email: A new routine (shr_orb_avg_cosz) has been introduced "that eliminates the spurious zonal oscillation of daily insolation caused by discrete time sampling. The algorithm uses the mean of cosz in a time step. The module shr_orb_mod.F90 calls this subroutine" Added a shr_orb_init routine which is used to set the dt to use in the above calculation. This dt is the size of the radiation time step. If shr_orb_init is not called, the original shr_orb_cosz calculation is used. It is important to note that ALL CESM components will use this modified cosz calculation with the specified dt value if it is turned on. This new shr functionality is controlled via the new CAM namelist logical: use_rad_dt_cosz

Index: components/cam/bld/namelist_files/namelist_definition.xml

--- components/cam/bld/namelist_files/namelist_definition.xml (.../cam5_3_79) (revision 75667) +++ components/cam/bld/namelist_files/namelist_definition.xml (.../cam5_3_80) (revision 75667) @@ -3131,6 +3131,12 @@ Default: FALSE

+<entry id="use_rad_dt_cosz" type="logical" category="radiation"

--- components/cam/src/control/runtime_opts.F90 (.../cam5_3_79) (revision 75667) +++ components/cam/src/control/runtime_opts.F90 (.../cam5_3_80) (revision 75667) @@ -266,6 +266,7 @@ ! or hours (negative) SW/LW radiation will be run continuously ! from the start of an initial run. Default: 0 logical :: spectralflux ! calculate fluxes (up and down) per band. Default: FALSE +logical :: use_rad_dt_cosz ! if true, uses the radiation dt for all cosz calculations

! SCM Options logical :: single_column @@ -443,7 +444,6 @@ character(len=fieldname_lenp2) fwrtpr9(pflds) character(len=fieldname_lenp2) fwrtpr10(pflds)

-! ! Define the cam_inparm namelist ! _NOTE_ If a namelist option is not described in the CAM Users Guide, ! it is not supported.
@@ -479,7 +479,7 @@ namelist /cam_inparm/ print_energy_errors

! radiative heating calculation options

--- components/cam/src/physics/rrtmg/radiation.F90 (.../cam5_3_79) (revision 75667) +++ components/cam/src/physics/rrtmg/radiation.F90 (.../cam5_3_80) (revision 75667) @@ -70,6 +70,7 @@ ! run continuously from the start of an ! initial or restart run logical :: spectralflux = .false. ! calculate fluxes (up and down) per band. +logical :: use_rad_dt_cosz = .false. ! if true, use radiation dt for all cosz calculations

-subroutine radiation_defaultopts(iradsw_out, iradlw_out, iradae_out, irad_always_out, spectralflux_out) +subroutine radiation_defaultopts(iradsw_out, iradlw_out, iradae_out, irad_always_out, spectralflux_out, use_rad_dt_cosz_out) !----------------------------------------------------------------------- ! Purpose: Return default runtime options !----------------------------------------------------------------------- @@ -121,6 +122,7 @@ integer, intent(out), optional :: iradae_out integer, intent(out), optional :: irad_always_out logical, intent(out), optional :: spectralflux_out

@@ -331,6 +340,9 @@ ! liquid budgets. integer :: history_budget_histfile_num ! output history file number for budget fields integer :: err +

gold2718 commented 8 years ago

Wasn't this brought into ACME with commit c40047604afd3fccee432083d6c1aacfdc0ca012 ?

cecilehannay commented 8 years ago

Yes, I agree it looks like it was brought into ACME. We are trying to find a way to easily find track the bugs found in CAM. Here we decided to use the label "PotentialBug".

mt5555 commented 8 years ago

@rljacob : since this is in ACME, should we add the "Bug" label? Or add "Bug" and remove "PotentialBug"?

rljacob commented 8 years ago

Right this is a "Bug", not a "PotentialBug".

rljacob commented 8 years ago

@cecilehannay we're using "PotentialBug" for "In CAM but NOT in ACME".

rljacob commented 8 years ago

Also changed the title which should describe the bug.

cecilehannay commented 8 years ago

This issue is the same as: https://github.com/ACME-Climate/ACME/issues/139

This was fixed in: https://github.com/ACME-Climate/ACME/pull/222