# Registry file                                         
#                                               
# At the present time this file is managed manually and edited by hand.                                         
#                                               
################################################################################
# Dimension specifications
#
# This section of the Registry file is used to specify the dimensions
# that will be used to define arrays. Dim is the one-letter name of the
# dimension.  How defined can either be "standard_domain", which means
# that the dimension (1) is one of the three spatial dimensions and (2)
# it will be set using the standard namelist mechanism and domain data
# structure dimension fields (e.g. sd31,ed31,sd32...).
#
# Order refers to which of the three sets of just-mentioned internal
# dimension variables the dimension is referred to by in the driver.
# That is, is it the first, second, or third dimension.  The registry
# infers the mapping of its internal dimensions according to the
# combination of Order and Coord-axis that are specified in this table.
# Note that it is all right to more than one dimension name for, say, the
# x dimension.  However, the Order and Coord-axis relationship must be
# consistent throughout.
# 
# Note: these entries do not enforce storage order on a particular field.
# That is determined by the dimension strings for each field. But it does
# relate the dimspec to the internal data structures that the driver uses
# to maintain the three physical domain dimensions.
# 
# "How defined" can also specify the name of a namelist variable from which
# the definition for the dimension will come; this is specified as
# "namelist=<variable name>".  The namelist variable must have been
# defined as an integer and with only one entry in the rconfig table. Or
# a constant can be specified.  The coordinate axis for the dimension is
# either X, Y, Z, or C (for "not a spatial dimension").  The Dimname is
# the desriptive name of the dimension that will be included in the
# metadata in data sets.  Note that the b, f, and t modifiers that appear
# as the last characters of dimension strings used # in state and # i1
# registry definitions are not dimensions and do not need to be declared
# here.
#

#<Table>  <Dim>  <Order> <How defined>         <Coord-axis>  <Dimname in Datasets>
dimspec    i      1     standard_domain           x          west-east
dimspec    j      2     standard_domain           y          south-north
dimspec    k      3     standard_domain           z          bottom_top
dimspec    l      2     namelist=num_soil_layers  z          soil_layers
dimspec    m      -     constant=3                c          three_things  # example; not used
dimspec    w      -     namelist=spec_bdy_width   c          spec_bdy_width


# dyn_eh -- Eulerian, Height coords
package   dyn_eh        dyn_opt==1                   -             -
# dyn_em -- Eulerian, Mass coords
package   dyn_em       dyn_opt==2                   -             -
# dyn_slt -- semi Lagrangian transport
package   dyn_slt       dyn_opt==3                   -             -
# dyn_exp -- experimental core
package   dyn_exp       dyn_opt==4                   -             -

################################################################################
################################################################################
################################################################################

# Lines that start with the word 'state' form a table that is                                           
# used by the script use_registry to generate module_state_descript.F                                           
# and other files.  Also see documentation in use_registry.                                             
#                                               
# table entries are of the form                                         
#<Table> <Type> <Sym>         <Dims>   <Use>   <NumTLev> <Stagger> <IO>     <DNAME>             <DESCRIP>     <UNITS>   
#
# Variables for slt dynamics                                            
#
#-----------------------------------------------------------------------------------------------------------------------------------------------------------------
#                                               
# Variables for 3DVAR model                                           
#                                               
state    real   ru             ijk     dyn_eh      2         X     irh       "RHO_U"                 "RHO COUPLED X WIND COMPONENT"   ""      
state    real   rv             ijk     dyn_eh      2         Y     irh       "RHO_V"                 "RHO COUPLED Y WIND COMPONENT"   ""      
#-----------------------------------------------------------------------------------------------------------------------------------------------------------------
# That is, is it the first, second, or third dimension.  The registry
state    real   u              ijk     dyn_em      2         X     irh       "U"                      "x-wind component"   "m s{-1}"
state    real   v              ijk     dyn_em      2         Y     irh       "V"                      "y-wind component"   "m s{-1}"
state    real   w              ijk     dyn_em      2         Z     irh       "w"                      "z-wind component"  "m s{-1}"
state    real   ph             ijk     dyn_em      2         Z     irh       "ph"                     "perturbation geopotential"  "m{2} s{-2}"
state    real   phb            ijk     dyn_em      1         Z     irh       "phb"                    "base-state geopotential"  "m{2} s{-2}"
state    real   t              ijk     dyn_em      2         -     irh       "t"                      "perturbation potential temperature (theta-t0)" "K"
state    real   mu              ij     dyn_em      2         -     irh       "mu"                     "perturbation dry air mass in column" "pascals"
state    real   mub             ij     dyn_em      1         -     irh       "mub"                    "base state dry air mass in column" "pascals"
state    real   mu0             ij     dyn_em      1         -     irh       "mu0"                    "initial dry mass in column" "pascals"
state    real   tke            ijk     dyn_em      2         -      r        "tke"                    "TURBULENCE KINETIC ENERGY"         "m{2} s{-2}"      
#
# Moist Scalars  - both height and mass coordinate models
#                                               
# The first line ensures that there will be identifiers named moist and                                         
# moist_tend even if there are not any moist scalars (so the essentially                                                
# dry code will will still link properly)                                               
#                                               
state   real    -              ijkft   moist       2         -     -    -                                       






# The first line ensures that there will be identifiers named moist and                                         
state   real    qv             ijkft   moist       2         -     irh       "QVAPOR"           "Water vapor mixing ratio"      "kg kg{-1}"
state   real    qc             ijkft   moist       2         -     irh       "QCLOUD"           "Cloud water mixing ratio"      "kg kg{-1}"
state   real    qr             ijkft   moist       2         -     irh       "QRAIN"            "Rain water mixing ratio"       "kg kg{-1}"
state   real    qi             ijkft   moist       2         -     irh       "QICE"             "Ice mixing ratio"              "kg kg{-1}"
state   real    qs             ijkft   moist       2         -     irh       "QSNOW"            "Snow mixing ratio"             "kg kg{-1}"
state   real    qg             ijkft   moist       2         -     irh       "QGRAUP"           "Graupel mixing ratio"          "kg kg{-1}"
#-----------------------------------------------------------------------------------------------------------------------------------------------------------------

## Chem Scalars  - both height and mass coordinate models                                       
#                                               
state   real    -              ijkft   chem        2         -     -    -                                       

#-----------------------------------------------------------------------------------------------------------------------------------------------------------------
# specified LBC arrays, first, Eulerian height coordinate model
state    real   fcx            w         em+eh     -         -      ir       "fcx"                  "RELAXATION TERM FOR BOUNDARY ZONE"         ""
state    real   gcx            w         em+eh     -         -      ir       "gcx"                  "2ND RELAXATION TERM FOR BOUNDARY ZONE"         ""
state    real   dtbc            -        em+eh     -         -      ir       "dtbc"                 "TIME SINCE BOUNDARY READ"         ""
state    real   TSLB           ijl       eh+em      1         Z     irh       "TSLB"                  "SOIL TEMPERATURE"                         "K"      
state    real   ZS              l        eh+em      -         Z     ir        "ZS"                    "DEPTHS OF CENTERS OF SOIL LAYERS"         "m"     
state    real   DZS             l        eh+em      -         Z     ir        "DZS"                   "THICKNESSES OF SOIL LAYERS"               "m"      
state    real   Q2               ij     misc        1         -     irh       "Q2"                   "QV at 2 M"         " "
state    real   T2               ij     misc        1         -     irh       "T2"                   "TEMP at 2 M" ""
state    real   TH2              ij     misc        1         -     irh       "TH2"                  "POT TEMP at 2 M" ""
state    real   U10              ij     misc        1         X     irh       "U10"                  "U at 10 M"         " "
state    real   V10              ij     misc        1         Y     irh       "V10"                  "V at 10 M"         " "

