Skip to content

Commit

Permalink
Change some indents and change 0 to c0. (#15)
Browse files Browse the repository at this point in the history
* Additional CD variables for the EVP dynamics

* Fix some indents and change 0 to c0
  • Loading branch information
dabail10 authored Nov 17, 2021
1 parent 2f65ca8 commit 5435aba
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
40 changes: 20 additions & 20 deletions cicecore/cicedynB/dynamics/ice_dyn_evp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -290,25 +290,25 @@ subroutine evp (dt)

if (grid_system == 'CD') then

if (.not. calc_strair) then
strairxN(:,:,:) = strax(:,:,:)
strairyN(:,:,:) = stray(:,:,:)
strairxE(:,:,:) = strax(:,:,:)
strairyE(:,:,:) = stray(:,:,:)
else
call ice_HaloUpdate (strairxN, halo_info, &
field_loc_center, field_type_vector)
call ice_HaloUpdate (strairyN, halo_info, &
field_loc_center, field_type_vector)
call ice_HaloUpdate (strairxE, halo_info, &
field_loc_center, field_type_vector)
call ice_HaloUpdate (strairyE, halo_info, &
field_loc_center, field_type_vector)
call grid_average_X2Y('T2NF',strairxN)
call grid_average_X2Y('T2NF',strairyN)
call grid_average_X2Y('T2EF',strairxE)
call grid_average_X2Y('T2EF',strairyE)
endif
if (.not. calc_strair) then
strairxN(:,:,:) = strax(:,:,:)
strairyN(:,:,:) = stray(:,:,:)
strairxE(:,:,:) = strax(:,:,:)
strairyE(:,:,:) = stray(:,:,:)
else
call ice_HaloUpdate (strairxN, halo_info, &
field_loc_center, field_type_vector)
call ice_HaloUpdate (strairyN, halo_info, &
field_loc_center, field_type_vector)
call ice_HaloUpdate (strairxE, halo_info, &
field_loc_center, field_type_vector)
call ice_HaloUpdate (strairyE, halo_info, &
field_loc_center, field_type_vector)
call grid_average_X2Y('T2NF',strairxN)
call grid_average_X2Y('T2NF',strairyN)
call grid_average_X2Y('T2EF',strairxE)
call grid_average_X2Y('T2EF',strairyE)
endif

endif
! tcraig, tcx, threading here leads to some non-reproducbile results and failures in icepack_ice_strength
Expand Down Expand Up @@ -426,7 +426,7 @@ subroutine evp (dt)
do iblk = 1, nblocks

!-----------------------------------------------------------------
! more preparation for dynamics on N grid
! more preparation for dynamics on E grid
!-----------------------------------------------------------------

this_block = get_block(blocks_ice(iblk),iblk)
Expand Down
22 changes: 11 additions & 11 deletions cicecore/cicedynB/dynamics/ice_dyn_shared.F90
Original file line number Diff line number Diff line change
Expand Up @@ -213,23 +213,23 @@ subroutine init_dyn (dt)
if (trim(coriolis) == 'constant') then
fcor_blk(i,j,iblk) = 1.46e-4_dbl_kind ! Hibler 1979, N. Hem; 1/s
else if (trim(coriolis) == 'zero') then
fcor_blk(i,j,iblk) = 0.0
fcor_blk(i,j,iblk) = c0
else
fcor_blk(i,j,iblk) = c2*omega*sin(ULAT(i,j,iblk)) ! 1/s
endif

if (grid_system == 'CD') then

if (trim(coriolis) == 'constant') then
fcorE_blk(i,j,iblk) = 1.46e-4_dbl_kind ! Hibler 1979, N. Hem; 1/s
fcorN_blk(i,j,iblk) = 1.46e-4_dbl_kind ! Hibler 1979, N. Hem; 1/s
else if (trim(coriolis) == 'zero') then
fcorE_blk(i,j,iblk) = 0.0
fcorN_blk(i,j,iblk) = 0.0
else
fcorE_blk(i,j,iblk) = c2*omega*sin(ELAT(i,j,iblk)) ! 1/s
fcorN_blk(i,j,iblk) = c2*omega*sin(NLAT(i,j,iblk)) ! 1/s
endif
if (trim(coriolis) == 'constant') then
fcorE_blk(i,j,iblk) = 1.46e-4_dbl_kind ! Hibler 1979, N. Hem; 1/s
fcorN_blk(i,j,iblk) = 1.46e-4_dbl_kind ! Hibler 1979, N. Hem; 1/s
else if (trim(coriolis) == 'zero') then
fcorE_blk(i,j,iblk) = c0
fcorN_blk(i,j,iblk) = c0
else
fcorE_blk(i,j,iblk) = c2*omega*sin(ELAT(i,j,iblk)) ! 1/s
fcorN_blk(i,j,iblk) = c2*omega*sin(NLAT(i,j,iblk)) ! 1/s
endif

endif

Expand Down

0 comments on commit 5435aba

Please sign in to comment.