!-------------------------------------- LICENCE BEGIN ------------------------------------
!Environment Canada - Atmospheric Science and Technology License/Disclaimer, 
!                     version 3; Last Modified: May 7, 2008.
!This is free but copyrighted software; you can use/redistribute/modify it under the terms 
!of the Environment Canada - Atmospheric Science and Technology License/Disclaimer 
!version 3 or (at your option) any later version that should be found at: 
!http://collaboration.cmc.ec.gc.ca/science/rpn.comm/license.html 
!
!This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
!without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
!See the above mentioned License/Disclaimer for more details.
!You should have received a copy of the License/Disclaimer along with this software; 
!if not, you can write to: EC-RPN COMM Group, 2121 TransCanada, suite 500, Dorval (Quebec), 
!CANADA, H9P 1J3; or send e-mail to service.rpn@ec.gc.ca
!-------------------------------------- LICENCE END --------------------------------------
#if defined (DOC)
*
***comdeck out.cdk
*
*______________________________________________________________________
*                                                                      |
*  OUTPUT GLOBAL CONTROL VARIABLES                                     |
*______________________________________________________________________|
*                    |                                                 |
* NAME               | DESCRIPTION                                     |
*--------------------|-------------------------------------------------|
* Out_flipit_L       | .true. to flip field from ni*nj*nk to ni*nk*nj  |
* Out_debug_L        | .true. to print stdout from FST functions       |
* Out_datyp          | 1 - real datyp, 134 - compressed real (RPN FST) |
* Out_etik_S         | label, etiket                                   |
* Out_etiket_S       | original label                                  |
* Out_runstrt_S      | date and time of start of pilot run             |
* Out_endstepno      | last timestep to be included in current output  |
* Out_typvar_S       | type of variable 'P'-predicted, 'A'-analysis    |
* Out_deet           | timestep interval in seconds Cstv_dt_8          |
* Out_dateo          | date and time of origin                         |
* Out_ixg(4)         | grid descriptors                                |
* Out_ip2            | value for IP2                                   |
* Out_ip3            | value for IP3                                   |
* Out_ndigits        | number of digits in the suffix of filename      |
*                    | which contains usually the value IP2            |
* Out_gridtyp_S      | grid type 'E' or '#' or 'M' or 'G'              |
* Out_numpe_perb     | number of processors per block                  |
* Out_blocme         | local block processor id                        |
* Out_nblocx         | number of blocks along x                        |
* Out_nblocy         | number of blocks along y                        |
* Out_mybloc         | local block                                     |
* Out_myblocx        | local column of block topology                  |
* Out_myblocy        | local row of block topology                     |
* Out_bloci0         | global starting I for local block               |
* Out_blocin         | global ending   I for local block               |
* Out_blocj0         | global starting J for local block               |
* Out_blocjn         | global ending   J for local block               |
* Out_blocni         | total points along NI for local block           |
* Out_blocnj         | total points along NJ for local block           |
* Out_myproc         | processor number                                |
* Out_myprocni       | l_ni                                            |
* Out_myprocnj       | l_ni                                            |
* Out_idg            | global starting I for loc. blk within outputgrid|
* Out_ifg            | global ending   I for loc. blk within outputgrid|
* Out_idg            | global starting J for loc. blk within outputgrid|
* Out_ifg            | global ending   J for loc. blk within outputgrid|
* Out_nisg           | Number of points for ">>" for output grid       |
* Out_njsg           | Number of points for "^^" for output grid       |
* Out_nisl           | Number of points along X to output for local blk|
* Out_njsl           | Number of points along Y to output for local blk|
* Out_gridi0         | starting I of entire grid (Grid_x0)             |
* Out_gridin         | ending   I of entire grid (Grid_x1)             |
* Out_gridj0         | starting J of entire grid (Grid_y0)             |
* Out_gridjn         | ending   J of entire grid (Grid_y1)             |
* Out_rgridi0        | starting I of reduced grid (Grid_x0)            |
* Out_rgridin        | ending   I of reduced grid (Grid_x1)            |
* Out_rgridj0        | starting J of reduced grid (Grid_y0)            |
* Out_rgridjn        | ending   J of reduced grid (Grid_y1)            |
* Out_rewrit_L       | .true. to overwrite, .false. to not overwrite   |
* ---------------------------------------------------------------------
#endif
      character*256 Out_filename_S
      character*256 Out_filenamep_S
      character*15 Out_runstrt_S
      character*12 Out_etik_S, Out_etiket_S
      character*1  Out_gridtyp_S,Out_levtyp_S, Out_proj_S,Out_unit_S
      character*2  Out_typvar_S,Out_prefix_S
      character*3  Out_ext_S
      logical      Out_flipit_L, Out_debug_L, Out_rewrit_L
      real         Out_xpos(*), Out_ypos(*)
      pointer      (Out_xpos_,Out_xpos), (Out_ypos_,Out_ypos)

      integer Out_date,Out_hour,Out_dateo,Out_deet,Out_npas,Out_endstepno,
     $        Out_kind, Out_unf, Out_nisl,Out_njsl,Out_nisg, Out_njsg,
     $        Out_nblocx,Out_nblocy,Out_blocme,Out_numpe_perb,
     $        Out_bloci0,Out_blocin,Out_blocj0,Out_blocjn,
     $        Out_blocwest,Out_bloceast,Out_blocnorth,Out_blocsouth,
     $        Out_blocni, Out_blocnj,Out_myblocx, Out_myblocy, Out_nk,
     $        Out_gridi0,Out_gridin,Out_gridj0,Out_gridjn, Out_mybloc,
     $        Out_rgridi0,Out_rgridj0, Out_reduc,Out_ndigits,
     $        Out_datyp,
     $        Out_hx,Out_hy,
     $        Out_idg, Out_ifg, Out_jdg, Out_jfg,
     $        Out_idl, Out_ifl, Out_jdl, Out_jfl,
     $        Out_ig1, Out_ig2, Out_ig3, Out_ig4,
     $        Out_ixg(4), Out_ip2, Out_ip3,
     $        Out_myproc,Out_myrow,Out_mycol,
     $        Out_myproci0, Out_myprocj0, Out_myprocni, Out_myprocnj,
     $        Out_halox,Out_haloy,Out_periodx,Out_periody,
     $        Out_mywest,Out_myeast,Out_mynorth,Out_mysouth

      common /out_i/
     $        Out_date,Out_hour,Out_dateo,Out_deet,Out_npas,Out_endstepno,
     $        Out_kind, Out_unf, Out_nisl,Out_njsl,Out_nisg, Out_njsg,
     $        Out_nblocx,Out_nblocy,Out_blocme,Out_numpe_perb,
     $        Out_bloci0,Out_blocin,Out_blocj0,Out_blocjn,
     $        Out_blocwest,Out_bloceast,Out_blocnorth,Out_blocsouth,
     $        Out_blocni, Out_blocnj,Out_myblocx, Out_myblocy, Out_nk,
     $        Out_gridi0,Out_gridin,Out_gridj0,Out_gridjn, Out_mybloc,
     $        Out_rgridi0,Out_rgridj0, Out_reduc,Out_ndigits,
     $        Out_datyp,
     $        Out_hx,Out_hy,
     $        Out_idg, Out_ifg, Out_jdg, Out_jfg,
     $        Out_idl, Out_ifl, Out_jdl, Out_jfl,
     $        Out_ig1, Out_ig2, Out_ig3, Out_ig4,
     $        Out_ixg, Out_ip2, Out_ip3,
     $        Out_myproc,Out_myrow,Out_mycol,
     $        Out_myproci0, Out_myprocj0, Out_myprocni, Out_myprocnj,
     $        Out_halox,Out_haloy,Out_periodx,Out_periody,
     $        Out_mywest,Out_myeast,Out_mynorth,Out_mysouth

      common /out_c/
     $        Out_filename_S, Out_runstrt_S, Out_etik_S, Out_etiket_S,
     $        Out_gridtyp_S,Out_levtyp_S, Out_proj_S,Out_unit_S,
     $        Out_typvar_S,Out_prefix_S, Out_ext_s

      common /out_l/  Out_flipit_L, Out_debug_L,Out_rewrit_L
      common /out_p/  Out_xpos_, Out_ypos_