Skip to content

Commit

Permalink
fixes for cgrid repro
Browse files Browse the repository at this point in the history
  • Loading branch information
DeniseWorthen committed May 22, 2022
1 parent dd158e2 commit ae50efe
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 9 deletions.
13 changes: 9 additions & 4 deletions cicecore/cicedynB/dynamics/ice_dyn_evp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,17 @@ subroutine evp (dt)
! convert fields from T to U grid
!-----------------------------------------------------------------

call ice_HaloUpdate (tmass, halo_info, &
field_loc_center, field_type_scalar)
call ice_HaloUpdate (aice_init, halo_info, &
field_loc_center, field_type_scalar)

call grid_average_X2Y('F', tmass , 'T' , umass , 'U')
call grid_average_X2Y('F', aice_init, 'T' , aiu , 'U')
call grid_average_X2Y('S', uocn , grid_ocn_dynu, uocnU , 'U')
call grid_average_X2Y('S', vocn , grid_ocn_dynv, vocnU , 'U')
call grid_average_X2Y('S', ss_tltx , grid_ocn_dynu, ss_tltxU, 'U')
call grid_average_X2Y('S', ss_tlty , grid_ocn_dynv, ss_tltyU, 'U')
call grid_average_X2Y('F', uocn , grid_ocn_dynu, uocnU , 'U')
call grid_average_X2Y('F', vocn , grid_ocn_dynv, vocnU , 'U')
call grid_average_X2Y('F', ss_tltx , grid_ocn_dynu, ss_tltxU, 'U')
call grid_average_X2Y('F', ss_tlty , grid_ocn_dynv, ss_tltyU, 'U')

if (grid_ice == 'CD' .or. grid_ice == 'C') then
call grid_average_X2Y('F', tmass , 'T' , emass, 'E')
Expand Down
13 changes: 13 additions & 0 deletions cicecore/cicedynB/infrastructure/ice_grid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,19 @@ subroutine init_grid2
!-----------------------------------------------------------------

call ice_timer_start(timer_bound)

call ice_HaloUpdate (tarea, halo_info, &
field_loc_center, field_type_scalar, &
fillValue=c1)
call ice_HaloUpdate (uarea, halo_info, &
field_loc_NEcorner, field_type_scalar, &
fillValue=c1)
call ice_HaloUpdate (tarear, halo_info, &
field_loc_center, field_type_scalar, &
fillValue=c1)
call ice_HaloUpdate (uarear, halo_info, &
field_loc_NEcorner, field_type_scalar, &
fillValue=c1)
call ice_HaloUpdate (dxhy, halo_info, &
field_loc_center, field_type_vector, &
fillValue=c1)
Expand Down
9 changes: 4 additions & 5 deletions cicecore/drivers/nuopc/cmeps/ice_import_export.F90
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,6 @@ subroutine ice_import( importState, rc )
! ocean
workx = uocn (i,j,iblk) ! currents, m/s
worky = vocn (i,j,iblk)

uocn(i,j,iblk) = workx*cos(ANGLET(i,j,iblk)) & ! rotate to align with model i,j
+ worky*sin(ANGLET(i,j,iblk))
vocn(i,j,iblk) = worky*cos(ANGLET(i,j,iblk)) &
Expand Down Expand Up @@ -800,10 +799,10 @@ subroutine ice_import( importState, rc )

if (.not.prescribed_ice) then
call t_startf ('cice_imp_t2u')
call ice_HaloUpdate(uocn, halo_info, field_loc_center, field_type_scalar)
call ice_HaloUpdate(vocn, halo_info, field_loc_center, field_type_scalar)
call ice_HaloUpdate(ss_tltx, halo_info, field_loc_center, field_type_scalar)
call ice_HaloUpdate(ss_tlty, halo_info, field_loc_center, field_type_scalar)
call ice_HaloUpdate(uocn, halo_info, field_loc_center, field_type_vector)
call ice_HaloUpdate(vocn, halo_info, field_loc_center, field_type_vector)
call ice_HaloUpdate(ss_tltx, halo_info, field_loc_center, field_type_vector)
call ice_HaloUpdate(ss_tlty, halo_info, field_loc_center, field_type_vector)
! tcraig, moved to dynamics for consistency
!work = uocn
!call grid_average_X2Y('F',work,'T',uocn,'U')
Expand Down

0 comments on commit ae50efe

Please sign in to comment.