Skip to content

Commit

Permalink
Most initialization working
Browse files Browse the repository at this point in the history
  • Loading branch information
alperaltuntas committed Jul 3, 2017
1 parent 426357c commit 54f7976
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions config_src/mct_driver/ocn_comp_mct.F90
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ module ocn_comp_mct
! From MOM6
use ocean_model_mod, only: ocean_state_type, ocean_public_type
use ocean_model_mod, only: ocean_model_init
use MOM_time_manager, only: time_type, set_date, set_calendar_type, THIRTY_DAY_MONTHS
use MOM_domains, only: MOM_infra_init
use MOM_time_manager, only: time_type, set_date, set_calendar_type, NOLEAP
use MOM_domains, only: MOM_infra_init, num_pes, root_pe, pe_here

!
! !PUBLIC MEMBER FUNCTIONS:
implicit none
Expand Down Expand Up @@ -78,22 +79,29 @@ subroutine ocn_init_mct( EClock, cdata_o, x2o_o, o2x_o, NLFilename )
integer :: year, month, day, hour, minute, seconds, rc
character(len=128) :: errMsg
integer :: mpicom
integer :: npes, pe0
integer :: i

mpicom = cdata_o%mpicom

call MOM_infra_init(mpicom)

call ESMF_ClockGet(EClock, currTime=current_time, rc=rc)

call ESMF_TimeGet(current_time, yy=year, mm=month, dd=day, h=hour, m=minute, s=seconds, rc=rc)

call set_calendar_type(THIRTY_DAY_MONTHS)
! we need to confirm this:
call set_calendar_type(NOLEAP)

time_init = set_date(year, month, day, hour, minute, seconds, err_msg=errMsg)
time_in = set_date(year, month, day, hour, minute, seconds, err_msg=errMsg)

npes = num_pes()
pe0 = root_pe()

allocate(ocn_surface)
ocn_surface%is_ocean_PE = .true.
allocate(ocn_surface%pelist(npes))
ocn_surface%pelist(:) = (/(i,i=pe0,pe0+npes)/)

!call ocean_model_init(ocn_surface, ocn_state, time_init, time_in)
call ocean_model_init(ocn_surface, ocn_state, time_init, time_in)

!-----------------------------------------------------------------------
!EOC
Expand Down

0 comments on commit 54f7976

Please sign in to comment.