📄 scandyn.f90
字号:
#include <misc.h>#include <params.h>subroutine scandyn (ztodt, etadot, etamid, grlps1, grt1, & grz1, grd1, grfu1, grfv1, grut1, & grvt1, grrh1, grlps2, grt2, grz2, & grd2, grfu2, grfv2, grut2, grvt2, & grrh2, vcour, vmax2d, vmax2dt, detam, & t2, fu, fv)!----------------------------------------------------------------------- ! ! Purpose: ! ! Method: ! "After coupling" gaussian latitude scan for which some of the physics! and nonlinear dynamics calculations are completed. The main loop over! latitude in this routine is multitasked.!! Note: the "ifdef" constructs in this routine are associated with the! message-passing version of CAM. Messages are sent which! have no relevance to the shared-memory case. Also, some arrays are ! dimensioned differently to optimize the size of messages sent.! ! Author: ! Original version: CCM3!-----------------------------------------------------------------------!! $Id: scandyn.F90,v 1.8 2001/09/16 22:13:28 rosinski Exp $! $Author: rosinski $!!----------------------------------------------------------------------- use precision use pmgrid#ifdef TIMING_BARRIERS use mpishorthand, only: mpicom#endif use pspect use prognostics use rgrid!----------------------------------------------------------------------- implicit none!-----------------------------------------------------------------------!! Input arguments! real(r8), intent(in) :: ztodt ! two delta t unless nstep =0 real(r8), intent(inout) :: etadot(plon,plevp,beglat:endlat) ! vertical motion (slt) real(r8), intent(in) :: etamid(plev) ! hybrd coord value at levels!! Fourier coefficient arrays which have a latitude index on them for! multitasking. These arrays are defined in LINEMSDYN and and used in QUAD! to compute spectral coefficients. They contain a latitude index so! that the sums over latitude can be performed in a specified order.!#if ( defined PVP ) real(r8), intent(inout) :: grlps1(2*pmmax,plat/2) ! sym. undiff. term in lnps eqn. real(r8), intent(inout) :: grlps2(2*pmmax,plat/2) ! antisym undiff. term in lnps eqn. real(r8), intent(inout) :: grt1(2*pmmax,plev,plat/2) ! sym. undiff. term in t eqn. real(r8), intent(inout) :: grt2(2*pmmax,plev,plat/2) ! antisym. undiff. term in t eqn. real(r8), intent(inout) :: grz1(2*pmmax,plev,plat/2) ! sym. undiff. term in z eqn. real(r8), intent(inout) :: grz2(2*pmmax,plev,plat/2) ! antisym. undiff. term in z eqn. real(r8), intent(inout) :: grd1(2*pmmax,plev,plat/2) ! sym. undiff. term in d eqn. real(r8), intent(inout) :: grd2(2*pmmax,plev,plat/2) ! antisym. undiff. term in d eqn. real(r8), intent(inout) :: grfu1(2*pmmax,plev,plat/2) ! sym. nonlinear terms in u eqn. real(r8), intent(inout) :: grfu2(2*pmmax,plev,plat/2) ! antisym. nonlinear terms in u eqn. real(r8), intent(inout) :: grfv1(2*pmmax,plev,plat/2) ! sym. nonlinear terms in v eqn. real(r8), intent(inout) :: grfv2(2*pmmax,plev,plat/2) ! antisym. nonlinear terms in v eqn. real(r8), intent(inout) :: grut1(2*pmmax,plev,plat/2) ! sym. lambda deriv. term in t eqn. real(r8), intent(inout) :: grut2(2*pmmax,plev,plat/2) ! antisym. lambda deriv. term in t eqn. real(r8), intent(inout) :: grvt1(2*pmmax,plev,plat/2) ! sym. mu derivative term in t eqn. real(r8), intent(inout) :: grvt2(2*pmmax,plev,plat/2) ! antisym. mu deriv. term in t eqn. real(r8), intent(inout) :: grrh1(2*pmmax,plev,plat/2) ! sym. del**2 term in d eqn. real(r8), intent(inout) :: grrh2(2*pmmax,plev,plat/2) ! antisym. del**2 term in d eqn.#else real(r8), intent(inout) :: grlps1(2*pmmax,plat/2) ! sym. undiff. term in lnps eqn. real(r8), intent(inout) :: grlps2(2*pmmax,plat/2) ! antisym undiff. term in lnps eqn. real(r8), intent(inout) :: grt1(plev,2*pmmax,plat/2) ! sym. undiff. term in t eqn. real(r8), intent(inout) :: grt2(plev,2*pmmax,plat/2) ! antisym. undiff. term in t eqn. real(r8), intent(inout) :: grz1(plev,2*pmmax,plat/2) ! sym. undiff. term in z eqn. real(r8), intent(inout) :: grz2(plev,2*pmmax,plat/2) ! antisym. undiff. term in z eqn. real(r8), intent(inout) :: grd1(plev,2*pmmax,plat/2) ! sym. undiff. term in d eqn. real(r8), intent(inout) :: grd2(plev,2*pmmax,plat/2) ! antisym. undiff. term in d eqn. real(r8), intent(inout) :: grfu1(plev,2*pmmax,plat/2) ! sym. nonlinear terms in u eqn. real(r8), intent(inout) :: grfu2(plev,2*pmmax,plat/2) ! antisym. nonlinear terms in u eqn. real(r8), intent(inout) :: grfv1(plev,2*pmmax,plat/2) ! sym. nonlinear terms in v eqn. real(r8), intent(inout) :: grfv2(plev,2*pmmax,plat/2) ! antisym. nonlinear terms in v eqn. real(r8), intent(inout) :: grut1(plev,2*pmmax,plat/2) ! sym. lambda deriv. term in t eqn. real(r8), intent(inout) :: grut2(plev,2*pmmax,plat/2) ! antisym. lambda deriv. term in t eqn. real(r8), intent(inout) :: grvt1(plev,2*pmmax,plat/2) ! sym. mu derivative term in t eqn. real(r8), intent(inout) :: grvt2(plev,2*pmmax,plat/2) ! antisym. mu deriv. term in t eqn. real(r8), intent(inout) :: grrh1(plev,2*pmmax,plat/2) ! sym. del**2 term in d eqn. real(r8), intent(inout) :: grrh2(plev,2*pmmax,plat/2) ! antisym. del**2 term in d eqn.#endif real(r8), intent(in) :: detam(plev) real(r8), intent(inout) :: t2(plond,plev,beglat:endlat) ! tot dT/dt to to physics real(r8), intent(inout) :: fu(plond,plev,beglat:endlat) ! u wind tend real(r8), intent(inout) :: fv(plond,plev,beglat:endlat) ! v wind tend!! Output arguments! real(r8), intent(out) :: vcour(plev,plat) ! maximum Courant number in vert. real(r8), intent(out) :: vmax2d(plev,plat) ! max. wind at each level, latitude real(r8), intent(out) :: vmax2dt(plev,plat) ! max. truncated wind at each lvl,lat! Local variables integer irow ! latitude pair index integer lat,j ! latitude indices!#if ( defined SPMD )#ifdef TIMING_BARRIERS call t_startf ('sync_bndexch') call mpibarrier (mpicom) call t_stopf ('sync_bndexch')#endif!! Communicate boundary information ! call t_startf ('bndexch') call bndexch call t_stopf ('bndexch')#endif!$OMP PARALLEL DO PRIVATE (J, LAT, IROW) do lat=beglat,endlat j = j1 - 1 + lat irow = lat if (lat.gt.plat/2) irow = plat - lat + 1 call linemsdyn (lat, ps(1,lat,n3m1), ps(1,lat,n3m2), u3(i1,1,j,n3m1), & u3(i1,1,j,n3m2), v3(i1,1,j,n3m1), v3(i1,1,j,n3m2), t3(i1,1,j,n3m1), t3(i1,1,j,n3m2), & q3(i1,1,1,j,n3m1), etadot(1,1,lat), etamid, & ztodt, grlps1(1,irow), grt1(1,1,irow), grz1(1,1,irow), grd1(1,1,irow), & grfu1(1,1,irow), grfv1(1,1,irow), & grut1(1,1,irow), grvt1(1,1,irow), grrh1(1,1,irow), grlps2(1,irow),grt2(1,1,irow), & grz2(1,1,irow), grd2(1,1,irow), grfu2(1,1,irow), grfv2(1,1,irow), grut2(1,1,irow), & grvt2(1,1,irow), grrh2(1,1,irow), vcour(1,lat), vmax2d(1,lat), vmax2dt(1,lat), & detam, t2(1,1,lat), fu(1,1,lat), fv(1,1,lat), & div(1,1,lat,n3m1), vort(1,1,lat,n3m2), div(1,1,lat,n3m2), vort(1,1,lat,n3m1), & phis(1,lat), dpsl(1,lat), dpsm(1,lat), omga(1,1,lat), nlon(lat), & nmmax(irow)) end do ! Latitude loop returnend subroutine scandyn
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -