<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Mike,<div class=""><br class=""></div><div class="">With your “SIZE.h” (nSx=nSy=1), the bi/bj can only be one, so that shouldn’t worry you. There’s a PR <a href="https://github.com/MITgcm/MITgcm/pull/574" class="">https://github.com/MITgcm/MITgcm/pull/574</a> where I added 2D quadratic drag coefficient fields, maybe you can use that as a template, but I think you are already on the right track.</div><div class=""><br class=""></div><div class="">Martin<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 12. Apr 2022, at 16:21, Michael A Spall <<a href="mailto:mspall@whoi.edu" class="">mspall@whoi.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">I am interested in making my linear bottom drag coefficient a function of space. I tried to do this<br class="">by defining a 2-D array between 0 and 1 and multiplying the rhs of uDragTerms in mom_u_bottomdrag.F<br class="">by this scaling array (same for vDragTerms in mom_v_bottomdrag.F). I added common blocks to those<br class="">subroutines with the array so it is seen there. However, it looks like bi and bj are both 1 for all tiles in those<br class="">subtroutines, so it always takes the values of my scaling array from the first tile. Also in dynamics.F, which<br class="">calls them. I found some text online that says these are done in dynamics.F by a single loop, but I don't know<br class="">what that means. Any advice on how to make bottom drag a function of location? <br class=""><br class="">I am using MITgcm_c65l, the SIZE.h file is below.<br class=""><br class="">Thanks,<br class="">Mike<br class=""><br class="">C $Header: /u/gcmpack/MITgcm/model/inc/SIZE.h,v 1.28 2009/05/17 21:15:07 jmc Exp $<br class="">C $Name: $<br class="">C<br class="">CBOP<br class="">C !ROUTINE: SIZE.h<br class="">C !INTERFACE:<br class="">C include SIZE.h<br class="">C !DESCRIPTION: \bv<br class="">C *==========================================================*<br class="">C | SIZE.h Declare size of underlying computational grid. <br class="">C *==========================================================*<br class="">C | The design here support a three-dimensional model grid <br class="">C | with indices I,J and K. The three-dimensional domain <br class="">C | is comprised of nPx*nSx blocks of size sNx along one axis <br class="">C | nPy*nSy blocks of size sNy along another axis and one <br class="">C | block of size Nz along the final axis. <br class="">C | Blocks have overlap regions of size OLx and OLy along the <br class="">C | dimensions that are subdivided. <br class="">C *==========================================================*<br class="">C \ev<br class="">CEOP<br class="">C Voodoo numbers controlling data layout.<br class="">C sNx :: No. X points in sub-grid.<br class="">C sNy :: No. Y points in sub-grid.<br class="">C OLx :: Overlap extent in X.<br class="">C OLy :: Overlat extent in Y.<br class="">C nSx :: No. sub-grids in X.<br class="">C nSy :: No. sub-grids in Y.<br class="">C nPx :: No. of processes to use in X.<br class="">C nPy :: No. of processes to use in Y.<br class="">C Nx :: No. points in X for the total domain.<br class="">C Ny :: No. points in Y for the total domain.<br class="">C Nr :: No. points in Z for full process domain.<br class=""> INTEGER sNx<br class=""> INTEGER sNy<br class=""> INTEGER OLx<br class=""> INTEGER OLy<br class=""> INTEGER nSx<br class=""> INTEGER nSy<br class=""> INTEGER nPx<br class=""> INTEGER nPy<br class=""> INTEGER Nx<br class=""> INTEGER Ny<br class=""> INTEGER Nr<br class=""> PARAMETER (<br class=""> & sNx = 35,<br class=""> & sNy = 35,<br class=""> & OLx = 4,<br class=""> & OLy = 4,<br class=""> & nSx = 1,<br class=""> & nSy = 1,<br class=""> & nPx = 12,<br class=""> & nPy = 12,<br class=""> & Nx = sNx*nSx*nPx,<br class=""> & Ny = sNy*nSy*nPy,<br class=""> & Nr = 60)<br class=""><br class="">C MAX_OLX :: Set to the maximum overlap region size of any array<br class="">C MAX_OLY that will be exchanged. Controls the sizing of exch<br class="">C routine buffers.<br class=""> INTEGER MAX_OLX<br class=""> INTEGER MAX_OLY<br class=""> PARAMETER ( MAX_OLX = OLx,<br class=""> & MAX_OLY = OLy )<br class=""><br class=""><br class=""><br class="">==================================================================<br class=""><br class="">Michael A. Spall<br class="">Senior Scientist<br class="">Clark 323A<br class="">Department of Physical Oceanography<br class="">Woods Hole Oceanographic Institution<br class="">360 Woods Hole Road MS #21<br class="">Woods Hole, MA 02543<br class=""><br class="">508-289-3342<br class=""><a href="mailto:mspall@whoi.edu" class="">mspall@whoi.edu</a><br class="">https://www2.whoi.edu/staff/mspall<br class="">_______________________________________________<br class="">MITgcm-support mailing list<br class="">MITgcm-support@mitgcm.org<br class="">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support<br class=""></div></div></blockquote></div><br class=""></div></body></html>