Skip to content

Commit

Permalink
Add check in util script for vectors
Browse files Browse the repository at this point in the history
  • Loading branch information
josephzhang8 committed Aug 15, 2024
1 parent 915ef34 commit a8cca85
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion src/Utility/Post-Processing-Fortran/read_output10_xyt.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion src/Utility/Post-Processing-Fortran/read_output10_xyz.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion src/Utility/Post-Processing-Fortran/read_output10_xyzt.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a8cca85

Please sign in to comment.