include file: UMSCALAR 30
C ======================== COMDECK UMSCALAR ========================       @DYALLOC.103    
CLL                                                                        OCC0F400.1      
CLL  Model            Modification history:                                OCC0F400.2      
CLL  version  date                                                         OCC0F400.3      
CLL   4.0   01/06/95 Insert ice variables which are to be read in via      OCC0F400.4      
CLL                  UI rather than set locally.  C.Cooper.                OCC0F400.5      
CLL                                                                        OCC0F400.6      
CLL   4.1   03/04/96 Insert variables required for Gent and McWilliams     OLA0F401.38     
CLL                  scheme and for tapering of isopycnals  C.Roberts      OLA0F401.39     
CLL   4.4   16/09/97  ! Include variables for depth in quadratic Large     OLA0F404.1      
CLL   4.4   15/06/97 Add Free Surface solution timestep and                ORL1F404.177    
CLL                  weighting factor used with the delplus                ORL1F404.178    
CLL                  operator in TROPIC            R.Lenton                ORL1F404.179    
CLL   4.5   05/08/97 Removed old boundary logicals and added constants     OSI1F405.1      
CLL                  for Gill ocean boundary routine and fieldcodes.       OSI1F405.2      
CLL                  C.G. Jones                                            OSI1F405.3      
CLL   4.5   3.11.98   Set variables for Med/Hud outflow   M. Roberts       OOM2F405.30     
CLL   4.5    10/11/98   Add variables for biharmonic momentum and GM       OOM1F405.46     
CLL                     and Large scheme into common block                 OOM1F405.47     
CLL   4.5   3.9.98   Add new variables for HADCM4 sea-ice scheme           ODC1F405.158    
CLL                  and remove cavitating fluid variables.                ODC1F405.159    
CLL                  Doug Cresswell and Jonathan Gregory                   ODC1F405.160    
CLL                                                                        ORL1F404.180    
                                                                           ORL1F404.181    
      LOGICAL ROWPRT,   ! Switch for printouts in ROWCALC                  UMSCALAR.8      
     *        ALLROW,   !   "     "  all rows printed in ROWCALC           UMSCALAR.9      
     *        TSUVPRT,  !   "     "  printout of T,S,U,V in UMWRITOT       UMSCALAR.10     
     *        ANCILPRT  !   "     "     "     "  ancil. fields " "         UMSCALAR.11     
      INTEGER ISTRT,ISTOP                                                  UMSCALAR.12     
C                                                                          RH011293.43     
C          DECLARE REAL NUMBER VARIABLES                                   RH011293.44     
C                                                                          RH011293.45     
      REAL KAPPA0_SI,        ! Vert. diffusivity at surface                RH011293.47     
     &     DKAPPA_DZ_SI      ! Vert. diffusivity rate of increase          RH011293.48     
C                                                                          RH011293.50     
      REAL AH,               ! Coeff of horizontal mixing of T             RH011293.51     
     &     DTBT,             ! Free Surface barotropic timestep            ORL1F404.182    
     &     DTSF,             ! Time step on STREAM FUNCTION                RH011293.52     
     &     DTTS,             ! Time step on TRACERS                        RH011293.53     
     &     DTUV,             ! Time step on internal mode of U,V           RH011293.54     
     &     C2DTBT,           ! 2 * time step for free surface solution     ORL1F404.183    
     &     C2DTSF,           ! 2 * time step on STREAM FUNCTION            RH011293.55     
     &     C2DTTS,           ! 2 * time step for TRACERS                   RH011293.56     
     &     C2DTUV,           ! 2 * time step on internal mode of U,V       RH011293.57     
     &     OMEGA,            ! Rate of rotation of coordinate system.      RH011293.58     
     &     ACOR,             ! Used in coriolis term weighting             RH011293.59     
     &     CRIT,             ! Criterion for relaxation convergence        RH011293.60     
     &     SOR,              ! Coeff of over-relaxation (1.5-1.8)          RH011293.61     
     &     GRAV_SI,          ! Accel due to gravity SI units               RH011293.62     
     &     GRAV,             ! Accel due to gravity cgs units              RH011293.63     
     &     RHO_WATER_SI,     ! Density 1026 kg/m**3                        RH011293.64     
     &     SPECIFIC_HEAT_SI, ! S.H. SI units                               RH011293.65     
     &     CONV,             ! SI to cgs in wind stress calcs.             RH011293.66     
     &     PI,               ! 3.1415927                                   RH011293.67     
     &     RADIAN,           ! 57.29578 degrees                            RH011293.68     
     &     RADIUS            ! Radius of Earth                             RH011293.69     
     &    ,WGHT_DELPLUS      ! Weighting for delplus in TROPIC             ORL1F404.184    
C                                                                          RH011293.70     
      REAL AM                ! Coeff of horizontal mixing of U,V           ORH1F305.4104   
     &    ,AM0               ! } Coeffs for lateral viscosity              ORH1F305.4105   
     &    ,AM1               ! } variation with latitude                   ORH1F305.4106   
