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

📄 qmassd.f90

📁 CCSM Research Tools: Community Atmosphere Model (CAM)
💻 F90
字号:
#include <misc.h>#include <params.h>subroutine qmassd(cwava   ,etamid  ,w       ,q1      ,q2      , &                  pdel    ,hwn     ,nlon    )!----------------------------------------------------------------------- ! ! Purpose: ! Compute comtribution of current latitude to global integral of! q2*|q2 - q1|*eta! This is a measure of the difference between the fields before and! after the SLT "forecast" weighted by the approximate mass of the tracer.! It is used in the "fixer" which enforces conservation in constituent! fields transport via SLT. ! ! Method: ! Reference Rasch and Williamson, 1991, Rasch, Boville and Brasseur, 1995! ! Author: J. Olson! !-----------------------------------------------------------------------!! $Id: qmassd.F90,v 1.1 2001/11/06 18:42:50 erik Exp $! $Author: erik $!!-----------------------------------------------------------------------  use precision  use pmgrid  use tracers, only: pcnst  implicit none!------------------------------Arguments--------------------------------  integer , intent(in)  :: nlon                 ! longitude dimension    real(r8), intent(in)  :: cwava                ! normalization factor  real(r8), intent(in)  :: etamid(plev)         ! vertical coords at midpoints   real(r8), intent(in)  :: w                    ! gaussian weight this latitude  real(r8), intent(in)  :: q1(plond,plev) ! constituents (pre -SLT)  real(r8), intent(in)  :: q2(plond,plev) ! constituents (post-SLT)  real(r8), intent(in)  :: pdel(plond,plev)     ! pressure diff between interfaces  real(r8), intent(inout) :: hwn(pcnst)         ! accumulator for global integrals!! cwava l/(g*plon)! w     Gaussian weight.! q1    Untransported q-field.! q2    Transported   q-field.! pdel  array of pressure differences between layer interfaces (used for mass weighting)! hwn   Mass averaged constituent in units of kg/m**2.!-----------------------------------------------------------------------!---------------------------Local variables-----------------------------  integer i,k               ! longitude and level indices  real(r8) hwava            ! accumulator!-----------------------------------------------------------------------!  hwava = 0.0  do k=1,plev     do i=1,nlon        hwava = hwava + (q2(i,k)* etamid(k)*(abs(q1(i,k) - q2(i,k))))*pdel(i,k)     end do  end do!! The 0.5 factor arises because gaussian weights sum to 2!  hwn(1) = hwn(1) + cwava*w*hwava*0.5  returnend subroutine qmassd

⌨️ 快捷键说明

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