include file: STPARAM 46
CLL  Comdeck: STPARAM --------------------------------------------------   STPARAM.2      
CLL                                                                        STPARAM.3      
CLL  Purpose: Meaningful PARAMETER names for STASH processing routines.    STPARAM.4      
CLL           Both a long name and short name have been declared, to       STPARAM.5      
CLL           reduce the existence of "magic" numbers in STASH.            STPARAM.6      
CLL           Format is that first the address of the item is declare in   STPARAM.7      
CLL           both long and short form. example is;                        STPARAM.8      
CLL             integer st_item_code,s_item  !Item number (declaration)    STPARAM.9      
CLL             parameter(st_item_code=3,s_item=3)                         GSS1F305.71     
CLL                                                                        STPARAM.11     
CLL  Author:   S.Tett             Date:           22 January 1991          STPARAM.12     
CLL                                                                        STPARAM.13     
CLL  Model            Modification history from model version 3.0:         STPARAM.14     
CLL version  Date                                                          STPARAM.15     
CLL   3.5    Mar. 95  Sub-models project.                                  GSS1F305.72     
CLL                   st_model_code=28 added to STLIST addresses           GSS1F305.73     
CLL                                   S.J.Swarbrick                        GSS1F305.74     
!LL   4.2    27/11/96 MPP code: Added new stlist "magic numbers" :         GPB1F402.608    
!LL                   st_dump_output_length, st_dump_output_addr           GPB1F402.609    
!LL                                                       P.Burton         GPB0F403.8      
!LL   4.4    23/09/97 Add st_offset_code to the STASH list                 GSM5F404.26     
!LL                   S.D. Mullerworth                                     GSM5F404.27     
!    4.4  02/12/96 Time mean timeseries added R A Stratton.                GRS1F404.251    
!    4.5  23/01/98 Added new stlist magic number                           GPB2F405.242    
!                  st_dump_level_output_length                             GPB2F405.243    
CLL                                                                        STPARAM.16     
CLL  Programming standard: UM Doc Paper 3, version 2 (7/9/90)              STPARAM.17     
CLL                                                                        STPARAM.18     
CLL  Logical components covered: D70                                       STPARAM.19     
CLL                                                                        STPARAM.20     
CLL  Project task: D7                                                      STPARAM.21     
CLL                                                                        STPARAM.22     
CLL  External documentation:                                               STPARAM.23     
CLL    Unified Model Doc Paper C4 - Storage handling and diagnostic        STPARAM.24     
CLL                                 system (STASH)                         STPARAM.25     
CLLEND--------------------------------------------------------------       STPARAM.26     
C                                                                          STPARAM.27     
         integer st_model_code,s_modl ! Internal model number address      GSS1F305.75     
         parameter(st_model_code=28,s_modl=28)                             GSS1F305.76     
                                                                           GSS1F305.77     
         integer st_sect_no_code,s_sect ! Section Number address           GSS1F305.78     
     &          ,st_sect_code                                              GSS1F305.79     
         parameter(st_sect_no_code=2,s_sect=2,st_sect_code=2)              GSS1F305.80     
                                                                           GSS1F305.81     
         integer st_item_code,s_item  !Item number address                 GSS1F305.82     
         parameter(st_item_code=1,s_item=1)                                STPARAM.29     
                                                                           STPARAM.30     
         integer st_proc_no_code,s_proc ! Processing Code address          GSS1F305.83     
         parameter(st_proc_no_code=3,s_proc=3)                             STPARAM.35     
                                                                           STPARAM.36     
