Browse Source

Merge branch 'main/3-apply-coupling-timestep'

1.00.00
Sven Karsten 2 years ago
parent
commit
62299fefe5
  1. 3
      src/coupler/flux_exchange.F90
  2. 8
      src/oasis_interface/oas_exchange_fields.F90

3
src/coupler/flux_exchange.F90

@ -1109,6 +1109,7 @@ subroutine flux_exchange_init ( Time, Atm, Land, Ice, Ocean, Ocean_state,&
Dt_cpl = 0
if(present(dt_atmos)) Dt_atm = dt_atmos
if(present(dt_cpld )) Dt_cpl = dt_cpld
WRITE (*,*) "Set coupling time step Dt_cpl=", Dt_cpl, " from dt_cpld=", dt_cpld
!z1l check the flux conservation.
if(debug_stocks) call check_flux_conservation(Ice, Ocean, Ice_Ocean_Boundary)
@ -2530,7 +2531,7 @@ subroutine flux_down_from_atmos (Time, Atm, Land, Ice, &
#IFDEF OASIS_IOW_ESM
if (couple_flux_calculator) then
write(*,*) 'calling oas_exchange_fields'
call oas_exchange_fields(Ice,Ice_boundary,ice_ocean_boundary,Time_start,Timet)
call oas_exchange_fields(Ice,Ice_boundary,ice_ocean_boundary,Time_start,Timet, INT(Dt_cpl))
endif
#ENDIF
#IFDEF COUP_OAS !sandra

8
src/oasis_interface/oas_exchange_fields.F90

@ -1,5 +1,5 @@
#IFDEF OASIS_IOW_ESM
SUBROUTINE oas_exchange_fields(Ice,Ice_boundary,Ice_Ocean_Boundary,Time_start,Timet)
SUBROUTINE oas_exchange_fields(Ice,Ice_boundary,Ice_Ocean_Boundary,Time_start,Timet,dt_cpld)
!!---------------------------------------------------------------------
!! *** ROUTINE send_fld ***
@ -42,7 +42,8 @@ TYPE (ice_data_type), INTENT(IN) :: Ice
TYPE (atmos_ice_boundary_type), INTENT(INOUT) :: Ice_boundary
type(ice_ocean_boundary_type), intent(inout) :: Ice_Ocean_Boundary
type(time_type), intent(in) :: Time_start,Timet ! for coupling sandra
integer, parameter :: dt_cpld=600
INTEGER, INTENT(IN) :: dt_cpld
ztmp1 (:,:) = 0
nrcvinfo (:) = OASIS_idle
@ -51,8 +52,9 @@ integer, parameter :: dt_cpld=600
isec = (864e2*dy+sc)
write(*,*) 'inside oas_exchange_fields at isec=',isec
WRITE (*,*) "with coupling time step dt_cpld=", dt_cpld
if (mod(isec,dt_cpld)==0) then
write(*,*) 'calling MPI_BARRIER'
write(*,*) 'calling MPI_BARRIER at isec=', isec, ', dt_cpld=', dt_cpld
call MPI_BARRIER(MPI_COMM_WORLD,dummy)
write(*,*) 'passed MPI_BARRIER'
endif

Loading…
Cancel
Save