Skip to content

Commit

Permalink
Update CICE to Consortium/main (NOAA-EMC#48)
Browse files Browse the repository at this point in the history
Update OpenMP directives as needed including validation via new omp_suite. Fixed OpenMP in dynamics.
Refactored eap puny/pi lookups to improve scalar performance
Update Tsfc implementation to make sure land blocks don't set Tsfc to freezing temp
Update for sea bed stress calculations

fix comment, fix env for orion and hera

replace save_init with step_prep in CICE_RunMod

fixes for cgrid repro

remove added haloupdates

* baselines pass with these extra halo updates removed

change F->S for ocean velocities and tilts

fix debug failure when grid_ice=C

* compiling in debug mode using -init=snan,arrays requires
initialization of variables

respond to review comments

remove inserted whitespace for uvelE,N and vvelE,N
  • Loading branch information
DeniseWorthen committed May 10, 2024
1 parent 8d02a82 commit cb178b8
Show file tree
Hide file tree
Showing 67 changed files with 6,863 additions and 2,101 deletions.
Binary file modified LICENSE.pdf
Binary file not shown.
11 changes: 5 additions & 6 deletions cicecore/cicedyn/analysis/ice_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ subroutine runtime_diags (dt)
fisoon(n) = fisoon(n)*dt
fisoos(n) = fisoos(n)*dt

!$OMP PARALLEL DO PRIVATE(iblk,i,j)
!$OMP PARALLEL DO PRIVATE(iblk,i,j,k)
do iblk = 1, nblocks
do j = 1, ny_block
do i = 1, nx_block
Expand Down Expand Up @@ -1214,7 +1214,7 @@ subroutine init_mass_diags

if (tr_iso) then
do n=1,n_iso
!$OMP PARALLEL DO PRIVATE(iblk,i,j)
!$OMP PARALLEL DO PRIVATE(iblk,i,j,k)
do iblk = 1, nblocks
do j = 1, ny_block
do i = 1, nx_block
Expand Down Expand Up @@ -1317,7 +1317,6 @@ subroutine total_energy (work)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
file=__FILE__, line=__LINE__)

! MHRI: CHECK THIS OMP
!$OMP PARALLEL DO PRIVATE(iblk,i,j,n,k,ij,icells,indxi,indxj)
do iblk = 1, nblocks

Expand Down Expand Up @@ -1405,7 +1404,6 @@ subroutine total_salt (work)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
file=__FILE__, line=__LINE__)

! MHRI: CHECK THIS OMP
!$OMP PARALLEL DO PRIVATE(iblk,i,j,n,k,ij,icells,indxi,indxj)
do iblk = 1, nblocks

Expand Down Expand Up @@ -1513,7 +1511,8 @@ subroutine init_diags
if (abs(latpnt(n)) < c360 .and. abs(lonpnt(n)) < c360) then

! MDT, 09/2017: Comment out OpenMP directives since loop is not thread-safe
!!$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,latdis,londis,totdis)
! This is computing closest point, Could add a CRITICAL but it's just initialization
!!$XXXOMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,latdis,londis,totdis)
do iblk = 1, nblocks
this_block = get_block(blocks_ice(iblk),iblk)
ilo = this_block%ilo
Expand All @@ -1538,7 +1537,7 @@ subroutine init_diags
enddo ! i
enddo ! j
enddo ! iblk
!!$OMP END PARALLEL DO
!!$XXXOMP END PARALLEL DO

endif

Expand Down
1 change: 0 additions & 1 deletion cicecore/cicedyn/analysis/ice_history.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1887,7 +1887,6 @@ subroutine accum_hist (dt)
! increment field
!---------------------------------------------------------------

! MHRI: CHECK THIS OMP ... Maybe ok after "dfresh,dfsalt" added
!$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block, &
!$OMP k,n,qn,ns,sn,rho_ocn,rho_ice,Tice,Sbr,phi,rhob,dfresh,dfsalt, &
!$OMP worka,workb,worka3,Tinz4d,Sinz4d,Tsnz4d)
Expand Down
Loading

0 comments on commit cb178b8

Please sign in to comment.