Browse Source

Merge branch 'issues/1-unify-defines' fixes #1

1.00.00
Sven Karsten 2 years ago
parent
commit
8c68354b79
  1. 4
      build_haumea.sh
  2. 4
      build_hlrnb.sh
  3. 4
      build_hlrng.sh
  4. 4
      build_phy-2.sh
  5. 65
      src/coupler/coupler_main.F90
  6. 1757
      src/coupler/coupler_main.F90_ori
  7. 53
      src/coupler/flux_exchange.F90
  8. 56
      src/coupler/oas_define.F90~
  9. 13
      src/coupler/surface_flux.F90
  10. 63
      src/ice_sis/ice_model.F90
  11. 26
      src/mom5/ocean_core/ocean_model.F90
  12. 2
      src/mom5/ocean_core/ocean_types.F90
  13. 30
      src/mom5/ocean_wave/ocean_wave.F90
  14. 2
      src/oasis_interface/oas_define.F90
  15. 2
      src/oasis_interface/oas_finalize.F90
  16. 2
      src/oasis_interface/oas_init.F90
  17. 2
      src/oasis_interface/oas_receive.F90
  18. 163
      src/oasis_interface/oas_receive_field.F90
  19. 2
      src/oasis_interface/oas_send.F90
  20. 90
      src/oasis_interface/oas_send_field.F90
  21. 9
      src/oasis_interface/oas_vardef.F90

4
build_haumea.sh

@ -34,14 +34,14 @@ export IOW_ESM_LD="mpifort"
if [ $debug == "debug" ]; then
# compiler flags
export IOW_ESM_CPPDEFS="-DCOUP_OAS -DOASIS_IOW_ESM -DIOW_ESM_DEBUG"
export IOW_ESM_CPPDEFS="-DOASIS_IOW_ESM -DIOW_ESM_DEBUG"
export IOW_ESM_FFLAGS="-O0 -r8 -g -traceback -check all -fp-model fast=2 -xHost -I${IOW_ESM_NETCDF_INCLUDE}/"
export IOW_ESM_CFLAGS="-O0 -r8 -g -traceback -fp-model fast=2 -xHost -I${IOW_ESM_NETCDF_INCLUDE}/"
export IOW_ESM_LDFLAGS="-g -traceback -L${IOW_ESM_NETCDF_LIBRARY} -lnetcdf -lnetcdff -Wl,-rpath,${IOW_ESM_NETCDF_LIBRARY}"
else
# compiler flags
export IOW_ESM_CPPDEFS="-DCOUP_OAS -DOASIS_IOW_ESM"
export IOW_ESM_CPPDEFS="-DOASIS_IOW_ESM"
export IOW_ESM_FFLAGS="-O3 -r8 -no-prec-div -fp-model fast=2 -xHost -I${IOW_ESM_NETCDF_INCLUDE}/"
export IOW_ESM_CFLAGS="-O3 -r8 -no-prec-div -fp-model fast=2 -xHost -I${IOW_ESM_NETCDF_INCLUDE}/"

4
build_hlrnb.sh

@ -34,14 +34,14 @@ export IOW_ESM_LD="mpiifort"
if [ $debug == "debug" ]; then
# compiler flags
export IOW_ESM_CPPDEFS="-DCOUP_OAS -DOASIS_IOW_ESM -DIOW_ESM_DEBUG"
export IOW_ESM_CPPDEFS="-DOASIS_IOW_ESM -DIOW_ESM_DEBUG"
export IOW_ESM_FFLAGS="-O0 -r8 -g -traceback -check all -fp-model fast=2 -xHost -I${IOW_ESM_NETCDF_INCLUDE}/"
export IOW_ESM_CFLAGS="-O0 -r8 -g -traceback -fp-model fast=2 -xHost -I${IOW_ESM_NETCDF_INCLUDE}/"
export IOW_ESM_LDFLAGS="-g -traceback -L${IOW_ESM_NETCDF_LIBRARY} -lnetcdf -lnetcdff -Wl,-rpath,${IOW_ESM_NETCDF_LIBRARY}"
else
# compiler flags
export IOW_ESM_CPPDEFS="-DCOUP_OAS -DOASIS_IOW_ESM"
export IOW_ESM_CPPDEFS="-DOASIS_IOW_ESM"
export IOW_ESM_FFLAGS="-O3 -r8 -no-prec-div -fp-model fast=2 -xHost -I${IOW_ESM_NETCDF_INCLUDE}/"
export IOW_ESM_CFLAGS="-O3 -r8 -no-prec-div -fp-model fast=2 -xHost -I${IOW_ESM_NETCDF_INCLUDE}/"

4
build_hlrng.sh

@ -34,14 +34,14 @@ export IOW_ESM_LD="mpiifort"
if [ $debug == "debug" ]; then
# compiler flags
export IOW_ESM_CPPDEFS="-DCOUP_OAS -DOASIS_IOW_ESM -DIOW_ESM_DEBUG"
export IOW_ESM_CPPDEFS="-DOASIS_IOW_ESM -DIOW_ESM_DEBUG"
export IOW_ESM_FFLAGS="-O0 -r8 -g -traceback -check all -fp-model fast=2 -xHost -I${IOW_ESM_NETCDF_INCLUDE}/"
export IOW_ESM_CFLAGS="-O0 -r8 -g -traceback -fp-model fast=2 -xHost -I${IOW_ESM_NETCDF_INCLUDE}/"
export IOW_ESM_LDFLAGS="-g -traceback -L${IOW_ESM_NETCDF_LIBRARY} -lnetcdf -lnetcdff -Wl,-rpath,${IOW_ESM_NETCDF_LIBRARY}"
else
# compiler flags
export IOW_ESM_CPPDEFS="-DCOUP_OAS -DOASIS_IOW_ESM"
export IOW_ESM_CPPDEFS="-DOASIS_IOW_ESM"
export IOW_ESM_FFLAGS="-O3 -r8 -no-prec-div -fp-model fast=2 -xHost -I${IOW_ESM_NETCDF_INCLUDE}/"
export IOW_ESM_CFLAGS="-O3 -r8 -no-prec-div -fp-model fast=2 -xHost -I${IOW_ESM_NETCDF_INCLUDE}/"

4
build_phy-2.sh

