Test reading netCDF files
May fail due to write failure
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
subroutine testRead
!! Test reading netCDF files
!! May fail due to write failure
logical,dimension(1)::results
real(wp),dimension(:),allocatable::x,y,z,t
real(wp),dimension(:,:),allocatable::XX,YY,F
character(3),dimension(:),allocatable::vars
call readGrid('data.nc',vars,x,y,z,t)
allocate(F(size(x),size(y)))
call readStep('data.nc',trim(adjustl(vars(1))),F,1)
XX = meshGridX(x,y)
YY = meshGridY(x,y)
results(1) = norm2(F-XX*YY)<1.0E-10_wp
if( .not.any(results) ) error stop "Failed testRead[Write] check"
end subroutine testRead