C                                                                          ORH1F305.4107   
      REAL FKPH              ! Coeff of vertical mixing of T               ORH1F305.4108   
     &    ,FKPM              ! Coeff of vertical mixing of U,V             ORH1F305.4109   
     &    ,FNUB_SI           ! }Constants used in calculating              ORH1F305.4110   
     &    ,FNU0_SI           ! }Richardson number dependent viscosity      ORH1F305.4111   
     &    ,FKAPB_SI          ! }                                           ORH1F305.4112   
     &    ,STABLM_SI         ! }                                           ORH1F305.4113   
     &    ,GNUMINC_SI        ! Min values of vertical                      ORH1F305.4114   
     &    ,GNUMINT_SI        ! diffusivity (level 1)                       ORH1F305.4115   
      REAL                                                                 OLA0F404.2      
     & max_qLarge_depth  ! max depth allowed for quadratic Large           OLA0F404.3      
     &,crit_Ri  ! critical Richardson no used for depth of                 OLA0F404.4      
                ! quadratic Large scheme                                   OLA0F404.5      
     &,MAX_LARGE_DEPTH,CRIT_RI_FL  ! Equivalent numbers for Full Large     OOM1F405.51     
C                                                                          ORH1F305.4116   
      REAL AHI1_SI,          ! } Coeffs for isopycnal diffusion coeff      ORH1F305.4117   
     &     AHI2_SI,          ! } allowing it to vary with depth            ORH1F305.4118   
     &     AHI3_SI,          ! }                                           ORH1F305.4119   
     &     SLOPE_MAX         ! Max slope allowed (isopyc diffusncalcs)     ORH1F305.4120   
C                                                                          ORH1F305.4121   
      REAL ATHKDF1_SI,       ! } Coeffs for Gent and McWilliams scheme     OLA0F401.40     
     &     ATHKDF2_SI,       ! } thickness diffusion allowing it to        OLA0F401.41     
     &     ATHKDF3_SI,       ! } vary with depth                           OLA0F401.42     
     &     dslope,           !  Values required for tapering of            OLA0F401.43     
     &     slopec            !  isopycnals                                 OLA0F401.44     
      REAL athkdf_bi        ! Coeff for biharmonic GM mixing               OOM1F405.48     
     &    ,BM               ! Coeff mixing for biharmonic U,V              OOM1F405.49     
      REAL HANEY_SI          ! Haney temperature coeff (W/m2/K)            ORH1F305.4122   
C                                                                          ORH1F305.4123   
      REAL ETA1_SI,          ! } Depth decay of solar radiation bands      ORH1F305.4124   
     &     ETA2_SI,          ! }                                           ORH1F305.4125   
     &     RSOL              ! ratio of long/short wave radiation          ORH1F305.4126   
      Integer KFIX           ! max penetration depth of solar radiation    ORH1F305.4127   
C                                                                          ORH1F305.4128   
      REAL LAMDA,            ! Frctn wind mixing energy availbl to ocean   ORH1F305.4129   
     &     DELTA_SI,         ! Decay scale of wind mixing energy           ORH1F305.4130   
     &     EPSILON,          ! Proportion of convectivelyreleased          ORH1F305.4131   
     &                       ! energy available for mixing                 ORH1F305.4132   
     &     DELPSF            ! Non-solar density change (cm3/s2)           ORH1F305.4133   
C                                                                          ORH1F305.4134   
      REAL                                                                 OSI1F405.4      
     &     OBDY_GILL_MU,      ! weighting value for Gill bdy routine       OSI1F405.5      
     &     OBDY_GILL_LAMDA    ! constant for Gill ocean bdy routine        OSI1F405.6      
                                                                           OSI1F405.7      
      REAL TFREEZE,          ! Freezing pt of sea water                    ORH1F305.4141   
     &     EDDYDIFFN,        ! Ocean/ice diffusion constant N hemisphr     ORH1F305.4142   
     &     EDDYDIFFS,        ! Ocean/ice diffusion constant S hemisphr     ORH1F305.4143   
     &     SALICE,           ! Salinity of sea ice                         ORH1F305.4144   
     &     QFUSION,          ! Latent heat of fusion sea ice (J/kg)        ORH1F305.4145   
     &     H0,               ! Min local depth newly formed ice (m)        ORH1F305.4146   
     &     AMXSOUTH,         ! Max ice fraction S hemisphere               ORH1F305.4147   
     &     AMXNORTH,         ! Max ice fraction N hemisphere               ORH1F305.4148   
     &     AICEMIN,          ! Min ice fraction for icy points             ORH1F305.4149   
     &     HICEMIN,          ! Min ice depth for icy points                OCC0F400.7      
     &     RHOICE,           ! Density of ice                              ORH1F305.4150   
     &     RHOSNOW,          ! Density of snow                             OCC0F400.8      
     &     RHOWATER,         ! Density of water                            OCC0F400.9      
     &     AH_ICE,           ! Ice diffusion coefficient                   OCC0F400.12     
     &     quad_ice_drag,  ! coefft of quadratic ice-ocean drag            ODC1F405.161    
     &     hicestop,       ! max hice at which convergence is allowed      ODC1F405.162    
     &     hiceslow,       ! min hice at which convergence is impeded      ODC1F405.163    
     &     aicemizfry      ! aice below which GBM O2I is constant          ODC1F405.164    
