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

Do not read time from NetCDF file

As for the program `inst_eddies`.
parent d0a1d14e
No related branches found
No related tags found
No related merge requests found
......@@ -6,8 +6,8 @@ program test_get_1_outerm
use jumble, only: new_unit, count_lines
use netcdf, only: nf90_nowrite
use netcdf95, only: nf95_open, nf95_close, nf95_inq_varid, nf95_get_var, &
nf95_gw_var, find_coord, nf95_get_att
use nr_util, only: deg_to_rad, assert
nf95_gw_var
use nr_util, only: deg_to_rad
use derived_types, only: eddy, shpc, null_ssh_contour, missing_speed
use get_1_outerm_m, only: get_1_outerm
......@@ -31,8 +31,6 @@ program test_get_1_outerm
logical:: cyclone = .true.
TYPE(shpc) hshp
character(len = 30) time_unit
real time
type(eddy) e
real, allocatable:: outside_points(:, :) ! (2, :) longitude and
......@@ -62,20 +60,9 @@ program test_get_1_outerm
call nf95_inq_varid(ncid, "adt", varid)
call nf95_gw_var(ncid, varid, ssh)
! Get the date:
call find_coord(ncid, varid = varid, std_name = "time")
call nf95_get_att(ncid, varid, name = "units", values = time_unit)
call assert(time_unit == "days since 1950-01-01 00:00:00" &
.or. time_unit == "days since 1950-1-1 00:00:00", "main: bad time unit")
! We are assuming there is a single date in the input file:
call nf95_get_var(ncid, varid, time)
days_1950 = nint(time)
call assert(abs(time - days_1950) < 0.1, "main: bad time value")
call nf95_close(ncid)
print *, "days_1950 = ?"
read *, days_1950
step = [longitude(2) - longitude(1), latitude(2) - latitude(1)]
print *, "Reading from outside_points.csv..."
......
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