Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

CESM1.2.1 and earlier- Temperature tendency output TTEND_TOT / PTTEND / DTCORE

STATUS: added by cacraig April 21, 2014 - see final post for details.
Affected release 1.2.1 and earlier
UPDATED:
- fixed in CESM1.2.2 (release target June 1, 2014)
- User will need to fix 1.0.x with the description below if they require the fix in this version

Bugzilla 1958

--------------------

Hello

Can someone explain me why

TTEND_TOT (total temperature tendency) != PTTEND (temperature tendency from physics) + DTCORE (temperature tendency from dynamical core).

i.e. physics and dynamics temperature tendency doesn't match total temperature tendency.

From our analysis of the source code and the documentation we cannot figure what's missing to get TTEND_TOT.
Does someone have a hint what's missing?

Sebastian
 

olson

Member
   I replicated the probem and you are correct, something is missing.  Specifically, it is
 a combination of a possibly misleading "feature" and a bug in the calculation of DTCORE
 (TTEND_TOT also had been computed incorrectly in earlier versions of the model, but has
 been corrected as of at least "cesm1_1_1")

  1) feature:  the "addfld" call for DTCORE indicates that the field be written to the
     history file as "instantaneous" rather than time averaged by default.  The other
     two fields are written time averaged by default.  To rectify this in your script,
     add the following to the "FINCL[x]" in your namelist:

         'TTEND_TOT:A','PTTEND:A','DTCORE:A'  for time averaged results
         or
         'TTEND_TOT:I','PTTEND:I','DTCORE:I'  for instantaneous results

  2) bug:  DTCORE is computed by backing out the temperature tendency from the difference
     of the before-and-after "dry static energy" states.  This is incorrect for closure of
     the T-budget.  The correct computation should involve the before-and-after T states
     directly.

 (this was tested only for the FV dynamical core)

   Thank you for catching this.


 

olson

Member
   I replicated the probem and you are correct, something is missing.  Specifically, it is
 a combination of a possibly misleading "feature" and a bug in the calculation of DTCORE
 (TTEND_TOT also had been computed incorrectly in earlier versions of the model, but has
 been corrected as of at least "cesm1_1_1")

  1) feature:  the "addfld" call for DTCORE indicates that the field be written to the
     history file as "instantaneous" rather than time averaged by default.  The other
     two fields are written time averaged by default.  To rectify this in your script,
     add the following to the "FINCL[x]" in your namelist:

         'TTEND_TOT:A','PTTEND:A','DTCORE:A'  for time averaged results
         or
         'TTEND_TOT:I','PTTEND:I','DTCORE:I'  for instantaneous results

  2) bug:  DTCORE is computed by backing out the temperature tendency from the difference
     of the before-and-after "dry static energy" states.  This is incorrect for closure of
     the T-budget.  The correct computation should involve the before-and-after T states
     directly.

 (this was tested only for the FV dynamical core)

   Thank you for catching this.


 

olson

Member
   I replicated the probem and you are correct, something is missing.  Specifically, it is
 a combination of a possibly misleading "feature" and a bug in the calculation of DTCORE
 (TTEND_TOT also had been computed incorrectly in earlier versions of the model, but has
 been corrected as of at least "cesm1_1_1")

  1) feature:  the "addfld" call for DTCORE indicates that the field be written to the
     history file as "instantaneous" rather than time averaged by default.  The other
     two fields are written time averaged by default.  To rectify this in your script,
     add the following to the "FINCL[x]" in your namelist:

         'TTEND_TOT:A','PTTEND:A','DTCORE:A'  for time averaged results
         or
         'TTEND_TOT:I','PTTEND:I','DTCORE:I'  for instantaneous results

  2) bug:  DTCORE is computed by backing out the temperature tendency from the difference
     of the before-and-after "dry static energy" states.  This is incorrect for closure of
     the T-budget.  The correct computation should involve the before-and-after T states
     directly.

 (this was tested only for the FV dynamical core)

   Thank you for catching this.


 

olson

Member
   I replicated the probem and you are correct, something is missing.  Specifically, it is
 a combination of a possibly misleading "feature" and a bug in the calculation of DTCORE
 (TTEND_TOT also had been computed incorrectly in earlier versions of the model, but has
 been corrected as of at least "cesm1_1_1")

  1) feature:  the "addfld" call for DTCORE indicates that the field be written to the
     history file as "instantaneous" rather than time averaged by default.  The other
     two fields are written time averaged by default.  To rectify this in your script,
     add the following to the "FINCL[x]" in your namelist:

         'TTEND_TOT:A','PTTEND:A','DTCORE:A'  for time averaged results
         or
         'TTEND_TOT:I','PTTEND:I','DTCORE:I'  for instantaneous results

  2) bug:  DTCORE is computed by backing out the temperature tendency from the difference
     of the before-and-after "dry static energy" states.  This is incorrect for closure of
     the T-budget.  The correct computation should involve the before-and-after T states
     directly.

 (this was tested only for the FV dynamical core)

   Thank you for catching this.


 

