next up previous contents
Next: 7 Mapping (Interpolation) Up: 1 General Modules and Previous: 5 Interface   Contents

Subsections

6 Fields

6.1 Module cpl_fields_mod - coupler/component list of exchanged fields (Source File: cpl_fields_mod.F90)

This module is an important component of the cpl6 Coupler. It contains the following:


REVISION HISTORY:

       2002 Feb 11 - full, realistic list of fields
       2001 Apr 13 - T. Craig
INTERFACE:
 
 module cpl_fields_mod
USES:
 
    use cpl_mct_mod     ! mct
    use cpl_kind_mod    ! kinds
 
    private  ! except
PUBLIC MEMBER FUNCTIONS:
 
    public :: cpl_fields_getField    ! returns string for nth aVect attribute 
    public :: cpl_fields_getLongName ! returns netCDF longname and unit strings
 
    !----------------------------------------------------------------------------
    ! component names
    !----------------------------------------------------------------------------
 
    character(32),parameter,public :: cpl_fields_atmname='atm'
    character(32),parameter,public :: cpl_fields_ocnname='ocn'
    character(32),parameter,public :: cpl_fields_icename='ice'
    character(32),parameter,public :: cpl_fields_lndname='lnd'
    character(32),parameter,public :: cpl_fields_rtmname='roff'
    character(32),parameter,public :: cpl_fields_cplname='cpl'
 
    !----------------------------------------------------------------------------
    ! "info-buffer" index of entries 
    !----------------------------------------------------------------------------
 
    integer(IN),parameter,public :: cpl_fields_ibuf_total    = 100 ! size of info-buffer
 
    integer(IN),parameter,public :: cpl_fields_ibuf_rcode    =   1 ! error code
    integer(IN),parameter,public :: cpl_fields_ibuf_cdate    =   2 ! current date: yymmdd
    integer(IN),parameter,public :: cpl_fields_ibuf_sec      =   3 ! elapsed sec on date
    integer(IN),parameter,public :: cpl_fields_ibuf_ncpl     =   4 ! cpl comm's per day
    integer(IN),parameter,public :: cpl_fields_ibuf_nfields  =  10
    integer(IN),parameter,public :: cpl_fields_ibuf_gsize    =  11
    integer(IN),parameter,public :: cpl_fields_ibuf_lsize    =  12
    integer(IN),parameter,public :: cpl_fields_ibuf_gisize   =  13
    integer(IN),parameter,public :: cpl_fields_ibuf_gjsize   =  14
    integer(IN),parameter,public :: cpl_fields_ibuf_lisize   =  15
    integer(IN),parameter,public :: cpl_fields_ibuf_ljsize   =  16
    integer(IN),parameter,public :: cpl_fields_ibuf_stopeod  =  19
    integer(IN),parameter,public :: cpl_fields_ibuf_stopnow  =  20
    integer(IN),parameter,public :: cpl_fields_ibuf_resteod  =  21
    integer(IN),parameter,public :: cpl_fields_ibuf_restnow  =  22
    integer(IN),parameter,public :: cpl_fields_ibuf_histeod  =  23
    integer(IN),parameter,public :: cpl_fields_ibuf_histnow  =  24
    integer(IN),parameter,public :: cpl_fields_ibuf_histavg  =  25
    integer(IN),parameter,public :: cpl_fields_ibuf_diageod  =  26
    integer(IN),parameter,public :: cpl_fields_ibuf_diagnow  =  27
    integer(IN),parameter,public :: cpl_fields_ibuf_infotim  =  28
    integer(IN),parameter,public :: cpl_fields_ibuf_infobug  =  29
    integer(IN),parameter,public :: cpl_fields_ibuf_precadj  =  31 ! precip adjustment factor (* 1.0e+6)
    integer(IN),parameter,public :: cpl_fields_ibuf_ashift   =  32 ! albedo calculation time shift
    integer(IN),parameter,public :: cpl_fields_ibuf_nbasins  =  33 ! number of active runoff basins
    integer(IN),parameter,public :: cpl_fields_ibuf_xalbic   =  34 ! request extra albedo solar init msg
    integer(IN),parameter,public :: cpl_fields_ibuf_inimask  =  36 ! flag cpl to send back domain spec for lnd
    integer(IN),parameter,public :: cpl_fields_ibuf_dead     =  37 ! non-0 <=> dead model
    integer(IN),parameter,public :: cpl_fields_ibuf_domain   =  40
    integer(IN),parameter,public :: cpl_fields_ibuf_userest  =  41 ! non-0 <=> use restart data sent to cpl
 
    integer(IN),parameter,public :: cpl_fields_rbuf_total    =  50 ! size of real info-buffer
 
    integer(IN),parameter,public :: cpl_fields_rbuf_spval    =   1 ! the special value
    integer(IN),parameter,public :: cpl_fields_rbuf_eccen    =  10 ! Earth's eccentricity
    integer(IN),parameter,public :: cpl_fields_rbuf_obliqr   =  11 ! Earth's Obliquity
    integer(IN),parameter,public :: cpl_fields_rbuf_lambm0   =  12 ! longitude of perihelion at v-equinox
    integer(IN),parameter,public :: cpl_fields_rbuf_mvelpp   =  13 ! Earth's Moving vernal equinox of orbit +pi
 
    !----------------------------------------------------------------------------
    ! initial fields, generally a domain description 
    !----------------------------------------------------------------------------
 
    integer(IN),parameter,public :: cpl_fields_grid_total  = 7
 
    character(*),parameter,public :: cpl_fields_grid_fields = &
       &'lat&
       &:lon&
       &:area&
       &:aream&
       &:index&
       &:mask&
       &:pid'
 
    integer(IN),parameter,public :: cpl_fields_grid_lat    = 1    ! lat from component
    integer(IN),parameter,public :: cpl_fields_grid_lon    = 2    ! lon from component
    integer(IN),parameter,public :: cpl_fields_grid_area   = 3    ! area from component
    integer(IN),parameter,public :: cpl_fields_grid_aream  = 4    ! area from mapping file
    integer(IN),parameter,public :: cpl_fields_grid_index  = 5    ! global index
    integer(IN),parameter,public :: cpl_fields_grid_mask   = 6    ! mask, 0 = inactive cell
    integer(IN),parameter,public :: cpl_fields_grid_pid    = 7    ! proc id number
 
    !----------------------------------------------------------------------------
    ! atm fields 
    !----------------------------------------------------------------------------
 
    integer(IN),parameter,public :: cpl_fields_a2c_total  = 19
 
    character(*), parameter,public :: cpl_fields_a2c_states = &
       &'Sa_z&
       &:Sa_u&
       &:Sa_v&
       &:Sa_tbot&
       &:Sa_ptem&
       &:Sa_shum&
       &:Sa_dens&
       &:Sa_pbot&
       &:Sa_pslv'
    character(*), parameter,public :: cpl_fields_a2c_fluxes = &
       &'Faxa_lwdn&
       &:Faxa_rainc&
       &:Faxa_rainl&
       &:Faxa_snowc&
       &:Faxa_snowl&
       &:Faxa_swndr&
       &:Faxa_swvdr&
       &:Faxa_swndf&
       &:Faxa_swvdf&
       &:Faxa_swnet'
    character(*), parameter,public :: cpl_fields_a2c_fields = &
       trim(cpl_fields_a2c_states)//":"//trim(cpl_fields_a2c_fluxes)
 
    !----- state fields -----
    integer(IN),parameter,public :: cpl_fields_a2c_z      =  1 ! bottom atm level height
    integer(IN),parameter,public :: cpl_fields_a2c_u      =  2 ! bottom atm level zon wind
    integer(IN),parameter,public :: cpl_fields_a2c_v      =  3 ! bottom atm level mer wind
    integer(IN),parameter,public :: cpl_fields_a2c_tbot   =  4 ! bottom atm level temp
    integer(IN),parameter,public :: cpl_fields_a2c_ptem   =  5 ! bottom atm level pot temp
    integer(IN),parameter,public :: cpl_fields_a2c_shum   =  6 ! bottom atm level spec hum
    integer(IN),parameter,public :: cpl_fields_a2c_dens   =  7 ! bottom atm level air den
    integer(IN),parameter,public :: cpl_fields_a2c_pbot   =  8 ! bottom atm level pressure
    integer(IN),parameter,public :: cpl_fields_a2c_pslv   =  9 ! sea level atm pressure
    !----- fluxes computed by atm ----
    integer(IN),parameter,public :: cpl_fields_a2c_lwdn   = 10 ! downward lw heat flux
    integer(IN),parameter,public :: cpl_fields_a2c_rainc  = 11 ! prec: liquid "convective"
    integer(IN),parameter,public :: cpl_fields_a2c_rainl  = 12 ! prec: liquid "large scale"
    integer(IN),parameter,public :: cpl_fields_a2c_snowc  = 13 ! prec: frozen "convective"
    integer(IN),parameter,public :: cpl_fields_a2c_snowl  = 14 ! prec: frozen "large scale"
    integer(IN),parameter,public :: cpl_fields_a2c_swndr  = 15 ! sw: nir direct  downward
    integer(IN),parameter,public :: cpl_fields_a2c_swvdr  = 16 ! sw: vis direct  downward
    integer(IN),parameter,public :: cpl_fields_a2c_swndf  = 17 ! sw: nir diffuse downward
    integer(IN),parameter,public :: cpl_fields_a2c_swvdf  = 18 ! sw: vis diffuse downward
    integer(IN),parameter,public :: cpl_fields_a2c_swnet  = 19 ! sw: net
 
 
    integer(IN),parameter,public :: cpl_fields_c2a_total  = 17
 
    character(*), parameter,public :: cpl_fields_c2a_states = &
       &'Sx_tref&
       &:Sx_qref&
       &:Sx_avsdr&
       &:Sx_anidr&
       &:Sx_avsdf&
       &:Sx_anidf&
       &:Sx_t&
       &:So_t&
       &:Sx_snowh&
       &:Sx_ifrac&
       &:Sx_ofrac'
    character(*), parameter,public :: cpl_fields_c2a_fluxes = &
       &'Faxx_taux&
       &:Faxx_tauy&
       &:Faxx_lat&
       &:Faxx_sen&
       &:Faxx_lwup&
       &:Faxx_evap'
    character(*), parameter,public :: cpl_fields_c2a_fields = &
       trim(cpl_fields_c2a_states)//":"//trim(cpl_fields_c2a_fluxes)
 
    !----- states given to atm ----
    integer(IN),parameter,public :: cpl_fields_c2a_tref  =  1 ! 2m reference temperature
    integer(IN),parameter,public :: cpl_fields_c2a_qref  =  2 ! 2m reference specific humidity
    integer(IN),parameter,public :: cpl_fields_c2a_avsdr =  3 ! albedo, visible, direct
    integer(IN),parameter,public :: cpl_fields_c2a_anidr =  4 ! albedo, near-ir, direct
    integer(IN),parameter,public :: cpl_fields_c2a_avsdf =  5 ! albedo, visible, diffuse
    integer(IN),parameter,public :: cpl_fields_c2a_anidf =  6 ! albedo, near-ir, diffuse
    integer(IN),parameter,public :: cpl_fields_c2a_t     =  7 ! surface temperature
    integer(IN),parameter,public :: cpl_fields_c2a_sst   =  8 ! sea surface temperature
    integer(IN),parameter,public :: cpl_fields_c2a_snowh =  9 ! surface snow depth
    integer(IN),parameter,public :: cpl_fields_c2a_ifrac = 10 ! surface ice fraction
    integer(IN),parameter,public :: cpl_fields_c2a_ofrac = 11 ! surface ocn fraction
    !----- fluxes given to atm ----
    integer(IN),parameter,public :: cpl_fields_c2a_taux  = 12 ! wind stress, zonal
    integer(IN),parameter,public :: cpl_fields_c2a_tauy  = 13 ! wind stress, meridional
    integer(IN),parameter,public :: cpl_fields_c2a_lat   = 14 ! latent          heat flux
    integer(IN),parameter,public :: cpl_fields_c2a_sen   = 15 ! sensible        heat flux
    integer(IN),parameter,public :: cpl_fields_c2a_lwup  = 16 ! upward longwave heat flux
    integer(IN),parameter,public :: cpl_fields_c2a_evap  = 17 ! evaporation    water flux
 
    !----------------------------------------------------------------------------
    ! ice fields
    !----------------------------------------------------------------------------
 
    integer(IN),parameter,public :: cpl_fields_i2c_total  = 22
 
    character(*), parameter,public :: cpl_fields_i2c_states = &
       &'Si_t&
       &:Si_tref&
       &:Si_qref&
       &:Si_ifrac&
       &:Si_avsdr&
       &:Si_anidr&
       &:Si_avsdf&
       &:Si_anidf&
       &:index'
    character(*), parameter,public :: cpl_fields_i2c_fluxes = &
       &'Faii_taux&
       &:Faii_tauy&
       &:Faii_lat&
       &:Faii_sen&
       &:Faii_lwup&
       &:Faii_evap&
       &:Faii_swnet&
       &:Fioi_swpen&
       &:Fioi_melth&
       &:Fioi_meltw&
       &:Fioi_salt&
       &:Fioi_taux&
       &:Fioi_tauy'
    character(*), parameter,public :: cpl_fields_i2c_fields = &
       trim(cpl_fields_i2c_states)//":"//trim(cpl_fields_i2c_fluxes)
 
    !----- ice states -----
    integer(IN),parameter,public :: cpl_fields_i2c_t     =  1 ! temperature
    integer(IN),parameter,public :: cpl_fields_i2c_tref  =  2 ! 2m reference temperature
    integer(IN),parameter,public :: cpl_fields_i2c_qref  =  3 ! 2m reference specific humidity
    integer(IN),parameter,public :: cpl_fields_i2c_ifrac =  4 ! fractional ice coverage
    integer(IN),parameter,public :: cpl_fields_i2c_avsdr =  5 ! albedo: visible, direct
    integer(IN),parameter,public :: cpl_fields_i2c_anidr =  6 ! albedo: near ir, direct
    integer(IN),parameter,public :: cpl_fields_i2c_avsdf =  7 ! albedo: visible, diffuse
    integer(IN),parameter,public :: cpl_fields_i2c_anidf =  8 ! albedo: near ir, diffuse
    !----- compression index -----
    integer(IN),parameter,public :: cpl_fields_i2c_index =  9 ! global data compr index
    !----- a/i fluxes computed by ice -----
    integer(IN),parameter,public :: cpl_fields_i2c_taux  = 10 ! wind stress, zonal
    integer(IN),parameter,public :: cpl_fields_i2c_tauy  = 11 ! wind stress, meridional
    integer(IN),parameter,public :: cpl_fields_i2c_lat   = 12 ! latent          heat flux
    integer(IN),parameter,public :: cpl_fields_i2c_sen   = 13 ! sensible        heat flux
    integer(IN),parameter,public :: cpl_fields_i2c_lwup  = 14 ! upward longwave heat flux
    integer(IN),parameter,public :: cpl_fields_i2c_evap  = 15 ! evaporation    water flux
    integer(IN),parameter,public :: cpl_fields_i2c_swnet = 16 ! shortwave: net absorbed
    !----- i/o fluxes computed by ice -----
    integer(IN),parameter,public :: cpl_fields_i2c_swpen = 17 ! net SW penetrating ice
    integer(IN),parameter,public :: cpl_fields_i2c_melth = 18 ! heat  flux from melting ice
    integer(IN),parameter,public :: cpl_fields_i2c_meltw = 19 ! water flux from melting ice
    integer(IN),parameter,public :: cpl_fields_i2c_salt  = 20 ! salt  flux from melting ice
    integer(IN),parameter,public :: cpl_fields_i2c_otaux = 21 ! ice/ocn stress, zonal
    integer(IN),parameter,public :: cpl_fields_i2c_otauy = 22 ! ice/ocn stress, meridional
 
 
    integer(IN),parameter,public :: cpl_fields_c2i_total  = 21
 
    character(*), parameter,public :: cpl_fields_c2i_states = &
       &'So_t&
       &:So_s&
       &:So_u&
       &:So_v&
       &:Sa_z&
       &:Sa_u&
       &:Sa_v&
       &:Sa_ptem&
       &:Sa_tbot&
       &:Sa_shum&
       &:Sa_dens&
       &:So_dhdx&
       &:So_dhdy'
    character(*), parameter,public :: cpl_fields_c2i_fluxes = &
       &'Fioo_q&
       &:Faxa_swndr&
       &:Faxa_swvdr&
       &:Faxa_swndf&
       &:Faxa_swvdf&
       &:Faxa_lwdn&
       &:Faxc_rain&
       &:Faxc_snow'
    character(*), parameter,public :: cpl_fields_c2i_fields = &
       trim(cpl_fields_c2i_states)//":"//trim(cpl_fields_c2i_fluxes)
 
    !----- ocn states -----
    integer(IN),parameter,public :: cpl_fields_c2i_ot    =  1 ! ocn temp
    integer(IN),parameter,public :: cpl_fields_c2i_os    =  2 ! ocn salinity
    integer(IN),parameter,public :: cpl_fields_c2i_ou    =  3 ! ocn u velocity
    integer(IN),parameter,public :: cpl_fields_c2i_ov    =  4 ! ocn v velocity
    integer(IN),parameter,public :: cpl_fields_c2i_dhdx  = 12 ! ocn surface slope, zonal
    integer(IN),parameter,public :: cpl_fields_c2i_dhdy  = 13 ! ocn surface slope, merid
    !----- atm states ----- 
    integer(IN),parameter,public :: cpl_fields_c2i_z     =  5 ! atm bottom layer height
    integer(IN),parameter,public :: cpl_fields_c2i_u     =  6 ! atm u velocity
    integer(IN),parameter,public :: cpl_fields_c2i_v     =  7 ! atm v velocity
    integer(IN),parameter,public :: cpl_fields_c2i_ptem  =  8 ! atm potential temp
    integer(IN),parameter,public :: cpl_fields_c2i_tbot  =  9 ! atm bottom temp
    integer(IN),parameter,public :: cpl_fields_c2i_shum  = 10 ! atm specfic humidity
    integer(IN),parameter,public :: cpl_fields_c2i_dens  = 11 ! atm air density
    !----- ocn fluxes -----
    integer(IN),parameter,public :: cpl_fields_c2i_q     = 14 ! ocn freeze or melt heat
    !----- atm fluxes -----
    integer(IN),parameter,public :: cpl_fields_c2i_swndr = 15 ! atm sw near-ir, direct
    integer(IN),parameter,public :: cpl_fields_c2i_swvdr = 16 ! atm sw visable, direct
    integer(IN),parameter,public :: cpl_fields_c2i_swndf = 17 ! atm sw near-ir, diffuse
    integer(IN),parameter,public :: cpl_fields_c2i_swvdf = 18 ! atm sw visable, diffuse
    integer(IN),parameter,public :: cpl_fields_c2i_lwdn  = 19 ! long-wave down
    integer(IN),parameter,public :: cpl_fields_c2i_rain  = 20 ! rain
    integer(IN),parameter,public :: cpl_fields_c2i_snow  = 21 ! snow
 
    !----------------------------------------------------------------------------
    ! lnd fields 
    !----------------------------------------------------------------------------
 
    integer(IN),parameter,public :: cpl_fields_l2c_total  = 15
 
    character(*), parameter,public :: cpl_fields_l2c_states = &
       &'Sl_t&
       &:Sl_tref&
       &:Sl_qref&
       &:Sl_avsdr&
       &:Sl_anidr&
       &:Sl_avsdf&
       &:Sl_anidf&
       &:Sl_snowh'
    character(*), parameter,public :: cpl_fields_l2c_fluxes = &
       &'Fall_taux&
       &:Fall_tauy&
       &:Fall_lat&
       &:Fall_sen&
       &:Fall_lwup&
       &:Fall_evap&
       &:Fall_swnet'
    character(*), parameter,public :: cpl_fields_l2c_fields = &
       trim(cpl_fields_l2c_states)//":"//trim(cpl_fields_l2c_fluxes)
 
    !----- lnd states -----
    integer(IN),parameter,public :: cpl_fields_l2c_t     =  1 ! temperature
    integer(IN),parameter,public :: cpl_fields_l2c_tref  =  2 ! 2m reference temperature
    integer(IN),parameter,public :: cpl_fields_l2c_qref  =  3 ! 2m reference specific humidity
    integer(IN),parameter,public :: cpl_fields_l2c_avsdr =  4 ! albedo: direct , visible
    integer(IN),parameter,public :: cpl_fields_l2c_anidr =  5 ! albedo: direct , near-ir
    integer(IN),parameter,public :: cpl_fields_l2c_avsdf =  6 ! albedo: diffuse, visible
    integer(IN),parameter,public :: cpl_fields_l2c_anidf =  7 ! albedo: diffuse, near-ir
    integer(IN),parameter,public :: cpl_fields_l2c_snowh =  8 ! snow height
    !----- computed by lnd -----
    integer(IN),parameter,public :: cpl_fields_l2c_taux  =  9 ! wind stress, zonal
    integer(IN),parameter,public :: cpl_fields_l2c_tauy  = 10 ! wind stress, meridional
    integer(IN),parameter,public :: cpl_fields_l2c_lat   = 11 ! latent          heat flux
    integer(IN),parameter,public :: cpl_fields_l2c_sen   = 12 ! sensible        heat flux
    integer(IN),parameter,public :: cpl_fields_l2c_lwup  = 13 ! upward longwave heat flux
    integer(IN),parameter,public :: cpl_fields_l2c_evap  = 14 ! evaporation    water flux
    integer(IN),parameter,public :: cpl_fields_l2c_swnet = 15 ! 2m reference temperature
 
 
    integer(IN),parameter,public :: cpl_fields_c2l_total  = 18
 
    character(*), parameter,public :: cpl_fields_c2l_states = &
       &'Sa_z&
       &:Sa_u&
       &:Sa_v&
       &:Sa_tbot&
       &:Sa_ptem&
       &:Sa_shum&
       &:Sa_dens&
       &:Sa_pbot&
       &:Sa_pslv'
    character(*), parameter,public :: cpl_fields_c2l_fluxes = &
       &'Faxa_lwdn&
       &:Faxa_rainc&
       &:Faxa_rainl&
       &:Faxa_snowc&
       &:Faxa_snowl&
       &:Faxa_swndr&
       &:Faxa_swvdr&
       &:Faxa_swndf&
       &:Faxa_swvdf'
    character(*), parameter,public :: cpl_fields_c2l_fields = &
       trim(cpl_fields_c2l_states)//":"//trim(cpl_fields_c2l_fluxes)
 
    !----- atm states -----
    integer(IN),parameter,public :: cpl_fields_c2l_z     =  1 ! bottom atm level height
    integer(IN),parameter,public :: cpl_fields_c2l_u     =  2 ! bottom atm level zon wind
    integer(IN),parameter,public :: cpl_fields_c2l_v     =  3 ! bottom atm level mer wind
    integer(IN),parameter,public :: cpl_fields_c2l_tbot  =  4 ! bottom atm level temp
    integer(IN),parameter,public :: cpl_fields_c2l_ptem  =  5 ! bottom atm level pot temp
    integer(IN),parameter,public :: cpl_fields_c2l_shum  =  6 ! bottom atm level spec hum
    integer(IN),parameter,public :: cpl_fields_c2l_dens  =  7 ! bottom atm level air dens
    integer(IN),parameter,public :: cpl_fields_c2l_pbot  =  8 ! bottom atm level pressure
    integer(IN),parameter,public :: cpl_fields_c2l_pslv  =  9 ! sea level atm pressure
    !----- computed by atm -----
    integer(IN),parameter,public :: cpl_fields_c2l_lwdn  = 10 ! downward longwave heat flux
    integer(IN),parameter,public :: cpl_fields_c2l_rainc = 11 ! precip: liquid, convective
    integer(IN),parameter,public :: cpl_fields_c2l_rainl = 12 ! precip: liquid, large-scale
    integer(IN),parameter,public :: cpl_fields_c2l_snowc = 13 ! precip: frozen, convective
    integer(IN),parameter,public :: cpl_fields_c2l_snowl = 14 ! precip: frozen, large-scale
    integer(IN),parameter,public :: cpl_fields_c2l_swndr = 15 ! shortwave: nir direct  down
    integer(IN),parameter,public :: cpl_fields_c2l_swvdr = 16 ! shortwave: vis direct  down
    integer(IN),parameter,public :: cpl_fields_c2l_swndf = 17 ! shortwave: nir diffuse down
    integer(IN),parameter,public :: cpl_fields_c2l_swvdf = 18 ! shortwave: vis diffuse down
 
    !----- special lnd grid initialization -----
 
    integer(IN),parameter,public :: cpl_fields_c2lg_total  = 6
 
    character(*), parameter,public :: cpl_fields_c2lg_fields = &
       &'lon&
       &:lat&
       &:area&
       &:lfrac&
       &:maskl&
       &:maska'
 
    integer(IN),parameter,public :: cpl_fields_c2lg_alon  =  1 ! longitude
    integer(IN),parameter,public :: cpl_fields_c2lg_alat  =  2 ! latitude
    integer(IN),parameter,public :: cpl_fields_c2lg_aarea =  3 ! cell area
    integer(IN),parameter,public :: cpl_fields_c2lg_lfrac =  4 ! lnd fraction
    integer(IN),parameter,public :: cpl_fields_c2lg_lmask =  5 ! lnd mask
    integer(IN),parameter,public :: cpl_fields_c2lg_amask =  6 ! atm mask
 
    !----------------------------------------------------------------------------
    ! ocn fields
    !----------------------------------------------------------------------------
 
    integer(IN),parameter,public :: cpl_fields_o2c_total  = 7
 
    character(*), parameter,public :: cpl_fields_o2c_states = &
       &'So_t&
       &:So_u&
       &:So_v&
       &:So_s&
       &:So_dhdx&
       &:So_dhdy'
    character(*), parameter,public :: cpl_fields_o2c_fluxes = &
       &'Fioo_q'
    character(*), parameter,public :: cpl_fields_o2c_fields = &
       trim(cpl_fields_o2c_states)//":"//trim(cpl_fields_o2c_fluxes)
 
 
    !----- ocn states -----
    integer(IN),parameter,public :: cpl_fields_o2c_t    =  1 ! temperature
    integer(IN),parameter,public :: cpl_fields_o2c_u    =  2 ! velocity, zonal
    integer(IN),parameter,public :: cpl_fields_o2c_v    =  3 ! velocity, meridional
    integer(IN),parameter,public :: cpl_fields_o2c_s    =  4 ! salinity
    integer(IN),parameter,public :: cpl_fields_o2c_dhdx =  5 ! surface slope, zonal
    integer(IN),parameter,public :: cpl_fields_o2c_dhdy =  6 ! surface slope, meridional
    integer(IN),parameter,public :: cpl_fields_o2c_q    =  7 ! heat of fusion (q>0) melt pot (q<0)
 
 
    integer(IN),parameter,public :: cpl_fields_c2o_total  = 18
 
    character(*), parameter,public :: cpl_fields_c2o_states = &
       &'Si_ifrac&
       &:Sa_pslv&
       &:Faoc_duu10n'
    character(*), parameter,public :: cpl_fields_c2o_fluxes = &
       &'Foxx_taux&
       &:Foxx_tauy&
       &:Foxx_swnet&
       &:Foxx_lat&
       &:Foxx_sen&
       &:Foxx_lwup&
       &:Foxx_lwdn&
       &:Foxx_melth&
       &:Foxx_salt&
       &:Foxx_prec&
       &:Foxx_snow&
       &:Foxx_rain&
       &:Foxx_evap&
       &:Foxx_meltw&
       &:Forr_roff'
    character(*), parameter,public :: cpl_fields_c2o_fields = &
       trim(cpl_fields_c2o_states)//":"//trim(cpl_fields_c2o_fluxes)
 
    !----- ocn model input -----
    integer(IN),parameter,public :: cpl_fields_c2o_ifrac =  1 ! state: ice fraction
    integer(IN),parameter,public :: cpl_fields_c2o_press =  2 ! state: sea level pressure
    integer(IN),parameter,public :: cpl_fields_c2o_duu10 =  3 ! state: 10m wind speed squared
    integer(IN),parameter,public :: cpl_fields_c2o_taux  =  4 ! wind stress: zonal
    integer(IN),parameter,public :: cpl_fields_c2o_tauy  =  5 ! wind stress: meridional
    integer(IN),parameter,public :: cpl_fields_c2o_swnet =  6 ! heat flux: shortwave net
    integer(IN),parameter,public :: cpl_fields_c2o_lat   =  7 ! heat flux: latent
    integer(IN),parameter,public :: cpl_fields_c2o_sen   =  8 ! heat flux: sensible
    integer(IN),parameter,public :: cpl_fields_c2o_lwup  =  9 ! heat flux: long-wave up
    integer(IN),parameter,public :: cpl_fields_c2o_lwdn  = 10 ! heat flux: long-wave down
    integer(IN),parameter,public :: cpl_fields_c2o_melth = 11 ! heat flux: melt
    integer(IN),parameter,public :: cpl_fields_c2o_salt  = 12 ! salt flux
    integer(IN),parameter,public :: cpl_fields_c2o_prec  = 13 ! water flux: rain+snow
    integer(IN),parameter,public :: cpl_fields_c2o_snow  = 14 ! water flux: snow
    integer(IN),parameter,public :: cpl_fields_c2o_rain  = 15 ! water flux: rain
    integer(IN),parameter,public :: cpl_fields_c2o_evap  = 16 ! water flux: evap
    integer(IN),parameter,public :: cpl_fields_c2o_meltw = 17 ! water flux: melt
    integer(IN),parameter,public :: cpl_fields_c2o_roff  = 18 ! water flux: runoff
 
    !----------------------------------------------------------------------------
    ! run-off field 
    !----------------------------------------------------------------------------
 
    integer(IN),parameter,public :: cpl_fields_r2c_total  = 1
 
    character(*), parameter,public :: cpl_fields_r2c_states = &
       &''
    character(*), parameter,public :: cpl_fields_r2c_fluxes = &
       &'Forr_roff'
    character(*), parameter,public :: cpl_fields_r2c_fields = &
      trim(cpl_fields_r2c_states)//":"//trim(cpl_fields_r2c_fluxes)
    character(*), parameter,public :: cpl_fields_r2c_fields = &
                                         trim(cpl_fields_r2c_fluxes)
 
    integer(IN),parameter,public :: cpl_fields_r2c_runoff = 1