# lsm State Variables

state    real   SMOIS            ijl     -          1         Z     irh      "SMOIS"                "SOIL MOISTURE" ""
state    real   SH2O             ijl     -          1         Z     irh      "SH2O"                 "SOIL LIQUID WATER" ""
state    real   XICE             ij     misc        1         -     irh      "XICE"                 "SEA ICE"         ""
state    real   SMSTAV           ij     misc        1         -      rh      "SMSTAV"               "MOISTURE VARIBILITY" ""
state    real   SMSTOT           ij     misc        1         -      r       "SMSTOT"               "TOTAL SOIL MOISTURE" ""
state    real   SFCRUNOFF        ij     misc        1         -      r       "SFROFF"               "SURFACE RUNOFF" ""
state    real   UDRUNOFF         ij     misc        1         -      r       "UDROFF"               "UNDERGROUND RUNOFF" ""
state  integer  IVGTYP           ij     misc        1         -     irh      "IVGTYP"               "VEGETATION TYPE" ""
state  integer  ISLTYP           ij     misc        1         -     irh      "ISLTYP"               "SOIL TYPE"         " "
state    real   VEGFRA           ij     misc        1         -     irh      "VEGFRA"               "VEGETATION FRACTION" ""
state    real   SFCEVP           ij     misc        1         -      r       "SFCEVP"               "SURFACE EVAPORATION" ""
state    real   GRDFLX           ij     misc        1         -      rh      "GRDFLX"               "GROUND HEAT FLUX" ""
state    real   SFCEXC           ij     misc        1         -      r       "SFCEXC "              "SURFACE EXCHANGE COEFFICIENT"         ""
state    real   ACSNOW           ij     misc        1         -      r        "ACSNOW"               "ACCUMULATED SNOW" ""
state    real   ACSNOM           ij     misc        1         -      r        "ACSNOM"               "ACCUMULATED MELTED SNOW"         ""
state    real   SNOW             ij     misc        1         -     irh       "SNOW"                 "SNOW WATER EQUIVALENT"         ""
state    real   SNOWH            ij     misc        1         -     irh       "SNOWH"                 "PHYSICAL SNOW DEPTH"  ""
state    real   CANWAT           ij     misc        1         -     irh       "CANWAT"               "CANOPY WATER" ""
state    real   SST              ij     misc        1         -     irh       "SST"                  "SEA SURFACE TEMPERATURE" "K"
state  integer  IFNDSNOWH        -      misc        1         -     i         "FNDSNOWH" "SNOWH_LOGICAL"
state  integer  IFNDSOILW        -      misc        1         -     i         "FNDSOILW" "SOILW_LOGICAL"


state   real   tke_myj          ijk    misc        1         -       r        "tke_myj"               "TKE FROM MELLOR-YAMADA-JANJIC      "m{2} s{-2}"
state   real   THZ0             ij     misc        1         -       r        "THZ0"                  "POTENTIAL TEMPERATURE AT ZNT"                 "K"
state   real   QZ0              ij     misc        1         -       r        "QZ0"                   "SPECIFIC HUMIDITY AT ZNT"                     "kg kg{-1}"
state   real   UZ0              ij     misc        1         -       r        "UZ0"                   "U WIND COMPONENT AT ZNT"                      "m s{-1}"
state   real   VZ0              ij     misc        1         -       r        "VZ0"                   "V WIND COMPONENT AT ZNT"                      "m s{-1}"
state   real   QSFC             ij     misc        1         -       r        "QSFC"                  "SPECIFIC HUMIDITY AT LOWER BOUNDARY"          "kg kg{-1}"
state   real   AKHS             ij     misc        1         -       r        "AKHS"                  "SFC EXCH COEFF FOR HEAT"                      "m s{-1}"    
state   real   AKMS             ij     misc        1         -       r        "AKMS"                  "SFC EXCH COEFF FOR MOMENTUM"                  "m s{-1}"    
state   real   HTOP            ij      misc        1         -       r        "HTOP"                 "TOP OF CONVECTION LELVEL"         ""
state   real   HBOT            ij      misc        1         -       r        "HBOT"                 "BOT OF CONVECTION LELVEL"         ""
state   real   CUPPT           ij      misc        1         -       r        "CUPPT"                "ACCUMULATED CONVECTIVE RAIN SINC LAST CALL TO THE RADIATION"         ""
state   real    msft           ij      eh+em         1         -     irh       "MAPFAC_M"         "Map scale factor on mass grid" "dimensionless"
state   real    msfu           ij      eh+em         1         X     irh       "MAPFAC_U"         "Map scale factor on u-grid" "dimensionless"
state   real    msfv           ij      eh+em         1         Y     irh       "MAPFAC_V"         "Map scale factor on v-grid" "dimensionless"
state   real    f              ij      eh+em         1         -     ir        "f"                     "Coriolis sine latitude term"         ""      
state   real    e              ij      eh+em         1         -     ir        "e"                     "Coriolis cosine latitude term"         ""      
state   real    sina           ij      eh+em         1         -     ir        "SINALPHA"         "Local sine of map rotation"   "dimensionless"
state   real    cosa           ij      eh+em         1         -     ir        "COSALPHA"         "Local cosine of map rotation"  "dimensionless"
state   real    ht             ij      eh+em         1         -     irh       "HGT"              "Terrain Height"   "m"
state   real    TSK            ij      eh+em         1         -     irh       "TSK"                   "SURFACE SKIN TEMPERATURE"                  "K"
state   real    u_base         k       eh+em         1         -     ir        "u_base"                "BASE STATE X WIND IN IDEALIZED CASES"         ""      
state   real    v_base         k       eh+em         1         -     ir        "v_base"                "BASE STATE Y WIND IN IDEALIZED CASES"         ""      
state   real    qv_base        k       eh+em         1         -     ir        "qv_base"               "BASE STATE QV IN IDEALIZED CASES"         ""      
state   real    z_base         k       eh+em         1         -     ir        "z_base"                "BASE STATE HEIGHT IN IDEALIZED CASES"         ""
state   real    u_frame        -       eh+em         1         -     ir        "u_frame"               "FRAME X WIND"         "m{1} s{-1}"      
state   real    v_frame        -       eh+em         1         -     ir        "v_frame"               "FRAME Y WIND"         "m{1} s{-1}"      
state   real    p_top          -       eh+em         -         -     irh       "p_top"    ""
state   real    fnm            k       dyn_em      1         -     irh       "fnm"  "upper wieght for vertical stretching"  "dimensionless"
state   real    fnp            k       dyn_em      1         -     irh       "fnp"  "lower weight for vertical stretching"  "dimensionless"
state   real    rdnw           k       dyn_em      1         -     irh       "rdnw"  "inverse dn values on full (w) levels"   "dimensionless"
state   real    rdn            k       dyn_em      1         -     irh       "rdn"  "dn values on half (mass) levels"   "dimensionless"
state   real    dnw            k       dyn_em      1         -     irh       "dnw" "dn values on full (w) levels"   "dimensionless"
state   real    dn             k       dyn_em      1         -     irh       "dn " "dn values on half (mass) levels"   "dimensionless"
state   real    znu            k       dyn_em      1         -     irh       "znu"  "eta values on half (mass) levels"  "dimensionless"
state   real    znw            k       dyn_em      1         Z     irh       "znw"  "eta values on full (w) levels"  "dimensionless"
state   real    t_base         k       dyn_em      1         -     ir        "t_base"               "BASE STATET T IN IDEALIZED CASES"         ""      
state   real    cfn            -       em_only      -         -     ir        "cfn"    ""
state   real    cfn1           -       em_only      -         -     ir        "cfn1"   ""
state   real    epsts          -       em_only      -         -     ir        "epsts"  ""
state   integer step_number    -       em_only      -         -     ir        "step_number"  ""
state    real  GSW              ij      eh+em        1         -     rh       "GSW"                   "DOWNWARD SHORT WAVE FLUX AT GROUND SURFACE"                           "W m{-2}"      
state    real  GLW              ij      eh+em        1         -     rh       "GLW"                   "DOWNWARD LONG WAVE FLUX AT GROUND SURFACE"                            "W m{-2}"      
state    real  XLAT             ij      eh+em        1         -     irh       "XLAT"                  "LATITUDE, SOUTH IS NEGATIVE"                                          "degree"      
state    real  XLONG            ij      eh+em        1         -     irh       "XLONG"                 "LONGITUDE, WEST IS NEGATIVE"                                          "degree"      
state    real  ALBEDO           ij      eh+em        1         -      r        "ALBEDO"                   "ALBEDO"        "NA"      
state    real  ALBBCK           ij      eh+em        1         -     ir        "ALBBCK"                   "BACKGROUND ALBEDO"        ""
state    real  EMISS            ij      eh+em        1         -      r        "EMISS"                 "SURFACE EMISSIVITY"                         "NA"      
state    real  LU_INDEX         ij      eh+em        1         -     irh       "LU_INDEX"              "LAND USE CATEGORY"         ""      
state    real  TMN              ij      eh+em        1         -     irh       "TMN"                   "SOIL TEMPERATURE AT LOWER BOUNDARY"           "K"      
state    real  XLAND            ij      eh+em        1         -     irh       "XLAND"                 "LAND MASK (1 FOR LAND, 2 FOR WATER)"          "NA"      
state    real  ZNT              ij      eh+em        1         -      r        "ZNT"                   "ROUGHNESS LENGTH"                             "m"      
state    real  UST              ij      eh+em        1         -      r        "UST"                   "U* IN SIMILARITY THEORY"                      "m s{-1}"      
state    real  MOL              ij      eh+em        1         -      r        "MOL"                   "Q* IN SIMILARITY THEORY"                      "kg kg{-1}"      
state    real  PBLH             ij      eh+em        1         -      r        "PBLH"                  "PBL HEIGHT"         "m"      
state    real  CAPG             ij      eh+em        1         -      r        "CAPG"                  "HEAT CAPACITY FOR SOIL"                       "J K{-1} m{-3}"      
state    real  THC              ij      eh+em        1         -      r        "THC"                   "THERMAL INERTIA"                              "Cal cm{-1} K{-1} s{-0.5}"      
state    real  HFX              ij      eh+em        1         -      rh       "HFX"                   "UPWARD HEAT FLUX AT THE SURFACE"              "W m{-2}"      
state    real  QFX              ij      eh+em        1         -      rh       "QFX"                   "UPWARD MOISTURE FLUX AT THE SURFACE"          "kg m{-2} s{-1}"      
state    real  SNOWC            ij      eh+em        1         -     irh       "SNOWC"                 "FLAG INDICATING SNOW COVERAGE (1 FOR SNOW COVER)"         "NA"      
state    real  MAVAIL           ij      eh+em        1         -      r        "MAVAIL"                "SURFACE MOISTURE AVAILABILITY"                "NA"      
state   real   tkesfcf          ij      eh+em        1         -      r        "tkesfcf"               "TKE AT THE SURFACE"                           "m{2} s{-2}"      
state   real    rdx            -        eh+em      -         -     ir        "rdx"                   "INVERSE X GRID LENGTH"         ""      
state   real    rdy            -        eh+em      -         -     ir        "rdy"                   "INVERSE Y GRID LENGTH"         ""      
state   real    dts            -        eh+em      -         -     ir        "dts"                   "SMALL TIMESTEP"         ""      
state   real    dtseps         -        eh+em      -         -     ir        "dtseps"                "TIME WEIGHT CONSTANT FOR SMALL STEPS"         ""      
state   real    resm           -        eh+em      -         -     ir        "resm"                  "TIME WEIGHT CONSTANT FOR SMALL STEPS"         ""      
state   real    zetatop        -        eh+em      -         -     irh       "zetatop"               "ZETA AT MODEL TOP"         ""      
state   real    cf1            -        eh+em      -         -     ir        "cf1"                   "2nd order extrapolation constant"         ""      
state   real    cf2            -        eh+em      -         -     ir        "cf2"                   "2nd order extrapolation constant"         ""      
state   real    cf3            -        eh+em      -         -     ir        "cf3"                   "2nd order extrapolation constant"         ""      
#-----------------------------------------------------------------------------------------------------------------------------------------------------------------

