Re: [gembud] Decoding NZ synoptic data files from web to GEMPAK format

  • To: "Mullenax, Robert R. (WFF-820.0)[ORBITAL SCIENCES CORPORATION]" <robert.r.mullenax@xxxxxxxx>
  • Subject: Re: [gembud] Decoding NZ synoptic data files from web to GEMPAK format
  • From: Christian Pagé <page.christian@xxxxxxxxx>
  • Date: Tue, 12 Apr 2022 16:38:47 +0200
Hi Robert,

I do something similar with some other data. What you need are separators
that end the bulletins and messages.

For example, this is what I insert when creating such a bulletin (octal
values here).
So you need at the beginning:
        fprintf(outptr, "\001\015\015\012");
        fprintf(outptr, "981 \015\015\012");
and at the end:
        fprintf(outptr, "\015\015\012\003");



(partial code snippet in C for reformatting the NWS text files of bulletins)

        /* Control-characters for beginning of message */
        fprintf(outptr, "\001\015\015\012");
        fprintf(outptr, "981 \015\015\012");

        /* Ok, begin message by writing header */
        fprintf(outptr, "%s", header);
        /* Get first line and write */
        getstat = fgets(tline, 499, inptr);
        testd = strlen(tline);
        tline[testd-1] = '\0';
        fprintf(outptr, "%s\n", tline);

      /* Output remaining lines */
      (void) strcpy(testf, "");
      getstat = fgets(tline, 499, inptr);
      while ( !strstr(testf, "####") && getstat != NULL ) {
        testd = strlen(tline);
        tline[testd-1] = '\0';
        if (out == TRUE) fprintf(outptr, "%s\n", tline);
        getstat = fgets(tline, 499, inptr);
        (void) strcpy(testf, "");
        (void) sscanf(tline, "%s", testf);
      }
      /* Write message end */
      if (out == TRUE) {
        fprintf(outptr, "\015\015\012\003");
        (void) fclose(outptr);
      }

Probably you will have questions do not hesitate to ask!

Christian


On Tue, Apr 12, 2022 at 4:10 PM Mullenax, Robert R. (WFF-820.0)[ORBITAL
SCIENCES CORPORATION] via gembud <gembud@xxxxxxxxxxxxxxxx> wrote:

> Good morning,
>
>
>
> Metservice NZ stopped transmitting their 3-hrly synoptic data via the WMO
> Gateway and make it available on their web page. I have tried and can’t get
> dclsfc to view the data as a proper bulletin (see below for sample data).
> Does anyone know what would need to be added to get GEMPAK to decode it
> (the purpose is to plot the data with sfmap)?
>
>
>
> Thanks, Robert Mullenax…data below
>
>
>
> AAXX 12124
> 93004 16/// /1923 10178 20154 39782 40029 57007 60001
> 333 10201=
> 93014 17998 /1811 10178 20140 39938 40028 57005 69961
> 333 10207=
> 93021 17497 /1810 10157 20141 39844 40020 57014 60071
> 333 10192=
> 93057 17498 /1714 10166 20147 39975 40023 57025 60101
> 333 10199=
> 93069 17/// /1431 10174 20167 39916 49997 57042 60161
> 333 10201=
> 93110 17997 /1610 10172 20157 30035 40044 57026 69921
> 333 10222=
> 93129 16/// ///// 10174 20155 30033 40038 57032 60121
> 333 10204=
> 93173 17998 /1709 10165 20139 30003 40065 57021 60001
> 333 10220=
> 93186 17997 /1409 10173 20153 30055 40059 57028 60051
> 333 10220=
> 93196 16/// /1219 10171 20165 30013 40066 57035 60091
> 333 10210=
> 93201 16/// /0703 10176 20132 30057 40076 57013 60001
> 333 10231=
> 93245 17698 /1802 10139 20122 39609 40086 57018 60001
> 333 10199=
> 93292 17697 /1602 10161 20152 30081 40086 57022 60001
> 333 10228=
> 93309 17798 /1807 10144 20136 30047 40082 57012 60001
> 333 10207=
> 93313 16/// /0503 10138 20131 39972 40090 57006 69941
> 333 10195=
> 93327 17898 /0305 10156 20140 30081 40091 57007 60001
> 333 10225=
> 93339 16/// /0406 10077 20067 39163 57007 60001
> 333 10174=
> 93373 17998 /2205 10149 20127 30087 40090 57005 60001
> 333 10231=
> 93393 16/// /0805 10175 20169 39930 40088 57021 60001
> 333 10193=
> 93404 17/97 /0503 10130 20124 30039 40094 57005 60001
> 333 10218=
> 93420 17996 /1203 10135 20128 30089 40096 57002 60001
> 333 10183=
> 93439 17396 /1814 10143 20142 30093 40108 52017 60041
> 333 10195=
> 93441 16/// /3203 10116 20115 39693 40104 57004 60001
> 333 10211=
> 93479 16/// /1708 10147 20138 30100 40107 52017 60011
> 333 10207=
> 93498 16/// /2909 10185 20148 39957 40096 52003 60001
> 333 10242=
> 93515 17/98 /1806 10113 20096 30107 40112 52006 60001
> 333 10187=
> 93527 16/// /1605 10144 20128 30084 40088 52001 60001
> 333 10240=
> 93546 17798 /2004 10138 20112 30084 40090 52002 60001
> 333 10215=
> 93562 16/// ///// 10158 20138 39873 40093 6///1=
> 93597 16/// /1823 10138 20125 30106 40112 52015 60001
> 333 10190=
> 93615 17/98 /1302 10088 20075 30059 40116 52007 60001
> 333 10185=
> 93678 17497 /2010 10115 20102 30000 40129 52016 69921
> 333 10251=
> 93709 16/// /1607 10093 20087 30112 40113 52012 60001
> 333 10162=
> 93721 17798 /1402 10090 20082 30132 40136 52009 60001
> 333 10162=
> 93738 16/// /0502 10079 20071 39365 52018 60001
> 333 10160=
> 93747 16/// /2303 10072 20066 39553 40134 52017 69921
> 333 10140=
> 93773 17898 /3406 10094 20087 30091 40124 52005 69921
> 333 10133=
> 93781 17598 /2802 10105 20093 30083 40129 52018 60001
> 333 10202=
> 93792 16/// /2404 10101 20063 39843 40127 52013 60001
> 333 10188=
> 93796 17/98 /3204 10075 20071 30080 40117 52008 69921
> 333 10132=
> 93800 16/// /1806 10115 20094 30108 40129 52007 60001
> 333 10144=
> 93805 16/// /2411 10116 20073 30080 40133 52021 60011
> 333 10143=
> 93831 17/99 /1903 10043 20024 39701 40137 52017 60001
> 333 10141=
> 93845 17597 /2412 10114 20076 30113 40114 52020 60051
> 333 10146=
> 93887 17/// /2910 10095 20078 39952 40111 52024 69961
> 333 10151=
> 93891 17799 /1803 10035 20027 30110 40113 52023 60001
> 333 10194=
> 93909 16/// ///// 10103 20063 60021
> 333 10132=
> 93929 16/// /2518 10080 20033 39990 40038 52028 60001
> 333 10113=
> 93947 16/// /2719 10063 20029 39948 49966 52029 69961
> 333 10088=
> 93985 17797 /3314 10160 20151 30117 40133 57004 60001
> 333 10192=
> 93994 16/// /3514 10237 20230 30025 40080 57010 60151
> 333 10241=
>
>
>
>
>
> Robert Mullenax
>
> Meteorologist
>
> CSBF/Peraton
>
> Columbia Scientific Balloon Facility
>
> robert.r.mullenax@xxxxxxxx
>
> 903-729-0271
>
>
> _______________________________________________
> NOTE: All exchanges posted to Unidata maintained email lists are
> recorded in the Unidata inquiry tracking system and made publicly
> available through the web.  Users who post to any of the lists we
> maintain are reminded to remove any personal information that they
> do not want to be made public.
>
>
> gembud mailing list
> gembud@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe,  visit:
> https://www.unidata.ucar.edu/mailing_lists/
>
  • 2022 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the gembud archives: