PUBLIC INTERFACE ~ PUBLIC DATA ~ PUBLIC ROUTINES ~ NAMELIST ~ DIAGNOSTIC FIELDS ~ ERROR MESSAGES ~ REFERENCES ~ NOTES

Module atmos_grid_mod

Contact: Z. Liang
Reviewers: S. M. Griffies
Change History: WebCVS Log


OVERVIEW

atmos_grid_mod Generate horizontal grid ( either bgrid or spectral grid ) for atmosphere and land model.

There are four subgrids, labeled T (for tracer), C (corner of T), N (north of T) and E (east of T). The following schematic describes the grid cell notation.

                          Ni,j
               +----------+-----------+Ci,j
               |                      |     
               |                      |
               |                      |
               +          +Ti,j       +Ei,j
               |                      |
               |                      |
               +----------+-----------+
The grid_spec file would contains all of the following information.

   x_T, y_T           = Geographic location of T-cell center
   x_vert_T, y_vert_T = Geographic location of T-cell vertices(each cell has 4 vertices)
   x_C, y_C           = Geographic location of C-cell center


OTHER MODULES USED

       mpp_mod
mpp_io_mod
fms_mod
transforms_mod
constants_mod

PUBLIC INTERFACE

atmos_grid_init:
Initialization routine.
generate_atmos_grid:
Generate horizontal grid.
write_atmos_grid_data:
write the Hgrid data to netcdf file
write_atmos_grid_meta:
Write out horizontal grid meta data.
atmos_grid_end:
Destruction routine.


PUBLIC DATA

None.


PUBLIC ROUTINES

  1. atmos_grid_init

    call atmos_grid_init ( )
    DESCRIPTION
    Read namelist, write out version and namelist informaiton.


  2. generate_atmos_grid

    call generate_atmos_grid 
    
    DESCRIPTION
    Calculate geographic locations of T and C-cell center.


    INPUT/OUTPUT
    Hgrid    A derived-type variable that contains horizontal grid information.
       [atmos_grid_type]

  3. write_atmos_grid_data

    call write_atmos_grid_data (unit,Hgrid)
    DESCRIPTION


    INPUT
    unit    The unit corresponding the output netcdf file. Always is returned by mpp_open.
       [integer]
    Hgrid    A derived-type variable that contains horizontal grid information.
       [atmos_grid_type]

  4. write_atmos_grid_meta

    call write_atmos_grid_meta (unit, Hgrid)
    DESCRIPTION


    INPUT
    unit    The unit corresponding the output netcdf file. Always is returned by mpp_open.
       [integer]
    Hgrid    A derived-type variable that contains horizontal grid information.
       [atmos_grid_type]

  5. atmos_grid_end

    call atmos_grid_end ( Hgrid )
    DESCRIPTION
    Deallocates memory used by "atmos_grid_type" variables.


    INPUT/OUTPUT
    Hgrid    A derived-type variable that contains horizontal grid information.
       [atmos_grid_type]


PUBLIC TYPES

  type atmos_grid_type
     real, dimension(:,:), pointer   :: x_T => NULL()      ! geographical longitude of T-cell center
     real, dimension(:,:), pointer   :: y_T => NULL()      ! geographical latitude of T-cell center 
     real, dimension(:,:), pointer   :: x_C => NULL()      ! geographical longitude of C-cell center
     real, dimension(:,:), pointer   :: y_C => NULL()      ! geographical latitude of C-cell center 
     real, dimension(:,:,:), pointer :: x_vert_T => NULL() ! geographical longitude of T-cell vertices
     real, dimension(:,:,:), pointer :: y_vert_T => NULL() ! geographical latitude of T-cell vertices
  end type atmos_grid_type


NAMELIST

&atmos_grid_nml

grid_type
type of grid. Its value can be "bgrid" or "spectral". Its default value is "bgrid".
[character(len=24)]
debug
control standard output.
[logical]
num_lon
number of longitude points.
[integer]
num_lat
number of latitude points.
[integer]
num_fourier
the fourier wavenumbers in the truncation are set equal to fourier_inc*m, where m = 0, num_fourier therefore, the total number of fourier modes is num_fourier +1. This namelist option is only for grid_type = 'spectral'
[integer]
num_spherical
the wavenumber increment (see num_fourier above). This namelist option is only for grid_type = 'spectral'
[integer]
fourier_inc
the maximum meridional wavenumber Retained meridional wavewnumbers are n = 0, num_spherical The total spherical wavenumber is L = n+m. This namelist option is only for grid_type = 'spectral'
[integer]
lon_begin, lon_end
range of the longitude. Default value is : lon_begin=0, lon_end=360. If you want to generate regional grid, you may need to set these namelists. Otherwise use default value. This namelist option is only for grid_type = 'bgrid'
[real]
lat_begin, lat_end
range of the latitude. Default value is : lat_begin=-90, lat_end=90. If you want to generate regional grid, you may need to set these namelists. Otherwise use default value. This namelist option is only for grid_type = 'bgrid'
[real]


DATA SETS

None.


ERROR MESSAGES

None.


top