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

📄 gmean.f90

📁 CCSM Research Tools: Community Atmosphere Model (CAM)
💻 F90
字号:
#include <misc.h>!-----------------------------------------------------------------------!BOP! !ROUTINE:  gmean --- Calculate the mean of a 2D field!! !INTERFACE:subroutine gmean(im,  jm,  jfirst,  jlast,  q, qmean)! !USES:  use precision  use dynamics_vars, only : gw  use pmgrid, only: npr_y#if defined( SPMD )  use parutilitiesmodule, only : parcollective, sumop  use spmd_dyn, only: comm_y#endif  implicit none! !INPUT PARAMETERS:  integer im, jm                       ! Horizontal dimensions  integer jfirst, jlast                ! Latitude strip  real(r8), intent(in) :: q(im,jfirst:jlast)              ! 2D field   real(r8) qmean! !DESCRIPTION:!     Calculate the mean of a 2D field!! !REVISION HISTORY:!   00.08.01   Lin     Creation!   01.01.10   Lin     Revised!   01.06.27   Mirin   Use y communicator!!EOP!-----------------------------------------------------------------------!BOC  real(r8)  xsum(jm)  integer i, j  do j=1,jm     xsum(j) = 0.  enddo  do j=jfirst,jlast     do i=1,im        xsum(j) = xsum(j) + q(i,j)     enddo     xsum(j) = xsum(j)*gw(j)  enddo#if defined( SPMD )  if (npr_y .ne. 1) then     call parcollective( comm_y, sumop, jm, xsum )  endif#endif  qmean = 0.0  do j=1,jm     qmean = qmean + xsum(j)  enddo  qmean = qmean / (2*im)  return!EOCend subroutine gmean!-----------------------------------------------------------------------

⌨️ 快捷键说明

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