@ -34,14 +34,14 @@ export IOW_ESM_LD="mpifort"
if [ $debug == "debug" ]; then
# compiler flags
export IOW_ESM_CPPDEFS="-DCOUP_OAS -DOASIS_IOW_ESM -DIOW_ESM_DEBUG"
export IOW_ESM_CPPDEFS="-DOASIS_IOW_ESM -DIOW_ESM_DEBUG"
export IOW_ESM_FFLAGS="-O0 -r8 -g -traceback -check all -fp-model fast=2 -xHost -I${IOW_ESM_NETCDF_INCLUDE}/"
export IOW_ESM_CFLAGS="-O0 -r8 -g -traceback -fp-model fast=2 -xHost -I${IOW_ESM_NETCDF_INCLUDE}/"
export IOW_ESM_LDFLAGS="-g -traceback -L${IOW_ESM_NETCDF_LIBRARY} -lnetcdf -lnetcdff -Wl,-rpath,${IOW_ESM_NETCDF_LIBRARY}"
else
# compiler flags
export IOW_ESM_CPPDEFS="-DCOUP_OAS -DOASIS_IOW_ESM"
export IOW_ESM_CPPDEFS="-DOASIS_IOW_ESM"
export IOW_ESM_FFLAGS="-O3 -r8 -no-prec-div -fp-model fast=2 -xHost -I${IOW_ESM_NETCDF_INCLUDE}/"
export IOW_ESM_CFLAGS="-O3 -r8 -no-prec-div -fp-model fast=2 -xHost -I${IOW_ESM_NETCDF_INCLUDE}/"

65
src/coupler/coupler_main.F90

@ -126,7 +126,6 @@ program coupler_main
! </INFO>
use constants_mod, only: constants_init
use time_manager_mod, only: time_type, set_calendar_type, set_time
@ -226,16 +225,14 @@ program coupler_main
use memutils_mod, only: print_memuse_stats
#IFDEF OASIS_IOW_ESM
use oas_vardef, only: MOM5_instance_letter
use oas_vardef, only: MOM5_instance_letter, type_atmos
#ENDIF
implicit none
#IFDEF COUP_OAS !sandra
#IFDEF OASIS_IOW_ESM
integer :: mpi_comm_mom
#ENDIF
!-----------------------------------------------------------------------
character(len=128) :: version = '$Id: coupler_main.F90,v 20.0 2013/12/13 23:27:07 fms Exp $'
@ -371,8 +368,6 @@ program coupler_main
! </NOTE>
! </NAMELIST>
integer, dimension(6) :: restart_interval = (/ 0, 0, 0, 0, 0, 0/)
integer, dimension(6) :: current_date = (/ 0, 0, 0, 0, 0, 0 /)
character(len=17) :: calendar = ' '
@ -397,10 +392,9 @@ program coupler_main
ice_npes, land_npes, atmos_nthreads, ocean_nthreads, &
concurrent, use_lag_fluxes, do_chksum, &
#IFDEF OASIS_IOW_ESM
check_stocks, restart_interval, MOM5_instance_letter
#ELSE
check_stocks, restart_interval
MOM5_instance_letter, type_atmos, &
#ENDIF
check_stocks, restart_interval
integer :: initClock, mainClock, termClock
@ -433,21 +427,21 @@ character(len=256), parameter :: note_header =
!#######################################################################
#IFDEF COUP_OAS ! sandra
call oas_init(mpi_comm_mom)
call mpp_init(localcomm=mpi_comm_mom)
#IFDEF OASIS_IOW_ESM
call oas_init(mpi_comm_mom)
call mpp_init(localcomm=mpi_comm_mom)
#ELSE
call mpp_init()
call mpp_init()
#ENDIF
!these clocks are on the global pelist
initClock = mpp_clock_id( 'Initialization' )
call mpp_clock_begin(initClock)
#IFDEF COUP_OAS ! sandra
call fms_init(mpi_comm_mom)
#IFDEF OASIS_IOW_ESM
call fms_init(mpi_comm_mom)
#ELSE
call fms_init()
call fms_init()
#ENDIF
call coupler_init
@ -457,10 +451,10 @@ character(len=256), parameter :: note_header =
call mpp_set_current_pelist()
#IFDEF COUP_OAS ! sandra
#IFDEF OASIS_IOW_ESM
call oas_define(mpi_comm_mom)
! write(*,*) "finished oasis define"
#ENDIF
call mpp_clock_end (initClock) !end initialization
@ -614,11 +608,16 @@ newClock14 = mpp_clock_id( 'final flux_check_stocks' )
if(do_chksum) call atmos_ice_land_chksum('update_atmos_down+', (nc-1)*num_atmos_calls+na)
call mpp_clock_begin(newClockd)
call flux_down_from_atmos( Time_atmos, Atm, Land, Ice, &
Land_ice_atmos_boundary, &
Atmos_land_boundary, &
Atmos_ice_boundary, Ice_ocean_boundary,Time_start,Time_ocean,(na==1)) ! sandra for coupling
#IFDEF OASIS_IOW_ESM
Atmos_ice_boundary, Ice_ocean_boundary,Time_start,Time_ocean,(na==1))
#ELSE
Atmos_ice_boundary)
#ENDIF
call mpp_clock_end(newClockd)
if(do_chksum) call atmos_ice_land_chksum('flux_down_from_atmos+', (nc-1)*num_atmos_calls+na)
@ -641,7 +640,11 @@ newClock14 = mpp_clock_id( 'final flux_check_stocks' )
if (do_ice .AND. Ice%pe) then
if(ice_npes .NE. atmos_npes)call mpp_set_current_pelist(Ice%pelist)
#IFDEF OASIS_IOW_ESM
call update_ice_model_fast( Atmos_ice_boundary, Ice, type_atmos)
#ELSE
call update_ice_model_fast( Atmos_ice_boundary, Ice )
#ENDIF
endif
if(ice_npes .NE. atmos_npes) call mpp_set_current_pelist(Atm%pelist)
@ -727,8 +730,13 @@ newClock14 = mpp_clock_id( 'final flux_check_stocks' )
! update_ocean_model since fluxes don't change here
if (do_ocean) &
#IFDEF OASIS_IOW_ESM
call update_ocean_model( Ice_ocean_boundary, Ocean_state, Ocean, &
Time_ocean, Time_step_cpld, type_atmos )
#ELSE
call update_ocean_model( Ice_ocean_boundary, Ocean_state, Ocean, &
Time_ocean, Time_step_cpld )
#ENDIF
if (do_chksum) call ocean_chksum('update_ocean_model+', nc)
! Get stocks from "Ice_ocean_boundary" and add them to Ocean stocks.
@ -792,10 +800,6 @@ call mpp_clock_end(newClock14)
call mpp_clock_end(mainClock)
call mpp_clock_begin(termClock)
!#IFDEF COUP_OAS ! sandra
! call oas_finalize ! needs to be called before fms_end()
!#ENDIF
if(do_chksum) call coupler_chksum('coupler_end-', nc)
call coupler_end
@ -806,16 +810,9 @@ call mpp_clock_end(newClock14)
call fms_end
#IFDEF COUP_OAS ! sandra
#IFDEF OASIS_IOW_ESM
call oas_finalize ! needs to be called after fms_end()
#ENDIF
IF (mpp_pe().EQ.mpp_root_pe()) THEN
open(unit=50, file='goodfile')
write(50,*)'go on'
close(50)
ENDIF
!-----------------------------------------------------------------------

