One zonal pass: total-mass PPM + proportionate ice-flux split, the snow twin + co-located mask, PCM tracer riding (gather then cell update), the mass update (AFTER every ride reads the pre-update mass), and the post-pass validity reduction.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(hgrid_t), | intent(in) | :: | grid | |||
| type(ocean_metrics_t), | intent(in) | :: | metrics | |||
| type(ocean_sea_ice_t), | intent(inout) | :: | ice | |||
| real(kind=wp), | intent(in) | :: | dt_adv | |||
| logical, | intent(in) | :: | wall_w |
Zero the west / east tile-edge face (a physical, non-periodic edge); a seam face is an ordinary face. |
||
| logical, | intent(in) | :: | wall_e |
Zero the west / east tile-edge face (a physical, non-periodic edge); a seam face is an ordinary face. |
||
| logical, | intent(out) | :: | ok |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | l | ||||
| integer, | private | :: | nghost | ||||
| integer, | private | :: | nx | ||||
| integer, | private | :: | ny |
pure subroutine ice_pass_x(grid, metrics, ice, dt_adv, wall_w, wall_e, ok) !! One zonal pass: total-mass PPM + proportionate ice-flux split, !! the snow twin + co-located mask, PCM tracer riding (gather then !! cell update), the mass update (AFTER every ride reads the !! pre-update mass), and the post-pass validity reduction. type(hgrid_t), intent(in) :: grid type(ocean_metrics_t), intent(in) :: metrics type(ocean_sea_ice_t), intent(inout) :: ice real(wp), intent(in) :: dt_adv logical, intent(in) :: wall_w, wall_e !! Zero the west / east tile-edge face (a physical, non-periodic !! edge); a seam face is an ordinary face. logical, intent(out) :: ok integer :: nx, ny, nghost, l nx = grid%nx_total ny = grid%ny_total nghost = grid%nghost call ice_cat_flux_x_impl(metrics%wet_T, metrics%dy_cu, metrics%idxT, ice%u_ice, & ice%mca_ice, ice%htot_work, ice%hl_x_work, ice%hr_x_work, & ice%uhtot_work, ice%uh_ice, dt_adv, nghost, grid%nx_phys, & ice%ncat, nx, ny, wall_w, wall_e) call ice_cat_flux_x_impl(metrics%wet_T, metrics%dy_cu, metrics%idxT, ice%u_ice, & ice%mca_snow, ice%htot_work, ice%hl_x_work, ice%hr_x_work, & ice%uhtot_work, ice%uh_snow, dt_adv, nghost, grid%nx_phys, & ice%ncat, nx, ny, wall_w, wall_e) call ice_mask_snow_by_ice_impl(ice%uh_ice, ice%uh_snow, nx + 1, ny, ice%ncat) ! ---- Tracer riding (Phase 2c), BEFORE the mass update ---- call ice_gather_flux_x_impl(ice%uh_ice, ice%m_ice, ice%tr_flux_x_work, ice%ncat, nx, ny) call ice_ride_update_x_impl(metrics%iareaT, ice%uh_ice, ice%tr_flux_x_work, ice%mca_ice, & ice%m_ice, dt_adv, ice%ncat, nx, ny) do l = 1, ice%nk_ice call ice_gather_flux_x_layer_impl(ice%uh_ice, ice%enth_ice, l, ice%tr_flux_x_work, & ice%ncat, ice%nk_ice, nx, ny) call ice_ride_update_x_layer_impl(metrics%iareaT, ice%uh_ice, ice%tr_flux_x_work, & ice%mca_ice, ice%enth_ice, l, dt_adv, ice%ncat, & ice%nk_ice, nx, ny) call ice_gather_flux_x_layer_impl(ice%uh_ice, ice%sal_ice, l, ice%tr_flux_x_work, & ice%ncat, ice%nk_ice, nx, ny) call ice_ride_update_x_layer_impl(metrics%iareaT, ice%uh_ice, ice%tr_flux_x_work, & ice%mca_ice, ice%sal_ice, l, dt_adv, ice%ncat, & ice%nk_ice, nx, ny) end do call ice_gather_flux_x_layer_impl(ice%uh_snow, ice%enth_snow, 1, ice%tr_flux_x_work, & ice%ncat, 1, nx, ny) call ice_ride_update_x_layer_impl(metrics%iareaT, ice%uh_snow, ice%tr_flux_x_work, & ice%mca_snow, ice%enth_snow, 1, dt_adv, ice%ncat, & 1, nx, ny) ! ---- Mass update (Phase 2d) ---- call ice_mass_update_x_impl(metrics%iareaT, ice%uh_ice, ice%mca_ice, dt_adv, & nghost, grid%nx_phys, ice%ncat, nx, ny) call ice_mass_update_x_impl(metrics%iareaT, ice%uh_snow, ice%mca_snow, dt_adv, & nghost, grid%nx_phys, ice%ncat, nx, ny) call ice_validity_reduce_impl(ice%mca_ice, ice%mca_snow, nghost, grid%nx_phys, & grid%ny_phys, ice%ncat, nx, ny, ok) end subroutine ice_pass_x