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

Feature/add icewave coupling fix #14

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
34d3566
Revert PIO_FILL_DOUBLE change for now
dabail10 Dec 17, 2021
dfc6a11
Add CESM1_PIO for fill value check (#675)
dabail10 Dec 18, 2021
9fb518e
- Update the namelist read to make the group order flexible. (#677)
apcraig Dec 22, 2021
05f2b5b
Port to Narwhal and add perf_suite (#678)
apcraig Jan 7, 2022
968b567
Add back in PIO_FILL_DOUBLE check for CESM
dabail10 Jan 27, 2022
d1e972a
Update OMP (#680)
apcraig Feb 18, 2022
bc210be
updating LICENSE.pdf for 2022
eclare108213 Feb 21, 2022
a59fa47
seabed stress - remove if statements (#673)
TillRasmussen Feb 23, 2022
8c23df8
- Update version and copyright. (#691)
apcraig Feb 23, 2022
8d7314f
add OMP_STACKSIZE for koehr (#693)
apcraig Feb 25, 2022
716417f
Merge branch 'CICE-Consortium:main' into nuopc
dabail10 Mar 10, 2022
7f1085b
Put back in the fix for eliminated land blocks
dabail10 Mar 10, 2022
03b9841
Add FillValue to restarts
dabail10 Mar 14, 2022
236f599
Fix fill values in restart and history_file length
dabail10 Mar 21, 2022
dc9e102
Merge branch 'nuopc_tmp' of https://github.com/ESCOMP/CICE into nuopc
dabail10 Mar 21, 2022
aa84d40
Merge branch 'cice6_20211214_branch' into nuopc
dabail10 Apr 21, 2022
4201c6e
Add stream number for history
dabail10 Apr 25, 2022
f5194e6
Use CICE internal calendar parameters
dabail10 Apr 27, 2022
11591d2
Add hist_streamnum logic
dabail10 Apr 27, 2022
1c2b9a5
Fix a couple issues with hist_streamnum
dabail10 Apr 28, 2022
15a65f1
Update namelist read logic
dabail10 Apr 27, 2022
c812965
updates to get wav/ice coupling working
Apr 24, 2022
ab40427
updates to have area correction factor calculated only if mesh_atm an…
Apr 24, 2022
d85480e
fix compilation problem
Apr 26, 2022
9a961a4
fixed compilation issues
Apr 26, 2022
a4c331c
removed explicit setting of area correction factors to 1
Apr 27, 2022
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
Binary file modified LICENSE.pdf
Binary file not shown.
13 changes: 6 additions & 7 deletions cicecore/cicedynB/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 Expand Up @@ -1706,7 +1705,7 @@ subroutine print_state(plabel,i,j,iblk)
! dynamics (transport and/or ridging) causes the floe size distribution to become non-normal
! if (tr_fsd) then
! if (abs(sum(trcrn(i,j,nt_fsd:nt_fsd+nfsd-1,n,iblk))-c1) > puny) &
! print*,'afsdn not normal', &
! write(nu_diag,*) 'afsdn not normal', &
! sum(trcrn(i,j,nt_fsd:nt_fsd+nfsd-1,n,iblk)), &
! trcrn(i,j,nt_fsd:nt_fsd+nfsd-1,n,iblk)
! endif
Expand Down
45 changes: 15 additions & 30 deletions cicecore/cicedynB/analysis/ice_history.F90
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ subroutine init_hist (dt)
integer (kind=int_kind), dimension(max_nstrm) :: &
ntmp
integer (kind=int_kind) :: nml_error ! namelist i/o error flag
character(len=char_len_long) :: tmpstr2 ! for namelist errors


character(len=*), parameter :: subname = '(init_hist)'

!-----------------------------------------------------------------
Expand Down Expand Up @@ -123,40 +122,27 @@ subroutine init_hist (dt)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
file=__FILE__, line=__LINE__)

call get_fileunit(nu_nml)
if (my_task == master_task) then
open (nu_nml, file=nml_filename, status='old',iostat=nml_error)
write(nu_diag,*) subname,' Reading icefields_nml'

call get_fileunit(nu_nml)
open (nu_nml, file=trim(nml_filename), status='old',iostat=nml_error)
if (nml_error /= 0) then
nml_error = -1
else
nml_error = 1
call abort_ice(subname//'ERROR: icefields_nml open file '// &
trim(nml_filename), &
file=__FILE__, line=__LINE__)
endif

nml_error = 1
do while (nml_error > 0)
read(nu_nml, nml=icefields_nml,iostat=nml_error)
if (nml_error /= 0) exit
end do
!if (nml_error == 0) close(nu_nml)

! check if there was an error.
! Write out errorneous line.
if (nml_error == 0) then
close(nu_nml) ! no error. close file
else ! nml_error not zero
! backspace, re-read erroneous line
backspace(nu_nml)
read(nu_nml,fmt='(A)') tmpstr2
if (nml_error /= 0) then
call abort_ice(subname//'ERROR: icefields_nml reading ', &
file=__FILE__, line=__LINE__)
endif

endif
call release_fileunit(nu_nml)

call broadcast_scalar(nml_error, master_task)
call broadcast_scalar(tmpstr2, master_task)
if (nml_error /= 0) then
close (nu_nml)
call abort_ice(subname//'ERROR: reading icefields_nml: ' // &
trim(tmpstr2), &
file=__FILE__, line=__LINE__)
close(nu_nml)
call release_fileunit(nu_nml)
endif

! histfreq options ('1','h','d','m','y')
Expand Down Expand Up @@ -1903,7 +1889,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
41 changes: 14 additions & 27 deletions cicecore/cicedynB/analysis/ice_history_bgc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ subroutine init_hist_bgc_2D
tr_bgc_DON, tr_bgc_Fe, tr_bgc_hum, &
skl_bgc, solve_zsal, z_tracers

character(len=char_len_long) :: tmpstr2 ! for namelist errors
character(len=*), parameter :: subname = '(init_hist_bgc_2D)'

call icepack_query_parameters(skl_bgc_out=skl_bgc, &
Expand All @@ -305,39 +304,27 @@ subroutine init_hist_bgc_2D
! read namelist
!-----------------------------------------------------------------

call get_fileunit(nu_nml)
if (my_task == master_task) then
open (nu_nml, file=nml_filename, status='old',iostat=nml_error)
write(nu_diag,*) subname,' Reading icefields_bgc_nml'

call get_fileunit(nu_nml)
open (nu_nml, file=trim(nml_filename), status='old',iostat=nml_error)
if (nml_error /= 0) then
nml_error = -1
else
nml_error = 1
call abort_ice(subname//'ERROR: icefields_bgc_nml open file '// &
trim(nml_filename), &
file=__FILE__, line=__LINE__)
endif

nml_error = 1
do while (nml_error > 0)
read(nu_nml, nml=icefields_bgc_nml,iostat=nml_error)
if (nml_error /= 0) exit
end do

! check if there was an error.
! Write out errorneous line.
if (nml_error == 0) then
close(nu_nml) ! no error. close file
else ! nml_error not zero
! backspace, re-read erroneous line
backspace(nu_nml)
read(nu_nml,fmt='(A)') tmpstr2
if (nml_error /= 0) then
call abort_ice(subname//'ERROR: icefields_bgc_nml reading ', &
file=__FILE__, line=__LINE__)
endif

endif
call release_fileunit(nu_nml)

call broadcast_scalar(nml_error, master_task)
call broadcast_scalar(tmpstr2, master_task)
if (nml_error /= 0) then
close (nu_nml)
call abort_ice(subname//'ERROR: reading icefields_bgc_nml: ' // &
trim(tmpstr2), &
file=__FILE__, line=__LINE__)
close(nu_nml)
call release_fileunit(nu_nml)
endif

if (.not. tr_iso) then
Expand Down
42 changes: 14 additions & 28 deletions cicecore/cicedynB/analysis/ice_history_drag.F90
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ subroutine init_hist_drag_2D
integer (kind=int_kind) :: ns
integer (kind=int_kind) :: nml_error ! namelist i/o error flag
logical (kind=log_kind) :: formdrag
character(len=char_len_long) :: tmpstr2 ! for namelist errors

character(len=*), parameter :: subname = '(init_hist_drag_2D)'

Expand All @@ -81,40 +80,27 @@ subroutine init_hist_drag_2D
! read namelist
!-----------------------------------------------------------------

call get_fileunit(nu_nml)
if (my_task == master_task) then
open (nu_nml, file=nml_filename, status='old',iostat=nml_error)
write(nu_diag,*) subname,' Reading icefields_drag_nml'

call get_fileunit(nu_nml)
open (nu_nml, file=trim(nml_filename), status='old',iostat=nml_error)
if (nml_error /= 0) then
nml_error = -1
else
nml_error = 1
call abort_ice(subname//'ERROR: icefields_drag_nml open file '// &
trim(nml_filename), &
file=__FILE__, line=__LINE__)
endif

nml_error = 1
do while (nml_error > 0)
read(nu_nml, nml=icefields_drag_nml,iostat=nml_error)
! if (nml_error > 0) read(nu_nml,*) ! for Nagware compiler
if (nml_error /= 0) exit
end do

! check if there was an error.
! Write out errorneous line.
if (nml_error == 0) then
close(nu_nml) ! no error. close file
else ! nml_error not zero
! backspace, re-read erroneous line
backspace(nu_nml)
read(nu_nml,fmt='(A)') tmpstr2
if (nml_error /= 0) then
call abort_ice(subname//'ERROR: icefields_drag_nml reading ', &
file=__FILE__, line=__LINE__)
endif

endif
call release_fileunit(nu_nml)

call broadcast_scalar(nml_error, master_task)
call broadcast_scalar(tmpstr2, master_task)
if (nml_error /= 0) then
close (nu_nml)
call abort_ice(subname//'ERROR: reading icefields_drag_nml: ' // &
trim(tmpstr2), &
file=__FILE__, line=__LINE__)
close(nu_nml)
call release_fileunit(nu_nml)
endif

call broadcast_scalar (f_Cdn_atm, master_task)
Expand Down
42 changes: 15 additions & 27 deletions cicecore/cicedynB/analysis/ice_history_fsd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ subroutine init_hist_fsd_2D
integer (kind=int_kind) :: nml_error ! namelist i/o error flag
real (kind=dbl_kind) :: secday
logical (kind=log_kind) :: tr_fsd, wave_spec
character(len=char_len_long) :: tmpstr2 ! for namelist errors


character(len=*), parameter :: subname = '(init_hist_fsd_2D)'

call icepack_query_tracer_flags(tr_fsd_out=tr_fsd)
Expand All @@ -97,38 +96,27 @@ subroutine init_hist_fsd_2D
! read namelist
!-----------------------------------------------------------------

call get_fileunit(nu_nml)
if (my_task == master_task) then
open (nu_nml, file=nml_filename, status='old',iostat=nml_error)
write(nu_diag,*) subname,' Reading icefields_fsd_nml'

call get_fileunit(nu_nml)
open (nu_nml, file=trim(nml_filename), status='old',iostat=nml_error)
if (nml_error /= 0) then
nml_error = -1
else
nml_error = 1
call abort_ice(subname//'ERROR: icefields_fsd_nml open file '// &
trim(nml_filename), &
file=__FILE__, line=__LINE__)
endif

nml_error = 1
do while (nml_error > 0)
read(nu_nml, nml=icefields_fsd_nml,iostat=nml_error)
if (nml_error /= 0) exit
end do

! check if there was an error.
! Write out errorneous line.
if (nml_error == 0) then
close(nu_nml) ! no error. close file
else ! nml_error not zero
! backspace, re-read erroneous line
backspace(nu_nml)
read(nu_nml,fmt='(A)') tmpstr2
if (nml_error /= 0) then
call abort_ice(subname//'ERROR: icefields_fsd_nml reading ', &
file=__FILE__, line=__LINE__)
endif
endif
call release_fileunit(nu_nml)

call broadcast_scalar(nml_error, master_task)
call broadcast_scalar(tmpstr2, master_task)
if (nml_error /= 0) then
close (nu_nml)
call abort_ice(subname//'ERROR: reading icefields_fsd_nml: '// &
trim(tmpstr2), &
file=__FILE__, line=__LINE__)
close(nu_nml)
call release_fileunit(nu_nml)
endif

call broadcast_scalar (f_afsd, master_task)
Expand Down
42 changes: 14 additions & 28 deletions cicecore/cicedynB/analysis/ice_history_mechred.F90
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ subroutine init_hist_mechred_2D
integer (kind=int_kind) :: nml_error ! namelist i/o error flag
real (kind=dbl_kind) :: secday
logical (kind=log_kind) :: tr_lvl
character(len=char_len_long) :: tmpstr2 ! for namelist errors

character(len=*), parameter :: subname = '(init_hist_mechred_2D)'

Expand All @@ -103,40 +102,27 @@ subroutine init_hist_mechred_2D
! read namelist
!-----------------------------------------------------------------

call get_fileunit(nu_nml)
if (my_task == master_task) then
open (nu_nml, file=nml_filename, status='old',iostat=nml_error)
write(nu_diag,*) subname,' Reading icefields_mechred_nml'

call get_fileunit(nu_nml)
open (nu_nml, file=trim(nml_filename), status='old',iostat=nml_error)
if (nml_error /= 0) then
nml_error = -1
else
nml_error = 1
call abort_ice(subname//'ERROR: icefields_mechred_nml open file '// &
trim(nml_filename), &
file=__FILE__, line=__LINE__)
endif

nml_error = 1
do while (nml_error > 0)
read(nu_nml, nml=icefields_mechred_nml,iostat=nml_error)
if (nml_error /= 0) exit
end do

! check if there was an error.
! Write out errorneous line.
if (nml_error == 0) then
close(nu_nml) ! no error. close file
else ! nml_error not zero
! backspace, re-read erroneous line
backspace(nu_nml)
read(nu_nml,fmt='(A)') tmpstr2
if (nml_error /= 0) then
call abort_ice(subname//'ERROR: icefields_mechred_nml reading ', &
file=__FILE__, line=__LINE__)
endif


endif
call release_fileunit(nu_nml)

call broadcast_scalar(nml_error, master_task)
call broadcast_scalar(tmpstr2, master_task)
if (nml_error /= 0) then
close (nu_nml)
call abort_ice(subname//'ERROR: reading icefields_mechred_nml: ' // &
trim(tmpstr2), &
file=__FILE__, line=__LINE__)
close(nu_nml)
call release_fileunit(nu_nml)
endif

if (.not. tr_lvl) then
Expand Down
Loading