⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sltb1.f90

📁 CCSM Research Tools: Community Atmosphere Model (CAM)
💻 F90
📖 第 1 页 / 共 2 页
字号:
     call limdz(fhr     ,dsig    ,fhst    ,fhsb    ,nlon    )  end if!! Vertical interpolation of scalar fields.!  call herzin(plev    ,pcnst   ,fhr     ,fhst    ,fhsb    , &              sig     ,dsig    ,sigdp   ,kdp     ,fbout1  , &              nlon    )  fbout(i1:nlon+i1-1,:,:) = fbout1(1:nlon,:,:)  returnend subroutine sltb1!============================================================================================subroutine vrtdep(pmap    ,dt      ,iterdp  ,wb      ,wst     , &                  wsb     ,sig     ,sigh    ,dsigh   ,kdpmpf  , &                   kdpmph  ,sigmp   ,sigdp   ,kdp     ,nlon    )!----------------------------------------------------------------------- ! ! Purpose: ! Compute vertical departure point and departure point index.! ! Method: ! ! Author: J. Olson! !-----------------------------------------------------------------------  use precision  use pmgrid  implicit none!------------------------------Arguments--------------------------------  integer , intent(in) :: nlon                ! longitude dimension  integer , intent(in) :: pmap                ! dimension of artificial vert grid  real(r8), intent(in) :: dt                  ! time step (seconds)  integer , intent(in) :: iterdp              ! number of iterations  real(r8), intent(in) :: wb (plon,plevp)     ! vertical velocity  real(r8), intent(in) :: wst(plon,plevp)     ! z-derivative of wb at top of interval  real(r8), intent(in) :: wsb(plon,plevp)     ! z-derivative of wb at bot of interval  real(r8), intent(in) :: sig  (plev )        ! sigma values of model full levels  real(r8), intent(in) :: sigh (plevp)        ! sigma values of model half levels  real(r8), intent(in) :: dsigh(plevp)        ! increment between half levels  integer , intent(in) :: kdpmpf(pmap)        ! artificial grid indices  integer , intent(in) :: kdpmph(pmap)        ! artificial grid indices  real(r8), intent(inout) :: sigmp(plon,plev) ! vert coords of traj mid-points  real(r8), intent(out) :: sigdp(plon,plev)   ! vert coords of traj departure points  integer , intent(out) :: kdp(plon,plev)     ! vertical departure point indices!!  pmap    Dimension of kdpmap arrays!  dt      Time interval that parameterizes the parcel trajectory.!  iterdp  Number of iterations used for departure point calculation.!  wb      Vertical velocity component (sigma dot).!  wst     z-derivs at the top edge of each interval contained in wb!  wsb     z-derivs at the bot edge of each interval contained in wb!  sig     Sigma values at the full-index levels.!  sigh    Half-index sigma levels including sigh(1) = sigma(1/2) = 0.0!          sigh(plev+1) = sigma(plev+1/2) = 1.0 .  Note that in general!          sigh(k) .lt. sig(k)  where sig(k) is the sigma value at the!          k_th full-index level.!  dsigh   Increment in half-index sigma levels.!  kdpmpf  Array of indices of the model full levels which are mapped!          into an artificial evenly spaced vertical grid.  Used to aid!          in search for vertical position of departure point !  kdpmph  Array of indices of the model half levels which are mapped!          into an artificial evenly spaced vertical grid.  Used to aid!          in search for vertical position of departure point !  sigmp   Sigma value at the trajectory midpoint for each gridpoint!          in a vertical slice from the global grid.  On entry sigmp is!          an initial guess.!  sigdp   Sigma value at the trajectory endpoint for each gridpoint!          in a vertical slice from the global grid.!  kdp     Vertical index for each gridpoint.  This index points into a!          vertical slice array whose vertical grid is given by sig.!          E.g.,   sig(kdp(i,k)) .le. sigdp(i,k) .lt. sig(kdp(i,k)+1).!-----------------------------------------------------------------------!---------------------------Local variables-----------------------------  integer i                 ! |  integer iter              ! |-- indices  integer k                 ! |  real(r8) wmp(plond,plev)  ! vert vel. at midpoint!-----------------------------------------------------------------------!! Loop over departure point iterates.!  do iter = 1,iterdp!! Compute midpoint indices in half-index sigma-level arrays (use kdp! as temporary storage).!     call kdpfnd(plevp   ,pmap    ,sigh    ,sigmp   ,kdpmph  , &                 kdp     ,nlon    )!! Interpolate sigma dot field to trajectory midpoints using Hermite! cubic interpolant.!     call herzin(plevp   ,1       ,wb      ,wst     ,wsb     , &                 sigh    ,dsigh   ,sigmp   ,kdp     ,wmp     , &                 nlon    )!! Update estimate of trajectory midpoint.!     do k = 1,plev        do i = 1,nlon           sigmp(i,k) = sig(k) - .5*dt*wmp(i,k)        end do     end do!! Restrict vertical midpoints to be between the top and bottom half-! index sigma levels.!     call vdplim(plevp   ,sigh    ,sigmp   ,nlon)  end do!! Compute trajectory endpoints.!  do k = 1,plev     do i = 1,nlon        sigdp(i,k) = sig(k) - dt*wmp(i,k)     end do  end do!! Restrict vertical departure points to be between the top and bottom! full-index sigma levels.!  call vdplim(plev    ,sig     ,sigdp   ,nlon)!! Vertical indices for trajectory endpoints that point into full-index! sigma level arrays.!  call kdpfnd(plev    ,pmap    ,sig     ,sigdp   ,kdpmpf  , &              kdp     ,nlon    )!  returnend subroutine vrtdep!============================================================================================subroutine vdplim(pkdim   ,sig     ,sigdp   ,nlon    )!----------------------------------------------------------------------- ! ! Purpose: ! Restrict vertical departure points to be between the top and bottom! sigma levels of the "full-" or "half-" level grid! ! Method: ! ! Author: J. Olson! !-----------------------------------------------------------------------!! $Id: sltb1.F90,v 1.6.4.2 2002/05/13 17:57:35 erik Exp $! $Author: erik $!!-----------------------------------------------------------------------  use precision  use pmgrid  implicit none!-----------------------------------------------------------------------  integer , intent(in)    :: nlon               ! longitude dimension  integer , intent(in)    :: pkdim              ! vertical dimension  real(r8), intent(in)    :: sig(pkdim)         ! vertical coordinate of model grid  real(r8), intent(inout) :: sigdp(plon,plev)   ! vertical coords. of departure points.! pkdim   Vertical dimension of "sig"! sig     Sigma values at the "full" or "half" model levels! sigdp   Sigma value at the trajectory endpoint or midpoint for each!         gridpoint in a vertical slice from the global grid.  This!         routine restricts those departure points to within the!         model's vertical grid.!-----------------------------------------------------------------------!---------------------------Local variables-----------------------------  integer i,k                 ! index!-----------------------------------------------------------------------!  do k=1,plev     do i = 1,nlon        if (sigdp(i,k) < sig(1)) then           sigdp(i,k) = sig(1)        end if        if (sigdp(i,k) >= sig(pkdim)) then           sigdp(i,k) = sig(pkdim)*(1. - 10.*epsilon(sigdp))        end if     end do  end do  returnend subroutine vdplim

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -