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

Module rad_utilities_mod

Contact:  fil
Reviewers:  smf
Change History: WebCVS Log


OVERVIEW

Code to define the derived data types and provide table search routines.

This code is used in the radiation code package as a helper module. It defines many derived data types used in radiation calculation. This code also provides table search routines and simple arithmatic routines.


OTHER MODULES USED

         fms_mod
time_manager_mod

PUBLIC INTERFACE

rad_utilities_init:
Subroutine to initialize radiation utility package.
check_derived_types:
Subroutine to verify that all logical elements of derived-type variables were initialized during the initialization phase.
locate_in_table:
Subroutine to locate index and residual value from an array provided with array and axis information
looktab_type1:
Subroutine to calculate answer from input differentials.
looktab_type2:
Subroutine to calculate answer from input differentials.
looktab_type3:
Subroutine to calculate answer from input differentials.
table1_alloc:
Allocate the longwave tables.
table2_alloc:
Allocate the longwave tables.
table3_alloc:
Allocate the longwave tables.
thickavg_3d:
Subroutine to use thick-averaging technique to define band interval single scattering properties.
thickavg_0d:
Subroutine to use thick-averaging technique to define band interval single scattering properties.
thickavg_isccp:
Subroutine to use thick-averaging technique to define band interval single scattering properties for a single specified band.
thickavg_1band:
Subroutine to use thick-averaging technique to define band interval single scattering properties for a single specified band.
thinavg:
Subroutine to use thin-averaging technique to define band interval single scattering properties.
rad_utilities_end:
Subroutine to close out the radiation utility package.


PUBLIC DATA

None.


