Skip to content
Snippets Groups Projects
Commit dbcc3386 authored by Debolskiy Andrey's avatar Debolskiy Andrey :bicyclist_tone5:
Browse files

test for lib

parent 91a9bb8b
No related branches found
No related tags found
No related merge requests found
......@@ -3,26 +3,28 @@ project(scm_io)
set(CMAKE_CXX_STANDARD 14)
include_directories(src)
enable_language(Fortran)
find_package(netCDF-Fortran REQUIRED
HINTS /usr/local/lib/cmake/netCDF/)
set(dialect " -free -fimplicit-none ")
set(bounds "-free -fimplicit-none ")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} ${bounds} -g -fbacktrace -O0 -fcheck=all")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${dialect}")
include_directories(src)
set(plt_io
src/scm_io_plt.f90
src/test_io_plt.f90)
add_executable(test_plt ${plt_io})
#src/test_io_plt.f90
src/netcdf_io_module.f90
#src/test_netcdf.f90)
add_library(test_io ${plt_io})
find_package(netCDF-Fortran REQUIRED
HINTS /usr/local/Cellar/netcdf-fortran/4.6.1/lib/cmake/netCDF/)
target_include_directories(test_plt PRIVATE ${netCDF_INCLUDE_DIR})
target_link_libraries(test_plt PRIVATE netCDF-Fortran)
\ No newline at end of file
target_link_libraries(test_plt PRIVATE netCDF::netcdff)
\ No newline at end of file
! Created by Andrey Debolskiy on 14.06.2024.
program test_netcdf
use netcdf_io_module
implicit none
integer, parameter:: nt = 10, nx = 100
real t, x
real, dimension(nt) :: series_t;
real, dimension(nx) :: profile;
real, dimension(nx,nt) :: time_scan;
type (io_struct) :: file_nc;
character(20) fname
fname = 'test_io.nc'
call open_netcdf(trim(fname), file_nc, nt, nx, 1, 1)
end program test_netcdf
\ No newline at end of file
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