C                                                                          ORH1F305.4152   
      REAL TFREEZ,           ! } Freezing pt of sea water and              ORH1F305.4153   
     &     TCHECK            ! } value for .LE. test                       ORH1F305.4154   
C                                                                          ORH1F305.4155   
      REAL PCO2_ATM_0        ! Initial atmospheric pCO2                    ORH1F305.4156   
     &    ,C14TO12_ATM_0     ! Initial atmospheric pCO2                    ORH1F305.4157   
                                                                           ORH8F402.68     
      REAL CSR_JFU0  ! CSR(JFU0) needed for mpp filtering code             ORH8F402.69     
     &,    CSTR_JFT0 ! CSTR(JFT0) needed for mpp filtering code            ORH8F402.70     
C                                                                          OJG1F404.3      
      REAL tendfrc           ! Fraction of box mixed by Med outflow        OJG1F404.4      
       real SALREF,SALLOW,SALUP                                            OJL1F405.87     
C                                                                          OJG1F404.5      
      REAL med_in,med_out                                                  OOM2F405.31     
     &    ,hud_in,hud_out   ! Hudson Bay inflow goes in at depth           OOM2F405.32     
      COMMON /SCALAR/ DTTS,DTUV,DTBT,DTSF,C2DTTS,C2DTUV,C2DTSF,C2DTBT      ORL1F404.185    
     &,AH,AM                                                               ORL1F404.186    
     &,AM0,AM1                                                             ORH1F305.4161   
     &,ACOR,CRIT,SOR,OMEGA,RADIUS,WGHT_DELPLUS,GRAV,RADIAN,PI              ORL1F404.187    
     &,GRAV_SI                                                             ORH1F305.4163   
     &,RHO_WATER_SI,SPECIFIC_HEAT_SI                                       ORH1F305.4164   
     &,ROWPRT,ALLROW,TSUVPRT,ANCILPRT,ISTRT,ISTOP                          ORH1F305.4165   
     &,FKPH,FKPM                                                           ORH1F305.4166   
     &,AHI1_SI,AHI2_SI,AHI3_SI,SLOPE_MAX                                   ORH1F305.4167   
     &,ATHKDF1_SI,ATHKDF2_SI,ATHKDF3_SI,dslope,slopec                      OLA0F401.45     
     &,athkdf_bi,BM                                                        OOM1F405.50     
     &,FNUB_SI,FNU0_SI,KAPPA0_SI,DKAPPA_DZ_SI,STABLM_SI                    ORH1F305.4168   
     &,GNUMINC_SI,GNUMINT_SI  ! Min values of vert diffusivity (level 1)   ORH1F305.4169   
     &,max_qLarge_depth,crit_Ri,MAX_LARGE_DEPTH,CRIT_RI_FL                 OOM1F405.52     
     &,HANEY_SI        ! Haney coefficient for temperature (W/m2/K)        ORH1F305.4170   
     &,ETA1_SI,ETA2_SI,RSOL,KFIX                                           ORH1F305.4171   
     &,LAMDA,DELTA_SI,EPSILON         ! Mixed layer params                 ORH1F305.4172   
     &,DELPSF  ! 'Non-solar density change' (mixed layer) (units cm3/s2)   ORH1F305.4173   
     &,OBDY_GILL_MU,OBDY_GILL_LAMDA                                        OSI1F405.8      
     &,TFREEZE,EDDYDIFFN,EDDYDIFFS,SALICE,QFUSION,H0,AMXSOUTH,AMXNORTH     ORH1F305.4176   
     &,AICEMIN,HICEMIN,RHOICE,RHOSNOW,RHOWATER                             ODC1F405.165    
     &,ah_ice,quad_ice_drag,hicestop,hiceslow,aicemizfry                   ODC1F405.166    
     &,TFREEZ,TCHECK    ! Freezing pt and value for .LE. test              ORH1F305.4178   
     &,pco2_atm_0       ! Initial atmospheric pCO2                         ORH1F305.4179   
     &,c14to12_atm_0    ! Initial C14/C12 ratio in atmosphere              ORH1F305.4180   
     &,CSR_JFU0,CSTR_JFT0                                                  ORH8F402.71     
     &,tendfrc,med_in,med_out,hud_in,hud_out                               OOM2F405.33     
                                                                           OOM2F405.34     
     &,SALREF,SALLOW,SALUP                                                 OJL1F405.88     
C ===================================================================      @DYALLOC.104