PUBLIC INTERFACE / DATA / ROUTINES / NAMELIST / ERRORS


module barotropic_diagnostics_mod

     Contact: Isaac Held
     Reviewers: Peter Phillipps


OVERVIEW


   The diagnostics module for the model that solves the barotropic vorticity
   equation on the sphere  
   

DESCRIPTION


   Using the diagnostics manager, creates output files for the barotropic model.
   Variables currently available for output under the "barotropic_diagnostics"
   module are
       zonal wind ("ucomp")
       meridional wind ("vcomp")
       relative vorticity ("vor")
       absolute vorticity ("pv")
       streamfunction ("stream")
       spectral tracer in grid domain ("trs")
       grid tracer ("tr")
       
   Whether or not these fields are actually output, the location of the 
   output, the frequency of output, whether or not the output is averaged
   in time or an instantaneous snapshot, is controlled by a 
   diag_table file utilized by the diagnostics manager module
       
   One can add other diagnostics by following the (somewhat convoluted)
       pattern within the program



OTHER MODULES USED


     diag_manaager_mod
     transforms_mod
     time_manager_mod
     barotropic_dynamics_mod
     barotropic_physics_mod


PUBLIC INTERFACE


  use barotropic_diagnostics_mod [,only: barotropic_diagnostics_init,       
                                         barotropic_diagnostics]
                                

PUBLIC ROUTINES


subroutine  barotropic_diagnostics_init
subroutine  barotropic_diagnostics



 subroutine barotropic_diagnostics_init(Time, num_lon, num_lat)
 
   type(time_type)    , intent(in)     :: Time
         current time 
   integer, intent(in) :: num_lon, num_lat
      num_lon = number of longitudes in global domain
      num_lat = number of latitudes in global domain
         

   Initializes module




subroutine barotropic_diagnostics (Time, Grid, Phys, time_index) type(time_type), intent(in) :: Time type(phys_type), intent(in) :: Phys type(grid_type), intent(in) :: Grid integer, intent(in) :: time_index phys_type is defined in barotropic_physics_mod; Phys is currently empty as there is no information generated in barotropic_physics_mod to be output; grid_type is defined in barotropic_dynamics_mod: Grid contains all of the fields to be output many of the grid fields in grid_type are dimensioned (lon, lat, time_index) where time_index = 1 or 2 -- the two time levels needed to update the state of the model using a leapfrog step are toggled between (:,:,1) and (:,:,2). The input time_index (which must equal either 1 or 2) determines which of these two fields is output) (this is confusing -- the calling program needs to know what has been placed in which slot -- it would be better to store this information within the data type)