Skip to content
Draft
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
26 changes: 24 additions & 2 deletions components/driver/source/driver_io_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,22 @@ end subroutine filelist_populator
!> @brief Callback interface for bespoke IO configuration
!> @param[in] config configuration to be passed in at call site
!> @param[in] clock Clock to be passed in at call site
subroutine io_configuration_callback(config,clock)
!> @param[in] legacy_read_intent The intention to read a legacy chkpnt
!> (may be overridden for some fields)
!> @param[in] legacy_read_intent The intention to write a legacy chkpnt
!> (may be overridden for some fields)
subroutine io_configuration_callback( config, &
clock, &
legacy_read_intent, &
legacy_write_intent )
use config_mod, only: config_type
use clock_mod, only : clock_type
use constants_mod, only : l_def
implicit none
type(config_type), intent(in) :: config
class(clock_type), intent(in) :: clock
logical(l_def), intent(in) :: legacy_read_intent
logical(l_def), intent(in) :: legacy_write_intent
end subroutine io_configuration_callback
end interface

Expand Down Expand Up @@ -109,6 +119,9 @@ subroutine init_io( context_name, &

logical(l_def) :: use_xios_io

logical(l_def), pointer :: legacy_read_intent
logical(l_def), pointer :: legacy_write_intent

use_xios_io = modeldb%config%io%use_xios_io()

! Allocate IO context type based on model configuration
Expand All @@ -125,8 +138,17 @@ subroutine init_io( context_name, &

call modeldb%io_contexts%get_io_context(context_name, context)
call context%set_current()

call modeldb%values%get_value( 'legacy_read_chkpnt_intent', &
legacy_read_intent )
call modeldb%values%get_value( 'legacy_write_chkpnt_intent', &
legacy_write_intent )

if (present(before_close)) then
call before_close(modeldb%config, modeldb%clock)
call before_close(modeldb%config, &
modeldb%clock, &
legacy_read_intent, &
legacy_write_intent)
end if

call context%close_context_definition()
Expand Down
9 changes: 5 additions & 4 deletions components/lfric-xios/source/lfric_xios_setup_mod.x90
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ contains

! Checkpoint domain parameters
character(len=str_def) :: domain_name, domain_fs_name
integer(kind=i_def), parameter :: domain_function_spaces(5) &
= (/W0, W1, W2, W3, Wtheta/)
integer(kind=i_def), parameter :: domain_function_spaces(7) &
= (/W0, W1, W2, W3, Wtheta, W2H, W2V/)
integer(kind=i_def) :: fs_index

! Variables needed to compute output domain coordinates in lat-long
Expand All @@ -288,8 +288,9 @@ contains
type(function_space_type), pointer :: output_field_fs => null()
type(function_space_type), pointer :: w2h_fs => null()

! Identify discontinuous spaces
integer(kind=i_def) :: use_i_index(2) = (/ W3, Wtheta /)

! Function spaces that can be written as layers of data
integer(kind=i_def) :: use_i_index(4) = (/ W3, Wtheta, W2H, W2V /)

! Factor to convert coords from radians to degrees if needed
! set as 1.0 for planar mesh
Expand Down
Loading