Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update areafac_c, areafac_ce in halo in dynamics #1

Merged
merged 1 commit into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions cicecore/cicedyn/dynamics/ice_transport_remap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1927,17 +1927,18 @@ subroutine locate_triangles (nx_block, ny_block, &
jse_br = 0

! area scale factor
! earea, narea valid on halo

do j = jlo-1, jhi
do i = ilo, ihi
do j = 1, ny_block
do i = 1, nx_block
areafac_c(i,j) = narea(i,j)
enddo
enddo

! area scale factor for other edge (east)

do j = jlo-1, jhi+1
do i = ilo-1, ihi
do j = 1, ny_block
do i = 1, nx_block
areafac_ce(i,j) = earea(i,j)
enddo
enddo
Expand Down Expand Up @@ -1978,17 +1979,18 @@ subroutine locate_triangles (nx_block, ny_block, &
jse_br = -1

! area scale factors
! earea, narea valid on halo

do j = jlo, jhi
do i = ilo-1, ihi
do j = 1, ny_block
do i = 1, nx_block
areafac_c(i,j) = earea(i,j)
enddo
enddo

! area scale factor for other edge (north)

do j = jlo-1, jhi
do i = ilo-1, ihi+1
do j = 1, ny_block
do i = 1, nx_block
areafac_ce(i,j) = narea(i,j)
enddo
enddo
Expand Down
30 changes: 21 additions & 9 deletions cicecore/cicedyn/infrastructure/ice_grid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ module ice_grid
dyE , & ! height of E-cell through the middle (m)
HTE , & ! length of eastern edge of T-cell (m)
HTN , & ! length of northern edge of T-cell (m)
tarea , & ! area of T-cell (m^2)
uarea , & ! area of U-cell (m^2)
narea , & ! area of N-cell (m^2)
earea , & ! area of E-cell (m^2)
tarear , & ! 1/tarea
uarear , & ! 1/uarea
narear , & ! 1/narea
earear , & ! 1/earea
tarea , & ! area of T-cell (m^2), valid in halo
uarea , & ! area of U-cell (m^2), valid in halo
narea , & ! area of N-cell (m^2), valid in halo
earea , & ! area of E-cell (m^2), valid in halo
tarear , & ! 1/tarea, valid in halo
uarear , & ! 1/uarea, valid in halo
narear , & ! 1/narea, valid in halo
earear , & ! 1/earea, valid in halo
tarean , & ! area of NH T-cells
tareas , & ! area of SH T-cells
ULON , & ! longitude of velocity pts, NE corner of T pts (radians)
Expand All @@ -101,7 +101,7 @@ module ice_grid
ELON , & ! longitude of center of east face of T pts (radians)
ELAT , & ! latitude of center of east face of T pts (radians)
ANGLE , & ! for conversions between POP grid and lat/lon
ANGLET , & ! ANGLE converted to T-cells
ANGLET , & ! ANGLE converted to T-cells, valid in halo
bathymetry , & ! ocean depth, for grounding keels and bergs (m)
ocn_gridcell_frac ! only relevant for lat-lon grids
! gridcell value of [1 - (land fraction)] (T-cell)
Expand Down Expand Up @@ -635,12 +635,24 @@ subroutine init_grid2
call ice_HaloUpdate (uarea, halo_info, &
field_loc_NEcorner, field_type_scalar, &
fillValue=c1, tripoleOnly=.true.)
call ice_HaloUpdate (narea, halo_info, &
field_loc_Nface, field_type_scalar, &
fillValue=c1, tripoleOnly=.true.)
call ice_HaloUpdate (earea, halo_info, &
field_loc_Eface, field_type_scalar, &
fillValue=c1, tripoleOnly=.true.)
call ice_HaloUpdate (tarear, halo_info, &
field_loc_center, field_type_scalar, &
fillValue=c1, tripoleOnly=.true.)
call ice_HaloUpdate (uarear, halo_info, &
field_loc_NEcorner, field_type_scalar, &
fillValue=c1, tripoleOnly=.true.)
call ice_HaloUpdate (narear, halo_info, &
field_loc_Nface, field_type_scalar, &
fillValue=c1, tripoleOnly=.true.)
call ice_HaloUpdate (earear, halo_info, &
field_loc_Eface, field_type_scalar, &
fillValue=c1, tripoleOnly=.true.)

call ice_timer_stop(timer_bound)

Expand Down
Loading