Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
36 changes: 24 additions & 12 deletions exp/MOM_compile.csh
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,11 @@ if ( ! -f $mppnccombine ) then
endif

set mkmf_lib = "$mkmf -f -m Makefile -a $code_dir -t $mkmfTemplate"
set lib_include_dirs = "$root/include $code_dir/shared/include $code_dir/shared/mpp/include"
if ( ! $?SPACK_GTRACERS_EXTERNAL ) then
set lib_include_dirs = "$root/include $code_dir/shared/include $code_dir/shared/mpp/include"
else
set lib_include_dirs = "$root/include $code_dir/shared/mpp/include"
endif

if ( $cosima_version ) then
echo "Including COSIMA version in build"
Expand All @@ -156,10 +160,14 @@ if ( $cosima_version ) then
set cppDefs = "$cppDefs -DCOSIMA_VERSION"
endif

# Build FMS.
source ./FMS_compile.csh

set includes = "-I$code_dir/shared/include -I$executable:h:h/lib_FMS -I$executable:h:h/lib_ocean"
if ( ! $?SPACK_GTRACERS_EXTERNAL ) then
echo "Building type=$type with internal FMS"
source ./FMS_compile.csh
set includes = "-I$code_dir/shared/include -I$executable:h:h/lib_FMS -I$executable:h:h/lib_ocean"
else
echo "Building type=$type with external FMS"
set includes = "-I$executable:h:h/lib_ocean"
endif

if ( $cosima_version ) then
set includes = "$includes -I$executable:h:h/lib_version/"
Expand Down Expand Up @@ -221,16 +229,16 @@ mkdir -p $executable:h
cd $executable:h
if( $type == MOM_solo ) then
set srcList = ( mom5/drivers )
set libs = "$executable:h:h/lib_ocean/lib_ocean.a $executable:h:h/lib_FMS/lib_FMS.a"
set libs = "$executable:h:h/lib_ocean/lib_ocean.a"
else if( $type == ACCESS-CM || $type == ACCESS-ESM) then
set srcList = ( access/accesscm_coupler )
set includes = "-I$executable:h:h/lib_FMS -I$executable:h:h/$type/lib_ocean"
set includes = "-I$executable:h:h/$type/lib_ocean"
set libs = "$executable:h:h/$type/lib_ocean/lib_ocean.a"
setenv OASIS true
else if( $type == ACCESS-OM || $type == ACCESS-OM-BGC) then
set srcList = ( access/accessom_coupler )
set includes = "-I$executable:h:h/lib_FMS -I$executable:h:h/$type/lib_ocean"
set libs = "$executable:h:h/$type/lib_ocean/lib_ocean.a $executable:h:h/lib_FMS/lib_FMS.a"
set includes = "-I$executable:h:h/$type/lib_ocean"
set libs = "$executable:h:h/$type/lib_ocean/lib_ocean.a"
else if( $type == MOM_SIS ) then
set srcList = ( coupler )
set includes = "$includes -I$executable:h:h/lib_ice -I$executable:h:h/lib_atmos_null -I$executable:h:h/lib_land_null"
Expand All @@ -256,12 +264,16 @@ else
exit 1
endif

if( $type == ACCESS-OM || $type == ACCESS-ESM) then
if( $type =~ ACCESS-* ) then
set srcList = ( $srcList access/shared )
endif

Comment thread
dougiesquire marked this conversation as resolved.
# Always include FMS
set libs = "$libs $executable:h:h/lib_FMS/lib_FMS.a"
if ( ! $?SPACK_GTRACERS_EXTERNAL ) then
set libs = "$libs $executable:h:h/lib_FMS/lib_FMS.a"
if( $type == ACCESS-CM || $type == ACCESS-ESM || $type == ACCESS-OM || $type == ACCESS-OM-BGC) then
set includes = "$includes -I$executable:h:h/lib_FMS"
endif
endif

if ( $cosima_version ) then
set libs = "$libs $executable:h:h/lib_version/lib_version.a"
Expand Down
8 changes: 7 additions & 1 deletion exp/ocean_compile.csh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ if( $type == ACCESS-OM || $type == ACCESS-CM || $type == ACCESS-OM-BGC || $type
if( $type == ACCESS-OM-BGC ) then
set srcList = ( $srcList mom5/ocean_csiro_bgc )
else if ( $type == ACCESS-OM || $type == ACCESS-ESM ) then
set srcList = ( $srcList mom5/ocean_bgc access/generic_tracers/generic_tracers access/generic_tracers/mocsy/src )

if ( ! $?SPACK_GTRACERS_EXTERNAL ) then
set srcList = ( $srcList mom5/ocean_bgc access/generic_tracers/generic_tracers access/generic_tracers/mocsy/src )
else
set srcList = ( $srcList mom5/ocean_bgc )
endif

endif
mkdir -p $executable:h:h/$type/$lib_name
cd $executable:h:h/$type/$lib_name
Expand Down
9 changes: 9 additions & 0 deletions src/access/shared/gtracer_flux.F90
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ subroutine flux_exchange_init (Time, Ocean, Ocean_state, Ice_ocean_boundary, atm
#if defined(ACCESS_CM)
allocate(Ice_ocean_boundary%co2(isc:iec,jsc:jec))
#endif
#if defined(ACCESS_OM) && defined(CSIRO_BGC)
allocate( &
Ice_ocean_boundary%iof_nit(isc:iec,jsc:jec), &
Ice_ocean_boundary%iof_alg(isc:iec,jsc:jec))
#endif

Ice_ocean_boundary%u_flux = 0.0
Ice_ocean_boundary%v_flux = 0.0
Expand All @@ -115,6 +120,10 @@ subroutine flux_exchange_init (Time, Ocean, Ocean_state, Ice_ocean_boundary, atm
#if defined(ACCESS_CM)
Ice_ocean_boundary%co2 = 0.0
#endif
#if defined(ACCESS_OM) && defined(CSIRO_BGC)
Ice_ocean_boundary%iof_nit = 0.0
Ice_ocean_boundary%iof_alg = 0.0
#endif

! Spawn 2D Ocean%fields FMS coupler type from 1D gas_fields_ocn
call coupler_type_spawn(gas_fields_ocn, Ocean%fields, (/isc,isc,iec,iec/), &
Expand Down
Loading