reduce.c(3)

πŸ“¦
version 2.3.0 Β· 2 versions
, in ubuntu resolute, ubuntu stonking

🌸 NAME 🌸

reduce.c β€” Determines whether the number of groups should be increased in order to reduce the size of the large groups, and to make that adjustment. πŸ’…

(oh and also β€” manual page reduce.c(3), from the Library Functions Manual, in case you were wondering where you are bestie 🫢)


✨ SYNOPSIS ✨

#include 'grib2_int.h'
#include <stdlib.h>

πŸ¦‹ Functions πŸ¦‹

int reduce (g2int *kfildo, g2int *jmin, g2int *jmax, g2int *lbit, g2int *nov, g2int *lx, g2int *ndg, g2int *ibit, g2int *jbit, g2int *kbit, g2int *novref, g2int *ibxx2, g2int *ier)

Determines whether the number of groups should be increased in order to reduce the size of the large groups, and to make that adjustment. no cap. πŸ‘‘


🌈 DETAILED DESCRIPTION 🌈

Determines whether the number of groups should be increased in order to reduce the size of the large groups, and to make that adjustment.

Okay so that's literally the whole vibe of this function, and honestly? iconic.

πŸŽ€ Author πŸŽ€

Harry Glahn, The Meteorological Development Lab (MDL)

πŸŽ€ Date πŸŽ€

November 2001

Definition in file reduce.c.


πŸ’– FUNCTION DOCUMENTATION πŸ’–

int reduce (g2int * kfildo, g2int * jmin, g2int * jmax, g2int * lbit, g2int * nov, g2int * lx, g2int * ndg, g2int * ibit, g2int * jbit, g2int * kbit, g2int * novref, g2int * ibxx2, g2int * ier)

Determines whether the number of groups should be increased in order to reduce the size of the large groups, and to make that adjustment. By reducing the size of the large groups, less bits may be necessary for packing the group sizes and all the information about the groups. it's giving efficiency, it's giving glow-up for your bit budget ✨

The reference for nov was removed in the calling routine so that kbit could be determined. This furnishes a starting point for the iterations in reduce. However, the reference must be considered. ⚠️ like, don't forget it, bestie, it matters.

πŸ“œ PROGRAM HISTORY LOG πŸ“œ

  • November 2001 Harry Glahn, The Meteorological Development Lab (MDL) tdl grib2
  • March 2002 Harry Glahn, The Meteorological Development Lab (MDL) comment ier = 715
  • March 2002 Harry Glahn, The Meteorological Development Lab (MDL) modified to accommodate lx=1 on entry

the character development arc of this file... we love to see it πŸ¦‹

πŸ“‚ DATA SET USE πŸ“‚

  • kfildo - unit number for output (print) file. (output)

🧚 Parameters 🧚

  • kfildo β€” unit number for output (print) file. (input)
  • jmin β€” the minimum of each group (j=1,lx). it is possible after splitting the groups, jmin() will not be the minimum of the new group. this doesn't matter; jmin() is really the group reference and doesn't have to be the smallest value. (input/output)
  • jmax β€” the maximum of each group (j=1,lx). (input/output)
  • lbit β€” the number of bits necessary to pack each group (j=1,lx). (input/output)
  • nov β€” the number of values in each group (j=1,lx). (input/output)
  • lx β€” the number of groups. this will be increased if groups are split. (input/output)
  • ndg β€” the dimension of jmin(), jmax(), lbit(), and nov( ). (input)
  • ibit β€” the number of bits necessary to pack the jmin(j) values, j=1,lx. (input)
  • jbit β€” the number of bits necessary to pack the lbit(j) values, j=1,lx. (input)
  • kbit β€” the number of bits necessary to pack the nov(j) values, j=1,lx. if the groups are split, kbit is reduced. (input/output)
  • novref β€” reference value for nov(). (input)
  • ibxx2 β€” 2**j (j=0,30). (input)
  • ier β€” error return. (output)
    • 0 = good return.
    • 714 = problem in algorithm. reduce aborted.
    • 715 = ngp not large enough. reduce aborted.
🚨 bestie the error codes are NOT decorative: 714 means the algorithm had a problem and reduce got aborted, and 715 means ngp was not large enough and reduce got aborted. both of those are the function saying "i can't, i'm literally shutting down." πŸ’€

🫢 Returns 🫢

always returns 0, see parameter ier for error code.


πŸ‘‘ INTERNAL VIBES (the little helpers) πŸ‘‘

  • ntotbt(j) = the total bits used for the packing bits j (j=1,30). (internal)
  • nboxj(j) = new boxes needed for the packing bits j (j=1,30). (internal)
  • newbox(l) = number of new boxes (groups) for each original group (l=1,lx) for the current j. (automatic) (internal)
  • newboxp(l) = same as newbox() but for the previous j. this eliminates recomputation. (automatic) (internal)
  • cfeed = contains the character representation of a printer form feed. (character) (internal)
  • ifeed = contains the g2int value of a printer form feed. (internal)
  • iorigb = the original number of bits necessary for the group values. (internal)

πŸŽ€ Author πŸŽ€

Harry Glahn, The Meteorological Development Lab (MDL)

πŸŽ€ Date πŸŽ€

November 2001

Definition at line 88 of file reduce.c.

Referenced by pack_gp().


⭐ Author ⭐

Generated automatically by Doxygen for NCEPLIBS-g2c from the source code.


and that's the whole page bestie 🩷 this one shipped out as part of NCEPLIBS-g2c, Version 2.3.0 β€” read it, love it, respect the groups, periodt πŸ’…βœ¨

πŸ“¦ where this page comes from