CL subsidiary codes for st_proc_no_code now                                STPARAM.37     
                                                                           STPARAM.38     
         integer st_replace_code                                           STPARAM.39     
         parameter(st_replace_code=1)                                      STPARAM.40     
                                                                           STPARAM.41     
         integer st_accum_code                                             STPARAM.42     
         parameter(st_accum_code=2)                                        STPARAM.43     
                                                                           STPARAM.44     
         integer st_time_mean_code                                         STPARAM.45     
         parameter(st_time_mean_code=3)                                    STPARAM.46     
                                                                           STPARAM.47     
         integer st_time_series_code                                       STPARAM.48     
         parameter(st_time_series_code=4)                                  STPARAM.49     
                                                                           STPARAM.50     
         integer st_max_code                                               STPARAM.51     
         parameter(st_max_code=5)                                          STPARAM.52     
                                                                           STPARAM.53     
         integer st_min_code                                               STPARAM.54     
         parameter(st_min_code=6)                                          STPARAM.55     
                                                                           STPARAM.56     
         integer st_append_traj_code                                       STPARAM.57     
         parameter(st_append_traj_code=7)                                  STPARAM.58     
                                                                           STPARAM.59     
         integer st_time_series_mean                                       GRS1F404.252    
         parameter(st_time_series_mean=8)                                  GRS1F404.253    
                                                                           GRS1F404.254    
         integer st_variance_code                                          STPARAM.60     
         parameter(st_variance_code=9)                                     GRS1F404.255    
                                                                           STPARAM.62     
         integer st_freq_code,s_freq ! Frequency (Input & output) addres   GSS1F305.84     
         parameter(st_freq_code=4,s_freq=4)                                STPARAM.64     
                                                                           STPARAM.65     
         integer st_offset_code,s_offs ! Offset for sampling               GSM5F404.28     
         parameter(st_offset_code=30,s_offs=30)                            GSM5F404.29     
                                                                           GSM5F404.30     
         integer st_start_time_code,s_times ! start timestep address       GSS1F305.85     
         parameter(st_start_time_code=5,s_times=5)                         STPARAM.67     
                                                                           STPARAM.68     
         integer st_end_time_code,s_timee ! end timestep address           GSS1F305.86     
         parameter(st_end_time_code=6,s_timee=6)                           STPARAM.70     
                                                                           STPARAM.71     
         integer st_period_code,s_period ! period in timesteps address     GSS1F305.87     
         parameter(st_period_code=7,s_period=7)                            STPARAM.73     
                                                                           STPARAM.74     
         integer st_infinite_time        ! infinite end/period value       STPARAM.75     
         parameter(st_infinite_time=-1)                                    STPARAM.76     
                                                                           STPARAM.77     
         integer st_end_of_list          ! end-of-list marker in times     STPARAM.78     
         parameter(st_end_of_list=-1)                                      STPARAM.79     
                                                                           STPARAM.80     
C ---------------------------- grid point stuff                            STPARAM.81     
         integer st_gridpoint_code,s_grid ! gridpoint info address         GSS1F305.88     
         parameter(st_gridpoint_code=8,s_grid=8)                           STPARAM.83     
CL now subsid grid point stuff                                             STPARAM.84     
         integer stash_null_mask_code,s_nomask ! no masking done           STPARAM.85     
         parameter(stash_null_mask_code=1,s_nomask=1)                      STPARAM.86     
                                                                           STPARAM.87     
         integer stash_land_mask_code,s_lndms ! land mask conds            STPARAM.88     
         parameter(stash_land_mask_code=2,s_lndms=2)                       STPARAM.89     
                                                                           STPARAM.90     
         integer stash_sea_mask_code,s_seams  ! sea mask code              STPARAM.91     
         parameter(stash_sea_mask_code=3,s_seams =3)                       STPARAM.92     
                                                                           STPARAM.93     
CL processing options                                                      STPARAM.94     
                                                                           STPARAM.95     
         integer block_size ! size of block for gridpoint code             STPARAM.96     
         parameter(block_size=10)                                          STPARAM.97     
                                                                           STPARAM.98     
         integer extract_top ! max code for vertical mean subroutine       STPARAM.99     
         integer extract_base ! base codes for vertical mean subroutine    STPARAM.100    
         parameter(extract_base=block_size*0)                              STPARAM.101    
         parameter(extract_top=block_size*1)                               STPARAM.102    
                                                                           STPARAM.103    
         integer vert_mean_top ! max code for vertical mean subroutine     STPARAM.104    
         integer vert_mean_base ! base codes for vertical mean subroutin   STPARAM.105    
         parameter(vert_mean_base=block_size*1)                            STPARAM.106    
         parameter(vert_mean_top=block_size*2)                             STPARAM.107    
                                                                           STPARAM.108    
         integer zonal_mean_top ! max code for zonal mean subroutine       STPARAM.109    
         integer zonal_mean_base ! base codes for zonal mean subroutine    STPARAM.110    
         parameter(zonal_mean_base=block_size*2)                           STPARAM.111    
         parameter(zonal_mean_top=block_size*3)                            STPARAM.112    
                                                                           STPARAM.113    
         integer merid_mean_top ! max code for meridional mean subroutin   STPARAM.114    
         integer merid_mean_base ! base codes for meridional mean subrou   STPARAM.115    
         parameter(merid_mean_base=block_size*3)                           STPARAM.116    
         parameter(merid_mean_top=block_size*4)                            STPARAM.117    
                                                                           STPARAM.118    
         integer field_mean_top ! max code for field mean subroutine       STPARAM.119    
         integer field_mean_base ! base codes for field mean subroutine    STPARAM.120    
         parameter(field_mean_base=block_size*4)                           STPARAM.121    
         parameter(field_mean_top=block_size*5)                            STPARAM.122    
                                                                           STPARAM.123    
         integer global_mean_top ! max code for global mean subroutine     STPARAM.124    
         integer global_mean_base ! base codes for global mean subroutin   STPARAM.125    
         parameter(global_mean_base=block_size*5)                          STPARAM.126    
         parameter(global_mean_top=block_size*6)                           STPARAM.127    
                                                                           STPARAM.128    
CL Weighting                                                               STPARAM.129    
                                                                           STPARAM.130    
         integer st_weight_code,s_weight ! weighting info address          GSS1F305.89     
         parameter(st_weight_code=9,s_weight=9)                            STPARAM.132    
                                                                           STPARAM.133    
         integer stash_weight_null_code,s_noweight ! value of null weigh   STPARAM.134    
         parameter(stash_weight_null_code=0,s_noweight=0)                  STPARAM.135    
                                                                           STPARAM.136    
         integer stash_weight_area_code,s_areaweight ! value of area wei   STPARAM.137    
         parameter(stash_weight_area_code=1,s_areaweight=1)                STPARAM.138    
                                                                           STPARAM.139    
         integer stash_weight_volume_code,s_volweight                      STPARAM.140    
         parameter(stash_weight_volume_code=2,s_volweight=2)               STPARAM.141    
                                                                           STPARAM.142    
         integer stash_weight_mass_code,s_massweight ! value of mass wei   STPARAM.143    
         parameter(stash_weight_mass_code=3,s_massweight=3)                STPARAM.144    
                                                                           STPARAM.145    
CL Domain definition                                                       STPARAM.146    
                                                                           STPARAM.147    
         integer st_north_code,s_north ! northern row address              GSS1F305.90     
         parameter(st_north_code=12,s_north=12)                            STPARAM.149    
                                                                           STPARAM.150    
         integer st_south_code,s_south ! southern row address              GSS1F305.91     
         parameter(st_south_code=13,s_south =13)                           STPARAM.152    
                                                                           STPARAM.153    
         integer st_west_code,s_west ! western column address              GSS1F305.92     
         parameter(st_west_code=14,s_west=14)                              STPARAM.155    
                                                                           STPARAM.156    
         integer st_east_code,s_east ! eastern row address                 GSS1F305.93     
         parameter(st_east_code=15,s_east =15)                             STPARAM.158    
                                                                           STPARAM.159    
CL Levels                                                                  STPARAM.160    
                                                                           STPARAM.161    
         integer st_input_bottom,s_bottom ! input bottom level address     GSS1F305.94     
         parameter(st_input_bottom=10,s_bottom =10)                        STPARAM.163    
                                                                           STPARAM.164    
         integer  st_special_code,s_special ! special code                 STPARAM.165    
         parameter(st_special_code=100,s_special=100)                      STPARAM.166    
                                                                           STPARAM.167    
         integer st_input_top,s_top          ! input top level address     GSS1F305.95     
         parameter(st_input_top=11,s_top=11)                               STPARAM.169    
                                                                           STPARAM.170    
         integer st_output_bottom,s_outbot   ! output bottom level addre   GSS1F305.96     
         parameter(st_output_bottom=21,s_outbot=21)                        STPARAM.172    
                                                                           STPARAM.173    
         integer st_output_top,s_outtop      ! output top level address    GSS1F305.97     
         parameter(st_output_top=22,s_outtop=22)                           STPARAM.175    
                                                                           STPARAM.176    
         integer st_model_level_code,s_model                               STPARAM.177    
         parameter(st_model_level_code=1,s_model=1)                        STPARAM.178    
                                                                           STPARAM.179    
         integer st_pressure_level_code,s_press ! code for pressure leve   STPARAM.180    
         parameter( st_pressure_level_code=2,s_press=2)                    STPARAM.181    
                                                                           STPARAM.182    
         integer st_height_level_code,s_height ! code for height levels    STPARAM.183    
         parameter(st_height_level_code=3,s_height=3)                      STPARAM.184    
                                                                           STPARAM.185    
         integer st_input_code,s_input               ! input code addres   GSS1F305.98     
         parameter(st_input_code=16,s_input=16)                            STPARAM.187    
                                                                           STPARAM.188    
         integer st_input_length,s_length ! input length of diagnostic     STPARAM.189    
         parameter(st_input_length=17,s_length=17)             ! address   GSS1F305.99     
                                                                           STPARAM.191    
         integer st_output_code,s_output ! output code address             GSS1F305.100    
         parameter(st_output_code=18,s_output=18)                          STPARAM.193    
                                                                           STPARAM.194    
C Pointer to D1 addressing information                                     GSM2F403.17     
         integer st_position_in_d1,st_d1pos ! Pos of item in D1 for        GSM2F403.18     
         parameter(st_position_in_d1=29,st_d1pos=29) ! relevant submodel   GSM2F403.19     
                                                                           GSM2F403.20     
C Output destination options                                               STPARAM.195    
                                                                           STPARAM.196    
         integer st_dump,st_secondary                                      STPARAM.197    
         parameter(st_dump=1,st_secondary=2)                               STPARAM.198    
                                                                           STPARAM.199    
         integer st_output_length,s_outlen ! output length of diagnostic   STPARAM.200    
         parameter(st_output_length=19,s_outlen=19)           ! address    GSS1F305.101    
*IF DEF,MPP                                                                GPB1F402.611    
         integer st_dump_output_length,s_doutlen ! output length on        GPB1F402.612    
         parameter(st_dump_output_length=32,s_doutlen=32)  ! dump          GSM5F404.31     
         integer st_dump_level_output_length,s_dlevoutlen                  GPB2F405.244    
         parameter(st_dump_level_output_length=33,s_dlevoutlen=33)         GPB2F405.245    
! output length of a single level on dump                                  GPB2F405.246    
*ENDIF                                                                     GPB1F402.614    
                                                                           STPARAM.202    
         integer st_output_addr,s_outadd ! start locn of diag after stas   STPARAM.203    
         parameter(st_output_addr=20,s_outadd=20)       ! output address   GSS1F305.102    
*IF DEF,MPP                                                                GPB1F402.615    
         integer st_dump_output_addr,s_doutadd ! output address on         GPB1F402.616    
         parameter(st_dump_output_addr=31,s_doutadd=31)  ! dump            GSM2F403.22     
*ENDIF                                                                     GPB1F402.618    
                                                                           STPARAM.205    
         integer st_lookup_ptr       ! ptr to dump lookup header address   GSS1F305.103    
         parameter(st_lookup_ptr=23)                                       STPARAM.207    
                                                                           STPARAM.208    
         integer st_series_ptr ! ptr into stash_series where control dat   STPARAM.209    
         parameter(st_series_ptr=24)                            ! addres   GSS1F305.104    
                                                                           STPARAM.211    
