From a8cca85a529e6ad28149517cabad0bd94d90f650 Mon Sep 17 00:00:00 2001 From: Joseph Zhang Date: Thu, 15 Aug 2024 13:11:12 -0400 Subject: [PATCH] Add check in util script for vectors --- .../Post-Processing-Fortran/read_output10_allnodes.f90 | 5 ++++- .../Post-Processing-Fortran/read_output10_transect.f90 | 5 ++++- src/Utility/Post-Processing-Fortran/read_output10_xyt.f90 | 5 ++++- src/Utility/Post-Processing-Fortran/read_output10_xyz.f90 | 5 ++++- src/Utility/Post-Processing-Fortran/read_output10_xyzt.f90 | 5 ++++- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/Utility/Post-Processing-Fortran/read_output10_allnodes.f90 b/src/Utility/Post-Processing-Fortran/read_output10_allnodes.f90 index 22c36f3f8..7b944f4f9 100644 --- a/src/Utility/Post-Processing-Fortran/read_output10_allnodes.f90 +++ b/src/Utility/Post-Processing-Fortran/read_output10_allnodes.f90 @@ -221,7 +221,10 @@ program read_out !Find nc file file63=varname(1:len_var)//'_'//it_char(1:leng)//'.nc' - if(ivs==2) varname2=varname(1:len_var-1)//'Y' + if(ivs==2) then + if(varname(len_var:len_var).ne."X") stop 'Vector name must end with X' + varname2=varname(1:len_var-1)//'Y' + endif inquire(file=file63,exist=lexist) if(lexist) then i23d=2 !3D var diff --git a/src/Utility/Post-Processing-Fortran/read_output10_transect.f90 b/src/Utility/Post-Processing-Fortran/read_output10_transect.f90 index 657d34f20..635f2be97 100644 --- a/src/Utility/Post-Processing-Fortran/read_output10_transect.f90 +++ b/src/Utility/Post-Processing-Fortran/read_output10_transect.f90 @@ -234,7 +234,10 @@ program read_out !Find nc file file63=varname(1:len_var)//'_'//it_char(1:leng)//'.nc' - if(ivs==2) varname2=varname(1:len_var-1)//'Y' + if(ivs==2) then + if(varname(len_var:len_var).ne."X") stop 'Vector name must end with X' + varname2=varname(1:len_var-1)//'Y' + endif inquire(file=file63,exist=lexist) if(lexist) then !3D var i23d=2 diff --git a/src/Utility/Post-Processing-Fortran/read_output10_xyt.f90 b/src/Utility/Post-Processing-Fortran/read_output10_xyt.f90 index 9afbe1f60..b8ead12e2 100644 --- a/src/Utility/Post-Processing-Fortran/read_output10_xyt.f90 +++ b/src/Utility/Post-Processing-Fortran/read_output10_xyt.f90 @@ -228,7 +228,10 @@ program read_out !Find nc file file63=varname(1:len_var)//'_'//it_char(1:leng)//'.nc' - if(ivs==2) varname2=varname(1:len_var-1)//'Y' + if(ivs==2) then + if(varname(len_var:len_var).ne."X") stop 'Vector name must end with X' + varname2=varname(1:len_var-1)//'Y' + endif inquire(file=file63,exist=lexist) if(lexist) then !3D var i23d=2 diff --git a/src/Utility/Post-Processing-Fortran/read_output10_xyz.f90 b/src/Utility/Post-Processing-Fortran/read_output10_xyz.f90 index 4d505804b..046f1c5c5 100644 --- a/src/Utility/Post-Processing-Fortran/read_output10_xyz.f90 +++ b/src/Utility/Post-Processing-Fortran/read_output10_xyz.f90 @@ -208,7 +208,10 @@ program read_out !Find nc file file63=varname(1:len_var)//'_'//it_char(1:leng)//'.nc' - if(ivs==2) varname2=varname(1:len_var-1)//'Y' + if(ivs==2) then + if(varname(len_var:len_var).ne."X") stop 'Vector name must end with X' + varname2=varname(1:len_var-1)//'Y' + endif inquire(file=file63,exist=lexist) if(lexist) then !3D var i23d=2 diff --git a/src/Utility/Post-Processing-Fortran/read_output10_xyzt.f90 b/src/Utility/Post-Processing-Fortran/read_output10_xyzt.f90 index e5df87f8b..a219ab3d5 100644 --- a/src/Utility/Post-Processing-Fortran/read_output10_xyzt.f90 +++ b/src/Utility/Post-Processing-Fortran/read_output10_xyzt.f90 @@ -210,7 +210,10 @@ program read_out !Find nc file file63=varname(1:len_var)//'_'//it_char(1:leng)//'.nc' - if(ivs==2) varname2=varname(1:len_var-1)//'Y' + if(ivs==2) then + if(varname(len_var:len_var).ne."X") stop 'Vector name must end with X' + varname2=varname(1:len_var-1)//'Y' + endif inquire(file=file63,exist=lexist) if(lexist) then !3D var i23d=2