NOAA-EMC / NCEPLIBS-grib_util

This is a collection of NCEP GRIB related utilities.
Other
19 stars 11 forks source link

what does "unblocked" mean? #264

Closed edwardhartnett closed 11 months ago

edwardhartnett commented 11 months ago

In the utility grbindex.f we say:

!> The index file serves as a table of contents for the GRIB1 file, !> enabling quick access to the data. The GRIB1 file must be unblocked, !> but there can be a gap before the first grib message of at most 32000 !> bytes and gaps between messages of at most 4000 bytes.

What does unblocked mean?

In fortran we can have formatted vs. unformatted files, is that what is meant here?

@GeorgeGayno-NOAA @GeorgeVandenberghe-NOAA @AlexanderRichert-NOAA @Hang-Lei-NOAA any gueses?

GeorgeVandenberghe-NOAA commented 11 months ago

The Grib1 library was originally developed on IBM MVS systems in the 1980s and early 90s and the "file" on disk was a much more complex object with blocking and record sizes maintained in their analog to an inode which was an entry in the disk catalog describing the file. Grib1 files had to be streams of bits (like Unix files) with all of those descriptor entries empty. This was IBM MVS file type unblocked or u. All of this IBM MVS "crap" did improve disk performance by laying files fairly efficiently on disk and reducing fragmentation a lot.

The concept of blocked at the file level is irrelevant on unix systems for unix system calls. Blocking is critical in the filesystem code but programmer mistakes there cause performance problems, not errors (generally fatal in MVS) returned to the program.

On Sun, Sep 10, 2023 at 4:38 AM Edward Hartnett @.***> wrote:

In the utility grbindex.f we say:

!> The index file serves as a table of contents for the GRIB1 file, !> enabling quick access to the data. The GRIB1 file must be unblocked, !> but there can be a gap before the first grib message of at most 32000 !> bytes and gaps between messages of at most 4000 bytes.

What does unblocked mean?

In fortran we can have formatted vs. unformatted files, is that what is meant here?

@GeorgeGayno-NOAA https://github.com/GeorgeGayno-NOAA @GeorgeVandenberghe-NOAA https://github.com/GeorgeVandenberghe-NOAA @AlexanderRichert-NOAA https://github.com/AlexanderRichert-NOAA @Hang-Lei-NOAA https://github.com/Hang-Lei-NOAA any gueses?

— Reply to this email directly, view it on GitHub https://github.com/NOAA-EMC/NCEPLIBS-grib_util/issues/264, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANDS4FSBMCR6I7WB6WAGNCLXZV4BFANCNFSM6AAAAAA4SAVMQU . You are receiving this because you were mentioned.Message ID: @.***>

--

George W Vandenberghe

Lynker Technologies at NOAA/NWS/NCEP/EMC

5830 University Research Ct., Rm. 2141

College Park, MD 20740

@.***

301-683-3769(work) 3017751547(cell)

GeorgeVandenberghe-NOAA commented 11 months ago

My answer boils down to "don't worry about it on unix systems"

On Sun, Sep 10, 2023 at 7:25 AM George Vandenberghe - NOAA Affiliate < @.***> wrote:

The Grib1 library was originally developed on IBM MVS systems in the 1980s and early 90s and the "file" on disk was a much more complex object with blocking and record sizes maintained in their analog to an inode which was an entry in the disk catalog describing the file. Grib1 files had to be streams of bits (like Unix files) with all of those descriptor entries empty. This was IBM MVS file type unblocked or u. All of this IBM MVS "crap" did improve disk performance by laying files fairly efficiently on disk and reducing fragmentation a lot.

The concept of blocked at the file level is irrelevant on unix systems for unix system calls. Blocking is critical in the filesystem code but programmer mistakes there cause performance problems, not errors (generally fatal in MVS) returned to the program.

On Sun, Sep 10, 2023 at 4:38 AM Edward Hartnett @.***> wrote:

In the utility grbindex.f we say:

!> The index file serves as a table of contents for the GRIB1 file, !> enabling quick access to the data. The GRIB1 file must be unblocked, !> but there can be a gap before the first grib message of at most 32000 !> bytes and gaps between messages of at most 4000 bytes.

What does unblocked mean?

In fortran we can have formatted vs. unformatted files, is that what is meant here?

@GeorgeGayno-NOAA https://github.com/GeorgeGayno-NOAA @GeorgeVandenberghe-NOAA https://github.com/GeorgeVandenberghe-NOAA @AlexanderRichert-NOAA https://github.com/AlexanderRichert-NOAA @Hang-Lei-NOAA https://github.com/Hang-Lei-NOAA any gueses?

— Reply to this email directly, view it on GitHub https://github.com/NOAA-EMC/NCEPLIBS-grib_util/issues/264, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANDS4FSBMCR6I7WB6WAGNCLXZV4BFANCNFSM6AAAAAA4SAVMQU . You are receiving this because you were mentioned.Message ID: @.***>

--

George W Vandenberghe

Lynker Technologies at NOAA/NWS/NCEP/EMC

5830 University Research Ct., Rm. 2141

College Park, MD 20740

@.***

301-683-3769(work) 3017751547(cell)

--

George W Vandenberghe

Lynker Technologies at NOAA/NWS/NCEP/EMC

5830 University Research Ct., Rm. 2141

College Park, MD 20740

@.***

301-683-3769(work) 3017751547(cell)

edwardhartnett commented 11 months ago

OK, thanks, good to know. I will remove these references from the current version of the documentation.