CL subsid stuff for time series                                            STPARAM.212    
         integer series_grid_type                                          STPARAM.213    
         parameter(series_grid_type=1)                                     STPARAM.214    
                                                                           STPARAM.215    
         integer series_grid_code                                          STPARAM.216    
         parameter(series_grid_code=0)                                     STPARAM.217    
                                                                           STPARAM.218    
         integer series_long_code                                          STPARAM.219    
         parameter(series_long_code=1)                                     STPARAM.220    
                                                                           STPARAM.221    
         integer series_size                                               STPARAM.222    
         parameter(series_size=2)                                          STPARAM.223    
                                                                           STPARAM.224    
         integer series_proc_code                                          STPARAM.225    
         parameter(series_proc_code=3)                                     STPARAM.226    
                                                                           STPARAM.227    
         integer series_north                                              STPARAM.228    
         parameter(series_north=4)                                         STPARAM.229    
                                                                           STPARAM.230    
         integer series_south                                              STPARAM.231    
         parameter(series_south=5)                                         STPARAM.232    
                                                                           STPARAM.233    
         integer series_west                                               STPARAM.234    
         parameter(series_west=6)                                          STPARAM.235    
                                                                           STPARAM.236    
         integer series_east                                               STPARAM.237    
         parameter(series_east=7)                                          STPARAM.238    
                                                                           STPARAM.239    
         integer series_list_start                                         STPARAM.240    
         parameter(series_list_start=8)                                    STPARAM.241    
                                                                           STPARAM.242    
         integer series_list_end                                           STPARAM.243    
         parameter(series_list_end=9)                                      STPARAM.244    
                                                                           STPARAM.245    
         integer record_size                                               STPARAM.246    
         parameter(record_size=9)                                          STPARAM.247    
                                                                           STPARAM.248    
C Miscellaneous parameters                                                 STPARAM.249    
                                                                           STPARAM.250    
         integer st_macrotag   ! system/user tag field in stlist address   GSS1F305.105    
         parameter(st_macrotag=25)                                         STPARAM.252    
                                                                           STPARAM.253    
C Pseudo-level list pointers                                               STPARAM.254    
                                                                           STPARAM.255    
         integer st_pseudo_in        ! pseudo-levels input list address    GSS1F305.106    
         parameter(st_pseudo_in=26)                                        STPARAM.257    
                                                                           STPARAM.258    
         integer st_pseudo_out       ! pseudo-levels output list address   GSS1F305.107    
         parameter(st_pseudo_out=27)                                       STPARAM.260    
                                                                           STPARAM.261    
C Internal horizontal gridtype codes common to all diagnostics             STPARAM.262    
                                                                           STPARAM.263    
         integer st_tp_grid,st_uv_grid, ! T-p grid, u-v grid               STPARAM.264    
     &           st_cu_grid,st_cv_grid, ! C-grid (u point, v point)        STPARAM.265    
     &           st_zt_grid,st_zu_grid, ! Zonal T-grid, u-grid             STPARAM.266    
     &           st_mt_grid,st_mu_grid, ! Meridional T-grid, u-grid        STPARAM.267    
     &           st_scalar              ! Scalar (ie. single value)        STPARAM.268    
         parameter(st_tp_grid=1,                                           STPARAM.269    
     &             st_uv_grid=2,                                           STPARAM.270    
     &             st_cu_grid=3,                                           STPARAM.271    
     &             st_cv_grid=4,                                           STPARAM.272    
     &             st_zt_grid=5,                                           STPARAM.273    
     &             st_zu_grid=6,                                           STPARAM.274    
     &             st_mt_grid=7,                                           STPARAM.275    
     &             st_mu_grid=8,                                           STPARAM.276    
     &             st_scalar=9)                                            STPARAM.277