subroutine plumes_wrapper (myTime, myIter, myThid) c----------------------------------------------------------------------- c Subroutine plumes_wrapper - 'Wrapper' routine to interface c with plumes driver. c 1) Set up "bi, bj loop" and some timers and clocks. c 2) Call do_plumes - driver for plumes which computes tendencies c 3) Interpolate tendencies to dynamics grid c 4) Convert u,v tendencies to C-Grid c c Calls: do_plumes (get u,v,t,s tend, step tke, etc and tc, etc. forward) c plume2dyn (4 calls - all plumes tendencies) c AtoC (u and v tendencies) c----------------------------------------------------------------------- implicit none #include "CPP_OPTIONS.h" #include "SIZE.h" #include "GRID.h" #include "plumes_SIZE.h" #include "DYNVARS.h" #include "plumes_coms.h" #include "EEPARAMS.h" integer myTime, myIter, myThid integer bi, bj integer idim1, idim2, jdim1, jdim2 idim1 = 1-OLx idim2 = sNx+OLx jdim1 = 1-OLy jdim2 = sNy+OLy c Compute plumes increments CALL TIMER_START ('DO_PLUMES [PLUME_WRAPPER]',mythid) do bi = myBxLo(myThid), myBxHi(myThid) call do_plumes(uplume,thplume,Nxplume,Nrplume,Nsx,bi, . duplume,dthplume) enddo CALL TIMER_STOP ('DO_PLUMES [PLUME_WRAPPER]',mythid) CALL TIMER_START ('PLUME2DYN [PLUME_WRAPPER]',mythid) do bj = myByLo(myThid), myByHi(myThid) do bi = myBxLo(myThid), myBxHi(myThid) call plume2dyn(duplume,Nxplume,Nrplume,Nsx,Nsy,idim1,idim2, . jdim1,jdim2,Nr,Nsx,Nsy,1,sNx,1,sNy,bi,bj,guplume,gvplume) call plume2dyn(dthplume,Nxplume,Nrplume,Nsx,Nsy,idim1,idim2, . jdim1,jdim2,Nr,Nsx,Nsy,1,sNx,1,sNy,bi,bj,gthplume) enddo enddo CALL TIMER_STOP ('PLUME2DYN [PLUME_WRAPPER]',mythid) c Convert guplume and gvplume from A-grid to C-grid for use by dynamics CALL TIMER_START ('ATOC [PLUME_WRAPPER]',mythid) call AtoC(myThid,guplume,gvplume,maskC,im1,im2,jm1,jm2,Nr, . Nsx,Nsy,1,sNx,1,sNy,guplume,gvplume) CALL TIMER_STOP ('ATOC [PLUME_WRAPPER]',mythid) CALL TIMER_START ('EXCHANGES [PLUME_WRAPPER]',mythid) c Call the c-grid exchange routine to fill in the halo regions (du,dv) call exch_uv_xyz_RL(guplume,gvplume,.TRUE.,myThid) c Call the a-grid exchange routine to fill in the halo regions (dth,ds) call exch_RL_cube(gthplume,OLx, OLx, OLy, OLy, Nr,OLx, OLy, . FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid ) CALL TIMER_STOP ('EXCHANGES [PLUME_WRAPPER]',mythid) return end