Read the lookup table from file (in binary, potentially unportable)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(LT_t), | intent(inout) | :: | my_lt | |||
| character(len=*), | intent(in) | :: | filename |
subroutine LT_from_file(my_lt, filename) type(LT_t), intent(inout) :: my_lt character(len=*), intent(in) :: filename integer :: my_unit open(newunit=my_unit, file=trim(filename), form='UNFORMATTED',& access='STREAM', status='OLD') read(my_unit) my_lt%n_points, my_lt%n_cols read(my_unit) my_lt%x_min, my_lt%dx, my_lt%inv_dx allocate(my_lt%cols_rows(my_lt%n_cols, my_lt%n_points)) allocate(my_lt%rows_cols(my_lt%n_points, my_lt%n_cols)) read(my_unit) my_lt%cols_rows my_lt%rows_cols = transpose(my_lt%cols_rows) close(my_unit) end subroutine LT_from_file