← back to index

src/core/MOM_transcribe_grid.F90

portedportable, not yet portedexecuted, not portableexecutable, not hit by this run

1! This file is part of MOM6, the Modular Ocean Model version 6.
2! See the LICENSE file for licensing information.
3! SPDX-License-Identifier: Apache-2.0
4
5!> Module with routines for copying information from a shared dynamic horizontal
6!! grid to an ocean-specific horizontal grid and the reverse.
7module MOM_transcribe_grid
8
9use MOM_array_transform, only : rotate_array, rotate_array_pair
10use MOM_domains, only : pass_var, pass_vector
11use MOM_domains, only : To_All, SCALAR_PAIR, CGRID_NE, AGRID, BGRID_NE, CORNER
12use MOM_dyn_horgrid, only : dyn_horgrid_type, set_derived_dyn_horgrid
13use MOM_dyn_horgrid, only : rotate_dyngrid=>rotate_dyn_horgrid
14use MOM_error_handler, only : MOM_error, MOM_mesg, FATAL, WARNING
15use MOM_grid, only : ocean_grid_type, set_derived_metrics
16use MOM_unit_scaling, only : unit_scale_type
17
18implicit none ; private
19
20public copy_dyngrid_to_MOM_grid, copy_MOM_grid_to_dyngrid, rotate_dyngrid
21
22contains
23
24!> Copies information from a dynamic (shared) horizontal grid type into an
25!! ocean_grid_type. There may also be a change in the reference
26!! height for topography between the two grids.
271subroutine copy_dyngrid_to_MOM_grid(dG, oG, US)
28 type(dyn_horgrid_type), intent(in) :: dG !< Common horizontal grid type
29 type(ocean_grid_type), intent(inout) :: oG !< Ocean grid type
30 type(unit_scale_type), intent(in) :: US !< A dimensional unit scaling type
31
32 integer :: isd, ied, jsd, jed ! Common data domains.
33 integer :: IsdB, IedB, JsdB, JedB ! Common data domains.
34 integer :: ido, jdo, Ido2, Jdo2 ! Indexing offsets between the grids.
35 integer :: Igst, Jgst ! Global starting indices.
36 integer :: i, j
37
38 ! MOM_grid_init and create_dyn_horgrid are called outside of this routine.
39 ! This routine copies over the fields that were set by MOM_initialized_fixed.
40
41 ! Determine the indexing offsets between the grids.
421 ido = dG%idg_offset - oG%idg_offset
431 jdo = dG%jdg_offset - oG%jdg_offset
44
451 isd = max(oG%isd, dG%isd+ido) ; jsd = max(oG%jsd, dG%jsd+jdo)
461 ied = min(oG%ied, dG%ied+ido) ; jed = min(oG%jed, dG%jed+jdo)
471 IsdB = max(oG%IsdB, dG%IsdB+ido) ; JsdB = max(oG%JsdB, dG%JsdB+jdo)
481 IedB = min(oG%IedB, dG%IedB+ido) ; JedB = min(oG%JedB, dG%JedB+jdo)
49
50 ! Check that the grids conform.
511 if ((isd > oG%isc) .or. (ied < oG%ied) .or. (jsd > oG%jsc) .or. (jed > oG%jed)) &
520 call MOM_error(FATAL, "copy_dyngrid_to_MOM_grid called with incompatible grids.")
53
548833 do i=isd,ied ; do j=jsd,jed
558704 oG%geoLonT(i,j) = dG%geoLonT(i+ido,j+jdo)
568704 oG%geoLatT(i,j) = dG%geoLatT(i+ido,j+jdo)
578704 oG%dxT(i,j) = dG%dxT(i+ido,j+jdo)
588704 oG%dyT(i,j) = dG%dyT(i+ido,j+jdo)
598704 oG%areaT(i,j) = dG%areaT(i+ido,j+jdo)
608704 oG%bathyT(i,j) = dG%bathyT(i+ido,j+jdo) - oG%Z_ref
618704 oG%meanSL(i,j) = dG%meanSL(i+ido,j+jdo) + oG%Z_ref
62
638704 oG%dF_dx(i,j) = dG%dF_dx(i+ido,j+jdo)
648704 oG%dF_dy(i,j) = dG%dF_dy(i+ido,j+jdo)
658704 oG%sin_rot(i,j) = dG%sin_rot(i+ido,j+jdo)
668704 oG%cos_rot(i,j) = dG%cos_rot(i+ido,j+jdo)
678832 oG%mask2dT(i,j) = dG%mask2dT(i+ido,j+jdo)
68 enddo ; enddo
69
708902 do I=IsdB,IedB ; do j=jsd,jed
718772 oG%geoLonCu(I,j) = dG%geoLonCu(I+ido,j+jdo)
728772 oG%geoLatCu(I,j) = dG%geoLatCu(I+ido,j+jdo)
738772 oG%dxCu(I,j) = dG%dxCu(I+ido,j+jdo)
748772 oG%dyCu(I,j) = dG%dyCu(I+ido,j+jdo)
758772 oG%dy_Cu(I,j) = dG%dy_Cu(I+ido,j+jdo)
76
778772 oG%porous_DminU(I,j) = dG%porous_DminU(I+ido,j+jdo) - oG%Z_ref
788772 oG%porous_DmaxU(I,j) = dG%porous_DmaxU(I+ido,j+jdo) - oG%Z_ref
798772 oG%porous_DavgU(I,j) = dG%porous_DavgU(I+ido,j+jdo) - oG%Z_ref
80
818772 oG%mask2dCu(I,j) = dG%mask2dCu(I+ido,j+jdo)
828772 oG%OBCmaskCu(I,j) = dG%OBCmaskCu(I+ido,j+jdo)
838772 oG%areaCu(I,j) = dG%areaCu(I+ido,j+jdo)
848901 oG%IareaCu(I,j) = dG%IareaCu(I+ido,j+jdo)
85 enddo ; enddo
86
878961 do i=isd,ied ; do J=JsdB,JedB
888832 oG%geoLonCv(i,J) = dG%geoLonCv(i+ido,J+jdo)
898832 oG%geoLatCv(i,J) = dG%geoLatCv(i+ido,J+jdo)
908832 oG%dxCv(i,J) = dG%dxCv(i+ido,J+jdo)
918832 oG%dyCv(i,J) = dG%dyCv(i+ido,J+jdo)
928832 oG%dx_Cv(i,J) = dG%dx_Cv(i+ido,J+jdo)
93
948832 oG%porous_DminV(i,J) = dG%porous_DminV(i+ido,J+jdo) - oG%Z_ref
958832 oG%porous_DmaxV(i,J) = dG%porous_DmaxV(i+ido,J+jdo) - oG%Z_ref
968832 oG%porous_DavgV(i,J) = dG%porous_DavgV(i+ido,J+jdo) - oG%Z_ref
97
988832 oG%mask2dCv(i,J) = dG%mask2dCv(i+ido,J+jdo)
998832 oG%OBCmaskCv(i,J) = dG%OBCmaskCv(i+ido,J+jdo)
1008832 oG%areaCv(i,J) = dG%areaCv(i+ido,J+jdo)
1018960 oG%IareaCv(i,J) = dG%IareaCv(i+ido,J+jdo)
102 enddo ; enddo
103
1049031 do I=IsdB,IedB ; do J=JsdB,JedB
1058901 oG%geoLonBu(I,J) = dG%geoLonBu(I+ido,J+jdo)
1068901 oG%geoLatBu(I,J) = dG%geoLatBu(I+ido,J+jdo)
1078901 oG%dxBu(I,J) = dG%dxBu(I+ido,J+jdo)
1088901 oG%dyBu(I,J) = dG%dyBu(I+ido,J+jdo)
1098901 oG%areaBu(I,J) = dG%areaBu(I+ido,J+jdo)
1108901 oG%CoriolisBu(I,J) = dG%CoriolisBu(I+ido,J+jdo)
1118901 oG%Coriolis2Bu(I,J) = dG%Coriolis2Bu(I+ido,J+jdo)
1129030 oG%mask2dBu(I,J) = dG%mask2dBu(I+ido,J+jdo)
113 enddo ; enddo
114
1151 oG%bathymetry_at_vel = dG%bathymetry_at_vel
1161 if (oG%bathymetry_at_vel) then
1170 do I=IsdB,IedB ; do j=jsd,jed
1180 oG%Dblock_u(I,j) = dG%Dblock_u(I+ido,j+jdo) - oG%Z_ref
1190 oG%Dopen_u(I,j) = dG%Dopen_u(I+ido,j+jdo) - oG%Z_ref
120 enddo ; enddo
1210 do i=isd,ied ; do J=JsdB,JedB
1220 oG%Dblock_v(i,J) = dG%Dblock_v(i+ido,J+jdo) - oG%Z_ref
1230 oG%Dopen_v(i,J) = dG%Dopen_v(i+ido,J+jdo) - oG%Z_ref
124 enddo ; enddo
125 endif
126
127121 oG%gridLonT(oG%isg:oG%ieg) = dG%gridLonT(dG%isg:dG%ieg)
12861 oG%gridLatT(oG%jsg:oG%jeg) = dG%gridLatT(dG%jsg:dG%jeg)
129 ! The more complicated logic here avoids segmentation faults if one grid uses
130 ! global symmetric memory while the other does not. Because a northeast grid
131 ! convention is being used, the upper bounds for each array correspond.
132 ! Note that the dynamic grid always uses symmetric memory.
1331 Ido2 = dG%IegB-oG%IegB ; Igst = max(oG%IsgB, (dG%isg-1)-Ido2)
1341 Jdo2 = dG%JegB-oG%JegB ; Jgst = max(oG%JsgB, (dG%jsg-1)-Jdo2)
135122 do I=Igst,oG%IegB ; oG%gridLonB(I) = dG%gridLonB(I+Ido2) ; enddo
13662 do J=Jgst,oG%JegB ; oG%gridLatB(J) = dG%gridLatB(J+Jdo2) ; enddo
137
138 ! Copy various scalar variables and strings.
1391 oG%x_axis_units = dG%x_axis_units ; oG%y_axis_units = dG%y_axis_units
1401 oG%x_ax_unit_short = dG%x_ax_unit_short ; oG%y_ax_unit_short = dG%y_ax_unit_short
1411 oG%grid_unit_to_L = dG%grid_unit_to_L
1421 oG%areaT_global = dG%areaT_global ; oG%IareaT_global = dG%IareaT_global
1431 oG%south_lat = dG%south_lat ; oG%west_lon = dG%west_lon
1441 oG%len_lat = dG%len_lat ; oG%len_lon = dG%len_lon
1451 oG%Rad_Earth_L = dG%Rad_Earth_L
1461 oG%max_depth = dG%max_depth
147
148! Update the halos in case the dynamic grid has smaller halos than the ocean grid.
1491 call pass_var(oG%areaT, oG%Domain)
1501 call pass_var(oG%bathyT, oG%Domain)
1511 call pass_var(oG%meanSL, oG%Domain)
1521 call pass_var(oG%geoLonT, oG%Domain)
1531 call pass_var(oG%geoLatT, oG%Domain)
1541 call pass_vector(oG%dxT, oG%dyT, oG%Domain, To_All+Scalar_Pair, AGRID)
1551 call pass_vector(oG%dF_dx, oG%dF_dy, oG%Domain, To_All, AGRID)
1561 call pass_vector(oG%cos_rot, oG%sin_rot, oG%Domain, To_All, AGRID)
1571 call pass_var(oG%mask2dT, oG%Domain)
158
1591 call pass_vector(oG%areaCu, oG%areaCv, oG%Domain, To_All+Scalar_Pair, CGRID_NE)
1601 call pass_vector(oG%dyCu, oG%dxCv, oG%Domain, To_All+Scalar_Pair, CGRID_NE)
1611 call pass_vector(oG%dxCu, oG%dyCv, oG%Domain, To_All+Scalar_Pair, CGRID_NE)
1621 call pass_vector(oG%dy_Cu, oG%dx_Cv, oG%Domain, To_All+Scalar_Pair, CGRID_NE)
1631 call pass_vector(oG%mask2dCu, oG%mask2dCv, oG%Domain, To_All+Scalar_Pair, CGRID_NE)
1641 call pass_vector(oG%OBCmaskCu, oG%OBCmaskCv, oG%Domain, To_All+Scalar_Pair, CGRID_NE)
1651 call pass_vector(oG%IareaCu, oG%IareaCv, oG%Domain, To_All+Scalar_Pair, CGRID_NE)
1661 call pass_vector(oG%IareaCu, oG%IareaCv, oG%Domain, To_All+Scalar_Pair, CGRID_NE)
1671 call pass_vector(oG%geoLatCu, oG%geoLatCv, oG%Domain, To_All+Scalar_Pair, CGRID_NE)
168
1691 call pass_var(oG%areaBu, oG%Domain, position=CORNER)
1701 call pass_var(oG%geoLonBu, oG%Domain, position=CORNER, inner_halo=oG%isc-isd)
1711 call pass_var(oG%geoLatBu, oG%Domain, position=CORNER)
1721 call pass_vector(oG%dxBu, oG%dyBu, oG%Domain, To_All+Scalar_Pair, BGRID_NE)
1731 call pass_var(oG%CoriolisBu, oG%Domain, position=CORNER)
1741 call pass_var(oG%Coriolis2Bu, oG%Domain, position=CORNER)
1751 call pass_var(oG%mask2dBu, oG%Domain, position=CORNER)
176
1771 if (oG%bathymetry_at_vel) then
1780 call pass_vector(oG%Dblock_u, oG%Dblock_v, oG%Domain, To_All+Scalar_Pair, CGRID_NE)
1790 call pass_vector(oG%Dopen_u, oG%Dopen_v, oG%Domain, To_All+Scalar_Pair, CGRID_NE)
180 endif
181
1821 call set_derived_metrics(oG, US)
183
1841end subroutine copy_dyngrid_to_MOM_grid
185
186
187!> Copies information from an ocean_grid_type into a dynamic (shared)
188!! horizontal grid type. There may also be a change in the reference
189!! height for topography between the two grids.
1900subroutine copy_MOM_grid_to_dyngrid(oG, dG, US)
191 type(ocean_grid_type), intent(in) :: oG !< Ocean grid type
192 type(dyn_horgrid_type), intent(inout) :: dG !< Common horizontal grid type
193 type(unit_scale_type), intent(in) :: US !< A dimensional unit scaling type
194
195 integer :: isd, ied, jsd, jed ! Common data domains.
196 integer :: IsdB, IedB, JsdB, JedB ! Common data domains.
197 integer :: ido, jdo, Ido2, Jdo2 ! Indexing offsets between the grids.
198 integer :: Igst, Jgst ! Global starting indices.
199 integer :: i, j
200
201 ! MOM_grid_init and create_dyn_horgrid are called outside of this routine.
202 ! This routine copies over the fields that were set by MOM_initialized_fixed.
203
204 ! Determine the indexing offsets between the grids.
2050 ido = oG%idG_offset - dG%idG_offset
2060 jdo = oG%jdG_offset - dG%jdG_offset
207
2080 isd = max(dG%isd, oG%isd+ido) ; jsd = max(dG%jsd, oG%jsd+jdo)
2090 ied = min(dG%ied, oG%ied+ido) ; jed = min(dG%jed, oG%jed+jdo)
2100 IsdB = max(dG%IsdB, oG%IsdB+ido) ; JsdB = max(dG%JsdB, oG%JsdB+jdo)
2110 IedB = min(dG%IedB, oG%IedB+ido) ; JedB = min(dG%JedB, oG%JedB+jdo)
212
213 ! Check that the grids conform.
2140 if ((isd > dG%isc) .or. (ied < dG%ied) .or. (jsd > dG%jsc) .or. (jed > dG%jed)) &
2150 call MOM_error(FATAL, "copy_dyngrid_to_MOM_grid called with incompatible grids.")
216
2170 do i=isd,ied ; do j=jsd,jed
2180 dG%geoLonT(i,j) = oG%geoLonT(i+ido,j+jdo)
2190 dG%geoLatT(i,j) = oG%geoLatT(i+ido,j+jdo)
2200 dG%dxT(i,j) = oG%dxT(i+ido,j+jdo)
2210 dG%dyT(i,j) = oG%dyT(i+ido,j+jdo)
2220 dG%areaT(i,j) = oG%areaT(i+ido,j+jdo)
2230 dG%bathyT(i,j) = oG%bathyT(i+ido,j+jdo) + oG%Z_ref
2240 dG%meanSL(i,j) = oG%meanSL(i+ido,j+jdo) - oG%Z_ref
225
2260 dG%dF_dx(i,j) = oG%dF_dx(i+ido,j+jdo)
2270 dG%dF_dy(i,j) = oG%dF_dy(i+ido,j+jdo)
2280 dG%sin_rot(i,j) = oG%sin_rot(i+ido,j+jdo)
2290 dG%cos_rot(i,j) = oG%cos_rot(i+ido,j+jdo)
2300 dG%mask2dT(i,j) = oG%mask2dT(i+ido,j+jdo)
231 enddo ; enddo
232
2330 do I=IsdB,IedB ; do j=jsd,jed
2340 dG%geoLonCu(I,j) = oG%geoLonCu(I+ido,j+jdo)
2350 dG%geoLatCu(I,j) = oG%geoLatCu(I+ido,j+jdo)
2360 dG%dxCu(I,j) = oG%dxCu(I+ido,j+jdo)
2370 dG%dyCu(I,j) = oG%dyCu(I+ido,j+jdo)
2380 dG%dy_Cu(I,j) = oG%dy_Cu(I+ido,j+jdo)
239
2400 dG%porous_DminU(I,j) = oG%porous_DminU(I+ido,j+jdo) + oG%Z_ref
2410 dG%porous_DmaxU(I,j) = oG%porous_DmaxU(I+ido,j+jdo) + oG%Z_ref
2420 dG%porous_DavgU(I,j) = oG%porous_DavgU(I+ido,j+jdo) + oG%Z_ref
243
2440 dG%mask2dCu(I,j) = oG%mask2dCu(I+ido,j+jdo)
2450 dG%OBCmaskCu(I,j) = oG%OBCmaskCu(I+ido,j+jdo)
2460 dG%areaCu(I,j) = oG%areaCu(I+ido,j+jdo)
2470 dG%IareaCu(I,j) = oG%IareaCu(I+ido,j+jdo)
248 enddo ; enddo
249
2500 do i=isd,ied ; do J=JsdB,JedB
2510 dG%geoLonCv(i,J) = oG%geoLonCv(i+ido,J+jdo)
2520 dG%geoLatCv(i,J) = oG%geoLatCv(i+ido,J+jdo)
2530 dG%dxCv(i,J) = oG%dxCv(i+ido,J+jdo)
2540 dG%dyCv(i,J) = oG%dyCv(i+ido,J+jdo)
2550 dG%dx_Cv(i,J) = oG%dx_Cv(i+ido,J+jdo)
256
2570 dG%porous_DminV(i,J) = oG%porous_DminU(i+ido,J+jdo) + oG%Z_ref
2580 dG%porous_DmaxV(i,J) = oG%porous_DmaxU(i+ido,J+jdo) + oG%Z_ref
2590 dG%porous_DavgV(i,J) = oG%porous_DavgU(i+ido,J+jdo) + oG%Z_ref
260
2610 dG%mask2dCv(i,J) = oG%mask2dCv(i+ido,J+jdo)
2620 dG%OBCmaskCv(i,J) = oG%OBCmaskCv(i+ido,J+jdo)
2630 dG%areaCv(i,J) = oG%areaCv(i+ido,J+jdo)
2640 dG%IareaCv(i,J) = oG%IareaCv(i+ido,J+jdo)
265 enddo ; enddo
266
2670 do I=IsdB,IedB ; do J=JsdB,JedB
2680 dG%geoLonBu(I,J) = oG%geoLonBu(I+ido,J+jdo)
2690 dG%geoLatBu(I,J) = oG%geoLatBu(I+ido,J+jdo)
2700 dG%dxBu(I,J) = oG%dxBu(I+ido,J+jdo)
2710 dG%dyBu(I,J) = oG%dyBu(I+ido,J+jdo)
2720 dG%areaBu(I,J) = oG%areaBu(I+ido,J+jdo)
2730 dG%CoriolisBu(I,J) = oG%CoriolisBu(I+ido,J+jdo)
2740 dG%Coriolis2Bu(I,J) = oG%Coriolis2Bu(I+ido,J+jdo)
2750 dG%mask2dBu(I,J) = oG%mask2dBu(I+ido,J+jdo)
276 enddo ; enddo
277
2780 dG%bathymetry_at_vel = oG%bathymetry_at_vel
2790 if (dG%bathymetry_at_vel) then
2800 do I=IsdB,IedB ; do j=jsd,jed
2810 dG%Dblock_u(I,j) = oG%Dblock_u(I+ido,j+jdo) + oG%Z_ref
2820 dG%Dopen_u(I,j) = oG%Dopen_u(I+ido,j+jdo) + oG%Z_ref
283 enddo ; enddo
2840 do i=isd,ied ; do J=JsdB,JedB
2850 dG%Dblock_v(i,J) = oG%Dblock_v(i+ido,J+jdo) + oG%Z_ref
2860 dG%Dopen_v(i,J) = oG%Dopen_v(i+ido,J+jdo) + oG%Z_ref
287 enddo ; enddo
288 endif
289
2900 dG%gridLonT(dG%isg:dG%ieg) = oG%gridLonT(oG%isg:oG%ieg)
2910 dG%gridLatT(dG%jsg:dG%jeg) = oG%gridLatT(oG%jsg:oG%jeg)
292
293 ! The more complicated logic here avoids segmentation faults if one grid uses
294 ! global symmetric memory while the other does not. Because a northeast grid
295 ! convention is being used, the upper bounds for each array correspond.
296 ! Note that the dynamic grid always uses symmetric memory.
2970 Ido2 = oG%IegB-dG%IegB ; Igst = max(dG%isg-1, oG%IsgB-Ido2)
2980 Jdo2 = oG%JegB-dG%JegB ; Jgst = max(dG%jsg-1, oG%JsgB-Jdo2)
2990 do I=Igst,dG%IegB ; dG%gridLonB(I) = oG%gridLonB(I+Ido2) ; enddo
3000 do J=Jgst,dG%JegB ; dG%gridLatB(J) = oG%gridLatB(J+Jdo2) ; enddo
301
302 ! Copy various scalar variables and strings.
3030 dG%x_axis_units = oG%x_axis_units ; dG%y_axis_units = oG%y_axis_units
3040 dG%x_ax_unit_short = oG%x_ax_unit_short ; dG%y_ax_unit_short = oG%y_ax_unit_short
3050 dG%grid_unit_to_L = oG%grid_unit_to_L
3060 dG%areaT_global = oG%areaT_global ; dG%IareaT_global = oG%IareaT_global
3070 dG%south_lat = oG%south_lat ; dG%west_lon = oG%west_lon
3080 dG%len_lat = oG%len_lat ; dG%len_lon = oG%len_lon
3090 dG%Rad_Earth_L = oG%Rad_Earth_L
3100 dG%max_depth = oG%max_depth
311
312! Update the halos in case the dynamic grid has smaller halos than the ocean grid.
3130 call pass_var(dG%areaT, dG%Domain)
3140 call pass_var(dG%bathyT, dG%Domain)
3150 call pass_var(dG%meanSL, dG%Domain)
3160 call pass_var(dG%geoLonT, dG%Domain)
3170 call pass_var(dG%geoLatT, dG%Domain)
3180 call pass_vector(dG%dxT, dG%dyT, dG%Domain, To_All+Scalar_Pair, AGRID)
3190 call pass_vector(dG%dF_dx, dG%dF_dy, dG%Domain, To_All, AGRID)
3200 call pass_vector(dG%cos_rot, dG%sin_rot, dG%Domain, To_All, AGRID)
3210 call pass_var(dG%mask2dT, dG%Domain)
322
3230 call pass_vector(dG%areaCu, dG%areaCv, dG%Domain, To_All+Scalar_Pair, CGRID_NE)
3240 call pass_vector(dG%dyCu, dG%dxCv, dG%Domain, To_All+Scalar_Pair, CGRID_NE)
3250 call pass_vector(dG%dxCu, dG%dyCv, dG%Domain, To_All+Scalar_Pair, CGRID_NE)
3260 call pass_vector(dG%dy_Cu, dG%dx_Cv, dG%Domain, To_All+Scalar_Pair, CGRID_NE)
3270 call pass_vector(dG%mask2dCu, dG%mask2dCv, dG%Domain, To_All+Scalar_Pair, CGRID_NE)
3280 call pass_vector(dG%OBCmaskCu, dG%OBCmaskCv, dG%Domain, To_All+Scalar_Pair, CGRID_NE)
3290 call pass_vector(dG%IareaCu, dG%IareaCv, dG%Domain, To_All+Scalar_Pair, CGRID_NE)
3300 call pass_vector(dG%IareaCu, dG%IareaCv, dG%Domain, To_All+Scalar_Pair, CGRID_NE)
3310 call pass_vector(dG%geoLatCu, dG%geoLatCv, dG%Domain, To_All+Scalar_Pair, CGRID_NE)
332
3330 call pass_var(dG%areaBu, dG%Domain, position=CORNER)
3340 call pass_var(dG%geoLonBu, dG%Domain, position=CORNER, inner_halo=dG%isc-isd)
3350 call pass_var(dG%geoLatBu, dG%Domain, position=CORNER)
3360 call pass_vector(dG%dxBu, dG%dyBu, dG%Domain, To_All+Scalar_Pair, BGRID_NE)
3370 call pass_var(dG%CoriolisBu, dG%Domain, position=CORNER)
3380 call pass_var(dG%Coriolis2Bu, dG%Domain, position=CORNER)
3390 call pass_var(dG%mask2dBu, dG%Domain, position=CORNER)
340
3410 if (dG%bathymetry_at_vel) then
3420 call pass_vector(dG%Dblock_u, dG%Dblock_v, dG%Domain, To_All+Scalar_Pair, CGRID_NE)
3430 call pass_vector(dG%Dopen_u, dG%Dopen_v, dG%Domain, To_All+Scalar_Pair, CGRID_NE)
344 endif
345
3460 call set_derived_dyn_horgrid(dG, US)
347
3480end subroutine copy_MOM_grid_to_dyngrid
349
350end module MOM_transcribe_grid