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

Bug fix: process fill values of velocity

parent cee3e995
No related branches found
No related tags found
No related merge requests found
......@@ -100,7 +100,7 @@ add_executable(test_set_max_speed
${PROJECT_SOURCE_DIR}/Common/read_field_indices.F90
${PROJECT_SOURCE_DIR}/Common/read_eddy.f90
${PROJECT_SOURCE_DIR}/Common/shpc_create.f90
${PROJECT_SOURCE_DIR}/Common/write_eddy.f90)
${PROJECT_SOURCE_DIR}/Common/write_eddy.f90 get_var.f90)
target_link_libraries(test_set_max_speed Geometry::geometry
Numer_Rec_95::numer_rec_95 NetCDF95::netcdf95 Shapelib_03::shapelib_03
......
program test_set_max_speed
use, intrinsic:: ISO_FORTRAN_ENV
use, intrinsic:: ieee_arithmetic, only: ieee_value, IEEE_QUIET_NAN
! Libraries:
use jumble, only: new_unit, count_lines, get_command_arg_dyn
......@@ -10,6 +12,7 @@ program test_set_max_speed
use nr_util, only: deg_to_rad
use derived_types, only: eddy, shpc
use get_var_m, only: get_var
use read_eddy_m, only: read_eddy
use set_max_speed_m, only: set_max_speed
use shpc_close_m, only: shpc_close
......@@ -57,15 +60,16 @@ program test_set_max_speed
print *, "Reading from uv.nc..."
call nf95_open("uv.nc", nf90_nowrite, ncid)
allocate(u(nlon, nlat), v(nlon, nlat))
call nf95_inq_varid(ncid, "ugos", varid)
call nf95_get_var(ncid, varid, u)
call nf95_inq_varid(ncid, "vgos", varid)
call nf95_get_var(ncid, varid, v)
call get_var(periodic = .false., max_rad_lon = 0, values = u, ncid = ncid, &
nlon = nlon, name = "ugos", &
new_fill_value = ieee_value(0., IEEE_QUIET_NAN))
call get_var(periodic = .false., max_rad_lon = 0, values = v, ncid = ncid, &
nlon = nlon, name = "vgos", &
new_fill_value = ieee_value(0., IEEE_QUIET_NAN))
! (We will need quiet NaNs rather the original fill values for u and
! v when we compute the max-speed contours and when we search the
! ssh of max-speed contours.)
call nf95_close(ncid)
print *, "Reading from shapefiles..."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment