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

nuopc/cmeps driver updates #668

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
0338d04
Merge pull request #1 from CICE-Consortium/master
DeniseWorthen Feb 25, 2020
99470ed
Merge pull request #2 from CICE-Consortium/master
DeniseWorthen Mar 7, 2020
71d2ded
Merge pull request #3 from CICE-Consortium/master
DeniseWorthen Apr 2, 2020
d46d691
merge latest master (#4)
DeniseWorthen Apr 22, 2020
183218a
updated orbital calculations needed for cesm
Apr 23, 2020
10e7c20
fixed problems in updated orbital calculations needed for cesm
Apr 29, 2020
ce8e5a9
update CICE6 to support coupling with UFS
apcraig May 10, 2020
8f0b5ee
Merge pull request #2 from apcraig/ufs01
dabail10 May 10, 2020
7ac0e3d
Merge pull request #1 from ESCOMP/nuopc
DeniseWorthen May 12, 2020
80c9e6e
Merge branch 'master' of https://github.com/CICE-Consortium/CICE into…
dabail10 May 19, 2020
53715ea
put in changes so that both ufsatm and cesm requirements for potentia…
May 25, 2020
7e43703
Merge pull request #3 from mvertens/mvertens/nuopc
dabail10 May 26, 2020
397e588
Merge remote-tracking branch 'upstream/master'
DeniseWorthen Jun 2, 2020
3bb3694
Convergence on ustar for CICE. (#452) (#5)
DeniseWorthen Jun 5, 2020
f41f1e9
Merge remote-tracking branch 'upstream/nuopc' into HEAD
DeniseWorthen Jun 22, 2020
e70d1ab
update icepack submodule
DeniseWorthen Jun 22, 2020
308a1d4
Revert "update icepack submodule"
DeniseWorthen Jun 22, 2020
7848fdf
Merge branch 'master' of https://github.com/CICE-Consortium/CICE into…
dabail10 Jun 24, 2020
6982ee4
Merge remote-tracking branch 'upstream/nuopc' into HEAD
DeniseWorthen Jun 25, 2020
089f60f
update comp_ice.backend with temporary ice_timers fix
DeniseWorthen Jun 25, 2020
6affdcf
Merge branch 'master' of https://github.com/CICE-Consortium/CICE into…
dabail10 Jun 29, 2020
b5a6058
Merge branch 'master' of https://github.com/CICE-Consortium/CICE into…
dabail10 Jul 1, 2020
415df0e
Merge branch 'nuopc' of https://github.com/ESCOMP/CICE into nuopc
dabail10 Jul 1, 2020
b4da8a6
Merge branch 'master' of https://github.com/CICE-Consortium/CICE into…
dabail10 Jul 1, 2020
239c7de
Merge branch 'nuopc' of https://github.com/ESCOMP/CICE into nuopc
dabail10 Jul 1, 2020
ad03424
Fix threading problem in init_bgc
dabail10 Jul 1, 2020
73e7774
Fix additional OMP problems
dabail10 Jul 1, 2020
46fcfba
changes for coldstart running
DeniseWorthen Jul 2, 2020
c762336
Move the forapps directory
dabail10 Jul 2, 2020
6bccf71
remove cesmcoupled ifdefs
DeniseWorthen Jul 2, 2020
902e883
Fix logging issues for NUOPC
dabail10 Jul 2, 2020
178693a
Merge branch 'nuopc' of https://github.com/ESCOMP/CICE into nuopc
dabail10 Jul 2, 2020
b4afd2e
removal of many cpp-ifdefs
Jul 4, 2020
3a1b88b
fix compile errors
DeniseWorthen Jul 4, 2020
41855fd
fixes to get cesm working
Jul 4, 2020
aea1aa8
update to latest nuopc changes
Jul 4, 2020
e4c989c
Merge branch 'master' of https://github.com/CICE-Consortium/CICE into…
dabail10 Jul 6, 2020
30a81cc
fixed white space issue
Jul 7, 2020
8ebdda9
Merge pull request #4 from mvertens/nuopc
dabail10 Jul 7, 2020
27dd3b7
Add restart_coszen namelist option
dabail10 Jul 7, 2020
50bf856
Merge remote-tracking branch 'upstream/master'
DeniseWorthen Jul 7, 2020
6b4a277
Merge branch 'nuopc' into coszen
dabail10 Jul 7, 2020
93f0e86
Merge pull request #5 from ESCOMP/coszen
dabail10 Jul 7, 2020
f92bef3
update icepack submodule
DeniseWorthen Jul 7, 2020
4e8cc79
Merge remote-tracking branch 'upstream/nuopc' into emc/develop
DeniseWorthen Jul 7, 2020
8ff4ee0
change Orion to orion in backend
DeniseWorthen Jul 7, 2020
916c6af
add -link_mpi=dbg to debug flags (#8)
DeniseWorthen Jul 14, 2020
9bdb9ad
Merge remote-tracking branch 'CICE-Consortium/master' into emc/develop
DeniseWorthen Jul 15, 2020
8f37bfc
cice6 compile (#6)
MinsukJi-NOAA Jul 17, 2020
86b8dab
Merge remote-tracking branch 'upstream/emc/develop' into HEAD
DeniseWorthen Jul 17, 2020
c084de4
Merge remote-tracking branch 'upstream/master' into emc/develop
DeniseWorthen Jul 17, 2020
88cc2fd
Merge remote-tracking branch 'upstream/master' into emc/develop
DeniseWorthen Aug 5, 2020
bdf1a1f
changes for consistency w/ current emc-cice5 (#13)
DeniseWorthen Aug 12, 2020
5ecde75
Merge remote-tracking branch 'upstream/emc/develop' into emc/develop
DeniseWorthen Aug 12, 2020
d81a834
Fixcommit (#14)
DeniseWorthen Aug 13, 2020
4d7ba5b
Merge remote-tracking branch 'upstream/master' into emc/develop
DeniseWorthen Aug 13, 2020
5dcfca8
Merge remote-tracking branch 'upstream/emc/develop' into emc/develop
DeniseWorthen Aug 13, 2020
285985c
Update CICE6 for integration to S2S
DeniseWorthen Aug 31, 2020
6d30789
Merge remote-tracking branch 'upstream/emc/develop' into emc/develop
DeniseWorthen Aug 31, 2020
8129aab
Merge remote-tracking branch 'consortium/master' into emc/develop
DeniseWorthen Aug 31, 2020
ac617cd
Support TACC stampede (#19)
MinsukJi-NOAA Oct 8, 2020
23cdee7
Merge remote-tracking branch 'upstream/emc/develop' into emc/develop
DeniseWorthen Oct 8, 2020
1e4f42b
update icepack
DeniseWorthen Oct 30, 2020
2515f77
Merge remote-tracking branch 'consortium/master' into feature/updcice
DeniseWorthen Oct 30, 2020
41afe74
add ice_dyn_vp module to CICE_InitMod
DeniseWorthen Oct 30, 2020
2a0f332
update gitmodules, update icepack
DeniseWorthen Nov 10, 2020
f773ef3
Update CICE to consortium master (#23)
DeniseWorthen Nov 10, 2020
840e931
Merge remote-tracking branch 'upstream/emc/develop' into emc/develop
DeniseWorthen Nov 10, 2020
1e4d393
Merge remote-tracking branch 'upstream/emc/develop' into feature/updcice
DeniseWorthen Mar 14, 2021
66546ae
Merge remote-tracking branch 'Consortium/master' into feature/updcice
DeniseWorthen Mar 14, 2021
2eca569
update icepack
DeniseWorthen Apr 5, 2021
b52e91c
Merge remote-tracking branch 'upstream/emc/develop' into emc/develop
DeniseWorthen Apr 5, 2021
51db2f9
Merge remote-tracking branch 'Consortium/master' into feature/updcice
DeniseWorthen Jun 1, 2021
d8fb6d9
switch icepack branches
DeniseWorthen Jun 2, 2021
9a76541
update icepack
DeniseWorthen Jun 4, 2021
519d339
Update CICE to latest Consortium master (#26)
DeniseWorthen Jun 4, 2021
74e7b58
Merge remote-tracking branch 'upstream/emc/develop' into emc/develop
DeniseWorthen Jun 5, 2021
9d88d92
add cice changes for zlvs (#29)
DeniseWorthen Jun 10, 2021
d1f2d15
Merge remote-tracking branch 'upstream/emc/develop' into emc/develop
DeniseWorthen Jun 11, 2021
0c39047
Merge branch 'emc/develop' into feature/updcice
DeniseWorthen Jun 24, 2021
f3b2652
update icepack and pointer
DeniseWorthen Jun 24, 2021
9057817
Merge remote-tracking branch 'Consortium/master' into feature/updcice
DeniseWorthen Jun 24, 2021
1721728
Merge remote-tracking branch 'Consortium/master' into feature/updcice
DeniseWorthen Jul 2, 2021
55586f7
update icepack and revert gitmodules
DeniseWorthen Jul 20, 2021
7f089d0
add memory profiling (#36)
DeniseWorthen Aug 23, 2021
2540695
Update CICE for latest Consortium master (#38)
DeniseWorthen Sep 16, 2021
d95bd51
Use CICE-Consortium/Icepack master (#40)
DeniseWorthen Oct 1, 2021
8d4a3c6
recreate cap update branch (#42)
DeniseWorthen Nov 22, 2021
4442246
Merge remote-tracking branch 'Consortium/main' into feature/nuopc_dri…
DeniseWorthen Nov 26, 2021
fb216b6
remove ITDrdg nml file
DeniseWorthen Nov 26, 2021
f9d0c47
Merge remote-tracking branch 'Consortium/main' into feature/nuopc_dri…
DeniseWorthen Nov 29, 2021
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
49 changes: 40 additions & 9 deletions cicecore/drivers/nuopc/cmeps/CICE_InitMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module CICE_InitMod
use icepack_intfc, only: icepack_aggregate
use icepack_intfc, only: icepack_init_itd, icepack_init_itd_hist
use icepack_intfc, only: icepack_init_fsd_bounds, icepack_init_wave
use icepack_intfc, only: icepack_init_snow
use icepack_intfc, only: icepack_configure
use icepack_intfc, only: icepack_warnings_flush, icepack_warnings_aborted
use icepack_intfc, only: icepack_query_parameters, icepack_query_tracer_flags
Expand Down Expand Up @@ -83,7 +84,7 @@ subroutine cice_init2()
use ice_dyn_vp , only: init_vp
use ice_flux , only: init_coupler_flux, init_history_therm
use ice_flux , only: init_history_dyn, init_flux_atm, init_flux_ocn
use ice_forcing , only: init_forcing_ocn
use ice_forcing , only: init_forcing_ocn, init_snowtable
use ice_forcing_bgc , only: get_forcing_bgc, get_atm_bgc
use ice_forcing_bgc , only: faero_default, faero_optics, alloc_forcing_bgc, fiso_default
use ice_history , only: init_hist, accum_hist
Expand All @@ -95,7 +96,8 @@ subroutine cice_init2()
use ice_transport_driver , only: init_transport

logical(kind=log_kind) :: tr_aero, tr_zaero, skl_bgc, z_tracers
logical(kind=log_kind) :: tr_iso, tr_fsd, wave_spec
logical(kind=log_kind) :: tr_iso, tr_fsd, wave_spec, tr_snow
character(len=char_len) :: snw_aging_table
character(len=*), parameter :: subname = '(cice_init2)'
!----------------------------------------------------

Expand Down Expand Up @@ -145,7 +147,7 @@ subroutine cice_init2()
call ice_HaloRestore_init ! restored boundary conditions

call icepack_query_parameters(skl_bgc_out=skl_bgc, z_tracers_out=z_tracers, &
wave_spec_out=wave_spec)
wave_spec_out=wave_spec, snw_aging_table_out=snw_aging_table)
call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(trim(subname), &
file=__FILE__,line= __LINE__)
Expand All @@ -158,7 +160,7 @@ subroutine cice_init2()
call init_history_dyn ! initialize dynamic history variables

call icepack_query_tracer_flags(tr_aero_out=tr_aero, tr_zaero_out=tr_zaero)
call icepack_query_tracer_flags(tr_iso_out=tr_iso)
call icepack_query_tracer_flags(tr_iso_out=tr_iso, tr_snow_out=tr_snow)
call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(trim(subname), &
file=__FILE__,line= __LINE__)
Expand All @@ -167,6 +169,17 @@ subroutine cice_init2()
call faero_optics !initialize aerosol optical property tables
end if

! snow aging lookup table initialization
if (tr_snow) then ! advanced snow physics
call icepack_init_snow()
call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
file=__FILE__, line=__LINE__)
if (snw_aging_table(1:4) /= 'test') then
call init_snowtable()
endif
endif

! Initialize shortwave components using swdn from previous timestep
! if restarting. These components will be scaled to current forcing
! in prep_radiation.
Expand Down Expand Up @@ -199,19 +212,20 @@ subroutine init_restart()
use ice_calendar, only: calendar
use ice_constants, only: c0
use ice_domain, only: nblocks
use ice_domain_size, only: ncat, n_iso, n_aero, nfsd
use ice_domain_size, only: ncat, n_iso, n_aero, nfsd, nslyr
use ice_dyn_eap, only: read_restart_eap
use ice_dyn_shared, only: kdyn
use ice_grid, only: tmask
use ice_init, only: ice_ic
use ice_init_column, only: init_age, init_FY, init_lvl, &
use ice_init_column, only: init_age, init_FY, init_lvl, init_snowtracers, &
init_meltponds_cesm, init_meltponds_lvl, init_meltponds_topo, &
init_isotope, init_aerosol, init_hbrine, init_bgc, init_fsd
use ice_restart_column, only: restart_age, read_restart_age, &
restart_FY, read_restart_FY, restart_lvl, read_restart_lvl, &
restart_pond_cesm, read_restart_pond_cesm, &
restart_pond_lvl, read_restart_pond_lvl, &
restart_pond_topo, read_restart_pond_topo, &
restart_snow, read_restart_snow, &
restart_fsd, read_restart_fsd, &
restart_iso, read_restart_iso, &
restart_aero, read_restart_aero, &
Expand All @@ -226,12 +240,13 @@ subroutine init_restart()
iblk ! block index
logical(kind=log_kind) :: &
tr_iage, tr_FY, tr_lvl, tr_pond_cesm, tr_pond_lvl, &
tr_pond_topo, tr_fsd, tr_iso, tr_aero, tr_brine, &
tr_pond_topo, tr_fsd, tr_iso, tr_aero, tr_brine, tr_snow, &
skl_bgc, z_tracers, solve_zsal
integer(kind=int_kind) :: &
ntrcr
integer(kind=int_kind) :: &
nt_alvl, nt_vlvl, nt_apnd, nt_hpnd, nt_ipnd, &
nt_smice, nt_smliq, nt_rhos, nt_rsnw, &
nt_iage, nt_FY, nt_aero, nt_fsd, nt_isosno, nt_isoice

character(len=*), parameter :: subname = '(init_restart)'
Expand All @@ -247,10 +262,12 @@ subroutine init_restart()
call icepack_query_tracer_flags(tr_iage_out=tr_iage, tr_FY_out=tr_FY, &
tr_lvl_out=tr_lvl, tr_pond_cesm_out=tr_pond_cesm, tr_pond_lvl_out=tr_pond_lvl, &
tr_pond_topo_out=tr_pond_topo, tr_aero_out=tr_aero, tr_brine_out=tr_brine, &
tr_fsd_out=tr_fsd, tr_iso_out=tr_iso)
tr_snow_out=tr_snow, tr_fsd_out=tr_fsd, tr_iso_out=tr_iso)
call icepack_query_tracer_indices(nt_alvl_out=nt_alvl, nt_vlvl_out=nt_vlvl, &
nt_apnd_out=nt_apnd, nt_hpnd_out=nt_hpnd, nt_ipnd_out=nt_ipnd, &
nt_iage_out=nt_iage, nt_FY_out=nt_FY, nt_aero_out=nt_aero, nt_fsd_out=nt_fsd, &
nt_smice_out=nt_smice, nt_smliq_out=nt_smliq, &
nt_rhos_out=nt_rhos, nt_rsnw_out=nt_rsnw, &
nt_isosno_out=nt_isosno, nt_isoice_out=nt_isoice)
call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
Expand Down Expand Up @@ -347,6 +364,21 @@ subroutine init_restart()
enddo ! iblk
endif ! .not. restart_pond
endif
! snow redistribution/metamorphism
if (tr_snow) then
if (trim(runtype) == 'continue') restart_snow = .true.
if (restart_snow) then
call read_restart_snow
else
do iblk = 1, nblocks
call init_snowtracers(trcrn(:,:,nt_smice:nt_smice+nslyr-1,:,iblk), &
trcrn(:,:,nt_smliq:nt_smliq+nslyr-1,:,iblk), &
trcrn(:,:,nt_rhos :nt_rhos +nslyr-1,:,iblk), &
trcrn(:,:,nt_rsnw :nt_rsnw +nslyr-1,:,iblk))
enddo ! iblk
endif
endif

! floe size distribution
if (tr_fsd) then
if (trim(runtype) == 'continue') restart_fsd = .true.
Expand Down Expand Up @@ -441,7 +473,6 @@ subroutine init_restart()
call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
file=__FILE__, line=__LINE__)

end subroutine init_restart

!=======================================================================
Expand Down
80 changes: 73 additions & 7 deletions cicecore/drivers/nuopc/cmeps/CICE_RunMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ subroutine ice_step
use ice_boundary, only: ice_HaloUpdate
use ice_calendar, only: dt, dt_dyn, ndtd, diagfreq, write_restart, istep
use ice_calendar, only: idate, msec
use ice_diagnostics, only: init_mass_diags, runtime_diags
use ice_diagnostics, only: init_mass_diags, runtime_diags, debug_model, debug_ice
use ice_diagnostics_bgc, only: hbrine_diags, zsal_diags, bgc_diags
use ice_domain, only: halo_info, nblocks
use ice_dyn_eap, only: write_restart_eap
Expand All @@ -123,12 +123,13 @@ subroutine ice_step
use ice_restart_column, only: write_restart_age, write_restart_FY, &
write_restart_lvl, write_restart_pond_cesm, write_restart_pond_lvl, &
write_restart_pond_topo, write_restart_aero, write_restart_fsd, &
write_restart_iso, write_restart_bgc, write_restart_hbrine
write_restart_iso, write_restart_bgc, write_restart_hbrine, &
write_restart_snow
use ice_restart_driver, only: dumpfile
use ice_restoring, only: restore_ice, ice_HaloRestore
use ice_step_mod, only: prep_radiation, step_therm1, step_therm2, &
update_state, step_dyn_horiz, step_dyn_ridge, step_radiation, &
biogeochemistry, save_init, step_dyn_wave
biogeochemistry, save_init, step_dyn_wave, step_snow
use ice_timers, only: ice_timer_start, ice_timer_stop, &
timer_diags, timer_column, timer_thermo, timer_bound, &
timer_hist, timer_readwrite
Expand All @@ -144,19 +145,28 @@ subroutine ice_step
offset ! d(age)/dt time offset

logical (kind=log_kind) :: &
tr_iage, tr_FY, tr_lvl, tr_fsd, &
tr_iage, tr_FY, tr_lvl, tr_fsd, tr_snow, &
tr_pond_cesm, tr_pond_lvl, tr_pond_topo, tr_brine, tr_iso, tr_aero, &
calc_Tsfc, skl_bgc, solve_zsal, z_tracers, wave_spec

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

character (len=char_len) :: plabeld

if (debug_model) then
plabeld = 'beginning time step'
do iblk = 1, nblocks
call debug_ice (iblk, plabeld)
enddo
endif

call icepack_query_parameters(calc_Tsfc_out=calc_Tsfc, skl_bgc_out=skl_bgc, &
solve_zsal_out=solve_zsal, z_tracers_out=z_tracers, ktherm_out=ktherm, &
wave_spec_out=wave_spec)
call icepack_query_tracer_flags(tr_iage_out=tr_iage, tr_FY_out=tr_FY, &
tr_lvl_out=tr_lvl, tr_pond_cesm_out=tr_pond_cesm, tr_pond_lvl_out=tr_pond_lvl, &
tr_pond_topo_out=tr_pond_topo, tr_brine_out=tr_brine, tr_aero_out=tr_aero, &
tr_iso_out=tr_iso, tr_fsd_out=tr_fsd)
tr_iso_out=tr_iso, tr_fsd_out=tr_fsd, tr_snow_out=tr_snow)
call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
file=__FILE__, line=__LINE__)
Expand Down Expand Up @@ -201,15 +211,33 @@ subroutine ice_step
!-----------------------------------------------------------------

if (calc_Tsfc) call prep_radiation (iblk)
if (debug_model) then
plabeld = 'post prep_radiation'
call debug_ice (iblk, plabeld)
endif

!-----------------------------------------------------------------
! thermodynamics and biogeochemistry
!-----------------------------------------------------------------

call step_therm1 (dt, iblk) ! vertical thermodynamics
if (debug_model) then
plabeld = 'post step_therm1'
call debug_ice (iblk, plabeld)
endif

call biogeochemistry (dt, iblk) ! biogeochemistry
if (debug_model) then
plabeld = 'post biogeochemistry'
call debug_ice (iblk, plabeld)
endif

if (.not.prescribed_ice) &
call step_therm2 (dt, iblk) ! ice thickness distribution thermo
if (debug_model) then
plabeld = 'post step_therm2'
call debug_ice (iblk, plabeld)
endif

endif ! ktherm > 0

Expand Down Expand Up @@ -237,19 +265,37 @@ subroutine ice_step

! momentum, stress, transport
call step_dyn_horiz (dt_dyn)
if (debug_model) then
plabeld = 'post step_dyn_horiz'
do iblk = 1, nblocks
call debug_ice (iblk, plabeld)
enddo ! iblk
endif

! ridging
!$OMP PARALLEL DO PRIVATE(iblk)
do iblk = 1, nblocks
if (kridge > 0) call step_dyn_ridge (dt_dyn, ndtd, iblk)
enddo
!$OMP END PARALLEL DO
if (debug_model) then
plabeld = 'post step_dyn_ridge'
do iblk = 1, nblocks
call debug_ice (iblk, plabeld)
enddo ! iblk
endif

! clean up, update tendency diagnostics
offset = c0
call update_state (dt_dyn, daidtd, dvidtd, dagedtd, offset)

enddo
if (debug_model) then
plabeld = 'post dynamics'
do iblk = 1, nblocks
call debug_ice (iblk, plabeld)
enddo
endif

endif ! not prescribed ice

Expand All @@ -260,18 +306,36 @@ subroutine ice_step
call ice_timer_start(timer_column) ! column physics
call ice_timer_start(timer_thermo) ! thermodynamics

!-----------------------------------------------------------------
! snow redistribution and metamorphosis
!-----------------------------------------------------------------

if (tr_snow) then ! advanced snow physics
do iblk = 1, nblocks
call step_snow (dt, iblk)
enddo
call update_state (dt) ! clean up
endif

!MHRI: CHECK THIS OMP
!$OMP PARALLEL DO PRIVATE(iblk)
do iblk = 1, nblocks

if (ktherm >= 0) call step_radiation (dt, iblk)
if (debug_model) then
plabeld = 'post step_radiation'
call debug_ice (iblk, plabeld)
endif

!-----------------------------------------------------------------
! get ready for coupling and the next time step
!-----------------------------------------------------------------

call coupling_prep (iblk)

if (debug_model) then
plabeld = 'post coupling_prep'
call debug_ice (iblk, plabeld)
endif
enddo ! iblk
!$OMP END PARALLEL DO

Expand Down Expand Up @@ -309,6 +373,7 @@ subroutine ice_step
if (tr_pond_cesm) call write_restart_pond_cesm
if (tr_pond_lvl) call write_restart_pond_lvl
if (tr_pond_topo) call write_restart_pond_topo
if (tr_snow) call write_restart_snow
if (tr_fsd) call write_restart_fsd
if (tr_iso) call write_restart_iso
if (tr_aero) call write_restart_aero
Expand Down Expand Up @@ -634,11 +699,12 @@ subroutine sfcflux_to_ocn(nx_block, ny_block, &

real (kind=dbl_kind) :: &
puny, & !
Lsub, & !
rLsub ! 1/Lsub

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

call icepack_query_parameters(puny_out=puny)
call icepack_query_parameters(puny_out=puny, Lsub_out=Lsub)
call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
file=__FILE__, line=__LINE__)
Expand Down
15 changes: 15 additions & 0 deletions cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ module ice_comp_nuopc
integer :: nthrds ! Number of threads to use in this component

integer :: dbug = 0
logical :: profile_memory = .false.
integer , parameter :: debug_import = 0 ! internal debug level
integer , parameter :: debug_export = 0 ! internal debug level
character(*), parameter :: modName = "(ice_comp_nuopc)"
Expand Down Expand Up @@ -157,6 +158,10 @@ subroutine InitializeP0(gcomp, importState, exportState, clock, rc)
type(ESMF_State) :: importState, exportState
type(ESMF_Clock) :: clock
integer, intent(out) :: rc

logical :: isPresent, isSet
character(len=64) :: value
character(len=char_len_long) :: logmsg
!--------------------------------

rc = ESMF_SUCCESS
Expand All @@ -166,6 +171,14 @@ subroutine InitializeP0(gcomp, importState, exportState, clock, rc)
acceptStringList=(/"IPDv01p"/), rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

profile_memory = .false.
call NUOPC_CompAttributeGet(gcomp, name="ProfileMemory", value=value, &
isPresent=isPresent, isSet=isSet, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
if (isPresent .and. isSet) profile_memory=(trim(value)=="true")
write(logmsg,*) profile_memory
call ESMF_LogWrite('CICE_cap:ProfileMemory = '//trim(logmsg), ESMF_LOGMSG_INFO)

end subroutine InitializeP0

!===============================================================================
Expand Down Expand Up @@ -1049,7 +1062,9 @@ subroutine ModelAdvance(gcomp, rc)
! Advance cice and timestep update
!--------------------------------

if(profile_memory) call ESMF_VMLogMemInfo("Entering CICE_Run : ")
call CICE_Run()
if(profile_memory) call ESMF_VMLogMemInfo("Leaving CICE_Run : ")

!--------------------------------
! Create export state
Expand Down
2 changes: 1 addition & 1 deletion cicecore/drivers/nuopc/cmeps/ice_import_export.F90
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ subroutine ice_import( importState, rc )
rhoa(i,j,iblk) = inst_pres_height_lowest / &
(287.058_ESMF_KIND_R8*(1._ESMF_KIND_R8+0.608_ESMF_KIND_R8*Qa(i,j,iblk))*Tair(i,j,iblk))
else
rhoa(i,j,iblk) = 0._ESMF_KIND_R8
rhoa(i,j,iblk) = 1.2_ESMF_KIND_R8
endif
end do !i
end do !j
Expand Down