<commit_before>program nc_diag_cat
    use netcdf
    use netcdf_unlimdims
    use ncdc_realloc
    use kinds
    
    ! NCDC = Net CDF Diag Concatenation
#include "ncdc_cli_decl.F90"
#include "ncdc_metadata_decl.F90"
#include "ncdc_data_decl.F90"
    logical                            :: enable_info = .TRUE.
    
    integer(i_long)                    :: ncid_output, ncid_input
    
    integer, parameter                 :: NC_DIAG_CAT_GZIP_COMPRESS = 6
    integer, parameter                 :: NC_DIAG_CAT_CHUNK_SIZE = 16384
    
    call nc_diag_cat_process_args
    
#ifndef NO_NETCDF
    write (*,"(A, A, A)") 'Initializing netcdf layer library, version ', trim(nf90_inq_libvers()), '...'
    !call string_before_delimiter(trim(nf90_inq_libvers()), " ", version_num)
#endif
    
    call info("Creating new NetCDF file: " // trim(output_file))
#ifndef NO_NETCDF
    call check( nf90_create(output_file, OR(NF90_NETCDF4, NF90_CLOBBER), ncid_output, &
        0) )
#endif
    
    ! nc_diag_cat steps:
    !   1) Do a quick pass to read metadata, then allocate space as
    !      necessary.
    !   2) Define variables with metadata. Do NOT store attributes.
    !   3) Read each file again, this time concatenating everything
    !      as we go.
    
    call nc_diag_cat_metadata_pass
    call nc_diag_cat_metadata_define
    
#ifdef DEBUG
    print *, "MAIN: trigger data pass!"
#endif
    
    call nc_diag_cat_data_pass
    
    call nc_diag_cat_metadata_define
        
#ifdef DEBUG
    print *, "ALL DONE!"
#endif
    
    call info("All data queued, letting NetCDF take over (and actually write)!")
    
    call check(nf90_close(ncid_output))
    
    call info("All done!")
    
    contains
        
#include "ncdc_util.F90"
#include "ncdc_cli_imp.F90"
#include "ncdc_metadata_imp.F90"
#include "ncdc_data_imp.F90"
end program nc_diag_cat<commit_msg>Fixed commit issue with define -> alloc split<commit_after>program nc_diag_cat
    use netcdf
    use netcdf_unlimdims
    use ncdc_realloc
    use kinds
    
    ! NCDC = Net CDF Diag Concatenation
#include "ncdc_cli_decl.F90"
#include "ncdc_metadata_decl.F90"
#include "ncdc_data_decl.F90"
    logical                            :: enable_info = .TRUE.
    
    integer(i_long)                    :: ncid_output, ncid_input
    
    integer, parameter                 :: NC_DIAG_CAT_GZIP_COMPRESS = 6
    integer, parameter                 :: NC_DIAG_CAT_CHUNK_SIZE = 16384
    
    call nc_diag_cat_process_args
    
#ifndef NO_NETCDF
    write (*,"(A, A, A)") 'Initializing netcdf layer library, version ', trim(nf90_inq_libvers()), '...'
    !call string_before_delimiter(trim(nf90_inq_libvers()), " ", version_num)
#endif
    
    call info("Creating new NetCDF file: " // trim(output_file))
#ifndef NO_NETCDF
    call check( nf90_create(output_file, OR(NF90_NETCDF4, NF90_CLOBBER), ncid_output, &
        0) )
#endif
    
    ! nc_diag_cat steps:
    !   1) Do a quick pass to read metadata, then allocate space as
    !      necessary.
    !   2) Define variables with metadata. Do NOT store attributes.
    !   3) Read each file again, this time concatenating everything
    !      as we go.
    
    call nc_diag_cat_metadata_pass
    call nc_diag_cat_metadata_define
    
#ifdef DEBUG
    print *, "MAIN: trigger data pass!"
#endif
    
    call nc_diag_cat_metadata_alloc
    call nc_diag_cat_data_pass
        
#ifdef DEBUG
    print *, "ALL DONE!"
#endif
    
    call info("All data queued, letting NetCDF take over (and actually write)!")
    
    call check(nf90_close(ncid_output))
    
    call info("All done!")
    
    contains
        
#include "ncdc_util.F90"
#include "ncdc_cli_imp.F90"
#include "ncdc_metadata_imp.F90"
#include "ncdc_data_imp.F90"
end program nc_diag_cat
{'fraction_non_alphanumeric': 0.08439490445859872, 'fraction_numerical': 0.019639065817409766, 'mean_word_length': 2.6663424124513617, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '2199662', 'n_tokens_mistral': 1364, 'n_tokens_neox': 1325, 'n_words': 315}