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

Read `ishape_last.txt`

Instead of hard-coding a value.
parent b740c192
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@ program test_read_snapshot
character(len = :), allocatable:: shpc_dir
type(snapshot) s
TYPE(shp_tr) hshp
integer k1, copy, unit
integer k1, copy, unit, ishape_last
real:: corner_deg(2) = [0.125, - 59.875]
! longitude and latitude of the corner of the whole grid in input
......@@ -63,10 +63,15 @@ program test_read_snapshot
"test_read_snapshot dist_lim")
copy = merge(dist_lim, 0, periodic)
open(unit, file = shpc_dir // "/ishape_last.txt", status = "old", &
action = "read", position = "rewind")
read(unit, fmt = *) ishape_last ! first date
close(unit)
call shp_tr_open(hshp, trim(shpc_dir), rank = 0)
call dbf_read_attribute_03(k1, hshp%extremum, hshp%extr_date, ishape = 0)
call read_snapshot(s, k1, hshp, corner_deg * deg_to_rad, &
step_deg * deg_to_rad, nlon, nlat, copy, k1, ishape_last = [3])
step_deg * deg_to_rad, nlon, nlat, copy, k1, [ishape_last])
CALL shp_tr_close(hshp)
call write_snapshot(s, corner_deg, step_deg, nlon, nlat, copy, k1)
......
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