response table の相対パスを設定ファイルの配置ディレクトリ基準へ解決する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | config_path | |||
| type(app_config), | intent(inout) | :: | cfg |
subroutine resolve_surface_current_model_path(config_path, cfg) character(len=*), intent(in) :: config_path type(app_config), intent(inout) :: cfg character(len=:), allocatable :: resolved_path integer :: directory_end if (.not. cfg%surface_current%has_response_table_path) return if (len_trim(cfg%surface_current%response_table_path) == 0) return if (cfg%surface_current%response_table_path(1:1) == '/') return directory_end = scan(trim(config_path), '/', back=.true.) if (directory_end == 0) return resolved_path = config_path(:directory_end)//trim(cfg%surface_current%response_table_path) if (len(resolved_path) > len(cfg%surface_current%response_table_path)) then error stop 'Resolved surface_current_model.response_table_path is too long.' end if cfg%surface_current%response_table_path = resolved_path end subroutine resolve_surface_current_model_path