#-------------------------------------------------------------------------------------------------------------------------------------------
# SI - start variables from netCDF format from Standard Initialization, most eventually for use in LSM schemes
#-------------------------------------------------------------------------------------------------------------------------------------------

state   real   sm000010            ij    misc          1     -     i1      "SM000010"      "LAYER SOIL MOISTURE" "m{3) m{-3}"
state   real   sm010040            ij    misc          1     -     i1      "SM010040 "     "LAYER SOIL MOISTURE" "m{3) m{-3}"
state   real   sm040100            ij    misc          1     -     i1      "SM040100 "     "LAYER SOIL MOISTURE" "m{3) m{-3}"
state   real   sm100200            ij    misc          1     -     i1      "SM100200 "     "LAYER SOIL MOISTURE" "m{3) m{-3}"
state   real   sm010200            ij    misc          1     -     i1      "SM010200"      "LAYER SOIL MOISTURE" "m{3) m{-3}"
state   real   soilm000            ij    misc          1     -     i1      "SOILM000"      "LAYER SOIL MOISTURE" "m{3) m{-3}"
state   real   soilm005            ij    misc          1     -     i1      "SOILM005"      "LAYER SOIL MOISTURE" "m{3) m{-3}"
state   real   soilm020            ij    misc          1     -     i1      "SOILM020"      "LAYER SOIL MOISTURE" "m{3) m{-3}"
state   real   soilm040            ij    misc          1     -     i1      "SOILM040"      "LAYER SOIL MOISTURE" "m{3) m{-3}"
state   real   soilm160            ij    misc          1     -     i1      "SOILM160"      "LAYER SOIL MOISTURE" "m{3) m{-3}"
state   real   soilm300            ij    misc          1     -     i1      "SOILM300"      "LAYER SOIL MOISTURE" "m{3) m{-3}"
state   real   sw000010            ij    misc          1     -     i1      "SW000010"      "LAYER SOIL LIQUID" "m{3) m{-3}"
state   real   sw010040            ij    misc          1     -     i1      "SW010040"      "LAYER SOIL LIQUID" "m{3) m{-3}"
state   real   sw040100            ij    misc          1     -     i1      "SW040100"      "LAYER SOIL LIQUID" "m{3) m{-3}"
state   real   sw100200            ij    misc          1     -     i1      "SW100200"      "LAYER SOIL LIQUID" "m{3) m{-3}"
state   real   sw010200            ij    misc          1     -     i1      "SW010200"      "LAYER SOIL LIQUID" "m{3) m{-3}"
state   real   soilw000            ij    misc          1     -     i1      "SOILW000"      "LAYER SOIL LIQUID" "m{3) m{-3}"
state   real   soilw005            ij    misc          1     -     i1      "SOILW005"      "LAYER SOIL LIQUID" "m{3) m{-3}"
state   real   soilw020            ij    misc          1     -     i1      "SOILW020"      "LAYER SOIL LIQUID" "m{3) m{-3}"
state   real   soilw040            ij    misc          1     -     i1      "SOILW040"      "LAYER SOIL LIQUID" "m{3) m{-3}"
state   real   soilw160            ij    misc          1     -     i1      "SOILW160"      "LAYER SOIL LIQUID" "m{3) m{-3}"
state   real   soilw300            ij    misc          1     -     i1      "SOILW300"      "LAYER SOIL LIQUID" "m{3) m{-3}"
state   real   st000010            ij    misc          1     -     i1      "ST000010"      "LAYER SOIL TEMPERATURE" "K"
state   real   st010040            ij    misc          1     -     i1      "ST010040"      "LAYER SOIL TEMPERATURE" "K"
state   real   st040100            ij    misc          1     -     i1      "ST040100"      "LAYER SOIL TEMPERATURE" "K"
state   real   st100200            ij    misc          1     -     i1      "ST100200"      "LAYER SOIL TEMPERATURE" "K"
state   real   st010200            ij    misc          1     -     i1      "ST010200"      "LAYER SOIL TEMPERATURE" "K"
state   real   soilt000            ij    misc          1     -     i1      "SOILT000"      "LAYER SOIL TEMPERATURE" "K"
state   real   soilt005            ij    misc          1     -     i1      "SOILT005"      "LAYER SOIL TEMPERATURE" "K"
state   real   soilt020            ij    misc          1     -     i1      "SOILT020"      "LAYER SOIL TEMPERATURE" "K"
state   real   soilt040            ij    misc          1     -     i1      "SOILT040"      "LAYER SOIL TEMPERATURE" "K"
state   real   soilt160            ij    misc          1     -     i1      "SOILT160"      "LAYER SOIL TEMPERATURE" "K"
state   real   soilt300            ij    misc          1     -     i1      "SOILT300"      "LAYER SOIL TEMPERATURE" "K"
state   real   landmask            ij    misc          1     -     i1      "LANDMASK"      "LAND MASK"  "flag"
state   real   topostdv            ij    misc          1     -     i1      "TOPOSTDV"      "ELEVATION STD DEV"  "m"
state   real   toposlpx            ij    misc          1     -     i1      "TOPOSLPX"      "ELEVATION X SLOPE"  ""
state   real   toposlpy            ij    misc          1     -     i1      "TOPOSLPY"      "ELEVATION Y SLOPE"  ""
state   real   shdmax              ij    misc          1     -     i1       "SHDMAX"        "ANNUAL MAX VEG FRAC" "fraction"
state   real   shdmin              ij    misc          1     -     i1       "SHDMIN"        "ANNUAL MIN VEG FRAC" "fraction"
state   real   snoalb              ij    misc          1     -     i1       "SNOALB"        "ANNUAL MAX SNOW ALBEDO" "fraction"
state   real   slopecat            ij    misc          1     -     i1      "SLOPECAT"      "SLOPE CATEGORY"  "flag"
state   real   toposoil            ij    misc          1     -     i1      "SOILHGT"       "ELEVATION OF LSM DATA"  "m"
state   real   landusef            iju   misc          1     Z     i1      "LANDUSEF"      "LANDUSE FRACTION"  "fraction"
state   real   soilctop            ijs   misc          1     Z     i1      "SOILCTOP"      "SOIL CAT FRACTION (TOP)"  "fraction"
state   real   soilcbot            ijs   misc          1     Z     i1      "SOILCBOT"      "SOIL CAT FRACTION (BOTTOM)"  "fraction"
state   real   soilcat             ij    misc          1     -     i1      "SOILCAT"       "SOIL CAT DOMINANT TYPE" "category"
state   real   vegcat              ij    misc          1     -     i1      "VEGCAT"        "VEGETATION CAT DOMINANT TYPE" "category"
                                                
#-----------------------------------------------------------------------------------------------------------------------------------------------------------------

state  real   totswdn   ij    misc        1    -    i
state  real   totlwdn   ij    misc        1    -    i
state  real   rswtoa    ij    misc        1    -    i
state  real   rlwtoa    ij    misc        1    -    i
state  real   czmean    ij    misc      1    -     i
state  real   cfracl    ij    misc      1    -     i
state  real   cfracm    ij    misc      1    -     i
state  real   cfrach    ij    misc      1    -     i
state  real   acfrst    ij    misc        1    -    i
state  real   acfrcv    ij    misc        1    -    i
state integer ncfrst    ij    misc        1    -    i
state integer ncfrcv    ij    misc        1    -    i

# Additional for NMM LSM
state    real   POTEVP           ij     misc        1         -     i       "POTEVP" "POTENTIAL EVAPORATION" "W m-2"
state    real   SNOPCX           ij     misc        1         -     i       "SNOPCX" "snow phase change heat flux" "W m-2"
state    real   SOILTB           ij     misc        1         -     i       "SOILTB" "BOTTOM SOIL TEMP" "K"

#-----------------------------------------------------------------------------------------------------------------------------------------------------------------

#state   integer number_at_same_level    -        -          -         -     -        "number_at_same_level"  ""         ""      
state   integer itimestep      -        -          -         -     h         "itimestep"             ""         ""      
#                                                
state   integer halo_x         -        -          -         -     -         "halo_x"                ""         ""      
state   integer halo_y         -        -          -         -     -         "halo_y"                ""         ""      
                                                
# output file descriptor for a domain                                           
state   integer oid            -        -          -         -     -         "oid"                   ""         ""      
state   integer nframes        -        -          -         -     -         "nframes"               ""         ""      
# input file descriptor for lbcs on mother domain                                               
state   integer lbc_fid        -        -          -         -     -         "lbc_fid"               ""         ""      
                                                
# indicates if tiling has been computed                                         
state   logical tiled          -        -          -         -     -         "tiled"                 ""         ""      
# indicates if patches have been computed                                               
state   logical patched        -        -          -         -     -         "patched"               ""         ""      
# indicates whether to read input from file or generate                                         
state   logical input_from_file        -        -          -         -     -         "input_from_file"         ""         ""    
state   logical write_metadata        -        -          -         -     -          "write_metadata"         ""         ""     
                                                
#
# insert here everything in main registry from rconfig to (but not including) communitations
# 
######                                          
#                                               
# Variables that are set at run-time to control configuration  (namelist-settable)                                              
#                                               
#<Table>  <Type>  <Sym>                   <How set>          <Nentries>   <Default>                                             
rconfig   integer time_step_max           namelist,namelist_01      1             1       ih   "time_step_max"         ""      ""
rconfig   integer max_dom                 namelist,namelist_01      1             1       irh  "max_dom"               ""      ""
# dynamics option (see package definitions, below)
rconfig   integer dyn_opt                 namelist,namelist_01      1             1       irh   "dyn_opt"               ""      ""
rconfig   integer rk_ord                  namelist,namelist_01      1             3       irh   "rk_order"               ""      ""
# diff_opt 1=old diffusion, 2=new                                               
rconfig   integer diff_opt                namelist,namelist_01      1             1       irh    "diff_opt"              ""      ""
# km_opt   1=old coefs, 2=tke, 3=Smagorinksy                                            
rconfig   integer km_opt                  namelist,namelist_01      1             1       irh    "km_opt"                ""      ""
rconfig   integer damp_opt                namelist,namelist_01      1             1       irh    "damp_opt"              ""      ""
rconfig   integer ISFFLX                  namelist,namelist_01      1             1       irh    "ISFFLX"                        ""      ""
rconfig   integer IFSNOW                  namelist,namelist_01      1             0       irh    "IFSNOW"                        ""      ""
rconfig   integer ICLOUD                  namelist,namelist_01      1             1       irh    "ICLOUD"                        ""      ""
#                                               
rconfig   integer num_soil_layers         namelist,namelist_01      1             5       irh    "num_soil_layers"               ""      ""
rconfig   integer spec_bdy_width          namelist,namelist_01      1             5       irh    "spec_bdy_width"                ""      ""
rconfig   integer spec_zone               namelist,namelist_01      1             1       irh    "spec_zone"                     ""      ""
rconfig   integer relax_zone              namelist,namelist_01      1             4       irh    "relax_zone"                    ""      ""
rconfig   integer tile_sz_x               namelist,namelist_01      1             0       -      "tile_sz_x"             ""      ""
rconfig   integer tile_sz_y               namelist,namelist_01      1             0       -      "tile_sz_y"             ""      ""
rconfig   integer numtiles                namelist,namelist_01      1             1       -      "numtiles"              ""      ""
rconfig   integer debug_level             namelist,namelist_01      1             0       -      "debug_level"           ""      ""
rconfig   integer irand                   namelist,namelist_01      1             0       -      "irand"           ""      ""
                                                
rconfig   integer grid_id                 namelist,namelist_02     max_domains    1       irh    "id"            ""      ""
rconfig   integer level                   namelist,namelist_02     max_domains    1       irh    "level"         ""      ""
                                                
rconfig   integer s_we                    namelist,namelist_02     max_domains    1       irh    "s_we"          ""      ""
rconfig   integer e_we                    namelist,namelist_02     max_domains    32      irh    "e_we"          ""      ""
rconfig   integer s_sn                    namelist,namelist_02     max_domains    1       irh    "s_sn"          ""      ""
rconfig   integer e_sn                    namelist,namelist_02     max_domains    32      irh    "e_sn"          ""      ""
rconfig   integer s_vert                  namelist,namelist_02     max_domains    1       irh    "s_vert"                ""      ""
rconfig   integer e_vert                  namelist,namelist_02     max_domains    31      irh    "e_vert"                ""      ""
rconfig   integer time_step_count_start   namelist,namelist_02     max_domains    0       h     "time_step_count_start"         ""      ""
rconfig   integer time_step_count_end     namelist,namelist_02     max_domains    10      h     "time_step_count_end"           ""      ""
rconfig   integer time_step_count_output  namelist,namelist_02     max_domains    10      h     "time_step_count_output"                ""      ""

rconfig   integer frames_per_outfile      namelist,namelist_02     max_domains    10      h     "frames_per_outfile"            ""      ""
rconfig   integer time_step_count_restart namelist,namelist_02     1              10      h     "time_step_count_restart"               ""      ""
rconfig   integer time_step_begin_restart namelist,namelist_02     1              0       h     "time_step_begin_restart"               ""      ""
rconfig   integer time_step_sound         namelist,namelist_02     max_domains    10      h     "time_step_sound"               ""      ""
rconfig   integer parent_id               namelist,namelist_02     max_domains    0       h     "parent_id"             ""      ""
rconfig   integer i_parent_start          namelist,namelist_02     max_domains    1       h     "i_parent_start"                ""      ""
rconfig   integer j_parent_start          namelist,namelist_02     max_domains    1       h     "j_parent_start"                ""      ""
                                               
rconfig   integer shw                     namelist,namelist_02     max_domains    1       h     "parent_grid_ratio"             ""      ""
rconfig   integer parent_grid_ratio       namelist,namelist_02     max_domains    1       h     "parent_grid_ratio"             ""      ""
rconfig   integer parent_time_step_ratio  namelist,namelist_02     max_domains    1       h     "parent_time_step_ratio"                ""      ""
rconfig   integer moad_grid_ratio         namelist,namelist_02     max_domains    1       h     "moad_grid_ratio"               ""      ""
rconfig   integer moad_time_step_ratio    namelist,namelist_02     max_domains    1       h     "moad_time_step_ratio"          ""      ""
                                              
rconfig   logical non_hydrostatic         namelist,namelist_03     max_domains  .true.   irh  "non_hydrostatic"    ""   ""
rconfig   real    dx                      namelist,namelist_03     max_domains    200     h     "dx"        "X HORIZONTAL RESOLUTION"   "METERS"
rconfig   real    dy                      namelist,namelist_03     max_domains    200     h     "dy"        "Y HORIZONTAL RESOLUTION"   "METERS"
rconfig   real    dt                      namelist,namelist_03     max_domains    2.      h     "dt"        "TEMPORAL RESOLUTION"      "SECONDS"
rconfig   real    ztop                    namelist,namelist_03     max_domains    15000.  h    "ztop"          ""      ""
rconfig   real    zdamp                   namelist,namelist_03     max_domains    5000.   h    "zdamp"         ""      ""
rconfig   real    dampcoef                namelist,namelist_03     max_domains    0.2     h    "dampcoef"              ""      ""
rconfig   real    smdiv                   namelist,namelist_03     max_domains    0.      h    "smdiv"         ""      ""
rconfig   real    emdiv                   namelist,namelist_03     max_domains    0.      h    "emdiv"         ""      ""
rconfig   real    epssm                   namelist,namelist_03     max_domains    .1      h    "epssm"         ""      ""
rconfig   real    khdif                   namelist,namelist_03     max_domains    0       h    "khdif"         ""      ""
rconfig   real    kvdif                   namelist,namelist_03     max_domains    0       h    "kvdif"         ""      ""
rconfig   real    mix_cr_len              namelist,namelist_03     max_domains    200.    h    "mix_cr_len"            ""      ""
rconfig   real    RADT                    namelist,namelist_03     max_domains    0       h    "RADT"          ""      ""
rconfig   real    BLDT                    namelist,namelist_03     max_domains    0       h    "BLDT"          ""      ""
rconfig   real    CUDT                    namelist,namelist_03     max_domains    0       h    "CUDT"          ""      ""
rconfig   integer JULYR                   namelist,namelist_03     max_domains    0       h    "JULYR"                 ""      ""
rconfig   integer JULDAY                  namelist,namelist_03     max_domains    1       h    "JULDAY"                ""      ""
rconfig   real    GMT                     namelist,namelist_03     max_domains    0.      h    "GMT"           ""      ""
                                                
rconfig   logical periodic_x              namelist,namelist_04     max_domains    .false. rh    "periodic_x"            ""      ""
rconfig   logical symmetric_xs            namelist,namelist_04     max_domains    .false. rh    "symmetric_xs"          ""      ""
rconfig   logical symmetric_xe            namelist,namelist_04     max_domains    .false. rh    "symmetric_xe"          ""      ""
rconfig   logical open_xs                 namelist,namelist_04     max_domains    .false. rh    "open_xs"               ""      ""
rconfig   logical open_xe                 namelist,namelist_04     max_domains    .false. rh    "open_xe"               ""      ""
rconfig   logical periodic_y              namelist,namelist_04     max_domains    .false. rh    "periodic_y"            ""      ""
rconfig   logical symmetric_ys            namelist,namelist_04     max_domains    .false. rh    "symmetric_ys"          ""      ""
rconfig   logical symmetric_ye            namelist,namelist_04     max_domains    .false. rh    "symmetric_ye"          ""      ""
rconfig   logical open_ys                 namelist,namelist_04     max_domains    .false. rh    "open_ys"               ""      ""
rconfig   logical open_ye                 namelist,namelist_04     max_domains    .false. rh    "open_ye"               ""      ""
rconfig   logical nested                  namelist,namelist_04     max_domains    .false. rh    "nested"                ""      ""
rconfig   logical specified               namelist,namelist_04     max_domains    .false. rh    "specified"             ""      ""
rconfig   logical top_radiation           namelist,namelist_04     max_domains    .false. rh    "top_radiation"         ""      ""