olson

Member
   I replicated the probem and you are correct, something is missing.  Specifically, it is
 a combination of a possibly misleading "feature" and a bug in the calculation of DTCORE
 (TTEND_TOT also had been computed incorrectly in earlier versions of the model, but has
 been corrected as of at least "cesm1_1_1")

  1) feature:  the "addfld" call for DTCORE indicates that the field be written to the
     history file as "instantaneous" rather than time averaged by default.  The other
     two fields are written time averaged by default.  To rectify this in your script,
     add the following to the "FINCL[x]" in your namelist:

         'TTEND_TOT:A','PTTEND:A','DTCORE:A'  for time averaged results
         or
         'TTEND_TOT:I','PTTEND:I','DTCORE:I'  for instantaneous results

  2) bug:  DTCORE is computed by backing out the temperature tendency from the difference
     of the before-and-after "dry static energy" states.  This is incorrect for closure of
     the T-budget.  The correct computation should involve the before-and-after T states
     directly.

 (this was tested only for the FV dynamical core)

   Thank you for catching this.


 

olson

Member
   I replicated the probem and you are correct, something is missing.  Specifically, it is
 a combination of a possibly misleading "feature" and a bug in the calculation of DTCORE
 (TTEND_TOT also had been computed incorrectly in earlier versions of the model, but has
 been corrected as of at least "cesm1_1_1")

  1) feature:  the "addfld" call for DTCORE indicates that the field be written to the
     history file as "instantaneous" rather than time averaged by default.  The other
     two fields are written time averaged by default.  To rectify this in your script,
     add the following to the "FINCL[x]" in your namelist:

         'TTEND_TOT:A','PTTEND:A','DTCORE:A'  for time averaged results
         or
         'TTEND_TOT:I','PTTEND:I','DTCORE:I'  for instantaneous results

  2) bug:  DTCORE is computed by backing out the temperature tendency from the difference
     of the before-and-after "dry static energy" states.  This is incorrect for closure of
     the T-budget.  The correct computation should involve the before-and-after T states
     directly.

 (this was tested only for the FV dynamical core)

   Thank you for catching this.


 

olson

Member
   I replicated the probem and you are correct, something is missing.  Specifically, it is
 a combination of a possibly misleading "feature" and a bug in the calculation of DTCORE
 (TTEND_TOT also had been computed incorrectly in earlier versions of the model, but has
 been corrected as of at least "cesm1_1_1")

  1) feature:  the "addfld" call for DTCORE indicates that the field be written to the
     history file as "instantaneous" rather than time averaged by default.  The other
     two fields are written time averaged by default.  To rectify this in your script,
     add the following to the "FINCL[x]" in your namelist:

         'TTEND_TOT:A','PTTEND:A','DTCORE:A'  for time averaged results
         or
         'TTEND_TOT:I','PTTEND:I','DTCORE:I'  for instantaneous results

  2) bug:  DTCORE is computed by backing out the temperature tendency from the difference
     of the before-and-after "dry static energy" states.  This is incorrect for closure of
     the T-budget.  The correct computation should involve the before-and-after T states
     directly.

 (this was tested only for the FV dynamical core)

   Thank you for catching this.


 

olson

Member
   I replicated the probem and you are correct, something is missing.  Specifically, it is
 a combination of a possibly misleading "feature" and a bug in the calculation of DTCORE
 (TTEND_TOT also had been computed incorrectly in earlier versions of the model, but has
 been corrected as of at least "cesm1_1_1")

  1) feature:  the "addfld" call for DTCORE indicates that the field be written to the
     history file as "instantaneous" rather than time averaged by default.  The other
     two fields are written time averaged by default.  To rectify this in your script,
     add the following to the "FINCL[x]" in your namelist:

         'TTEND_TOT:A','PTTEND:A','DTCORE:A'  for time averaged results
         or
         'TTEND_TOT:I','PTTEND:I','DTCORE:I'  for instantaneous results

  2) bug:  DTCORE is computed by backing out the temperature tendency from the difference
     of the before-and-after "dry static energy" states.  This is incorrect for closure of
     the T-budget.  The correct computation should involve the before-and-after T states
     directly.

 (this was tested only for the FV dynamical core)

   Thank you for catching this.


 
Thank you for your comment. If I get you right, I'll have to do two things:1. modify namelist (easy, I'll test this right now)2. modify the DTCORE calculations to get the correct dynamics temperature tendency.If you do have a fix for that, I'll appreciate thatWe are using CESM/WACCM 1.2.0 with the FV core.Sebastian
 
