module errs_common !$$$ module documentation block ! . . . . ! module: errs_common ! prgmmr: pondeca org: np23 date: 2012-11-13 ! ! abstract: ! ! ! program history log: ! 2012-10-15 pondeca - allocate and deallocated analysis error fiedds ! ! attributes: ! language: f90 ! machine: ! !$$$ end documentation block use kinds, only: i_kind,r_single implicit none real(r_single),allocatable,dimension(:,:):: psierr real(r_single),allocatable,dimension(:,:):: chierr real(r_single),allocatable,dimension(:,:):: uerr real(r_single),allocatable,dimension(:,:):: verr real(r_single),allocatable,dimension(:,:):: uerr2 real(r_single),allocatable,dimension(:,:):: verr2 real(r_single),allocatable,dimension(:,:):: wspderr real(r_single),allocatable,dimension(:,:):: wdirerr real(r_single),allocatable,dimension(:,:):: wdirerr2 real(r_single),allocatable,dimension(:,:):: terr real(r_single),allocatable,dimension(:,:):: tderr real(r_single),allocatable,dimension(:,:):: qerr real(r_single),allocatable,dimension(:,:):: perr real(r_single),allocatable,dimension(:,:):: gusterr real(r_single),allocatable,dimension(:,:):: viserr real(r_single),allocatable,dimension(:,:):: pblherr real(r_single),allocatable,dimension(:,:):: disterr real(r_single),allocatable,dimension(:,:):: wspd10merr real(r_single),allocatable,dimension(:,:):: td2merr real(r_single),allocatable,dimension(:,:):: mxtmerr real(r_single),allocatable,dimension(:,:):: mitmerr real(r_single),allocatable,dimension(:,:):: pmslerr real(r_single),allocatable,dimension(:,:):: howverr real(r_single),allocatable,dimension(:,:):: tcamterr real(r_single),allocatable,dimension(:,:):: lcbaserr real(r_single),allocatable,dimension(:,:):: uwnd10merr real(r_single),allocatable,dimension(:,:):: vwnd10merr contains subroutine create_errs_common(i1,i2,j1,j2) use controlvars, only: igust,ivis,ipblh,idist, & iwspd10m,itd2m,imxtm,imitm, & ipmsl,ihowv,itcamt,ilcbas, & iuwnd10m,ivwnd10m implicit none integer(i_kind),intent(in)::i1,i2,j1,j2 allocate ( psierr (i1:i2,j1:j2) ) allocate ( chierr (i1:i2,j1:j2) ) allocate ( uerr (i1:i2,j1:j2) ) allocate ( verr (i1:i2,j1:j2) ) allocate ( uerr2 (i1:i2,j1:j2) ) allocate ( verr2 (i1:i2,j1:j2) ) allocate ( wspderr (i1:i2,j1:j2) ) allocate ( wdirerr (i1:i2,j1:j2) ) allocate ( wdirerr2 (i1:i2,j1:j2) ) allocate ( terr (i1:i2,j1:j2) ) allocate ( tderr (i1:i2,j1:j2) ) allocate ( qerr (i1:i2,j1:j2) ) allocate ( perr (i1:i2,j1:j2) ) if (igust > 0) allocate ( gusterr (i1:i2,j1:j2) ) if (ivis > 0) allocate ( viserr (i1:i2,j1:j2) ) if (ipblh > 0) allocate ( pblherr (i1:i2,j1:j2) ) if (idist > 0) allocate ( disterr (i1:i2,j1:j2) ) if (iwspd10m > 0) allocate ( wspd10merr (i1:i2,j1:j2) ) if (itd2m > 0) allocate ( td2merr (i1:i2,j1:j2) ) if (imxtm > 0) allocate ( mxtmerr (i1:i2,j1:j2) ) if (imitm > 0) allocate ( mitmerr (i1:i2,j1:j2) ) if (ipmsl > 0) allocate ( pmslerr (i1:i2,j1:j2) ) if (ihowv > 0) allocate ( howverr (i1:i2,j1:j2) ) if (itcamt > 0) allocate ( tcamterr (i1:i2,j1:j2) ) if (ilcbas > 0) allocate ( lcbaserr (i1:i2,j1:j2) ) if (iuwnd10m > 0) allocate ( uwnd10merr (i1:i2,j1:j2) ) if (ivwnd10m > 0) allocate ( vwnd10merr (i1:i2,j1:j2) ) end subroutine create_errs_common subroutine destroy_errs_common use controlvars, only: igust,ivis,ipblh,idist, & iwspd10m,itd2m,imxtm,imitm, & ipmsl,ihowv,itcamt,ilcbas, & iuwnd10m,ivwnd10m implicit none deallocate ( psierr ) deallocate ( chierr ) deallocate ( uerr ) deallocate ( verr ) deallocate ( uerr2 ) deallocate ( verr2 ) deallocate ( wspderr ) deallocate ( wdirerr ) deallocate ( wdirerr2 ) deallocate ( terr ) deallocate ( tderr ) deallocate ( qerr ) deallocate ( perr ) if (igust > 0) deallocate ( gusterr ) if (ivis > 0) deallocate ( viserr ) if (ipblh > 0) deallocate ( pblherr ) if (idist > 0) deallocate ( disterr ) if (iwspd10m > 0) deallocate ( wspd10merr ) if (itd2m > 0) deallocate ( td2merr ) if (imxtm > 0) deallocate ( mxtmerr ) if (imitm > 0) deallocate ( mitmerr ) if (ipmsl > 0) deallocate ( pmslerr ) if (ihowv > 0) deallocate ( howverr ) if (itcamt > 0) deallocate ( tcamterr ) if (ilcbas > 0) deallocate ( lcbaserr ) if (iuwnd10m > 0) deallocate ( uwnd10merr ) if (ivwnd10m > 0) deallocate ( vwnd10merr ) end subroutine destroy_errs_common end module errs_common !************************************************************ !************************************************************