rconfig   integer start_year              namelist,namelist_05     max_domains    1993    irh   "start_year"            "4 DIGIT YEAR OF START OF MODEL" "YEARS"
rconfig   integer start_month             namelist,namelist_05     max_domains      03    irh   "start_month"           "2 DIGIT MONTH OF THE YEAR OF START OF MODEL, 1-12" "MONTHS"
rconfig   integer start_day               namelist,namelist_05     max_domains      13    irh   "start_day"             "2 DIGIT DAY OF THE MONTH OF START OF MODEL, 1-31" "DAYS"
rconfig   integer start_hour              namelist,namelist_05     max_domains      12    irh   "start_hour"            "2 DIGIT HOUR OF THE DAY OF START OF MODEL, 0-23" "HOURS"
rconfig   integer start_minute            namelist,namelist_05     max_domains      00    irh   "start_minute"          "2 DIGIT MINUTE OF THE HOUR OF START OF MODEL, 0-59" "MINUTES"
rconfig   integer start_second            namelist,namelist_05     max_domains      00    irh   "start_second"          "2 DIGIT SECOND OF THE MINUTE OF START OF MODEL, 0-59" "SECONDS"

rconfig   integer end_year                namelist,namelist_05     max_domains    1993    irh   "end_year"              "4 DIGIT YEAR OF END OF MODEL" "YEARS"
rconfig   integer end_month               namelist,namelist_05     max_domains      03    irh   "end_month"             "2 DIGIT MONTH OF THE YEAR OF END OF MODEL, 1-12" "MONTHS"
rconfig   integer end_day                 namelist,namelist_05     max_domains      14    irh   "end_day"               "2 DIGIT DAY OF THE MONTH OF END OF MODEL, 1-31" "DAYS"
rconfig   integer end_hour                namelist,namelist_05     max_domains      12    irh   "end_hour"              "2 DIGIT HOUR OF THE DAY OF END OF MODEL, 0-23" "HOURS"
rconfig   integer end_minute              namelist,namelist_05     max_domains      00    irh   "end_minute"            "2 DIGIT MINUTE OF THE HOUR OF END OF MODEL, 0-59" "MINUTES"
rconfig   integer end_second              namelist,namelist_05     max_domains      00    irh   "end_second"            "2 DIGIT SECOND OF THE MINUTE OF END OF MODEL, 0-59" "SECONDS"
rconfig   integer interval_seconds        namelist,namelist_05     1             43200    irh   "interval_seconds"      "SECONDS BETWEEN ANALYSIS AND BOUNDARY PERIODS" "SECONDS"
rconfig   integer real_data_init_type     namelist,namelist_05     1                 1    irh   "real_data_init_type"   "REAL DATA INITIALIZATION OPTIONS: 1=SI, 2=MM5, 3=GENERIC" "PRE-PROCESSOR TYPES"
                                                
#key      package       associated                package          associated 4d scalars
#         name          namelist choice           state vars

#### 9. Edit the Registry file to set up '4' as the value of the
**** namelist variable dyn_opt that means to select our exp dyncore.

#package   passivec1     chem_opt==0                  -             
package   passiveqv     mp_physics==0                -             moist:qv
package   kesslerscheme mp_physics==1                -             moist:qv,qc,qr
package   linscheme     mp_physics==2                -             moist:qv,qc,qr,qi,qs,qg
package   ncepcloud3    mp_physics==3                -             moist:qv,qc,qr
package   ncepcloud5    mp_physics==4                -             moist:qv,qc,qr,qi,qs
package   etampnew      mp_physics==5                -             moist:qv,qc
package   etampscheme   mp_physics==99               -             moist:qv,qc,qr

package   rrtmscheme    ra_lw_physics==1             -             -
package   gfdllwscheme  ra_lw_physics==99            -             -

package   swradscheme   ra_sw_physics==1             -             -
package   gsfcswscheme  ra_sw_physics==2             -             -
package   gfdlswscheme  ra_sw_physics==99            -             -

package   sfclayscheme   bl_sfclay_physics==1        -             -
package   myjsfcscheme   bl_sfclay_physics==2        -             -
package   slabscheme     bl_surface_physics==1       -             -
package   lsmscheme      bl_surface_physics==2       -             -
package   mrfscheme      bl_pbl_physics==1           -             -
package   myjpblscheme   bl_pbl_physics==2           -             -

package   kfetascheme    cu_physics==1               -             -
package   bmjscheme      cu_physics==2               -             -
package   kfscheme       cu_physics==99              -             -
                                                
rconfig   integer     chem_opt            namelist,namelist_04     max_domains    0       rh       "chem_opt"              ""      ""
rconfig   integer     mp_physics          namelist,namelist_04     max_domains    0       rh       "mp_physics"            ""      ""
rconfig   integer     ra_lw_physics       namelist,namelist_04     max_domains    0       rh       "ra_lw_physics"         ""      ""
rconfig   integer     ra_sw_physics       namelist,namelist_04     max_domains    0       rh       "ra_sw_physics"         ""      ""
rconfig   integer     bl_sfclay_physics   namelist,namelist_04     max_domains    0       rh       "bl_sfclay_physics"             ""      ""
rconfig   integer     bl_surface_physics  namelist,namelist_04     max_domains    0       rh       "bl_surface_physics"            ""      ""
rconfig   integer     bl_pbl_physics      namelist,namelist_04     max_domains    0       rh       "bl_pbl_physics"                ""      ""
rconfig   integer     cu_physics          namelist,namelist_04     max_domains    0       rh       "cu_physics"            ""      ""
rconfig   integer     h_mom_adv_order     namelist,namelist_04     max_domains    3       rh       "h_mom_adv_order"               ""      ""
rconfig   integer     v_mom_adv_order     namelist,namelist_04     max_domains    3       rh       "v_mom_adv_order"               ""      ""
rconfig   integer     h_sca_adv_order     namelist,namelist_04     max_domains    3       rh       "h_sca_adv_order"               ""      ""
rconfig   integer     v_sca_adv_order     namelist,namelist_04     max_domains    3       rh       "v_sca_adv_order"               ""      ""
                                               
rconfig   integer     io_form_input       namelist,namelist_04     1              2       h        "io_form_input"                 ""      ""
rconfig   integer     io_form_auxinput1   namelist,namelist_04     1              0       h        "io_form_auxinput1"                 ""      ""
rconfig   integer     io_form_auxinput2   namelist,namelist_04     1              0       h        "io_form_auxinput2"                 ""      ""
rconfig   integer     io_form_auxinput3   namelist,namelist_04     1              0       h        "io_form_auxinput3"                 ""      ""
rconfig   integer     io_form_auxinput4   namelist,namelist_04     1              0       h        "io_form_auxinput4"                 ""      ""
rconfig   integer     io_form_auxinput5   namelist,namelist_04     1              0       h        "io_form_auxinput5"                 ""      ""
rconfig   integer     io_form_history     namelist,namelist_04     1              2       h        "io_form_history"               ""      ""
rconfig   integer     io_form_auxhist1    namelist,namelist_04     1              0       h        "io_form_auxhist1"               ""      ""
rconfig   integer     io_form_auxhist2    namelist,namelist_04     1              0       h        "io_form_auxhist2"               ""      ""
rconfig   integer     io_form_auxhist3    namelist,namelist_04     1              0       h        "io_form_auxhist3"               ""      ""
rconfig   integer     io_form_auxhist4    namelist,namelist_04     1              0       h        "io_form_auxhist4"               ""      ""
rconfig   integer     io_form_auxhist5    namelist,namelist_04     1              0       h        "io_form_auxhist5"               ""      ""
rconfig   integer     io_form_restart     namelist,namelist_04     1              2       h        "io_form_restart"               ""      ""
rconfig   integer     io_form_boundary    namelist,namelist_04     1              2       h        "io_form_boundary"               ""      ""
# only need to specify these once; not for every io_form* variable
package   io_intio    io_form_restart==1                     -             -
package   io_netcdf   io_form_restart==2                     -             -
# Four placeholders for additional packages (we can go beyond zzz 
# but that will entail modifying frame/module_io.F and frame/md_calls.m4)
# Please note these are placeholders; HDF has not been implemented yet.
package   io_hdf      io_form_restart==3                     -             -
package   io_xxx      io_form_restart==4                     -             -
package   io_yyy      io_form_restart==5                     -             -
package   io_zzz      io_form_restart==6                     -             -
                                                
