Table with discontinuous lines and uneven spaces

tables

I am using "Overleaf" and I am having troubles with the definition of a table. I would like to have a table with continuous lines and equally spaced columns both in vertical and horizontal dimensions.
The code is the following:

    \usepackage{tabularx,booktabs}
    \begin{document}
    \begin{table}[h!]
     \begin{center}
    \bigskip
    \begin{tabular}{|*{8}{p{11mm}|}}
        

       \toprule
         \multicolumn{1}{c}{Method} & &
     \multicolumn{2}{c|}{I assimilation} & \multicolumn{2}{c|}{II assimilation} & \multicolumn{2}{c|}{III assimilation}  \\
            
            \cmidrule(lr){3-4} \cmidrule(lr){5-6}\cmidrule(lr){7-8}
          \multicolumn{1}{c}{} & & \multicolumn{1}{c}{\textbf{PF}} & \textbf{PN}&\textbf{PF} & \textbf{PN}&\textbf{PF} & \textbf{PN} \\
            \cline{1-8}
         
        {Open Loop} &{\textbf{OF}} & {?} & {?} & {?} & {?} & {?} & {?} \\
        
     &{\textbf{ON}}& {?} & {?} & {?} & {?} &{?} &{?} \\
        \cline{2-8}
        {TPF} &{\textbf{OF}} & {?} & {?} & {?} & {?} & {?}& {?}\\ 
        
         &{\textbf{ON}}& {?} &{?} & {?} & {?} & {?} & {?} \\ 
        
        
        \end{tabular}
          \bigskip
 \end{center}
\end{table}
\end{document}

Best Answer

With tabularay package is simple:

\documentclass{article}
\usepackage{tabularray}
\UseTblrLibrary{booktabs}

\begin{document}
\begin{table}[ht]
     \centering
\begin{tblr}{vlines,
             colspec={*{8}{X[c]}},
             column{2}={font=\bfseries},
                row{2}={font=\bfseries},
             }
    \toprule
\SetCell[r=2, c=2]{c} Method 
    &   &   \SetCell[c=2]{c} I assimilation 
            &   &   \SetCell[c=2]{c} II assimilation 
                    &   &   \SetCell[c=2]{c} III assimilation   
                            &                                   \\
    \midrule
     &          & PF    & PN    & PF    & PN    & PF    &   PN  \\
    \midrule
\SetCell[r=2]{c} {Open\\ Loop} 
    & OF    & ? & ? & ? & ? & ? & ?     \\
    & ON    & ? & ? & ? & ? & ? & ?     \\
    \cmidrule{2-8}
\SetCell[r=2]{c} TPF
    & OF    & ? & ? & ? & ? & ? & ?     \\
    & ON    & ? & ? & ? & ? & ? & ?     \\
    \bottomrule
    \end{tblr}
\end{table}
\end{document}

tabularray table

Related Question