:code:`ta` file (GTS) ===================== Data directory structure ------------------------------------ The :code:`ta` files are organized every 60 minutes : .. code-block:: bash [hailang@sya01n01 ~/chinawise/nwprod/decoders]$ls -la /sya/g3/wrf/data/obs/2001*.ta ...... -rw-r--r-- 1 wrf work 4183866 Jan 26 03:32 /sya/g3/wrf/data/obs/20012512.ta -rw-r--r-- 1 wrf work 1566223 Jan 26 03:32 /sya/g3/wrf/data/obs/20012513.ta -rw-r--r-- 1 wrf work 1583806 Jan 26 03:32 /sya/g3/wrf/data/obs/20012514.ta -rw-r--r-- 1 wrf work 2342846 Jan 26 03:32 /sya/g3/wrf/data/obs/20012515.ta -rw-r--r-- 1 wrf work 1535829 Jan 26 03:32 /sya/g3/wrf/data/obs/20012516.ta -rw-r--r-- 1 wrf work 1540626 Jan 26 03:32 /sya/g3/wrf/data/obs/20012517.ta -rw-r--r-- 1 wrf work 3959697 Jan 26 03:32 /sya/g3/wrf/data/obs/20012518.ta -rw-r--r-- 1 wrf work 1466181 Jan 26 03:32 /sya/g3/wrf/data/obs/20012519.ta -rw-r--r-- 1 wrf work 1464897 Jan 26 03:31 /sya/g3/wrf/data/obs/20012520.ta -rw-r--r-- 1 wrf work 2309281 Jan 26 03:31 /sya/g3/wrf/data/obs/20012521.ta -rw-r--r-- 1 wrf work 1555754 Jan 26 03:31 /sya/g3/wrf/data/obs/20012522.ta -rw-r--r-- 1 wrf work 1470354 Jan 26 03:31 /sya/g3/wrf/data/obs/20012523.ta -rw-r--r-- 1 wrf work 3975865 Jan 26 03:31 /sya/g3/wrf/data/obs/20012600.ta -rw-r--r-- 1 wrf work 1655233 Jan 26 03:31 /sya/g3/wrf/data/obs/20012601.ta -rw-r--r-- 1 wrf work 1430912 Jan 26 03:31 /sya/g3/wrf/data/obs/20012602.ta -rw-r--r-- 1 wrf work 849702 Jan 26 03:31 /sya/g3/wrf/data/obs/20012603.ta Data format ------------------- 样例文件 :download:`2020-01-26_00Z 报文 <20012600.ta>` .. literalinclude:: 20012600.ta :encoding: latin-1 :lines: 1-100 Data extractor --------------------- Decoder source code ---------------------------- 1. Source code directory: .. code-block:: bash > cd /g5/nwpc_ep8/obsproc/nwprod/decoders/decod_dccimisssurf/sorc 2. Subroutines to decode surface data * :code:`lsdcod.f` .. note:: * The *cimiss.tbl* and :code:`decod_WMO.Res40.headers` are not used, although they are required as arguments and read in. * The path and file name of :code:`cimiss_data_surface` file are hard coded in the subroutines. 4. Compile the code .. code-block:: bash > make Decode and convert to BUFR format --------------------------------------- 1. enter into the exec directory .. code-block:: bash > cd /g5/nwpc_ep8/obsproc/nwprod/decoders/decod_dccimisssurf/exec > ls -la total 2028 drwxr-xr-x. 3 zwtd zwtd 211 Dec 20 22:45 . drwxr-xr-x. 6 zwtd zwtd 82 Dec 20 22:42 .. lrwxrwxrwx. 1 zwtd zwtd 34 Dec 9 23:48 bufrtab.000 -> ../../decod_shared/fix/bufrtab.000 -rw-r--r--. 1 zwtd zwtd 1121683 Dec 9 23:48 cimiss.tbl lrwxrwxrwx. 1 zwtd zwtd 31 Dec 9 23:48 decod_WMO.Res40.headers -> ../parm/decod_WMO.Res40.headers -rwxr-xr-x. 1 zwtd zwtd 940696 Dec 20 00:24 decod_dccimiss -rw-r--r--. 1 zwtd zwtd 462 Dec 20 22:45 decod_dccimiss.log -rwxr-xr-x. 1 zwtd zwtd 484 Dec 20 00:30 run.ksh -rwxr-xr-x. 1 zwtd zwtd 776 Dec 20 22:44 run_dccimisssurf.py drwxr-xr-x. 2 zwtd zwtd 58 Dec 20 22:45 tmp 2. we provide a script to run the decoder in batch mode: .. code-block:: bash > ./run_dccimisssurf.py -s 2018121600 -e 2018121700 -i 1 .. note:: * given the starting datetime and ending datetime, it iterates all cycles (every 1 hours) * the units of interval is hour (-i) * this script call run.ksh 3. run the decoder script .. code-block:: bash > run.ksh > cat run.ksh !/bin/bash export DBNBUFRT=120 export TRANJB=/g5/nwpc_ep8/obsproc/nwprod/ush/tranjb export tank_dir=/g5/nwpc_ep8/obsproc/nwprod/dcom/us007003 export DBNROOT=`pwd` rm tmp/* rm decod_dccimiss.log ./decod_dccimiss -d decod_dccimiss.log -b 240 -c $1 bufrtab.000 cimiss.tbl decod_WMO.Res40.headers ls -la tmp/* BUFR_FILES=$(echo tmp/BUFR*) echo ${BUFR_FILES} for file in ${BUFR_FILES} do ${TRANJB} ${tank_dir} ${file} done .. note:: * -c $1 : Set the **current time** (201809011600) used to calculate the time departures of the obs. data. * -b 240 : Number of hours to decode prior to "current" time (default) * The observations with date/time between **current time** - 240 hours and **current time** + 3 are **kept**. 4. The generated BUFR format file will be saved at .. code-block:: bash > ls -la tmp -rw-r--r-- 1 xinzhang staff 4199744 Sep 21 18:45 tmp/BUFR.0.cimiss.1.6436.1536097072.8 Transfer bufr data to BUFR Tanks ------------------------------------ * put data in BUFR **tanks**: .. code-block:: bash > /g5/nwpc_ep8/obsproc/nwprod/ush/tranjb /g5/nwpc_ep8/obsproc/nwprod/dcom/us007003 tmp/BUFR.0.cimiss.1.6436.1536097072.8 > ls -al /g5/nwpc_ep8/obsproc/nwprod/dcom/us007003/20180901/b000/xx01 -rw-r--r-- 1 vagrant vagrant 4235328 Sep 27 04:42 /g5/nwpc_ep8/obsproc/nwprod/dcom/us007003/20180901/b000/xx001 .. note:: * if environmental variable **SCREEN=ON** : * Define **Run Time** is the system time when the tranjb is running. * Only observations with date/time between **Run Time** - 10 days and **Run Time** + 12 hours are kept. * for retrospective run, set **SCREEN=OFF** * :code:`/g5/nwpc_ep8/obsproc/nwprod/dcom/us007003/yyyymmdd/bmmm/xxsss` (where mmm is WMO BUFR message type and xxx is local BUFR message subtype) * 000.001 (in dump group mnemonic adpsfc): Surface synoptic fixed land reports * BUFR format * Arranged by UTC day and continuously grow throughout the day, if you run decoders many time, the content of the file will grow * No QC (other than rudimentary checks inside decoders) * No duplicate checking * Interested users can use utility :code:`debufr` to check the content of the bufr file:: > /g5/nwpc_ep8/obsproc/nwprod/util/exec/debufr /g5/nwpc_ep8/obsproc/nwprod/dcom/us007003/20180901/b000/xx001 the output is in :code:`debufr.out`.