# items that come in as metadata from the input file
# default values should be specified to prevent compiler from complaining about
# used before set of these variables (eg. in frame/module_configure.F)
rconfig   real    cen_lat                 derived                  max_domains    0       -        "cen_lat"              "center latitude"      "degrees, negative is south"
rconfig   real    cen_lon                 derived                  max_domains    0       -        "cen_lon"              "central longitude"      "degrees, negative is west"
rconfig   real    truelat1                derived                  max_domains    0       -        "true_lat1"             "first standard parallel"      "degrees, negative is south"
rconfig   real    truelat2                derived                  max_domains    0       -        "true_lat2"             "second standard parallel"      "degrees, negative is south"
rconfig   real    moad_cen_lat            derived                  max_domains    0       -        "moad_cen_lat"         "center latitude of the most coarse grid"      "degrees, negative is south"
rconfig   real    stand_lon               derived                  max_domains    0       -        "stand_lon"            "standard longitude, parallel to j-direction, perpendicular to i-direction "      "degrees, negative is west"
rconfig   real    bdyfrq                  derived                  max_domains    0       -        "bdyfrq"               "lateral boundary input frequency"      "seconds"
rconfig   integer iswater                 derived                  max_domains    0       -        "iswater"              "land use index of water"      "index category"
rconfig   integer isice                   derived                  max_domains    0       -        "isice"                "land use index of ice"        "index category"
rconfig   integer isurban                 derived                  max_domains    0       -        "isurban"              "land use index for 'urban and built-up"     "index category"
rconfig   integer isoilwater              derived                  max_domains    0       -        "isoilwater"           "land use index of water for soil"        "index category"
rconfig   integer map_proj                derived                  max_domains    0       -        "map_proj"             "domain map projection"      "0=none, 1=Lambert, 2=polar, 3=Mercator"
                                                
##                                                
#### communications                                               
##                                                

halo      HALO_INIT          dyn_em 24:xb%map_factor,xb%psac,xb%rough,xb%landmask,xb%tgrn,xb%u,xb%v,xb%w,xb%t,xb%p,xb%q,xb%rho,xb%rh,xb%h,xb%hf,xb%u10,xb%v10,xb%t2,xb%q2,xb%terr,xb%psfc,xb%regime,xb%tpw,xb%speed,xb%tb19v,xb%tb19h,xb%tb22v,xb%tb37v,xb%tb37h,xb%tb85v,xb%tb85h
halo      HALO_PSICHI_UV     dyn_em 24:vp%v1,vp%v2,xb%cori,xb%rho,xa%u,xa%v,xa%psfc
halo      HALO_BAL_EQN_ADJ   dyn_em 24:xp%v1z
halo      HALO_PSICHI_UV_ADJ dyn_em 24:xa%u,xa%v,xa%psfc
halo      HALO_XA            dyn_em 24:xa%u,xa%v,xa%w,xa%q,xa%p,xa%t,xa%rho,xa%rh,xa%psfc
halo      HALO_XB            dyn_em 24:xb%u,xb%v,xb%w,xb%q,xb%p,xb%t,xb%rho,xb%rh,xb%psfc
halo      HALO_SFC_XA        dyn_em 24:xa%u10,xa%v10,xa%t2,xa%q2
halo      HALO_SFC_XB        dyn_em 24:xb%u10,xb%v10,xb%t2,xb%q2
halo      HALO_SSMI_XA       dyn_em 24:xa%tpw,xa%speed,xa%tb19v,xa%tb19h,xa%tb22v,xa%tb37v,xa%tb37h,xa%tb85v,xa%tb85h
halo      HALO_SSMI_XB       dyn_em 24:xb%tpw,xb%speed,xb%tb19v,xb%tb19h,xb%tb22v,xb%tb37v,xb%tb37h,xb%tb85v,xb%tb85h

##### Derived types for 3DVAR
# BEGIN VP_TYPE DEFINITION:
#      <Table>  <Type>  <Sym>                <Dims>   <Use>   <NumTLev> <Stagger> <IO>     <DNAME>             <DESCRIP>     <UNITS>
typedef vp_type real    v1                      ijk      -         1        -       -
typedef vp_type real    v2                      ijk      -         1        -       -
typedef vp_type real    v3                      ijk      -         1        -       -
typedef vp_type real    v4                      ijk      -         1        -       -
typedef vp_type real    v5                      ijk      -         1        -       -
# END VP_TYPE DEFINITION

# BEGIN XB_TYPE DEFINITION:
typedef xb_type integer      map
typedef xb_type real         ptop
typedef xb_type real         ztop
typedef xb_type real         ps0
typedef xb_type real         ts0
typedef xb_type real         tlp
typedef xb_type real         tis0
typedef xb_type real         ds
typedef xb_type real         sigmaf_0
typedef xb_type integer      mix
typedef xb_type integer      mjy 
typedef xb_type integer      mkz
typedef xb_type integer      num_of_var
#
typedef xb_type integer    ids
typedef xb_type integer    ide
typedef xb_type integer    jds
typedef xb_type integer    jde
typedef xb_type integer    kds
typedef xb_type integer    kde
typedef xb_type integer    ims
typedef xb_type integer    ime
typedef xb_type integer    jms
typedef xb_type integer    jme
typedef xb_type integer    kms
typedef xb_type integer    kme
typedef xb_type integer    its
typedef xb_type integer    ite
typedef xb_type integer    jts
typedef xb_type integer    jte
typedef xb_type integer    kts
typedef xb_type integer    kte
#
# table entries are of the form                                         
#      <Table>  <Type>  <Sym>                <Dims>   <Use>   <NumTLev> <Stagger> <IO>     <DNAME>             <DESCRIP>     <UNITS>
#Grid variables	       			   
typedef xb_type real    grid_box_area          ij       -         1        -       -  
typedef xb_type real    map_factor             ij       -         1        -       -
typedef xb_type real    u                      ijk      -         1        -       -
typedef xb_type real    v                      ijk      -         1        -       -
typedef xb_type real    w                      ijk      -         1        -       -
typedef xb_type real    t                      ijk      -         1        -       -
typedef xb_type real    p                      ijk      -         1        -       -
typedef xb_type real    q                      ijk      -         1        -       -

typedef xb_type real    h                      ijk      -         1        -       -
typedef xb_type real    hf                     ijk      -         1        -       -
typedef xb_type real    wh                     ijk      -         1        -       -

typedef xb_type real    rho                    ijk      -         1        -       -
typedef xb_type real    rh                     ijk      -         1        -       -
typedef xb_type real    es                     ijk      -         1        -       -
typedef xb_type real    qs                     ijk      -         1        -       -
typedef xb_type real    td                     ijk      -         1        -       -
typedef xb_type real    vertical_inner_product ijk      -         1        -       -

typedef xb_type real    qcw                    ijk      -         1        -       -
typedef xb_type real    qrn                    ijk      -         1        -       -

typedef xb_type real    ref                    ijk      -         1        -       -

typedef xb_type real    rough                  ij       -         1        -       -
typedef xb_type real    tpw                    ij       -         1        -       -
typedef xb_type real    slp                    ij       -         1        -       -
typedef xb_type real    speed                  ij       -         1        -       -
typedef xb_type real    tb19v                  ij       -         1        -       -
typedef xb_type real    tb19h                  ij       -         1        -       -
typedef xb_type real    tb22v                  ij       -         1        -       -
typedef xb_type real    tb37v                  ij       -         1        -       -
typedef xb_type real    tb37h                  ij       -         1        -       -
typedef xb_type real    tb85v                  ij       -         1        -       -
typedef xb_type real    tb85h                  ij       -         1        -       -