PUBLIC ROUTINES

  1. rad_utilities_init

    call rad_utilities_init 
    
    DESCRIPTION
    This subroutine reads the input namelist file and initializes rad_utilities_nml. It then writes out this namelist to the output logfile. It also sets up the radiation calculation environment and the initialization flag variable.


  2. check_derived_types

    call check_derived_types 
    
    DESCRIPTION
    This subroutine checks that all of the variable names ending in "_iz" in its public derived-type module variables are set to .true.. If additional types or variables within current public types are added, it is necessary to also add the corresponding "_iz" variable, initialized in this module to .false., and then set to .true. when the variable is initialized, and add a check in this routine to verify that initialization.


  3. locate_in_table

    call locate_in_table (table_axis, x, dx, ix, k_min, k_max)
    DESCRIPTION
    given array x and an arithmetic sequence of table column headings tabxmin, tabxmin+tabdeltax, ..., corresponding to column ixlow, ixlow+1, ..., ixupp, Locate returns the array ix is column indices and the array dx of residuals.


    INPUT
    table_axis    table_axis contains the axis information such as, min, increment, and first column values.
       [table_axis_type]
    x    array from which data is to be searched
       [real]
    k_min    minimum k value of the search domain
       [integer]
    k_max    maximum k value of the search domain
       [integer]

    OUTPUT
    dx    residual between x and x(ix+first_column)
       [real]
    ix    index values of the searched domain in the array
       [integer]

  4. looktab_type1

    call looktab_type1 (tab, ix, iy, dx, dy, answer, k_min, k_max)
    DESCRIPTION
    given arrays ix(:,:,:) and iy(:,:,:) of integral subscripts and arrays dx(:,:,:) and dy(:,:,:) of differences from x(:,:,:) and y(:,:,:), calculate answer(:,:,:) = f(x(:,:,:), y(:,:,:)) from four tables of values, f, df/dx, df/dy, and d2f/dxdy.


    INPUT
    tab    The data array that contains function values and differentials
       [longwave_tables1_type]
    ix    x subscript of input data array
       [integer]
    iy    y subscript of input data array
       [integer]
    dx    x step in the x subscript space
       [real]
    dy    y step in the y subscript space
       [real]
    k_min    the minimum k value of the domain
       [integer]
    k_max    the maximum k value of the domain
       [integer]

    OUTPUT
    answer    the answer to be calculated
       [real]

  5. looktab_type2

    call looktab_type2 (tab, ix, iy, dx, dy, answer, k_min, k_max, m)
    DESCRIPTION
    given arrays ix(:,:,:) and iy(:,:,:) of integral subscripts and arrays dx(:,:,:) and dy(:,:,:) of differences from x(:,:,:) and y(:,:,:), calculate answer(:,:,:) = f(x(:,:,:), y(:,:,:)) from four tables of values, f, df/dx, df/dy, and d2f/dxdy. The difference between this version about the version above is that the differential arrays are 3 dimensional.


    INPUT
    tab    The data array that contains function values and differentials
       [longwave_tables2_type]
    ix    x subscript of input data array
       [integer]
    iy    y subscript of input data array
       [integer]
    dx    x step in the x subscript space
       [real]
    dy    y step in the y subscript space
       [real]
    k_min    the minimum k value of the domain
       [integer]
    k_max    the maximum k value of the domain
       [integer]
    m    the z indice of the differential arrays
       [integer]

    OUTPUT
    answer    the answer to be calculated
       [real]

  6. looktab_type3

    call looktab_type3 (tab, ix, dx, answer, k_min, k_max, n)
    DESCRIPTION
    given arrays ix(:,:,:) and iy(:,:,:) of integral subscripts and arrays dx(:,:,:) and dy(:,:,:) of differences from x(:,:,:) and y(:,:,:), calculate answer(:,:,:) = f(x(:,:,:), y(:,:,:)) from four tables of values, f, df/dx, df/dy, and d2f/dxdy. In this version, only f(x,y) and f(x,y)+dx*df/dx is used. Probably the f(x,y) is homogeneous in y space.


    INPUT
    tab    The data array that contains function values and differentials
       [longwave_tables3_type]
    ix    x subscript of input data array
       [integer]
    dx    x step in the x subscript space
       [real]
    k_min    the minimum k value of the domain
       [integer]
    k_max    the maximum k value of the domain
       [integer]
    n    the z indice of the differential arrays
       [integer]

    OUTPUT
    answer    the answer to be calculated
       [real]

  7. table1_alloc

    call table1_alloc (tab, dim1, dim2)
    DESCRIPTION
    Allocate the longwave tables based on 2 dimension sizes


    INPUT
    dim1    size of the x dimension
       [integer]
    dim2    size of the y dimension
       [integer]

    INPUT/OUTPUT
    tab    The longwave tables
       [longwave_tables1_type]

  8. table2_alloc

    call table2_alloc (tab, dim1, dim2)
    DESCRIPTION
    Allocate the longwave tables based on 3 dimension sizes


    INPUT
    dim1    size of the x dimension
       [integer]
    dim2    size of the y dimension
       [integer]
    dim3    size of the z dimension
       [integer]

    INPUT/OUTPUT
    tab    The longwave tables
       [longwave_tables2_type]

  9. table3_alloc

    call table3_alloc (tab, dim1, dim2)
    DESCRIPTION
    Allocate the longwave tables based on 2 dimension sizes


    INPUT
    dim1    size of the x dimension
       [integer]
    dim2    size of the y dimension
       [integer]

    INPUT/OUTPUT
    tab    The longwave tables
       [longwave_tables3_type]

  10. thickavg_3d

    call thickavg_3d (nivl1 , nivl2 , nivls , & nbands, $ extivl , ssalbivl , asymmivl, solflxivl, & solflxband, extband , ssalbband , asymmband)
    DESCRIPTION
    use the thick-averaging technique to define the single-scattering properties of the parameterization band spectral intervals from the specified spectral intervals of the particular scatterer.

    references:

    edwards,j.m. and a. slingo, studies with a flexible new radiation code I: choosing a configuration for a large-scale model., q.j.r. meteorological society, 122, 689-719, 1996.

    note: the 1.0E-100 factor to calculate asymmband is to prevent division by zero.


    INPUT
    nivl1    interval number for the specified single-scattering properties corresponding to the first psuedo- monochromatic frequency in a given parameterization band
       [integer]
    nivl2    interval number for the specified single-scattering properties corresponding to the last psuedo- monochromatic frequency in a given parameterization band
       [integer]
    nivls    number of specified scattering spectral intervals
       [integer]
    nbands    number of spectral bands
       [integer]
    extivl    the specified spectral values of the extinction coefficient
       [real]
    asymmivl    the specified spectral values of the asymmetry factor
       [real]
    solflxivl    the solar flux in each specified scattering spectral interval
       [real]
    solflxband    the solar flux in each parameterization band
       [real]

    INPUT/OUTPUT
    ssalbivl    the specified spectral values of the single-scattering albedo
       [real]

    OUTPUT
    extband    the parameterization band values of the extinction coefficient
       [real]
    ssalbband    the parameterization band values of the single-scattering albedo
       [real]
    asymmband    the parameterization band values of the asymmetry factor
       [real]

  11. thickavg_0d

    call thickavg_0d (nivl1 , nivl2 , nivls , & nbands, & extivl , ssalbivl , asymmivl, solflxivl, & solflxband, extband , ssalbband , asymmband)
    DESCRIPTION
    use the thick-averaging technique to define the single-scattering properties of the parameterization band spectral intervals from the specified spectral intervals of the particular scatterer.

    references:

    edwards,j.m. and a. slingo, studies with a flexible new radiation code I: choosing a configuration for a large-scale model., q.j.r. meteorological society, 122, 689-719, 1996.

    note: the 1.0E-100 factor to calculate asymmband is to prevent division by zero.


    INPUT
    nivl1    interval number for the specified single-scattering properties corresponding to the first psuedo- monochromatic frequency in a given parameterization band
       [integer]
    nivl2    interval number for the specified single-scattering properties corresponding to the last psuedo- monochromatic frequency in a given parameterization band
       [integer]
    nivls    number of specified scattering spectral intervals
       [integer]
    nbands    number of spectral bands
       [integer]
    extivl    the specified spectral values of the extinction coefficient
       [real]
    asymmivl    the specified spectral values of the asymmetry factor
       [real]
    solflxivl    the solar flux in each specified scattering spectral interval
       [real]
    solflxband    the solar flux in each parameterization band
       [real]

    INPUT/OUTPUT
    ssalbivl    the specified spectral values of the single-scattering albedo
       [real]

    OUTPUT
    extband    the parameterization band values of the extinction coefficient
       [real]
    ssalbband    the parameterization band values of the single-scattering albedo
       [real]
    asymmband    the parameterization band values of the asymmetry factor
       [real]

  12. thickavg_isccp

    call thickavg_isccp 
    
    DESCRIPTION
    use the thick-averaging technique to define the single-scattering properties of the specified parameterization band spectral interval from the specified spectral intervals of the particular scatterer.

    references:

    edwards,j.m. and a. slingo, studies with a flexible new radiation code I: choosing a configuration for a large-scale model., q.j.r. meteorological society, 122, 689-719, 1996.

    note: the 1.0E-100 factor to calculate asymmband is to prevent division by zero.


    INPUT
    nband   
       [integer]
    nivl1    interval number for the specified single-scattering properties corresponding to the first psuedo- monochromatic frequency in a given parameterization band
       [integer]
    nivl2    interval number for the specified single-scattering properties corresponding to the last psuedo- monochromatic frequency in a given parameterization band
       [integer]
    extivl    the specified spectral values of the extinction coefficient
       [real]
    solflxivl    the solar flux in each specified scattering spectral interval
       [real]
    solflxband    the solar flux in each parameterization band
       [real]
    mask    mask is .true. at gridpoints where extband needs to be calculated
       [logical]

    OUTPUT
    extband    the parameterization band values of the extinction coefficient
       [real]

  13. thickavg_1band

    call thickavg_1band 
    
    DESCRIPTION
    use the thick-averaging technique to define the single-scattering properties of the specified parameterization band spectral interval from the specified spectral intervals of the particular scatterer.

    references:

    edwards,j.m. and a. slingo, studies with a flexible new radiation code I: choosing a configuration for a large-scale model., q.j.r. meteorological society, 122, 689-719, 1996.

    note: the 1.0E-100 factor to calculate asymmband is to prevent division by zero.


    INPUT
    nband   
       [integer]
    nivl1    interval number for the specified single-scattering properties corresponding to the first psuedo- monochromatic frequency in a given parameterization band
       [integer]
    nivl2    interval number for the specified single-scattering properties corresponding to the last psuedo- monochromatic frequency in a given parameterization band
       [integer]
    nivls    number of specified scattering spectral intervals
       [integer]
    nbands    number of spectral bands
       [integer]
    extivl    the specified spectral values of the extinction coefficient
       [real]
    asymmivl    the specified spectral values of the asymmetry factor
       [real]
    solflxivl    the solar flux in each specified scattering spectral interval
       [real]
    solflxband    the solar flux in each parameterization band
       [real]
    mask    mask is .true. at gridpoints where band calculations are needed
       [logical]

    INPUT/OUTPUT
    ssalbivl    the specified spectral values of the single-scattering albedo
       [real]

    OUTPUT
    extband    the parameterization band values of the extinction coefficient
       [real]
    ssalbband    the parameterization band values of the single-scattering albedo
       [real]
    asymmband    the parameterization band values of the asymmetry factor
       [real]

  14. thinavg

    call thinavg (nivl1 , nivl2 , nivls , & nbands, & extivl , ssalbivl , asymmivl, solflxivl, & solflxband, extband , ssalbband , asymmband)
    DESCRIPTION
    use the thin-averaging technique to define the single-scattering properties of the parameterization band spectral intervals from the specified spectral intervals of the particular scatterer.

    references:

    edwards,j.m. and a. slingo, studies with a flexible new radiation code I: choosing a configuration for a large-scale model., q.j.r. meteorological society, 122, 689-719, 1996.

    note: the 1.0E-100 factor to calculate asymmband is to prevent division by zero.


    INPUT
    nivl1    interval number for the specified single-scattering properties corresponding to the first psuedo- monochromatic frequency in a given parameterization band
       [integer]
    nivl2    interval number for the specified single-scattering properties corresponding to the last psuedo- monochromatic frequency in a given parameterization band
       [integer]
    nivls    number of specified scattering spectral intervals
       [integer]
    extivl    the specified spectral values of the extinction coefficient
       [real]
    nbands    number of spectral bands
       [integer]
    asymmivl    the specified spectral values of the asymmetry factor
       [real]
    solflxivl    the solar flux in each specified scattering spectral interval
       [real]
    solflxband    the solar flux in each parameterization band
       [real]

    INPUT/OUTPUT
    ssalbivl    the specified spectral values of the single-scattering albedo
       [real]

    OUTPUT
    extband    the parameterization band values of the extinction coefficient
       [real]
    ssalbband    the parameterization band values of the single-scattering albedo
       [real]
    asymmband    the parameterization band values of the asymmetry factor
       [real]

  15. rad_utilities_end

    call rad_utilities_end 
    
    DESCRIPTION
    This subroutine is the destructor for rad_utilies_mod. it marks the module as uninitialized.



DATA SETS

None.


ERROR MESSAGES

None.


top