program main
    use netcdf_io_module
    implicit none
    type(io_struct) :: ios
    real, dimension(10) :: time_data = (/1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0/)
    real, dimension(10) :: series_data = (/10.0, 9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0/)
    real, dimension(10, 10) :: timescan_data
    real, dimension(10) :: profile_data
    integer :: i, j

    ! Инициализация данных timescan и profile
    do i = 1, 10
        profile_data(i) = real(i)
        do j = 1, 10
            timescan_data(j, i) = real(j) + real(i)
        end do
    end do

    call open_netcdf('series_data.nc', ios, 10, 10)
    if (ios%is_open) then
        call write_series(ios, time_data, series_data)
        call write_timescan(ios, timescan_data)
        call write_profile(ios, profile_data)
        call close_netcdf(ios)
    else
        print *, 'Failed to open NetCDF file.'
    endif
end program main