typedef xb_type real    cori                   ij       -         1        -       -
typedef xb_type real    tgrn                   ij       -         1        -       -
typedef xb_type real    lat                    ij       -         1        -       -
typedef xb_type real    lon                    ij       -         1        -       -
typedef xb_type real    terr                   ij       -         1        -       -
typedef xb_type real    psac                   ij       -         1        -       -
typedef xb_type real    lanu                   ij       -         1        -       -
typedef xb_type real    snow                   ij       -         1        -       -
typedef xb_type real    landmask               ij       -         1        -       -

typedef xb_type real    u10                    ij       -         1        -       -
typedef xb_type real    v10                    ij       -         1        -       -
typedef xb_type real    t2                     ij       -         1        -       -
typedef xb_type real    q2                     ij       -         1        -       -
typedef xb_type real    psfc                   ij       -         1        -       -

typedef xb_type real    regime                 ij       -         1        -       -

typedef xb_type real    znu                    k        -         1        -       -
typedef xb_type real    znw                    k        -         1        -       -
typedef xb_type real    dn                     k        -         1        -       -
typedef xb_type real    dnw                    k        -         1        -       -

typedef xb_type real    sigmah                 k        -         1        -       -
typedef xb_type real    sigmaf                 k        -         1        -       -
# END XB_TYPE DEFINITION

# BEGIN X_TYPE DEFINITION
typedef x_type real    u                      ijk      -         1        -       -
typedef x_type real    v                      ijk      -         1        -       -
typedef x_type real    w                      ijk      -         1        -       -
typedef x_type real    t                      ijk      -         1        -       -
typedef x_type real    q                      ijk      -         1        -       -
typedef x_type real    p                      ijk      -         1        -       -
typedef x_type real    rh                     ijk      -         1        -       -
typedef x_type real    rho                    ijk      -         1        -       -
typedef x_type real    wh                     ijk      -         1        -       -

typedef x_type real    qcw                    ijk      -         1        -       -
typedef x_type real    qrn                    ijk      -         1        -       -

typedef x_type real    tgrn                   ij       -         1        -       -
typedef x_type real    psfc                   ij       -         1        -       -
typedef x_type real    u10                    ij       -         1        -       -
typedef x_type real    v10                    ij       -         1        -       -
typedef x_type real    t2                     ij       -         1        -       -
typedef x_type real    q2                     ij       -         1        -       -

typedef x_type real    ref                    ijk      -         1        -       -

typedef x_type real    tpw                    ij       -         1        -       -
typedef x_type real    speed                  ij       -         1        -       -
typedef x_type real    tb19v                  ij       -         1        -       -
typedef x_type real    tb19h                  ij       -         1        -       -
typedef x_type real    tb22v                  ij       -         1        -       -
typedef x_type real    tb37v                  ij       -         1        -       -
typedef x_type real    tb37h                  ij       -         1        -       -
typedef x_type real    tb85v                  ij       -         1        -       -
typedef x_type real    tb85h                  ij       -         1        -       -

#  END TYPE x_type

# BEGIN XPOSE_TYPE DEFINITION:
#
typedef xpose_type integer    domdesc
typedef xpose_type integer    comms(max_comms)
typedef xpose_type integer    halo_id0
typedef xpose_type integer    halo_id1
typedef xpose_type integer    halo_id2
typedef xpose_type integer    halo_id3
typedef xpose_type integer    halo_id4
typedef xpose_type integer    halo_id5
typedef xpose_type integer    halo_id6
typedef xpose_type integer    halo_id7
typedef xpose_type integer    halo_id8
typedef xpose_type integer    halo_id9
typedef xpose_type integer    xpose_id1
typedef xpose_type integer    xpose_id2
#
# For standard MN decomposition:
typedef xpose_type integer    ids
typedef xpose_type integer    ide
typedef xpose_type integer    jds
typedef xpose_type integer    jde
typedef xpose_type integer    kds
typedef xpose_type integer    kde

typedef xpose_type integer    ims
typedef xpose_type integer    ime
typedef xpose_type integer    jms
typedef xpose_type integer    jme
typedef xpose_type integer    kms
typedef xpose_type integer    kme

typedef xpose_type integer    its
typedef xpose_type integer    ite
typedef xpose_type integer    jts
typedef xpose_type integer    jte
typedef xpose_type integer    kts
typedef xpose_type integer    kte

typedef xpose_type integer    ips
typedef xpose_type integer    ipe
typedef xpose_type integer    jps
typedef xpose_type integer    jpe
typedef xpose_type integer    kps
typedef xpose_type integer    kpe
#
# For xpose-ing to NZ decomposition:
typedef xpose_type integer    idsx
typedef xpose_type integer    idex
typedef xpose_type integer    jdsx
typedef xpose_type integer    jdex
typedef xpose_type integer    kdsx
typedef xpose_type integer    kdex

typedef xpose_type integer    imsx
typedef xpose_type integer    imex
typedef xpose_type integer    jmsx
typedef xpose_type integer    jmex
typedef xpose_type integer    kmsx
typedef xpose_type integer    kmex

typedef xpose_type integer    itsx
typedef xpose_type integer    itex
typedef xpose_type integer    jtsx
typedef xpose_type integer    jtex
typedef xpose_type integer    ktsx
typedef xpose_type integer    ktex

typedef xpose_type integer    ipsx
typedef xpose_type integer    ipex
typedef xpose_type integer    jpsx
typedef xpose_type integer    jpex
typedef xpose_type integer    kpsx
typedef xpose_type integer    kpex
#
# For xpose-ing to MZ decomposition:
typedef xpose_type integer    idsy
typedef xpose_type integer    idey
typedef xpose_type integer    jdsy
typedef xpose_type integer    jdey
typedef xpose_type integer    kdsy
typedef xpose_type integer    kdey

typedef xpose_type integer    imsy
typedef xpose_type integer    imey
typedef xpose_type integer    jmsy
typedef xpose_type integer    jmey
typedef xpose_type integer    kmsy
typedef xpose_type integer    kmey

typedef xpose_type integer    itsy
typedef xpose_type integer    itey
typedef xpose_type integer    jtsy
typedef xpose_type integer    jtey
typedef xpose_type integer    ktsy
typedef xpose_type integer    ktey

typedef xpose_type integer    ipsy
typedef xpose_type integer    ipey
typedef xpose_type integer    jpsy
typedef xpose_type integer    jpey
typedef xpose_type integer    kpsy
typedef xpose_type integer    kpey
#
typedef xpose_type real  v1z          ijk      -         1        -       -
typedef xpose_type real  v1x          ijkx     -         1        -       -
typedef xpose_type real  v1y          ijky     -         1        -       -

typedef xpose_type real  v2z          ijk      -         1        -       -
typedef xpose_type real  v2x          ijkx     -         1        -       -
typedef xpose_type real  v2y          ijky     -         1        -       -

xpose    XPOSE_V1  dyn_em xp%v1z,xp%v1x,xp%v1y
xpose    XPOSE_V2  dyn_em xp%v2z,xp%v2x,xp%v2y

# END XPOSE_TYPE DEFINITION
#
#Need this next line to set dyncores[0] to "v3d"
state real dummy i dyn_em 1
#
#Set state
state vp_type vv - -
state vp_type vp - -
state xb_type xb - -
state x_type xa - -
state xpose_type xp - -
		          
# communications

halo      HALO_EM_INIT dyn_em 48:u_1,u_2,v_1,v_2
halo      HALO_EH_INIT dyn_eh 48:ru_1,ru_2,rv_1,rv_2