6.1.1 cpl_fields_getField

Returns nfld element of the colon-delimited string cstring in the output character string outfield.


REVISION HISTORY:

       2003-Jan-24  - T. Craig - first version
INTERFACE:
 
   subroutine cpl_fields_getField(outfield,nfld,cstring)
USES:
INPUT/OUTPUT PARAMETERS:
 
    character(*),intent(out) :: outfield   ! output field name
    integer     ,intent(in ) :: nfld       ! field number
    character(*),intent(in ) :: cstring    ! colon delimited field string

6.2 Module cpl_fields_getLongName - get netCDF attributes for a field (Source File: cpl_fields_mod.F90)

Parse the field name fldstr and and return the netCDF attribute character string longname and unit string units corresponding to the given field name.

Contructs a lookup table of short and long names.

Example: for input So_dhdx, the So_ is removed and the attribute and units for dydx is returned.


REVISION HISTORY:

       2003-may-12 - B. Kauffman - initial version
INTERFACE:
 
 subroutine cpl_fields_getLongName(fldstr,longname,units)
USES:
 
    implicit none
INPUT/OUTPUT PARAMETERS:
 
    character(*),intent(in)   :: fldstr     ! field name
    character(*),intent(out)  :: longname   ! corresponding longname
    character(*),intent(out)  :: units      ! corresponding units



next up previous contents
Next: 7 Mapping (Interpolation) Up: 1 General Modules and Previous: 5 Interface   Contents
cesm.ucar.edu