17         gw_dtdt, gw_dudt, gw_dvdt, tau_tofd, tau_mtb, tau_ogw,     &
 
   18         tau_ngw, zmtb, zlwb, zogw, dudt_mtb, dudt_ogw, dudt_tms,   &
 
   19         tot_zmtb, tot_zlwb, tot_zogw,                              &
 
   20         tot_tofd, tot_mtb, tot_ogw, tot_ngw,                       &
 
   21         du3dt_mtb,du3dt_ogw, du3dt_tms, du3dt_ngw, dv3dt_ngw,      &
 
   22         dtdt, dudt, dvdt, errmsg, errflg)
 
   24        use machine,                
only: kind_phys
 
   29        integer,              
intent(in) :: im, levs
 
   30        real(kind=kind_phys), 
intent(in) :: dtf
 
   31        logical,              
intent(in) :: ldiag_ugwp      
 
   33        real(kind=kind_phys), 
intent(in),    
dimension(:)   :: zmtb, zlwb, zogw
 
   34        real(kind=kind_phys), 
intent(in),    
dimension(:)   :: tau_mtb, tau_ogw, tau_tofd, tau_ngw
 
   35        real(kind=kind_phys), 
intent(inout), 
dimension(:)   :: tot_mtb, tot_ogw, tot_tofd, tot_ngw
 
   36        real(kind=kind_phys), 
intent(inout), 
dimension(:)   :: tot_zmtb, tot_zlwb, tot_zogw
 
   37        real(kind=kind_phys), 
intent(in),    
dimension(:,:) :: gw_dtdt, gw_dudt, gw_dvdt, dudt_mtb, dudt_tms
 
   38        real(kind=kind_phys), 
intent(in),    
dimension(:,:), 
optional :: dudt_ogw
 
   39        real(kind=kind_phys), 
intent(inout), 
dimension(:,:), 
optional :: du3dt_mtb, du3dt_ogw, du3dt_tms, du3dt_ngw, dv3dt_ngw
 
   40        real(kind=kind_phys), 
intent(inout), 
dimension(:,:) :: dtdt, dudt, dvdt
 
   42        character(len=*),        
intent(out) :: errmsg
 
   43        integer,                 
intent(out) :: errflg
 
   50          tot_zmtb =  tot_zmtb + dtf *zmtb
 
   51          tot_zlwb =  tot_zlwb + dtf *zlwb
 
   52          tot_zogw =  tot_zogw + dtf *zogw
 
   54          tot_tofd  = tot_tofd + dtf *tau_tofd
 
   55          tot_mtb   = tot_mtb +  dtf *tau_mtb
 
   56          tot_ogw   = tot_ogw +  dtf *tau_ogw
 
   57          tot_ngw   = tot_ngw +  dtf *tau_ngw
 
   59          du3dt_mtb = du3dt_mtb + dtf *dudt_mtb
 
   60          du3dt_tms = du3dt_tms + dtf *dudt_tms
 
   61          du3dt_ogw = du3dt_ogw + dtf *dudt_ogw
 
   62          du3dt_ngw = du3dt_ngw + dtf *gw_dudt
 
   63          dv3dt_ngw = dv3dt_ngw + dtf *gw_dvdt
 
 
subroutine cires_ugwp_post_run(ldiag_ugwp, dtf, im, levs, gw_dtdt, gw_dudt, gw_dvdt, tau_tofd, tau_mtb, tau_ogw, tau_ngw, zmtb, zlwb, zogw, dudt_mtb, dudt_ogw, dudt_tms, tot_zmtb, tot_zlwb, tot_zogw, tot_tofd, tot_mtb, tot_ogw, tot_ngw, du3dt_mtb, du3dt_ogw, du3dt_tms, du3dt_ngw, dv3dt_ngw, dtdt, dudt, dvdt, errmsg, errflg)
This module contains the calculation of the UGWP v0 diagnostics (ldiag_ugwp)