1757
src/coupler/coupler_main.F90_ori

File diff suppressed because it is too large Load Diff

53
src/coupler/flux_exchange.F90

@ -241,6 +241,10 @@ module flux_exchange_mod
do_specified_land
#endif
#IFDEF OASIS_IOW_ESM
use oas_vardef, only: type_atmos
#ENDIF
implicit none
include 'netcdf.inc'
private
@ -820,7 +824,6 @@ subroutine flux_exchange_init ( Time, Atm, Land, Ice, Ocean, Ocean_state,&
call setup_xmap(xmap_sfc, (/ 'ATM', 'OCN', 'LND' /), &
(/ Atm%Domain, Ice%Domain, Land%Domain /), &
"INPUT/grid_spec.nc", Atm%grid)
! sandra test not done 18122018 write(*,*) "xgrid i ", xmap_sfc%x2(1)%i
! exchange grid indices
X1_GRID_ATM = 1; X1_GRID_ICE = 2; X1_GRID_LND = 3;
call generate_sfc_xgrid( Land, Ice )
@ -863,7 +866,7 @@ subroutine flux_exchange_init ( Time, Atm, Land, Ice, Ocean, Ocean_state,&
allocate( atmos_ice_boundary%u_star(is:ie,js:je,kd) )
allocate( atmos_ice_boundary%t_flux(is:ie,js:je,kd) )
allocate( atmos_ice_boundary%q_flux(is:ie,js:je,kd) )
#IFDEF COUP_OAS !sandra
#IFDEF OASIS_IOW_ESM
allocate( atmos_ice_boundary%lh_flux(is:ie,js:je,kd) )
#ENDIF
allocate( atmos_ice_boundary%lw_flux(is:ie,js:je,kd) )
@ -884,7 +887,7 @@ subroutine flux_exchange_init ( Time, Atm, Land, Ice, Ocean, Ocean_state,&
atmos_ice_boundary%u_star=0.0
atmos_ice_boundary%t_flux=0.0
atmos_ice_boundary%q_flux=0.0
#IFDEF COUP_OAS !sandra
#IFDEF OASIS_IOW_ESM
atmos_ice_boundary%lh_flux=0.0
#ENDIF
atmos_ice_boundary%lw_flux=0.0
@ -1044,7 +1047,7 @@ subroutine flux_exchange_init ( Time, Atm, Land, Ice, Ocean, Ocean_state,&
allocate( ice_ocean_boundary%calving_hflx (is:ie,js:je) ) ; ice_ocean_boundary%calving_hflx = 0.0
allocate( ice_ocean_boundary%p (is:ie,js:je) ) ; ice_ocean_boundary%p = 0.0
allocate( ice_ocean_boundary%mi (is:ie,js:je) ) ; ice_ocean_boundary%mi = 0.0
#IFDEF COUP_OAS !sandra
#IFDEF OASIS_IOW_ESM
allocate( ice_ocean_boundary%u_wind (is:ie,js:je) ) ; ice_ocean_boundary%u_wind = 0.0
allocate( ice_ocean_boundary%v_wind (is:ie,js:je) ) ; ice_ocean_boundary%v_wind = 0.0
#ENDIF
@ -1109,7 +1112,10 @@ 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
#IFDEF OASIS_IOW_ESM
WRITE (*,*) "Set coupling time step Dt_cpl=", Dt_cpl, " from dt_cpld=", dt_cpld
#ENDIF
!z1l check the flux conservation.
if(debug_stocks) call check_flux_conservation(Ice, Ocean, Ice_Ocean_Boundary)
@ -2152,18 +2158,33 @@ end subroutine sfc_boundary_layer
! A derived data type to specify properties and fluxes passed from atmosphere to ice.
! </INOUT>
!
#IFDEF OASIS_IOW_ESM
subroutine flux_down_from_atmos (Time, Atm, Land, Ice, &
Atmos_boundary, Land_boundary, Ice_boundary,ice_ocean_boundary,Time_start,Timet, couple_flux_calculator ) ! for coupling sandra
Atmos_boundary, Land_boundary, Ice_boundary, ice_ocean_boundary, &
Time_start, Timet, couple_flux_calculator )
type(time_type), intent(in) :: Time
type(atmos_data_type), intent(inout) :: Atm
type(land_data_type), intent(in) :: Land
type(ice_data_type), intent(in) :: Ice
type(land_ice_atmos_boundary_type),intent(in) :: Atmos_boundary
type(atmos_land_boundary_type), intent(inout):: Land_boundary
type(atmos_ice_boundary_type), intent(inout):: Ice_boundary
type(time_type), intent(in) :: Time_start,Timet
type(ice_ocean_boundary_type), intent(inout):: ice_ocean_boundary
logical, intent(in) :: couple_flux_calculator
#ELSE
subroutine flux_down_from_atmos (Time, Atm, Land, Ice, &
Atmos_boundary, Land_boundary, Ice_boundary)
type(time_type), intent(in) :: Time,Time_start,Timet ! for coupling sandra
type(time_type), intent(in) :: Time
type(atmos_data_type), intent(inout) :: Atm
type(land_data_type), intent(in) :: Land
type(ice_data_type), intent(in) :: Ice
type(land_ice_atmos_boundary_type),intent(in) :: Atmos_boundary
type(atmos_land_boundary_type), intent(inout):: Land_boundary
type(atmos_ice_boundary_type), intent(inout):: Ice_boundary
type(ice_ocean_boundary_type), intent(inout):: ice_ocean_boundary ! for coupling sandra
logical, intent(in) :: couple_flux_calculator
#ENDIF
real, dimension(n_xgrid_sfc) :: ex_flux_sw, ex_flux_lwd, &
ex_flux_sw_dir, &
@ -2528,21 +2549,17 @@ subroutine flux_down_from_atmos (Time, Atm, Land, Ice, &
ex_gas_fluxes%bc(n)%field(m)%values, xmap_sfc)
enddo !} m
enddo !} n
#IFDEF OASIS_IOW_ESM
if (couple_flux_calculator) then
IF (TRIM(type_atmos) == 'flux_calculator') THEN
if (couple_flux_calculator) then
#ifdef IOW_ESM_DEBUG
write(*,*) 'calling oas_exchange_fields'
#endif
call oas_exchange_fields(Ice,Ice_boundary,ice_ocean_boundary,Time_start,Timet, INT(Dt_cpl))
endif
endif
ELSEIF (TRIM(type_atmos) == 'none') THEN
#ENDIF
#IFDEF COUP_OAS !sandra
! write(*,*) "start oasis receive in flux exchange"
#ifdef IOW_ESM_DEBUG
write(*,*) 'really calling oas_receive_field'
#endif
call oas_receive_field(Ice,Ice_boundary,ice_ocean_boundary,Time_start,Timet)
#ELSE
!Balaji: data_override calls moved here from coupler_main
! if (ov) then
@ -2582,6 +2599,8 @@ subroutine flux_down_from_atmos (Time, Atm, Land, Ice, &
call data_override('ICE', 'u_flux', Ice_boundary%u_flux, Time)
call data_override('ICE', 'v_flux', Ice_boundary%v_flux, Time)
#IFDEF OASIS_IOW_ESM
ENDIF
#ENDIF
call data_override('ICE', 'dhdt', Ice_boundary%dhdt, Time)

56
src/coupler/oas_define.F90~

@ -1,56 +0,0 @@
#ifdef COUP_OAS
SUBROUTINE oas_cos_define
!
! grid definitions for OASIS
!
USE oas_vardef
USE mod_oasis_namcouple ! OASIS3-MCT namcouple variables: e.g. coupling time step
USE ice_grid_mod, ONLY : &
IMPLICIT NONE
INTEGER(KIND=iintegers) :: &
! igrid, & ! ids returned by oasis_def_grid
! iptid, & ! ids returned by oasis_set_points
! imskid, & ! ids returned by oasis_set_mask
! iextent(1,3), & !
! ioffset(1,3), & !
! ji, jj, jg, & !
! jg_end, jh_beg, & !
part_id, & !
il_paral(5), & ! OASIS3 box partition
! var_nodims(2), & !
! ishape(2,2), & ! shape of arrays passed to PSMILe
! nlei_tot, nlej_tot, & ! upper halo limits on a global subdomain
! jih_tot, jjh_tot, & ! global subdomain size without halo
ierror, & !
! lev_diff, & !
! izerrstat
REAL(KIND=8) :: &
! start_lonc, &
! start_latc
CHARACTER(LEN=4) :: &
grd_t = 'momt', & ! name of t grid of mom
grd_c = 'momc' ! name of c grid of mom
CHARACTER(len=30) :: &
data_gridname='grids.nc', & ! file with the grids
data_maskname='masks.nc' ! file with the masks
! Global grid parameters :
INTEGER :: nlon, nlat, ntot ! dimensions in the 2 directions of space + total size
INTEGER :: il_size
INTEGER :: nc ! number of corners in the (i,j) plan
CALL oasis_def_partition (part_id, il_paral, ierror)

13
src/coupler/surface_flux.F90

@ -41,6 +41,10 @@ use sat_vapor_pres_mod, only: escomp, descomp
use constants_mod, only: cp_air, hlv, stefan, rdgas, rvgas, grav, vonkarm
use mpp_mod, only: input_nml_file
#IFDEF OASIS_IOW_ESM
use oas_vardef, only: type_atmos
#ENDIF
implicit none
private
@ -476,7 +480,8 @@ subroutine surface_flux_1d ( &
call ncar_ocean_fluxes (w_atm, th_atm, t_surf0, q_atm, q_surf0, z_atm, &
seawater, cd_m, cd_t, cd_q, u_star, b_star )
end if
#IFDEF COUP_OAS !sandra
#IFDEF OASIS_IOW_ESM
IF (TRIM(type_atmos) == 'flux_calculator') THEN
flux_t = 0.0
flux_q = 0.0
flux_r = 0.0
@ -493,8 +498,8 @@ subroutine surface_flux_1d ( &
q_star = 0.0
q_surf = 0.0
w_atm = 0.0
#ELSE
ELSEIF (TRIM(type_atmos) == 'none') THEN
#ENDIF
where (avail)
! scale momentum drag coefficient on orographic roughness
cd_m = cd_m*(log(z_atm/rough_mom+1)/log(z_atm/rough_scale+1))**2
@ -558,6 +563,8 @@ subroutine surface_flux_1d ( &
q_surf = 0.0
w_atm = 0.0
endwhere
#IFDEF OASIS_IOW_ESM
ENDIF
#ENDIF
! calculate d(stress component)/d(atmos wind component)
dtaudu_atm = 0.0

63
src/ice_sis/ice_model.F90

@ -140,7 +140,7 @@ module ice_model_mod
real, dimension(:,:,:), pointer :: data =>NULL()
integer :: xtype
type(coupler_3d_bc_type) :: fluxes ! array of fluxes used for additional tracers
#IFDEF COUP_OAS !sandra
#IFDEF OASIS_IOW_ESM
real, dimension(:,:,:), pointer :: lh_flux =>NULL() ! for coupling latent heat
real, dimension(:,:), pointer :: u_wind =>NULL() ! for wave model
real, dimension(:,:), pointer :: v_wind =>NULL() ! for wave model
@ -193,14 +193,19 @@ contains
end subroutine update_ice_model_slow_dn
#IFDEF OASIS_IOW_ESM
subroutine update_ice_model_fast_new ( Atmos_boundary, Ice, type_atmos )
type(atmos_ice_boundary_type), intent(inout) :: Atmos_boundary
type (ice_data_type), intent(inout) :: Ice
CHARACTER(*), OPTIONAL, INTENT(IN) :: type_atmos
#ELSE
subroutine update_ice_model_fast_new ( Atmos_boundary, Ice )
type(atmos_ice_boundary_type), intent(inout) :: Atmos_boundary
type (ice_data_type), intent(inout) :: Ice
#ENDIF
call mpp_clock_begin(iceClock)
call mpp_clock_begin(iceClock3)
#IFDEF COUP_OAS !sandra
call update_ice_model_fast_old (Ice, Atmos_boundary%fluxes, &
Atmos_boundary%u_flux, &
Atmos_boundary%v_flux, &
@ -212,7 +217,10 @@ contains
Atmos_boundary%lw_flux, &
Atmos_boundary%t_flux, &
Atmos_boundary%q_flux, &
#IFDEF OASIS_IOW_ESM
Atmos_boundary%lh_flux, & !inserted for coupling latent heat
type_atmos, &
#ENDIF
Atmos_boundary%dhdt, &
Atmos_boundary%dedt, &
Atmos_boundary%drdt, &
@ -220,27 +228,6 @@ contains
Atmos_boundary%fprec, &
Atmos_boundary%coszen, &
Atmos_boundary%p )
#ELSE
call update_ice_model_fast_old (Ice, Atmos_boundary%fluxes, &
Atmos_boundary%u_flux, &
Atmos_boundary%v_flux, &
Atmos_boundary%u_star, &
Atmos_boundary%sw_flux_nir_dir, &
Atmos_boundary%sw_flux_nir_dif, &
Atmos_boundary%sw_flux_vis_dir, &
Atmos_boundary%sw_flux_vis_dif, &
Atmos_boundary%lw_flux, &
Atmos_boundary%t_flux, &
Atmos_boundary%q_flux, &
Atmos_boundary%dhdt, &
Atmos_boundary%dedt, &
Atmos_boundary%drdt, &
Atmos_boundary%lprec, &
Atmos_boundary%fprec, &
Atmos_boundary%coszen, &
Atmos_boundary%p )
#ENDIF
call mpp_clock_end(iceClock3)
call mpp_clock_end(iceClock)
@ -765,8 +752,9 @@ contains
subroutine update_ice_model_fast_old (Ice, Atmos_boundary_fluxes, flux_u, flux_v, u_star, &
flux_sw_nir_dir, flux_sw_nir_dif, flux_sw_vis_dir, flux_sw_vis_dif,&
flux_lw, flux_t, flux_q, &
#IFDEF COUP_OAS
#IFDEF OASIS_IOW_ESM
flux_lhc, &
type_atmos, &
#ENDIF
dhdt, dedt, drdt, lprec, fprec, coszen, p_surf )
@ -777,8 +765,9 @@ contains
real, dimension(isc:iec,jsc:jec,km), intent(in) :: flux_lw ! net longwave radiation (+ down)
real, dimension(isc:iec,jsc:jec,km), intent(in) :: flux_t ! sensible heat flux (+ up)
real, dimension(isc:iec,jsc:jec,km), intent(in) :: flux_q ! specific humidity flux (+up)
#IFDEF COUP_OAS !sandra wird derzeit nicht verwendet
#IFDEF OASIS_IOW_ESM
real, dimension(isc:iec,jsc:jec,km), optional, intent(in) :: flux_lhc ! latent heat flux (+up)
CHARACTER(len=16), INTENT(IN) :: type_atmos
#ENDIF
real, dimension(isc:iec,jsc:jec,km), intent(in) :: flux_sw_nir_dir ! net near IR direct shortwave radiation (+ down)
real, dimension(isc:iec,jsc:jec,km), intent(in) :: flux_sw_nir_dif ! net near IR diffuse shortwave radiation (+ down)
@ -816,10 +805,14 @@ contains
flux_v_new(i,j,k) = flux_v(i,j,k)
flux_t_new(i,j,k) = flux_t(i,j,k)
flux_q_new(i,j,k) = flux_q(i,j,k)
#IFDEF COUP_OAS !sandra
flux_lh_new(i,j,k) = flux_lhc(i,j,k)
#ELSE
#IFDEF OASIS_IOW_ESM
IF (TRIM(type_atmos) == 'flux_calculator') THEN
flux_lh_new(i,j,k) = flux_lhc(i,j,k)
ELSEIF (TRIM(type_atmos) == 'none') THEN
#ENDIF
flux_lh_new(i,j,k) = hlv*flux_q(i,j,k)
#IFDEF OASIS_IOW_ESM
ENDIF
#ENDIF
flux_lw_new(i,j,k) = flux_lw(i,j,k)
flux_sw_nir_dir_new(i,j,k) = flux_sw_nir_dir(i,j,k)
@ -919,8 +912,6 @@ contains
end do
end do
call compute_ocean_roughness (Ice%mask, u_star(:,:,1), Ice%rough_mom(:,:,1), &
Ice%rough_heat(:,:,1), Ice%rough_moist(:,:,1) )
@ -960,8 +951,6 @@ contains
Ice%Time = Ice%Time + Ice%Time_step_fast ! advance time
!write(*,*) "Ice%Time " , Ice%Time ! sandra
end subroutine update_ice_model_fast_old
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
@ -1856,10 +1845,10 @@ subroutine atm_ice_bnd_type_chksum(id, timestep, bnd_type)
write(outunit,100) 'atm_ice_bnd_type%u_star ',mpp_chksum(bnd_type%u_star)
write(outunit,100) 'atm_ice_bnd_type%t_flux ',mpp_chksum(bnd_type%t_flux)
write(outunit,100) 'atm_ice_bnd_type%q_flux ',mpp_chksum(bnd_type%q_flux)
#IFDEF COUP_OAS !sandra
write(outunit,100) 'atm_ice_bnd_type%lh_flux ',mpp_chksum(bnd_type%lh_flux)
write(outunit,100) 'atm_ice_bnd_type%u_wind ',mpp_chksum(bnd_type%u_wind)
write(outunit,100) 'atm_ice_bnd_type%v_wind ',mpp_chksum(bnd_type%v_wind)
#IFDEF OASIS_IOW_ESM
write(outunit,100) 'atm_ice_bnd_type%lh_flux ',mpp_chksum(bnd_type%lh_flux)
write(outunit,100) 'atm_ice_bnd_type%u_wind ',mpp_chksum(bnd_type%u_wind)
write(outunit,100) 'atm_ice_bnd_type%v_wind ',mpp_chksum(bnd_type%v_wind)
#ENDIF
write(outunit,100) 'atm_ice_bnd_type%lw_flux ',mpp_chksum(bnd_type%lw_flux)
write(outunit,100) 'atm_ice_bnd_type%sw_flux_vis_dir ',mpp_chksum(bnd_type%sw_flux_vis_dir)

26
src/mom5/ocean_core/ocean_model.F90

@ -1394,6 +1394,17 @@ subroutine ocean_model_init(Ocean, Ocean_state, Time_init, Time_in)
! this module and intent inout, and Ocean_sfc is intent out.
! </DESCRIPTION>
!
#IFDEF OASIS_IOW_ESM
subroutine update_ocean_model(Ice_ocean_boundary, Ocean_state, Ocean_sfc, &
time_start_update, Ocean_coupling_time_step, type_atmos, do_wave_in)
type(ice_ocean_boundary_type), intent(inout) :: Ice_ocean_boundary
type(ocean_state_type), pointer :: Ocean_state
type(ocean_public_type), intent(inout) :: Ocean_sfc
type(time_type), intent(in) :: time_start_update
type(time_type), intent(in) :: Ocean_coupling_time_step
CHARACTER(*), optional, intent(in) :: type_atmos
logical, optional, intent(in) :: do_wave_in
#ELSE
subroutine update_ocean_model(Ice_ocean_boundary, Ocean_state, Ocean_sfc, &
time_start_update, Ocean_coupling_time_step, do_wave_in)
type(ice_ocean_boundary_type), intent(inout) :: Ice_ocean_boundary
@ -1402,11 +1413,22 @@ subroutine ocean_model_init(Ocean, Ocean_state, Time_init, Time_in)
type(time_type), intent(in) :: time_start_update
type(time_type), intent(in) :: Ocean_coupling_time_step
logical, optional, intent(in) :: do_wave_in
#ENDIF
integer :: seconds, days
integer :: num_ocn
integer :: taum1, tau, taup1
integer :: i, j, k, n
#IFDEF OASIS_IOW_ESM
CHARACTER (len=16) :: type_atmos_local
IF(present(type_atmos)) THEN
type_atmos_local=type_atmos
ELSE
type_atmos_local='none'
ENDIF
#ENDIF
call mpp_clock_begin(id_ocean)
if(first_ocn_call) then
@ -1520,7 +1542,11 @@ subroutine ocean_model_init(Ocean, Ocean_state, Time_init, Time_in)
! update the simplified MOM version of a wave model
call mpp_clock_begin(id_wave)
#IFDEF OASIS_IOW_ESM
call ocean_wave_model(Time, Waves, Ice_ocean_boundary, type_atmos_local)
#ELSE
call ocean_wave_model(Time, Waves, Ice_ocean_boundary)
#ENDIF
call mpp_clock_end(id_wave)
#if defined (ENABLE_ODA) && defined (ENABLE_ECDA)

2
src/mom5/ocean_core/ocean_types.F90

@ -1215,7 +1215,7 @@ module ocean_types_mod
real, pointer, dimension(:,:) :: ustoke =>NULL() ! x-dir surface stokes drift
real, pointer, dimension(:,:) :: vstoke =>NULL() ! y-dir surface stokes drift
real, pointer, dimension(:,:) :: wavlen =>NULL() ! wave length
#IFDEF COUP_OAS !sandra
#IFDEF OASIS_IOW_ESM
real, pointer, dimension(:,:) :: u_wind =>NULL() ! u_wind for wave_model
real, pointer, dimension(:,:) :: v_wind =>NULL() ! v_wind for wave model
#ENDIF

30
src/mom5/ocean_wave/ocean_wave.F90

@ -393,15 +393,31 @@ end subroutine ocean_wave_init
! time step the wave model
! </DESCRIPTION>
!
#IFDEF OASIS_IOW_ESM
subroutine ocean_wave_model(Time, Waves, Ice_ocean_boundary, type_atmos)
type(ocean_time_type), intent(in) :: Time
type(ocean_wave_type), intent(inout) :: Waves
type(ice_ocean_boundary_type), intent(in) :: Ice_ocean_boundary
CHARACTER(*), OPTIONAL, INTENT(IN) :: type_atmos
#ELSE
subroutine ocean_wave_model(Time, Waves, Ice_ocean_boundary)
type(ocean_time_type), intent(in) :: Time
type(ocean_wave_type), intent(inout) :: Waves
type(ice_ocean_boundary_type), intent(in) :: Ice_ocean_boundary
#ENDIF
integer :: i,j
integer :: ndtt, nww
real :: wmax, cspeed, dtwmax, cm
#IFDEF OASIS_IOW_ESM
CHARACTER (len=16) :: type_atmos_local
IF(present(type_atmos)) THEN
type_atmos_local=type_atmos
ELSE
type_atmos_local='none'
ENDIF
#ENDIF
if ( .not.module_is_initialized ) return
if(debug_this_module) then
@ -419,12 +435,16 @@ subroutine ocean_wave_model(Time, Waves, Ice_ocean_boundary)
windx = 0.0
windy = 0.0
#IFDEF COUP_OAS !sandra
wrk1(isc:iec,jsc:jec)=Ice_ocean_boundary%u_wind(isc:iec,jsc:jec)
wrk2(isc:iec,jsc:jec)=Ice_ocean_boundary%v_wind(isc:iec,jsc:jec)
#ELSE
#IFDEF OASIS_IOW_ESM
IF (TRIM(type_atmos_local) == 'flux_calculator') THEN
wrk1(isc:iec,jsc:jec)=Ice_ocean_boundary%u_wind(isc:iec,jsc:jec)
wrk2(isc:iec,jsc:jec)=Ice_ocean_boundary%v_wind(isc:iec,jsc:jec)
ELSEIF (TRIM(type_atmos_local) == 'none') THEN
#ENDIF
call data_override('OCN', 'u_bot', wrk1, Time%model_time )
call data_override('OCN', 'v_bot', wrk2, Time%model_time )
#IFDEF OASIS_IOW_ESM
ENDIF
#ENDIF
do j=jsc,jec

2
src/oasis_interface/oas_define.F90

@ -1,4 +1,4 @@
#IFDEF COUP_OAS
#IFDEF OASIS_IOW_ESM
SUBROUTINE oas_define(local_comm)
!
! grid definitions for OASIS

2
src/oasis_interface/oas_finalize.F90

@ -1,4 +1,4 @@
#IFDEF COUP_OAS
#IFDEF OASIS_IOW_ESM
SUBROUTINE oas_finalize
! organization of MPI ending by OASIS

2
src/oasis_interface/oas_init.F90

@ -1,4 +1,4 @@
#IFDEF COUP_OAS
#IFDEF OASIS_IOW_ESM
SUBROUTINE oas_init(local_comm)

2
src/oasis_interface/oas_receive.F90

@ -1,4 +1,4 @@
#IFDEF COUP_OAS
#IFDEF OASIS_IOW_ESM
SUBROUTINE oas_recieve( kid, kstep, pdata, kinfo )
!!---------------------------------------------------------------------

163
src/oasis_interface/oas_receive_field.F90

@ -1,163 +0,0 @@
#IFDEF COUP_OAS
SUBROUTINE oas_receive_field(Ice,Ice_boundary,Ice_Ocean_Boundary,Time_start,Timet)
USE oas_vardef
USE mpp_mod, only: mpp_pe, mpp_root_pe
USE time_manager_mod, only : get_time, get_time,operator(-),time_type
USE ice_model_mod, only: ice_data_type,atmos_ice_boundary_type
USE ocean_model_mod, only: ice_ocean_boundary_type
USE netcdf
USE ice_grid_mod
IMPLICIT NONE
INTEGER :: &
maskt(iec-isc+1,jec-jsc+1), & ! mask array
maskc(iec-isc+1,jec-jsc+1) ! mask array
type(time_type), intent(in) :: Time_start,Timet ! for coupling sandra
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
INTEGER :: &
isec,sec,day, tcks, &
ncfileid, ncvarid, & ! NetCDF IDs
sc,dy,jn,k, &
nrcvinfo(nfld_rcv_tot) ! OASIS info argument
REAL(kind=8) :: &
ztmp1 (iec,jec)
nrcvinfo (:) = OASIS_idle
ztmp1 (:,:) = 0.0
! call get_time(Ice%Time-Ice%Time_init,sc,dy)
! isec = sc+(dy*86400)
! call get_time(Ice%Time_step_slow,scs,dys)
! call get_time(Ice%Time-Time_start, sc, dy)
call get_time(Timet-Time_start, sc, dy)
isec = (864e2*dy+sc)!-(864e2*dys+scs)
! isec = (nsteps) * dt_clpd
!IF (ltime) CALL get_timings (i_cpl_add_comp, ntstep, dt, izerror)
!------------------------------------------------------------------------------
! Receive all coupling fields
!-------------------------------------------------------------------------------
#ifdef OASIS_IOW_ESM
! Do not read here, use instead oas_exchange_fields module
#else
DO jn = 1, nfld_rcv_tot
! IF( srcv(jn)%laction ) THEN
CALL oas_recieve( jn, isec, ztmp1(:,:), nrcvinfo(jn) )
! write(*,*) " nrcvinfo(jn) ", nrcvinfo(jn), jn, OASIS_Rcv, isec
IF( nrcvinfo(jn) == OASIS_Rcv ) frcv(:,:,jn)=ztmp1(:,:)
! ENDIF
ENDDO
!write(*,*)" oasis receive laction: " , srcv(jn)%laction, isec
!IF (ltime) CALL get_timings (i_cpl_get, ntstep, dt, izerror)
istatus=nf90_open('masks.nc', NF90_NOWRITE, ncfileid)
istatus=nf90_inq_varid(ncfileid, 'tmom.msk' , ncvarid)
istatus=nf90_get_var(ncfileid, ncvarid, maskt, &
(/ isc, jsc /), (/ iec-isc+1,jec-jsc+1 /))
istatus=nf90_inq_varid(ncfileid, 'cmom.msk' , ncvarid)
istatus=nf90_get_var(ncfileid, ncvarid, maskc, &
(/ isc, jsc /), (/ iec-isc+1,jec-jsc+1 /))
istatus=nf90_close(ncfileid)
jn = 1
! IF( nrcvinfo(jn) == OASIS_Rcv ) THEN ! rain 1)
do k = 1, size(Ice_boundary%lprec,3)
WHERE (maskt == 0) Ice_boundary%lprec(isc:iec,jsc:jec,k) = frcv(isc:iec,jsc:jec,jn)
enddo
! ENDIF
jn = jn + 1
! IF( nrcvinfo(jn) == OASIS_Rcv ) THEN ! evaporation 2)
do k = 1, size(Ice_boundary%q_flux,3)
WHERE (maskt == 0) Ice_boundary%q_flux(isc:iec,jsc:jec,k) = -frcv(isc:iec,jsc:jec,jn)
enddo
! ENDIF
jn = jn + 1
! IF( nrcvinfo(jn) == OASIS_Rcv ) THEN ! snow 3)
do k = 1, size(Ice_boundary%fprec,3)
WHERE (maskt == 0) Ice_boundary%fprec(isc:iec,jsc:jec,k) = frcv(isc:iec,jsc:jec,jn)
enddo
! ENDIF
jn = jn + 1
! IF( nrcvinfo(jn) == OASIS_Rcv ) THEN ! sea level pressure 4)
do k = 1, size(Ice_boundary%p,3)
WHERE (maskt == 0) Ice_boundary%p(isc:iec,jsc:jec,k) = frcv(isc:iec,jsc:jec,jn)
enddo
! ENDIF
jn = jn + 1
! IF( nrcvinfo(jn) == OASIS_Rcv ) THEN ! u velocity 5)
WHERE (maskc == 0) Ice_Ocean_Boundary%u_wind(isc:iec,jsc:jec) = frcv(isc:iec,jsc:jec,jn)
! ENDIF
jn = jn + 1
! IF( nrcvinfo(jn) == OASIS_Rcv ) THEN ! v velocity 6)
WHERE (maskc == 0) Ice_Ocean_Boundary%v_wind(isc:iec,jsc:jec) = frcv(isc:iec,jsc:jec,jn)
! ENDIF
jn = jn + 1
! IF( nrcvinfo(jn) == OASIS_Rcv ) THEN ! u wind stress 7)
do k = 1, size(Ice_boundary%u_flux,3)
WHERE (maskc == 0) Ice_boundary%u_flux(isc:iec,jsc:jec,k) = -frcv(isc:iec,jsc:jec,jn)
enddo
! ENDIF
jn = jn + 1
! IF( nrcvinfo(jn) == OASIS_Rcv ) THEN ! v wind stress 8)
do k = 1, size(Ice_boundary%v_flux,3)
WHERE (maskc == 0) Ice_boundary%v_flux(isc:iec,jsc:jec,k) = -frcv(isc:iec,jsc:jec,jn)
enddo
! ENDIF
jn = jn + 1
! IF( nrcvinfo(jn) == OASIS_Rcv ) THEN ! longwave radiation upward 9)
do k = 1, size(Ice_boundary%lw_flux,3)
WHERE (maskt == 0) Ice_boundary%lw_flux(isc:iec,jsc:jec,k) = frcv(isc:iec,jsc:jec,jn)
enddo
! ENDIF
jn = jn + 1
! IF( nrcvinfo(jn) == OASIS_Rcv ) THEN ! longwave radiation downward 10)
do k = 1, size(Ice_boundary%lw_flux,3)
WHERE (maskt == 0) Ice_boundary%lw_flux(isc:iec,jsc:jec,k) = -Ice_boundary%lw_flux(isc:iec,jsc:jec,k) + frcv(isc:iec,jsc:jec,jn)
enddo
! ENDIF
jn = jn + 1
! IF( nrcvinfo(jn) == OASIS_Rcv ) THEN ! shortwave radiation direct 11)
do k = 1, size(Ice_boundary%sw_flux_vis_dir,3)
WHERE (maskt == 0) Ice_boundary%sw_flux_vis_dir(isc:iec,jsc:jec,k) = frcv(isc:iec,jsc:jec,jn)
enddo
! ENDIF
jn = jn + 1
! IF( nrcvinfo(jn) == OASIS_Rcv ) THEN ! shortware radiation diffusive 12)
do k = 1, size(Ice_boundary%sw_flux_vis_dif,3)
WHERE (maskt == 0) Ice_boundary%sw_flux_vis_dif(isc:iec,jsc:jec,k) = frcv(isc:iec,jsc:jec,jn)
enddo
! ENDIF
jn = jn + 1
! IF( nrcvinfo(jn) == OASIS_Rcv ) THEN ! latent heat flux 13)
do k = 1, size(Ice_boundary%lh_flux,3)
WHERE (maskt == 0) Ice_boundary%lh_flux(isc:iec,jsc:jec,k) = -frcv(isc:iec,jsc:jec,jn)
enddo
! ENDIF
jn = jn + 1
! IF( nrcvinfo(jn) == OASIS_Rcv ) THEN ! sensible heat flux 14)
do k = 1, size(Ice_boundary%t_flux,3)
WHERE (maskt == 0) Ice_boundary%t_flux(isc:iec,jsc:jec,k) = -frcv(isc:iec,jsc:jec,jn)
enddo
! ENDIF
#endif
END SUBROUTINE oas_receive_field
#ENDIF

