LT_to_file Subroutine

public subroutine LT_to_file(my_lt, filename)

Write the lookup table to file (in binary, potentially unportable)

Arguments

Type IntentOptional Attributes Name
type(LT_t), intent(in) :: my_lt
character(len=*), intent(in) :: filename

Source Code

  subroutine LT_to_file(my_lt, filename)
    type(LT_t), intent(in)       :: my_lt
    character(len=*), intent(in) :: filename
    integer                      :: my_unit

    open(newunit=my_unit, file=trim(filename), form='UNFORMATTED',&
        access='STREAM', status='REPLACE')
    write(my_unit) my_lt%n_points, my_lt%n_cols
    write(my_unit) my_lt%x_min, my_lt%dx, my_lt%inv_dx
    write(my_unit) my_lt%cols_rows
    close(my_unit)
  end subroutine LT_to_file