Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define new fates_param_reader_type type to abstract HLM-side param I/O #1096

Merged
merged 6 commits into from
Nov 17, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Remove is_host_file from new fates_param_reader_type API. (because in…
… practice, all callers use the FatesParametersInterface::RegisterParameter() default of false). Note this parameter is also called sync_with_host elsewhere.
johnpaulalex committed Oct 25, 2023
commit 3d0e54df146ec1dd005ffcad2987ebc8ffc6e50c
7 changes: 1 addition & 6 deletions main/FatesInterfaceMod.F90
Original file line number Diff line number Diff line change
@@ -2169,7 +2169,6 @@ subroutine FatesReadParameters(param_reader)

character(len=32) :: subname = 'FatesReadParameters'
class(fates_parameters_type), allocatable :: fates_params
logical :: is_host_file

if ( hlm_masterproc == itrue ) then
write(fates_log(), *) 'FatesParametersInterface.F90::'//trim(subname)//' :: CLM reading ED/FATES '//' parameters '
@@ -2182,11 +2181,7 @@ subroutine FatesReadParameters(param_reader)
call PRTRegisterParams(fates_params) ! PRT mod, only operates on fates_params class
call FatesSynchronizedParamsInst%RegisterParams(fates_params) !Synchronized params class in Synchronized params mod, only operates on fates_params class

is_host_file = .false.
call param_reader%Read(is_host_file, fates_params)

is_host_file = .true.
call param_reader%Read(is_host_file, fates_params)
call param_reader%Read(fates_params)

call FatesReceiveParams(fates_params)
call SpitFireReceiveParams(fates_params)
6 changes: 3 additions & 3 deletions main/FatesParametersInterface.F90
Original file line number Diff line number Diff line change
@@ -93,17 +93,17 @@ module FatesParametersInterface
end type fates_param_reader_type

abstract interface
subroutine Read_interface(this, is_host_file, fates_params )
subroutine Read_interface(this, fates_params )
!
! !DESCRIPTION:
! Read 'fates_params' parameters from appropriate filename given 'is_host_file'.
! Read 'fates_params' parameters from (HLM-provided) storage. Note this ignores
! the legacy parameter_type.sync_with_host setting.
!
! USES
import :: fates_param_reader_type
import :: fates_parameters_type
! !ARGUMENTS:
class(fates_param_reader_type) :: this
logical, intent(in) :: is_host_file
class(fates_parameters_type), intent(inout) :: fates_params
!-----------------------------------------------------------------------