2
src/oasis_interface/oas_send.F90

@ -1,4 +1,4 @@
#IFDEF COUP_OAS
#IFDEF OASIS_IOW_ESM
SUBROUTINE oas_send( kid, kstep, pdata1, kinfo)
!!---------------------------------------------------------------------

90
src/oasis_interface/oas_send_field.F90

@ -1,90 +0,0 @@
#IFDEF COUP_OAS
SUBROUTINE oas_send_field(Ice,Time_start,Timet)
!!---------------------------------------------------------------------
!! *** ROUTINE send_fld ***
!!
!! ** Purpose : Prepare and send coupling fields to OASIS
!!
!!----------------------------------------------------------------------
USE oas_vardef
USE mpp_mod, only: mpp_pe, mpp_root_pe
USE ice_grid_mod
USE ice_type_mod, only: ice_data_type
USE time_manager_mod, only : get_time,get_time,operator(-),time_type
USE netcdf
IMPLICIT NONE
!
! local parameters, variables and arrays
!
INTEGER :: &
isec, &
kinfo, &
il_var_id(16), &
dimids(2), &
k,j,i,jn,sc,dy, &
dt,tcks,sec,day
REAL (KIND=8) :: &
ztmp1 (iec,jec), &
ztmp2 (iec,jec)
TYPE (ice_data_type), INTENT(IN) :: Ice
type(time_type), intent(in) :: Time_start,Timet ! for coupling sandra
! ! call get_time(Ice%Time-Ice%Time_init,sc,dy)
! ! isec = sc+(dy*86400)
! ! call get_time(Ice%Time_step_slow,scs,dys)
! ! call get_time(Ice%Time-Time_start, sc, dy)
! call get_time(Timet-Time_start, sc, dy)
! isec = (864e2*dy+sc)
! ! write(*,*) "Time",Ice%Time,Time_start,Ice%Time_init,isec
! !----------------------------------------------------------------------------
! ! handling of sent fields
! !----------------------------------------------------------------------------
! jn = 1.0
! ztmp1(:,:)=0.0
! ztmp2(:,:)=0.0
! !write(*,*)" oasis send laction: " , ssnd(jn)%laction, isec
! !! jn = jn + 1
! ! IF( ssnd(jn)%laction ) THEN ! sea surface temperature
! ! write(*,*) "max t_surf mom: ",MAXVAL(Ice%t_surf(isc:iec,jsc:jec,1)), isec
! ! write(*,*) "min t_surf mom: ",MINVAL(Ice%t_surf(isc:iec,jsc:jec,1)), isec
! ! ztmp1(:,:)=0.
! ! do k=1,1 !,km
! ! do j = jsc, jec
! ! do i = isc, iec
! ! ztmp1(i,j) = ztmp1(i,j) + Ice%t_surf(i,j,k)
! ! enddo
! ! enddo
! ! enddo
! ztmp1(isc:iec,jsc:jec) =Ice%t_surf(isc:iec,jsc:jec,1)
! CALL oas_send (jn, isec,ztmp1, kinfo )
! ! ENDIF
! jn = jn + 1
! ! IF( ssnd(jn)%laction ) THEN ! sea ice area fraction
! ztmp2(:,:)=0.
! do k=2,km
! do j = jsc, jec
! do i = isc, iec
! ztmp2(i,j) = ztmp2(i,j) + Ice%part_size(i,j,k)
! enddo
! enddo
! enddo
! CALL oas_send (jn, isec, ztmp2, kinfo )
! ! ENDIF
END SUBROUTINE oas_send_field
#ENDIF

9
src/oasis_interface/oas_vardef.F90

@ -1,4 +1,4 @@
#IFDEF COUP_OAS
#IFDEF OASIS_IOW_ESM
MODULE oas_vardef
!Controls, definitions and variables
@ -32,6 +32,8 @@ IMPLICIT NONE
CHARACTER(len=128) :: comp_out ! name of the output log file
CHARACTER(len=3) :: chout
CHARACTER(len=16) :: type_atmos = 'flux_calculator'
TYPE :: CPL_FLD
CHARACTER(LEN = 1) :: clgrid ! Grid type
LOGICAL :: laction = .TRUE. ! To be coupled or not
@ -39,13 +41,8 @@ IMPLICIT NONE
INTEGER :: vari_id ! Id of the field
END TYPE CPL_FLD
#IFDEF OASIS_IOW_ESM
INTEGER, PARAMETER :: nfld_snd_tot=18
INTEGER, PARAMETER :: nfld_rcv_tot=49
#ELSE
INTEGER, PARAMETER :: nfld_snd_tot=2
INTEGER, PARAMETER :: nfld_rcv_tot=14
#ENDIF
TYPE(CPL_FLD), ALLOCATABLE :: &
srcv(:), & ! All fields to be received

Loading…
Cancel
Save