<commit_before>!>----------------------------------------------------------
!!  Handle reading and writing Linear wind Look up tables to/from disk
!!
!!  Look up tables are written from disk in a documented netCDF file (e.g. with all LUT options)
!!  When a LUT is read from disk, the options stored in that file are checked against the options
!!  specified for the current run. If they are compatible (x, y, and z shape) the LUT will be read
!!  If the options for the current run are not the same as those in the file, a warning is printed
!!  but and an error will be thrown, the model will continue, it will just use the options
!!  stored in the file so the LUT does not need to be regenerated.
!!
!!  @author
!!  <NAME> (<EMAIL>)
!!
!!----------------------------------------------------------
module linear_theory_lut_disk_io

    use data_structures
    use string,         only: str
    use netcdf
    use io_routines,    only: file_exists, io_read, check, io_read_attribute, io_add_attribute, io_maxDims, io_getdims
    implicit none

    private
    public :: read_lut
    public :: write_lut

    character(len=10), parameter :: lt_lut_version="1.1"

    interface write_var
        module procedure write_var_1d,write_var_6d
    end interface write_var

    interface check_attribute
        module procedure check_attribute_r,check_attribute_i,check_attribute_c
    end interface check_attribute
<commit_msg>Minor changes to lt_lut_io import<commit_after>!>----------------------------------------------------------
!!  Handle reading and writing Linear wind Look up tables to/from disk
!!
!!  Look up tables are written from disk in a documented netCDF file (e.g. with all LUT options)
!!  When a LUT is read from disk, the options stored in that file are checked against the options
!!  specified for the current run. If they are compatible (x, y, and z shape) the LUT will be read
!!  If the options for the current run are not the same as those in the file, a warning is printed
!!  but and an error will be thrown, the model will continue, it will just use the options
!!  stored in the file so the LUT does not need to be regenerated.
!!
!!  @author
!!  <NAME> (<EMAIL>)
!!
!!----------------------------------------------------------
module linear_theory_lut_disk_io

    use data_structures
    use string,         only: str
    use netcdf
    use io_routines,    only: file_exists, io_read, check, &
                              io_read_attribute, io_add_attribute, &
                              io_maxDims, io_getdims
    implicit none

    private
    public :: read_lut
    public :: write_lut

    character(len=10), parameter :: lt_lut_version="1.1"

    interface write_var
        module procedure write_var_1d,write_var_6d
    end interface write_var

    interface check_attribute
        module procedure check_attribute_r,check_attribute_i,check_attribute_c
    end interface check_attribute

{'fraction_non_alphanumeric': 0.13447098976109215, 'fraction_numerical': 0.004095563139931741, 'mean_word_length': 2.412107101280559, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1961124', 'n_tokens_mistral': 804, 'n_tokens_neox': 773, 'n_words': 334}