Skip to content

Commit

Permalink
Changes to support NUOPC in CESM and OMP bug fixes. (CICE-Consortium#478
Browse files Browse the repository at this point in the history
)

* updated orbital calculations needed for cesm

* fixed problems in updated orbital calculations needed for cesm

* update CICE6 to support coupling with UFS

* put in changes so that both ufsatm and cesm requirements for potential temperature and density are satisfied

* Fix threading problem in init_bgc

* Fix additional OMP problems

* Move the forapps directory

* Fix logging issues for NUOPC

Co-authored-by: Mariana Vertenstein <mvertens@ucar.edu>
Co-authored-by: apcraig <anthony.p.craig@gmail.com>
  • Loading branch information
3 people authored Jul 3, 2020
1 parent 55ca18b commit ed78a99
Show file tree
Hide file tree
Showing 13 changed files with 766 additions and 207 deletions.
2 changes: 1 addition & 1 deletion cicecore/cicedynB/general/ice_init.F90
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ subroutine input_data
ice_ic /= 'none' .and. ice_ic /= 'default') then
if (my_task == master_task) then
write(nu_diag,*) subname//' ERROR: runtype, restart, ice_ic are inconsistent:'
write(nu_diag,*) subname//' ERROR: runtype=',trim(runtype), 'restart=',restart, 'ice_ic=',trim(ice_ic)
write(nu_diag,*) subname//' ERROR: runtype=',trim(runtype), ' restart=',restart, ' ice_ic=',trim(ice_ic)
write(nu_diag,*) subname//' ERROR: Please review user guide'
endif
abort_list = trim(abort_list)//":1"
Expand Down
10 changes: 3 additions & 7 deletions cicecore/drivers/nuopc/cmeps/CICE_InitMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ end subroutine CICE_Initialize
!
! Initialize CICE model.

subroutine cice_init(mpicom_ice)
subroutine cice_init

use ice_arrays_column, only: hin_max, c_hi_range, alloc_arrays_column
use ice_arrays_column, only: floe_rad_l, floe_rad_c, &
Expand All @@ -66,7 +66,7 @@ subroutine cice_init(mpicom_ice)
use ice_flux_bgc, only: alloc_flux_bgc
use ice_calendar, only: dt, dt_dyn, time, istep, istep1, write_ic, &
init_calendar, calendar
use ice_communicate, only: init_communicate, my_task, master_task
use ice_communicate, only: my_task, master_task
use ice_diagnostics, only: init_diags
use ice_domain, only: init_domain_blocks
use ice_domain_size, only: ncat, nfsd
Expand All @@ -91,14 +91,10 @@ subroutine cice_init(mpicom_ice)
use drv_forcing, only: sst_sss
#endif

integer (kind=int_kind), optional, intent(in) :: &
mpicom_ice ! communicator for sequential ccsm

logical(kind=log_kind) :: tr_aero, tr_zaero, skl_bgc, z_tracers, &
tr_iso, tr_fsd, wave_spec
character(len=*), parameter :: subname = '(cice_init)'

call init_communicate(mpicom_ice) ! initial setup for message passing
call init_fileunits ! unit numbers

call icepack_configure() ! initialize icepack
Expand Down Expand Up @@ -204,9 +200,9 @@ subroutine cice_init(mpicom_ice)
! coupler communication or forcing data initialization
!--------------------------------------------------------------------

#ifndef coupled
call init_forcing_atmo ! initialize atmospheric forcing (standalone)

#ifndef coupled
#ifndef CESMCOUPLED
if (tr_fsd .and. wave_spec) call get_wave_spec ! wave spectrum in ice
call get_forcing_atmo ! atmospheric forcing from data
Expand Down
6 changes: 5 additions & 1 deletion cicecore/drivers/nuopc/cmeps/CICE_RunMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
module CICE_RunMod

use ice_kinds_mod
#ifdef CESMCOUPLED
use perf_mod, only : t_startf, t_stopf, t_barrierf
#endif
use ice_fileunits, only: nu_diag
use ice_arrays_column, only: oceanmixed_ice
use ice_constants, only: c0, c1
Expand Down Expand Up @@ -207,12 +209,14 @@ subroutine ice_step
call init_history_bgc
call ice_timer_stop(timer_diags) ! diagnostics/history

#ifdef CESMCOUPLED
if (prescribed_ice) then ! read prescribed ice
call t_barrierf('cice_run_presc_BARRIER',MPI_COMM_ICE)
call t_startf ('cice_run_presc')
call ice_prescribed_run(idate, sec)
call t_stopf ('cice_run_presc')
endif
#endif

call save_init

Expand Down Expand Up @@ -374,7 +378,7 @@ subroutine coupling_prep (iblk)
fsens, flat, fswabs, flwout, evap, Tref, Qref, &
scale_fluxes, frzmlt_init, frzmlt, Uref, wind
use ice_flux_bgc, only: faero_ocn, fiso_ocn, Qref_iso, fiso_evap, &
fzsal_ai, fzsal_g_ai, flux_bio, flux_bio_ai
fzsal_ai, fzsal_g_ai, flux_bio, flux_bio_ai, &
fnit, fsil, famm, fdmsp, fdms, fhum, fdust, falgalN, &
fdoc, fdic, fdon, ffep, ffed, bgcflux_ice_to_ocn
use ice_grid, only: tmask
Expand Down
422 changes: 336 additions & 86 deletions cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90

Large diffs are not rendered by default.

Loading

0 comments on commit ed78a99

Please sign in to comment.