Thank you for your comment. If I get you right, I'll have to do two things:1. modify namelist (easy, I'll test this right now)2. modify the DTCORE calculations to get the correct dynamics temperature tendency.If you do have a fix for that, I'll appreciate thatWe are using CESM/WACCM 1.2.0 with the FV core.Sebastian
 
Thank you for your comment. If I get you right, I'll have to do two things:1. modify namelist (easy, I'll test this right now)2. modify the DTCORE calculations to get the correct dynamics temperature tendency.If you do have a fix for that, I'll appreciate thatWe are using CESM/WACCM 1.2.0 with the FV core.Sebastian
 
Thank you for your comment. If I get you right, I'll have to do two things:1. modify namelist (easy, I'll test this right now)2. modify the DTCORE calculations to get the correct dynamics temperature tendency.If you do have a fix for that, I'll appreciate thatWe are using CESM/WACCM 1.2.0 with the FV core.Sebastian
 
Thank you for your comment. If I get you right, I'll have to do two things:1. modify namelist (easy, I'll test this right now)2. modify the DTCORE calculations to get the correct dynamics temperature tendency.If you do have a fix for that, I'll appreciate thatWe are using CESM/WACCM 1.2.0 with the FV core.Sebastian
 
Thank you for your comment. If I get you right, I'll have to do two things:1. modify namelist (easy, I'll test this right now)2. modify the DTCORE calculations to get the correct dynamics temperature tendency.If you do have a fix for that, I'll appreciate thatWe are using CESM/WACCM 1.2.0 with the FV core.Sebastian
 
Thank you for your comment. If I get you right, I'll have to do two things:1. modify namelist (easy, I'll test this right now)2. modify the DTCORE calculations to get the correct dynamics temperature tendency.If you do have a fix for that, I'll appreciate thatWe are using CESM/WACCM 1.2.0 with the FV core.Sebastian
 
Thank you for your comment. If I get you right, I'll have to do two things:1. modify namelist (easy, I'll test this right now)2. modify the DTCORE calculations to get the correct dynamics temperature tendency.If you do have a fix for that, I'll appreciate thatWe are using CESM/WACCM 1.2.0 with the FV core.Sebastian
 

olson

Member
   In the module, "physpkg.F90" modify 2 routines:

   subroutine tphysac:

        move the code block:

       ! store dse after tphysac in buffer
       do k = 1,pver
          dtcore(:ncol,k) = state%s(:ncol,k)
       end do

       to just below the line:

       state%t(:ncol,:pver) = tini(:ncol,:pver) + ztodt*tend%dtdt(:ncol,:pver)

       and change:

       dtcore(:ncol,k) = state%s(:ncol,k)

       to

       dtcore(:ncol,k) = state%t(:ncol,k)

   subroutine tphysbc:

       change the line:

       dtcore(:ncol,k) = (state%s(:ncol,k) - dtcore(:ncol,k))/(cpair*ztodt)

       to

       dtcore(:ncol,k) = (tini(:ncol,k) - dtcore(:ncol,k))/(ztodt) + tend%dTdt(:ncol,k)


     ... that should do it.
 

olson

Member
   In the module, "physpkg.F90" modify 2 routines:

   subroutine tphysac:

        move the code block:

       ! store dse after tphysac in buffer
       do k = 1,pver
          dtcore(:ncol,k) = state%s(:ncol,k)
       end do

       to just below the line:

       state%t(:ncol,:pver) = tini(:ncol,:pver) + ztodt*tend%dtdt(:ncol,:pver)

       and change:

       dtcore(:ncol,k) = state%s(:ncol,k)

       to

       dtcore(:ncol,k) = state%t(:ncol,k)

   subroutine tphysbc:

       change the line:

       dtcore(:ncol,k) = (state%s(:ncol,k) - dtcore(:ncol,k))/(cpair*ztodt)

       to

       dtcore(:ncol,k) = (tini(:ncol,k) - dtcore(:ncol,k))/(ztodt) + tend%dTdt(:ncol,k)


     ... that should do it.
 

olson

Member
   In the module, "physpkg.F90" modify 2 routines:

   subroutine tphysac:

        move the code block:

       ! store dse after tphysac in buffer
       do k = 1,pver
          dtcore(:ncol,k) = state%s(:ncol,k)
       end do

       to just below the line:

       state%t(:ncol,:pver) = tini(:ncol,:pver) + ztodt*tend%dtdt(:ncol,:pver)

       and change:

       dtcore(:ncol,k) = state%s(:ncol,k)

       to

       dtcore(:ncol,k) = state%t(:ncol,k)

   subroutine tphysbc:

       change the line:

       dtcore(:ncol,k) = (state%s(:ncol,k) - dtcore(:ncol,k))/(cpair*ztodt)

       to

       dtcore(:ncol,k) = (tini(:ncol,k) - dtcore(:ncol,k))/(ztodt) + tend%dTdt(:ncol,k)


     ... that should do it.
 
Top