NOAA-EMC / NCEPLIBS-g2c

This library contains C decoder/encoder routines for GRIB edition 2.
Other
18 stars 11 forks source link

can anyone provide an example of spherical harmonics complex packing? #189

Open edwardhartnett opened 2 years ago

edwardhartnett commented 2 years ago

Can anyone provide a small, but working, example of the settings needed for spherical harmonics complex packing? Is anyone we know using this?

I am trying to write a test for specpack()/specunpack(), but I don't understand how this packing works - it's quite beyond the sort of math I'm used to. I'm sure I can understand it eventually, but it sure would be helpful if someone who knows it could give me a working example...

See: https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_temp5-51.shtml

I've got the test I'm trying up here: https://github.com/NOAA-EMC/NCEPLIBS-g2c/pull/188

Currently the code (and test) report success, but the data I get out of specunpack does not match the data I put into specpack. Which is sad.

BoiVuong-NOAA commented 2 years ago

No, I do not know spherical harmonics complex packing. I do not know any GRIB2 in PROD that uses spherical harmonics complex packing.

Hang-Lei-NOAA commented 2 years ago

When I was developing the interoperable physics driver, I remembered that the stochastic physics used it in some way. Let me search it.

On Thu, Nov 4, 2021 at 7:42 AM Boi Vuong @.***> wrote:

No, I do not know spherical harmonics complex packing. I do not know any GRIB2 in PROD that uses spherical harmonics complex packing.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/NOAA-EMC/NCEPLIBS-g2c/issues/189#issuecomment-960705986, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKWSMFHWTY5HPGCNUTTFKL3UKJ5SFANCNFSM5HLEFG2A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Hang-Lei-NOAA commented 2 years ago

You can get some reference from here: git clone https://github.com/noaa-psd/stochastic_physics.git

stochy_internal_state_mod.F90 contains the spherical harmonic definitions and arrays stochy_patterngenerator.F90; spectral_transforms.F90; get_stochy_pattern.F90; get_stochy_pattern.F90 initial, convert it.

On Thu, Nov 4, 2021 at 8:53 AM Hang Lei - NOAA Affiliate @.***> wrote:

When I was developing the interoperable physics driver, I remembered that the stochastic physics used it in some way. Let me search it.

On Thu, Nov 4, 2021 at 7:42 AM Boi Vuong @.***> wrote:

No, I do not know spherical harmonics complex packing. I do not know any GRIB2 in PROD that uses spherical harmonics complex packing.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/NOAA-EMC/NCEPLIBS-g2c/issues/189#issuecomment-960705986, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKWSMFHWTY5HPGCNUTTFKL3UKJ5SFANCNFSM5HLEFG2A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

edwardhartnett commented 3 months ago

@Hang-Lei-NOAA can you try to turn this into a test? I can help if you need it...

Hang-Lei-NOAA commented 3 months ago

@Edward Hartnett - NOAA Affiliate @.***> Okay, let me explore it this summer, besides the library work for models.

On Mon, Jun 17, 2024 at 3:17 AM Edward Hartnett @.***> wrote:

@Hang-Lei-NOAA https://github.com/Hang-Lei-NOAA can you try to turn this into a test? I can help if you need it...

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