PUBLIC INTERFACE / DATA / ROUTINES / NAMELIST / ERRORS


module shallow_diagnostics_mod

     Contact: Isaac Held
     Reviewers: Peter Phillipps


OVERVIEW


   The diagnostics module for the model that solves the shallow water
   equation on the sphere  
   

DESCRIPTION


   Using the diagnostics manager, creates output files for the shallow model.
   Variables currently available for output under the "shallow_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
     shallow_dynamics_mod
     shallow_physics_mod


PUBLIC INTERFACE


  use shallow_diagnostics_mod [,only: shallow_diagnostics_init,       
                                         shallow_diagnostics]
                                

PUBLIC ROUTINES


subroutine  shallow_diagnostics_init
subroutine  shallow_diagnostics



 subroutine shallow_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 shallow_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 shallow_physics_mod; ; grid_type is defined in shallow_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)