    SUBROUTINE WRTCOM
!---------------------------------------------------------------
    INCLUDE "parmeta.f90"
    PARAMETER (IMJM=IM*JM-JM/2,LP1=LM+1)
    PARAMETER (LB=322,JAM=268,ITB=76,JTB=134,ITBQ=152,JTBQ=440)
    PARAMETER (NSOIL=2)
    PARAMETER (NWBC=98532,NWCW=529058,NWCV=51608,NWDY=9+129786 &
    ,          NWPH=21+333225 &
    ,          NWPV=735414,NWSO=219334,NWSR=12902,NWVR=1999810)

    INCLUDE "COMM_BOCO.f90"
    INCLUDE "CLDWTR.chk"
    INCLUDE "COMM_CNVCLDK.f90"
    INCLUDE "DYNAM.chk"
    INCLUDE "PHYS2.chk"
    INCLUDE "COMM_PVRBLSK.f90"
    INCLUDE "COMM_SOILK.f90"
    INCLUDE "COMM_VRBLSK.f90"

    REAL :: DYA(NWDY),PH(NWPH-1),PDBA(NWBC),CWMA(NWCW)
    EQUIVALENCE (DYC,DYA(1)),(PT2C,PH(1)),(PDB(1,1),PDBA(1)) &
    ,           (CWMC(1,1),CWMA(1))
!---------------------------------------------------------------
    WRITE(50)(PDBA(N),N=1,NWBC)

    WRITE(51)(CWMA(N),N=1,NWCW)

    WRITE(52)(CUPPTX(N),N=1,NWCV)

    WRITE(53)(DYA(N),N=1,NWDY)

    WRITE(54)KTMC,(PH(N),N=1,NWPH-1)

    WRITE(55)(Z0X(N),N=1,NWPV)

    WRITE(56)(SOILT1X(N),N=1,NWSO)

    WRITE(57)(USTARX(N),N=1,NWSR)

    WRITE(58)(PDX(N),N=1,NWVR)

    RETURN
    END SUBROUTINE WRTCOM
