From 86d3409d53ded31ae48bf3c3c4758e351c1f07be Mon Sep 17 00:00:00 2001 From: Jean-Francois Lemieux Date: Fri, 2 Jun 2023 19:08:41 +0000 Subject: [PATCH 1/9] Use same method whether l_fixed_area=T or F to compute masks for edge fluxes --- .../cicedyn/dynamics/ice_transport_remap.F90 | 27 +++++-------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/cicecore/cicedyn/dynamics/ice_transport_remap.F90 b/cicecore/cicedyn/dynamics/ice_transport_remap.F90 index 286a51711..e4fd51bc4 100644 --- a/cicecore/cicedyn/dynamics/ice_transport_remap.F90 +++ b/cicecore/cicedyn/dynamics/ice_transport_remap.F90 @@ -1951,21 +1951,9 @@ subroutine locate_triangles (nx_block, ny_block, & ! Compute mask for edges with nonzero departure areas !------------------------------------------------------------------- - if (l_fixed_area) then - icellsd = 0 + icellsd = 0 + if (trim(edge) == 'north') then do j = jb, je - do i = ib, ie - if (edgearea(i,j) /= c0) then - icellsd = icellsd + 1 - indxid(icellsd) = i - indxjd(icellsd) = j - endif - enddo - enddo - else - icellsd = 0 - if (trim(edge) == 'north') then - do j = jb, je do i = ib, ie if (dpx(i-1,j)/=c0 .or. dpy(i-1,j)/=c0 & .or. & @@ -1975,9 +1963,9 @@ subroutine locate_triangles (nx_block, ny_block, & indxjd(icellsd) = j endif enddo - enddo - else ! east edge - do j = jb, je + enddo + else ! east edge + do j = jb, je do i = ib, ie if (dpx(i,j-1)/=c0 .or. dpy(i,j-1)/=c0 & .or. & @@ -1987,9 +1975,8 @@ subroutine locate_triangles (nx_block, ny_block, & indxjd(icellsd) = j endif enddo - enddo - endif ! edge = north/east - endif ! l_fixed_area + enddo + endif ! edge = north/east !------------------------------------------------------------------- ! Scale the departure points From 76c9bb4866cca40f6774910a033f141e8ef1c088 Mon Sep 17 00:00:00 2001 From: Jean-Francois Lemieux Date: Mon, 5 Jun 2023 19:43:54 +0000 Subject: [PATCH 2/9] Corrected typo in comment --- cicecore/cicedyn/dynamics/ice_transport_remap.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cicecore/cicedyn/dynamics/ice_transport_remap.F90 b/cicecore/cicedyn/dynamics/ice_transport_remap.F90 index e4fd51bc4..876036b18 100644 --- a/cicecore/cicedyn/dynamics/ice_transport_remap.F90 +++ b/cicecore/cicedyn/dynamics/ice_transport_remap.F90 @@ -1838,7 +1838,7 @@ subroutine locate_triangles (nx_block, ny_block, & ! BL | BC | BR (bottom left, center, right) ! | | ! - ! and the transport is across the edge between cells TC and TB. + ! and the transport is across the edge between cells TC and BC. ! ! Departure points are scaled to a local coordinate system ! whose origin is at the midpoint of the edge. From 21ad9c008b5ef10d28cac8a2cab2c48a086373b8 Mon Sep 17 00:00:00 2001 From: Jean-Francois Lemieux Date: Wed, 7 Jun 2023 18:55:16 +0000 Subject: [PATCH 3/9] Cosmetic (indentation) change in ice_transport_remap.F90 --- .../cicedyn/dynamics/ice_transport_remap.F90 | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/cicecore/cicedyn/dynamics/ice_transport_remap.F90 b/cicecore/cicedyn/dynamics/ice_transport_remap.F90 index 876036b18..91f817bf4 100644 --- a/cicecore/cicedyn/dynamics/ice_transport_remap.F90 +++ b/cicecore/cicedyn/dynamics/ice_transport_remap.F90 @@ -1954,27 +1954,27 @@ subroutine locate_triangles (nx_block, ny_block, & icellsd = 0 if (trim(edge) == 'north') then do j = jb, je - do i = ib, ie - if (dpx(i-1,j)/=c0 .or. dpy(i-1,j)/=c0 & - .or. & - dpx(i,j)/=c0 .or. dpy(i,j)/=c0) then - icellsd = icellsd + 1 - indxid(icellsd) = i - indxjd(icellsd) = j - endif - enddo + do i = ib, ie + if (dpx(i-1,j)/=c0 .or. dpy(i-1,j)/=c0 & + .or. & + dpx(i,j)/=c0 .or. dpy(i,j)/=c0) then + icellsd = icellsd + 1 + indxid(icellsd) = i + indxjd(icellsd) = j + endif + enddo enddo else ! east edge do j = jb, je - do i = ib, ie - if (dpx(i,j-1)/=c0 .or. dpy(i,j-1)/=c0 & - .or. & - dpx(i,j)/=c0 .or. dpy(i,j)/=c0) then - icellsd = icellsd + 1 - indxid(icellsd) = i - indxjd(icellsd) = j - endif - enddo + do i = ib, ie + if (dpx(i,j-1)/=c0 .or. dpy(i,j-1)/=c0 & + .or. & + dpx(i,j)/=c0 .or. dpy(i,j)/=c0) then + icellsd = icellsd + 1 + indxid(icellsd) = i + indxjd(icellsd) = j + endif + enddo enddo endif ! edge = north/east From 68f768c15b3e84406a1ea0321014b55323c69d1d Mon Sep 17 00:00:00 2001 From: Jean-Francois Lemieux Date: Mon, 12 Jun 2023 15:15:09 +0000 Subject: [PATCH 4/9] Set l_fixed_area value depending of grid type --- .../cicedyn/dynamics/ice_transport_driver.F90 | 8 ++--- .../cicedyn/dynamics/ice_transport_remap.F90 | 36 ++++++++++++++++--- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/cicecore/cicedyn/dynamics/ice_transport_driver.F90 b/cicecore/cicedyn/dynamics/ice_transport_driver.F90 index 30fe546e0..a4c0ef09f 100644 --- a/cicecore/cicedyn/dynamics/ice_transport_driver.F90 +++ b/cicecore/cicedyn/dynamics/ice_transport_driver.F90 @@ -37,9 +37,6 @@ module ice_transport_driver ! 'upwind' => 1st order donor cell scheme ! 'remap' => remapping scheme - logical, parameter :: & - l_fixed_area = .false. ! if true, prescribe area flux across each edge - ! NOTE: For remapping, hice and hsno are considered tracers. ! ntrace is not equal to ntrcr! @@ -81,6 +78,7 @@ subroutine init_transport use ice_state, only: trcr_depend use ice_timers, only: ice_timer_start, ice_timer_stop, timer_advect use ice_transport_remap, only: init_remap + use ice_grid, only: grid_ice integer (kind=int_kind) :: & k, nt, nt1 ! tracer indices @@ -236,7 +234,7 @@ subroutine init_transport endif ! master_task 1000 format (1x,a,2x,i6,2x,i6,2x,i4,4x,l4) - if (trim(advection)=='remap') call init_remap ! grid quantities + if (trim(advection)=='remap') call init_remap (grid_ice) ! grid quantities call ice_timer_stop(timer_advect) ! advection @@ -545,7 +543,6 @@ subroutine transport_remap (dt) call horizontal_remap (dt, ntrace, & uvel (:,:,:), vvel (:,:,:), & aim (:,:,:,:), trm(:,:,:,:,:), & - l_fixed_area, & tracer_type, depend, & has_dependents, integral_order, & l_dp_midpt, grid_ice, & @@ -554,7 +551,6 @@ subroutine transport_remap (dt) call horizontal_remap (dt, ntrace, & uvel (:,:,:), vvel (:,:,:), & aim (:,:,:,:), trm(:,:,:,:,:), & - l_fixed_area, & tracer_type, depend, & has_dependents, integral_order, & l_dp_midpt, grid_ice) diff --git a/cicecore/cicedyn/dynamics/ice_transport_remap.F90 b/cicecore/cicedyn/dynamics/ice_transport_remap.F90 index 91f817bf4..e393a8865 100644 --- a/cicecore/cicedyn/dynamics/ice_transport_remap.F90 +++ b/cicecore/cicedyn/dynamics/ice_transport_remap.F90 @@ -57,6 +57,9 @@ module ice_transport_remap p5625m = -9._dbl_kind/16._dbl_kind ,& p52083 = 25._dbl_kind/48._dbl_kind + logical :: & + l_fixed_area ! if true, prescribe area flux across each edge + logical (kind=log_kind), parameter :: bugcheck = .false. !======================================================================= @@ -253,13 +256,16 @@ module ice_transport_remap ! ! author William H. Lipscomb, LANL - subroutine init_remap + subroutine init_remap (grid_ice) use ice_domain, only: nblocks use ice_grid, only: xav, yav, xxav, yyav ! dxT, dyT, xyav, & ! xxxav, xxyav, xyyav, yyyav + character (len=char_len_long), intent(in) :: & + grid_ice ! ice grid, B, C, etc + integer (kind=int_kind) :: & i, j, iblk ! standard indices @@ -293,6 +299,29 @@ subroutine init_remap enddo !$OMP END PARALLEL DO + !------------------------------------------------------------------- + ! Set logical l_fixed_area depending of the grid type. + ! + ! If l_fixed_area is true, the area of each departure region is + ! computed in advance (e.g., by taking the divergence of the + ! velocity field and passed to locate_triangles. The departure + ! regions are adjusted to obtain the desired area. + ! If false, edgearea is computed in locate_triangles and passed out. + ! + ! l_fixed_area = .false. has been the default approach in CICE. It is + ! used like this for the B-grid. However, idealized tests with the + ! C-grid have shown that l_fixed_area = .false. leads to a checkerboard + ! pattern in prognostic fields (e.g. aice). Using l_fixed_area = .true. + ! eliminates the checkerboard pattern in C-grid simulations. + ! + !------------------------------------------------------------------- + + if (grid_ice == 'CD' .or. grid_ice == 'C') then + l_fixed_area = .true. + else + l_fixed_area = .false. + endif + end subroutine init_remap !======================================================================= @@ -316,7 +345,6 @@ end subroutine init_remap subroutine horizontal_remap (dt, ntrace, & uvel, vvel, & mm, tm, & - l_fixed_area, & tracer_type, depend, & has_dependents, & integral_order, & @@ -364,8 +392,8 @@ subroutine horizontal_remap (dt, ntrace, & ! If false, edgearea is computed in locate_triangles and passed out. !------------------------------------------------------------------- - logical, intent(in) :: & - l_fixed_area ! if true, edgearea_e and edgearea_n are prescribed +! logical, intent(in) :: & +! l_fixed_area ! if true, edgearea_e and edgearea_n are prescribed ! if false, edgearea is computed here and passed out integer (kind=int_kind), dimension (ntrace), intent(in) :: & From 3d26d4cdb6089467b3c3a0866cb8f99fdc103f07 Mon Sep 17 00:00:00 2001 From: Jean-Francois Lemieux Date: Mon, 12 Jun 2023 18:17:43 +0000 Subject: [PATCH 5/9] Modifs to the doc for l_fixed_area --- doc/source/science_guide/sg_horiztrans.rst | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/doc/source/science_guide/sg_horiztrans.rst b/doc/source/science_guide/sg_horiztrans.rst index d66046465..64c3cf1c7 100644 --- a/doc/source/science_guide/sg_horiztrans.rst +++ b/doc/source/science_guide/sg_horiztrans.rst @@ -39,7 +39,7 @@ remapping scheme of :cite:`Dukowicz00` as modified for sea ice by - The upwind scheme uses velocity points at the East and North face (i.e. :math:`uvelE=u` at the E point and :math:`vvelN=v` at the N point) of a T gridcell. As such, the prognostic C grid velocity components (:math:`uvelE` and :math:`vvelN`) can be passed directly to the upwind transport scheme. If the upwind scheme is used with the B grid, the B grid velocities, :math:`uvelU` and :math:`vvelU` (respectively :math:`u` and :math:`v` at the U point) are interpolated to the E and N points first. (Note however that the upwind scheme does not transport all potentially available tracers.) -- The remapping scheme uses :math:`uvelU` and :math:`vvelU` if l_fixed_area is false and :math:`uvelE` and :math:`vvelN` if l_fixed_area is true. l_fixed_area is hardcoded to false by default and further described below. As such, the B grid velocities (:math:`uvelU` and :math:`vvelU`) are used directly in the remapping scheme, while the C grid velocities (:math:`uvelE` and :math:`vvelN`) are interpolated to U points first. If l_fixed_area is changed to true, then the reverse is true. The C grid velocities are used directly and the B grid velocities are interpolated. +- Remapping is naturally a B-grid transport scheme as the corner (U point) velocity components :math:`uvelU` and :math:`vvelU` are used to calculate departure points. Nevertheless, the remapping scheme can also be used with the C grid by first interpolating :math:`uvelE` and :math:`vvelN` to the U points. The remapping scheme has several desirable features: @@ -477,9 +477,15 @@ Remote Sensing Center (Norway), who applied an earlier version of the CICE remapping scheme to an ocean model. The implementation in CICE is somewhat more general, allowing for departure regions lying on both sides of a cell edge. The extra triangle is constrained to lie in one -but not both of the grid cells that share the edge. Since this option -has yet to be fully tested in CICE, the current default is -`l\_fixed\_area` = false. +but not both of the grid cells that share the edge. + +The default value for the B grid is `l\_fixed\_area` = false. However, +idealized tests with the C grid have shown that prognostic fields such +as sea ice concentration exhibit a checkerboard pattern with +`l\_fixed\_area` = false. The logical `l\_fixed\_area` is therefore set +to true when using the C grid. The edge areas `edgearea\_e` and `edgearea\_n` +are in this case calculated with the C grid velocity components :math:`uvelE` +and :math:`vvelN`. We made one other change in the scheme of :cite:`Dukowicz00` for locating triangles. In their paper, departure points are defined by From f93d3226718e4b6fba5be912e7727cf3ce3f62ac Mon Sep 17 00:00:00 2001 From: Jean-Francois Lemieux Date: Mon, 19 Jun 2023 19:47:44 +0000 Subject: [PATCH 6/9] Use umask for uvel,vvel initialization for boxslotcyl and change grid avg type from S to A in init_state --- .../cicedyn/dynamics/ice_transport_remap.F90 | 12 ------- cicecore/cicedyn/general/ice_init.F90 | 34 ++++++++++++------- 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/cicecore/cicedyn/dynamics/ice_transport_remap.F90 b/cicecore/cicedyn/dynamics/ice_transport_remap.F90 index e393a8865..cafbabc57 100644 --- a/cicecore/cicedyn/dynamics/ice_transport_remap.F90 +++ b/cicecore/cicedyn/dynamics/ice_transport_remap.F90 @@ -384,18 +384,6 @@ subroutine horizontal_remap (dt, ntrace, & character (len=char_len_long), intent(in) :: & grid_ice ! ice grid, B, C, etc - !------------------------------------------------------------------- - ! If l_fixed_area is true, the area of each departure region is - ! computed in advance (e.g., by taking the divergence of the - ! velocity field and passed to locate_triangles. The departure - ! regions are adjusted to obtain the desired area. - ! If false, edgearea is computed in locate_triangles and passed out. - !------------------------------------------------------------------- - -! logical, intent(in) :: & -! l_fixed_area ! if true, edgearea_e and edgearea_n are prescribed - ! if false, edgearea is computed here and passed out - integer (kind=int_kind), dimension (ntrace), intent(in) :: & tracer_type , & ! = 1, 2, or 3 (see comments above) depend ! tracer dependencies (see above) diff --git a/cicecore/cicedyn/general/ice_init.F90 b/cicecore/cicedyn/general/ice_init.F90 index 1baaa95b3..399f5736b 100644 --- a/cicecore/cicedyn/general/ice_init.F90 +++ b/cicecore/cicedyn/general/ice_init.F90 @@ -2532,7 +2532,7 @@ subroutine init_state use ice_domain, only: nblocks, blocks_ice, halo_info use ice_domain_size, only: ncat, nilyr, nslyr, n_iso, n_aero, nfsd use ice_flux, only: sst, Tf, Tair, salinz, Tmltz - use ice_grid, only: tmask, ULON, TLAT, grid_ice, grid_average_X2Y + use ice_grid, only: tmask, umask, ULON, TLAT, grid_ice, grid_average_X2Y use ice_boundary, only: ice_HaloUpdate use ice_constants, only: field_loc_Nface, field_loc_Eface, field_type_scalar use ice_state, only: trcr_depend, aicen, trcrn, vicen, vsnon, & @@ -2720,6 +2720,7 @@ subroutine init_state ilo, ihi, jlo, jhi, & iglob, jglob, & ice_ic, tmask(:,:, iblk), & + umask(:,:, iblk), & ULON (:,:, iblk), & TLAT (:,:, iblk), & Tair (:,:, iblk), sst (:,:, iblk), & @@ -2742,10 +2743,10 @@ subroutine init_state if (grid_ice == 'CD' .or. grid_ice == 'C') then - call grid_average_X2Y('S',uvel,'U',uvelN,'N') - call grid_average_X2Y('S',vvel,'U',vvelN,'N') - call grid_average_X2Y('S',uvel,'U',uvelE,'E') - call grid_average_X2Y('S',vvel,'U',vvelE,'E') + call grid_average_X2Y('A',uvel,'U',uvelN,'N') + call grid_average_X2Y('A',vvel,'U',vvelN,'N') + call grid_average_X2Y('A',uvel,'U',uvelE,'E') + call grid_average_X2Y('A',vvel,'U',vvelE,'E') ! Halo update on North, East faces call ice_HaloUpdate(uvelN, halo_info, & @@ -2760,7 +2761,6 @@ subroutine init_state endif - !----------------------------------------------------------------- ! compute aggregate ice state and open water area !----------------------------------------------------------------- @@ -2819,8 +2819,9 @@ subroutine set_state_var (nx_block, ny_block, & ilo, ihi, jlo, jhi, & iglob, jglob, & ice_ic, tmask, & - ULON, & - TLAT, & + umask, & + ULON, & + TLAT, & Tair, sst, & Tf, & salinz, Tmltz, & @@ -2845,7 +2846,8 @@ subroutine set_state_var (nx_block, ny_block, & ice_ic ! method of ice cover initialization logical (kind=log_kind), dimension (nx_block,ny_block), intent(in) :: & - tmask ! true for ice/ocean cells + tmask , & ! true for ice/ocean cells + umask ! for U points real (kind=dbl_kind), dimension (nx_block,ny_block), intent(in) :: & ULON , & ! longitude of velocity pts (radians) @@ -3293,13 +3295,19 @@ subroutine set_state_var (nx_block, ny_block, & domain_length = dxrect*cm_to_m*nx_global period = c12*secday ! 12 days rotational period max_vel = pi*domain_length/period + do j = 1, ny_block do i = 1, nx_block - uvel(i,j) = c2*max_vel*(real(jglob(j), kind=dbl_kind) - p5) & - / real(ny_global - 1, kind=dbl_kind) - max_vel - vvel(i,j) = -c2*max_vel*(real(iglob(i), kind=dbl_kind) - p5) & - / real(nx_global - 1, kind=dbl_kind) + max_vel + if (umask(i,j)) then + uvel(i,j) = c2*max_vel*(real(jglob(j), kind=dbl_kind) - p5) & + / real(ny_global - 1, kind=dbl_kind) - max_vel + vvel(i,j) = -c2*max_vel*(real(iglob(i), kind=dbl_kind) - p5) & + / real(nx_global - 1, kind=dbl_kind) + max_vel + else + uvel(i,j) = c0 + vvel(i,j) = c0 + endif enddo ! j enddo ! i else From 387c7df416b3f0d084fe748e6c916aa00c3dac91 Mon Sep 17 00:00:00 2001 From: Jean-Francois Lemieux Date: Mon, 24 Jul 2023 17:48:36 +0000 Subject: [PATCH 7/9] Temporary changes before next PR: l_fixed_area=F for B and C grid --- cicecore/cicedyn/dynamics/ice_transport_remap.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cicecore/cicedyn/dynamics/ice_transport_remap.F90 b/cicecore/cicedyn/dynamics/ice_transport_remap.F90 index cafbabc57..8cb371333 100644 --- a/cicecore/cicedyn/dynamics/ice_transport_remap.F90 +++ b/cicecore/cicedyn/dynamics/ice_transport_remap.F90 @@ -317,7 +317,7 @@ subroutine init_remap (grid_ice) !------------------------------------------------------------------- if (grid_ice == 'CD' .or. grid_ice == 'C') then - l_fixed_area = .true. + l_fixed_area = .false. !jlem temporary else l_fixed_area = .false. endif From 816dda09da5dfa4c79f8969600a63d9ffc49cdf2 Mon Sep 17 00:00:00 2001 From: Jean-Francois Lemieux Date: Mon, 24 Jul 2023 17:51:16 +0000 Subject: [PATCH 8/9] Temporary changes before next PR: remove paragraph in the doc --- doc/source/science_guide/sg_horiztrans.rst | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/doc/source/science_guide/sg_horiztrans.rst b/doc/source/science_guide/sg_horiztrans.rst index 64c3cf1c7..9ad30348a 100644 --- a/doc/source/science_guide/sg_horiztrans.rst +++ b/doc/source/science_guide/sg_horiztrans.rst @@ -477,15 +477,9 @@ Remote Sensing Center (Norway), who applied an earlier version of the CICE remapping scheme to an ocean model. The implementation in CICE is somewhat more general, allowing for departure regions lying on both sides of a cell edge. The extra triangle is constrained to lie in one -but not both of the grid cells that share the edge. - -The default value for the B grid is `l\_fixed\_area` = false. However, -idealized tests with the C grid have shown that prognostic fields such -as sea ice concentration exhibit a checkerboard pattern with -`l\_fixed\_area` = false. The logical `l\_fixed\_area` is therefore set -to true when using the C grid. The edge areas `edgearea\_e` and `edgearea\_n` -are in this case calculated with the C grid velocity components :math:`uvelE` -and :math:`vvelN`. +but not both of the grid cells that share the edge. Since this option +has yet to be fully tested in CICE, the current default is +`l\_fixed\_area` = false. We made one other change in the scheme of :cite:`Dukowicz00` for locating triangles. In their paper, departure points are defined by From 84149ccfa49f4a1a97cf35f3d596d4f2fe8f3904 Mon Sep 17 00:00:00 2001 From: Jean-Francois Lemieux Date: Mon, 24 Jul 2023 19:47:02 +0000 Subject: [PATCH 9/9] Small modifs: l_fixed_area and grid_ice are defined in module ice_transport_remap --- .../cicedyn/dynamics/ice_transport_driver.F90 | 6 ++-- .../cicedyn/dynamics/ice_transport_remap.F90 | 28 ++++++------------- 2 files changed, 11 insertions(+), 23 deletions(-) diff --git a/cicecore/cicedyn/dynamics/ice_transport_driver.F90 b/cicecore/cicedyn/dynamics/ice_transport_driver.F90 index a4c0ef09f..4f9d84d98 100644 --- a/cicecore/cicedyn/dynamics/ice_transport_driver.F90 +++ b/cicecore/cicedyn/dynamics/ice_transport_driver.F90 @@ -234,7 +234,7 @@ subroutine init_transport endif ! master_task 1000 format (1x,a,2x,i6,2x,i6,2x,i4,4x,l4) - if (trim(advection)=='remap') call init_remap (grid_ice) ! grid quantities + if (trim(advection)=='remap') call init_remap ! grid quantities call ice_timer_stop(timer_advect) ! advection @@ -545,7 +545,7 @@ subroutine transport_remap (dt) aim (:,:,:,:), trm(:,:,:,:,:), & tracer_type, depend, & has_dependents, integral_order, & - l_dp_midpt, grid_ice, & + l_dp_midpt, & uvelE (:,:,:), vvelN (:,:,:)) else call horizontal_remap (dt, ntrace, & @@ -553,7 +553,7 @@ subroutine transport_remap (dt) aim (:,:,:,:), trm(:,:,:,:,:), & tracer_type, depend, & has_dependents, integral_order, & - l_dp_midpt, grid_ice) + l_dp_midpt) endif !------------------------------------------------------------------- diff --git a/cicecore/cicedyn/dynamics/ice_transport_remap.F90 b/cicecore/cicedyn/dynamics/ice_transport_remap.F90 index 8cb371333..eb0dd17cf 100644 --- a/cicecore/cicedyn/dynamics/ice_transport_remap.F90 +++ b/cicecore/cicedyn/dynamics/ice_transport_remap.F90 @@ -42,6 +42,7 @@ module ice_transport_remap use ice_exit, only: abort_ice use icepack_intfc, only: icepack_warnings_flush, icepack_warnings_aborted use icepack_intfc, only: icepack_query_parameters + use ice_grid, only : grid_ice implicit none private @@ -59,6 +60,8 @@ module ice_transport_remap logical :: & l_fixed_area ! if true, prescribe area flux across each edge + ! if false, area flux is determined internally + ! and is passed out logical (kind=log_kind), parameter :: bugcheck = .false. @@ -256,16 +259,13 @@ module ice_transport_remap ! ! author William H. Lipscomb, LANL - subroutine init_remap (grid_ice) + subroutine init_remap use ice_domain, only: nblocks use ice_grid, only: xav, yav, xxav, yyav ! dxT, dyT, xyav, & ! xxxav, xxyav, xyyav, yyyav - character (len=char_len_long), intent(in) :: & - grid_ice ! ice grid, B, C, etc - integer (kind=int_kind) :: & i, j, iblk ! standard indices @@ -348,7 +348,7 @@ subroutine horizontal_remap (dt, ntrace, & tracer_type, depend, & has_dependents, & integral_order, & - l_dp_midpt, grid_ice, & + l_dp_midpt, & uvelE, vvelN) use ice_boundary, only: ice_halo, ice_HaloMask, ice_HaloUpdate, & @@ -381,9 +381,6 @@ subroutine horizontal_remap (dt, ntrace, & real (kind=dbl_kind), intent(inout), dimension (nx_block,ny_block,ntrace,ncat,max_blocks) :: & tm ! mean tracer values in each grid cell - character (len=char_len_long), intent(in) :: & - grid_ice ! ice grid, B, C, etc - integer (kind=int_kind), dimension (ntrace), intent(in) :: & tracer_type , & ! = 1, 2, or 3 (see comments above) depend ! tracer dependencies (see above) @@ -732,8 +729,7 @@ subroutine horizontal_remap (dt, ntrace, & dxu (:,:,iblk), dyu(:,:,iblk), & xp (:,:,:,:), yp (:,:,:,:), & iflux, jflux, & - triarea, & - l_fixed_area, edgearea_e(:,:)) + triarea, edgearea_e(:,:)) !------------------------------------------------------------------- ! Given triangle vertices, compute coordinates of triangle points @@ -792,8 +788,7 @@ subroutine horizontal_remap (dt, ntrace, & dxu (:,:,iblk), dyu (:,:,iblk), & xp (:,:,:,:), yp(:,:,:,:), & iflux, jflux, & - triarea, & - l_fixed_area, edgearea_n(:,:)) + triarea, edgearea_n(:,:)) call triangle_coordinates (nx_block, ny_block, & integral_order, icellsng(:,iblk), & @@ -1712,8 +1707,7 @@ subroutine locate_triangles (nx_block, ny_block, & dxu, dyu, & xp, yp, & iflux, jflux, & - triarea, & - l_fixed_area, edgearea) + triarea, edgearea) integer (kind=int_kind), intent(in) :: & nx_block, ny_block, & ! block dimensions @@ -1746,12 +1740,6 @@ subroutine locate_triangles (nx_block, ny_block, & indxi , & ! compressed index in i-direction indxj ! compressed index in j-direction - logical, intent(in) :: & - l_fixed_area ! if true, the area of each departure region is - ! passed in as edgearea - ! if false, edgearea if determined internally - ! and is passed out - real (kind=dbl_kind), dimension(nx_block,ny_block), intent(inout) :: & edgearea ! area of departure region for each edge ! edgearea > 0 for eastward/northward flow