Skip to content
Snippets Groups Projects
Commit a9a17c1d authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Rename variable `n_shpc` to `n_slices`

parent e44d1ce3
No related branches found
No related tags found
No related merge requests found
...@@ -17,10 +17,10 @@ program test_read_snapshot ...@@ -17,10 +17,10 @@ program test_read_snapshot
character(len = :), allocatable:: shpc_dir character(len = :), allocatable:: shpc_dir
type(snapshot) s type(snapshot) s
TYPE(shpc_slice_handler), allocatable:: hshp(:) ! (n_shpc) TYPE(shpc_slice_handler), allocatable:: hshp(:) ! (n_slices)
type(shpc_slice_meta), allocatable:: ssm(:) ! (n_shpc) type(shpc_slice_meta), allocatable:: ssm(:) ! (n_slices)
integer copy, unit, k, i integer copy, unit, k, i
integer n_shpc ! number of input SHPC directories integer n_slices ! number of input SHPC directories
real:: corner_deg(2) = [0.125, - 59.875] real:: corner_deg(2) = [0.125, - 59.875]
! longitude and latitude of the corner of the whole grid in input ! longitude and latitude of the corner of the whole grid in input
...@@ -42,12 +42,12 @@ program test_read_snapshot ...@@ -42,12 +42,12 @@ program test_read_snapshot
!------------------------------------------------------------------------- !-------------------------------------------------------------------------
n_shpc = COMMAND_ARGUMENT_COUNT() n_slices = COMMAND_ARGUMENT_COUNT()
call assert(n_shpc /= 0, & call assert(n_slices /= 0, &
"Required arguments: SHPC-directory [SHPC-directory] ...") "Required arguments: SHPC-directory [SHPC-directory] ...")
allocate(hshp(n_shpc), ssm(n_shpc)) allocate(hshp(n_slices), ssm(n_slices))
do i = 1, n_shpc do i = 1, n_slices
call get_command_arg_dyn(i, shpc_dir) call get_command_arg_dyn(i, shpc_dir)
call shpc_open(hshp(i), trim(shpc_dir), pszaccess = "rb") call shpc_open(hshp(i), trim(shpc_dir), pszaccess = "rb")
call dbf_read_attribute_03(ssm(i)%d0, hshp(i)%extremum, & call dbf_read_attribute_03(ssm(i)%d0, hshp(i)%extremum, &
...@@ -81,7 +81,7 @@ program test_read_snapshot ...@@ -81,7 +81,7 @@ program test_read_snapshot
corner = corner_deg * deg_to_rad, step = step_deg * deg_to_rad, & corner = corner_deg * deg_to_rad, step = step_deg * deg_to_rad, &
copy = copy) copy = copy)
do i = 1, n_shpc do i = 1, n_slices
CALL shpc_close(hshp(i)) CALL shpc_close(hshp(i))
end do end do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment