compack.c(3)

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

πŸ’– compack.c β€” a manual page, but make it cute πŸ’–

okay bestie, welcome to compack.c(3) from the library functions manual, and no cap this one is a whole mood. it's giving "packing data fields with a complex packing algorithm" energy and honestly? iconic. let's get into it ✨


✨ NAME ✨

compack.c β€” pack a data field using a complex packing algorithm. that's it, that's the girl. πŸŽ€


🌸 SYNOPSIS 🌸

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

πŸ¦‹ Functions πŸ¦‹

  • void compack (float *fld, g2int ndpts, g2int idrsnum, g2int *idrstmpl, unsigned char *cpack, g2int *lcpack) β€” pack a data field using a complex packing algorithm. she does exactly what it says on the tin, periodt. πŸ’…

πŸ’œ Detailed Description πŸ’œ

pack a data field using a complex packing algorithm. lowkey the whole personality of this file. 🫢

Author Stephen Gilbert

Date 2002-11-07

Definition in file compack.c.


πŸ‘‘ Function Documentation πŸ‘‘

⭐ void compack (float * fld, g2int ndpts, g2int idrsnum, g2int * idrstmpl, unsigned char * cpack, g2int * lcpack)

pack a data field using a complex packing algorithm. this function supports GRIB2 complex packing templates with or without spatial differences (i.e. DRTs 5.2 and 5.3). it also fills in GRIB2 Data Representation Template 5.2 or Template 5.3 with the appropriate values. so like, she packs AND she fills in the template. main character behaviour, fr fr. πŸ”₯

🌈 Parameters 🌈

  • fld β€” contains the data values to pack.
  • ndpts β€” the number of data values in array fld.
  • idrsnum β€” Data Representation Template number. Must equal 2 or 3. (no other numbers allowed bestie, she's picky and that's valid πŸ’…)
  • idrstmpl β€” contains the array of values for Data Representation Template 5.2 or 5.3. here's the roster, by index:
    • 0 β€” Reference value - ignored on input, set my compack().
    • 1 β€” Binary Scale Factor
    • 2 β€” Decimal Scale Factor
    • 6 β€” Missing value management
    • 7 β€” Primary missing value
    • 8 β€” Secondary missing value
    • 16 β€” Order of Spatial Differencing (1 or 2)
  • cpack β€” the packed data field.
  • lcpack β€” length of packed field cpack.

Author Stephen Gilbert

Date 2002-11-07

Definition at line 42 of file compack.c.

References ALOG2, int_power(), mkieee(), pack_gp(), sbit(), and sbits().

Referenced by cmplxpack().

not me listing every single reference because the vibe check said "keep all the facts" and honestly? we listen to the vibe check. πŸ’€

πŸŽ€ Author πŸŽ€

generated automatically by Doxygen for NCEPLIBS-g2c from the source code. so like, the robots wrote this one, not a human, and we still ate. 🧚


okay that's the whole page bestie, you're officially fluent in compack.c πŸ’– this was NCEPLIBS-g2c, Version 2.3.0, and the page is compack.c(3) β€” go forth and pack those data fields, slay, bye! πŸŒΈβœ¨πŸ¦‹

πŸ“¦ where this page comes from