Surface¶
目录
Data directory structure¶
The Surface data is organized as text files every 6 hours :
> ls -la /g3/tianwh/share/conobs/rec_RSURF_20190* -rw-r--r-- 1 tianwh obs 11482070 9月 25 00:59 /g3/tianwh/share/conobs/rec_RSURF_2019060100_g_06.dat -rw-r--r-- 1 tianwh obs 11654320 9月 25 00:59 /g3/tianwh/share/conobs/rec_RSURF_2019060106_g_06.dat -rw-r--r-- 1 tianwh obs 11637320 9月 25 00:59 /g3/tianwh/share/conobs/rec_RSURF_2019060112_g_06.dat -rw-r--r-- 1 tianwh obs 11630570 9月 25 00:59 /g3/tianwh/share/conobs/rec_RSURF_2019060118_g_06.dat -rw-r--r-- 1 tianwh obs 11549820 9月 25 00:59 /g3/tianwh/share/conobs/rec_RSURF_2019060200_g_06.dat -rw-r--r-- 1 tianwh obs 11672570 9月 25 00:59 /g3/tianwh/share/conobs/rec_RSURF_2019060206_g_06.dat -rw-r--r-- 1 tianwh obs 11687820 9月 25 00:59 /g3/tianwh/share/conobs/rec_RSURF_2019060212_g_06.dat -rw-r--r-- 1 tianwh obs 11619320 9月 25 00:59 /g3/tianwh/share/conobs/rec_RSURF_2019060218_g_06.dat -rw-r--r-- 1 tianwh obs 11566570 9月 25 00:59 /g3/tianwh/share/conobs/rec_RSURF_2019060300_g_06.dat -rw-r--r-- 1 tianwh obs 11562820 9月 25 00:59 /g3/tianwh/share/conobs/rec_RSURF_2019060306_g_06.dat -rw-r--r-- 1 tianwh obs 11619320 9月 25 00:59 /g3/tianwh/share/conobs/rec_RSURF_2019060312_g_06.dat -rw-r--r-- 1 tianwh obs 11468820 9月 25 00:59 /g3/tianwh/share/conobs/rec_RSURF_2019060318_g_06.dat -rw-r--r-- 1 tianwh obs 11398070 9月 25 00:59 /g3/tianwh/share/conobs/rec_RSURF_2019060400_g_06.dat -rw-r--r-- 1 tianwh obs 11605820 9月 25 00:59 /g3/tianwh/share/conobs/rec_RSURF_2019060406_g_06.dat ...... > ls -la /g3/tianwh/share/conobs/rec_RGWST_* -rw-r--r-- 1 tianwh obs 93516320 9月 25 01:00 /g3/tianwh/share/conobs/rec_RGWST_2019060100_g_06.dat -rw-r--r-- 1 tianwh obs 93554820 9月 25 01:00 /g3/tianwh/share/conobs/rec_RGWST_2019060106_g_06.dat -rw-r--r-- 1 tianwh obs 93540820 9月 25 01:00 /g3/tianwh/share/conobs/rec_RGWST_2019060112_g_06.dat -rw-r--r-- 1 tianwh obs 93005820 9月 25 01:00 /g3/tianwh/share/conobs/rec_RGWST_2019060118_g_06.dat -rw-r--r-- 1 tianwh obs 93162320 9月 25 01:00 /g3/tianwh/share/conobs/rec_RGWST_2019060200_g_06.dat -rw-r--r-- 1 tianwh obs 93525820 9月 25 01:00 /g3/tianwh/share/conobs/rec_RGWST_2019060206_g_06.dat -rw-r--r-- 1 tianwh obs 93411320 9月 25 01:00 /g3/tianwh/share/conobs/rec_RGWST_2019060212_g_06.dat -rw-r--r-- 1 tianwh obs 93466570 9月 25 01:00 /g3/tianwh/share/conobs/rec_RGWST_2019060218_g_06.dat -rw-r--r-- 1 tianwh obs 93471570 9月 25 01:00 /g3/tianwh/share/conobs/rec_RGWST_2019060300_g_06.dat -rw-r--r-- 1 tianwh obs 93224570 9月 25 01:00 /g3/tianwh/share/conobs/rec_RGWST_2019060306_g_06.dat -rw-r--r-- 1 tianwh obs 93466320 9月 25 01:00 /g3/tianwh/share/conobs/rec_RGWST_2019060312_g_06.dat -rw-r--r-- 1 tianwh obs 93426320 9月 25 01:00 /g3/tianwh/share/conobs/rec_RGWST_2019060318_g_06.dat -rw-r--r-- 1 tianwh obs 93565070 9月 25 01:00 /g3/tianwh/share/conobs/rec_RGWST_2019060400_g_06.dat -rw-r--r-- 1 tianwh obs 93464320 9月 25 01:00 /g3/tianwh/share/conobs/rec_RGWST_2019060406_g_06.dat -rw-r--r-- 1 tianwh obs 93514320 9月 25 01:00 /g3/tianwh/share/conobs/rec_RGWST_2019060412_g_06.dat -rw-r--r-- 1 tianwh obs 93420820 9月 25 01:00 /g3/tianwh/share/conobs/rec_RGWST_2019060418_g_06.dat -rw-r--r-- 1 tianwh obs 93526820 9月 25 01:00 /g3/tianwh/share/conobs/rec_RGWST_2019060500_g_06.dat -rw-r--r-- 1 tianwh obs 93393320 9月 25 01:00 /g3/tianwh/share/conobs/rec_RGWST_2019060506_g_06.dat -rw-r--r-- 1 tianwh obs 93572570 9月 25 01:00 /g3/tianwh/share/conobs/rec_RGWST_2019060512_g_06.dat -rw-r--r-- 1 tianwh obs 93435570 9月 25 01:00 /g3/tianwh/share/conobs/rec_RGWST_2019060518_g_06.dat -rw-r--r-- 1 tianwh obs 93589820 9月 25 01:00 /g3/tianwh/share/conobs/rec_RGWST_2019060600_g_06.dat
Data format¶
CIMISS format data is looks like :
RSURF 2019 6 1 0 45928 6 9 9
00081 81.00 -5.53 -36.87 19.00 1.00 100.00
1013.20 23.05 21.35 347.00 0.00 999999.00 999999.00 999999.00 1011.00 8.00 8.00 8.00 8.00 8.00 8.00 8.00 8.00 8.00
00081 81.00 -5.53 -36.87 19.00 1.00 0.00
1012.80 24.15 21.75 345.00 0.10 999999.00 999999.00 999999.00 1010.60 8.00 8.00 8.00 8.00 8.00 8.00 8.00 8.00 8.00
00081 81.00 -5.53 -36.87 19.00 1.00 200.00
1012.90 22.25 21.25 333.00 0.00 999999.00 999999.00 999999.00 1010.70 8.00 8.00 8.00 8.00 8.00 8.00 8.00 8.00 8.00
00086 86.00 -19.98 -43.96 1214.00 1.00 0.00
1016.00 20.75 14.25 289.00 1.80 999999.00 999999.00 999999.00 882.20 8.00 8.00 8.00 8.00 8.00 8.00 8.00 8.00 8.00
00086 86.00 -19.98 -43.96 1214.00 1.00 100.00
1016.30 20.25 14.35 306.00 1.50 999999.00 999999.00 999999.00 882.30 8.00 8.00 8.00 8.00 8.00 8.00 8.00 8.00 8.00
00086 86.00 -19.98 -43.96 1214.00 31.00 2100.00
1015.10 21.35 13.95 288.00 3.90 999999.00 999999.00 999999.00 881.70 8.00 8.00 8.00 8.00 8.00 8.00 8.00 8.00 8.00
00086 86.00 -19.98 -43.96 1214.00 1.00 200.00
1016.30 20.45 14.35 283.00 2.50 999999.00 999999.00 999999.00 882.40 8.00 8.00 8.00 8.00 8.00 8.00 8.00 8.00 8.00
01001 1001.00 70.94 -8.67 10.00 31.00 2200.00
1015.80 -0.40 -1.80 341.00 10.70 999999.00 999999.00 999999.00 1014.60 0.00 0.00 0.00 0.00 0.00 8.00 8.00 8.00 0.00
01001 1001.00 70.94 -8.67 10.00 1.00 200.00
1014.60 -0.40 -1.97 337.00 10.30 999999.00 999999.00 999999.00 1013.40 0.00 0.00 0.00 0.00 0.00 8.00 8.00 8.00 0.00
01001 1001.00 70.94 -8.67 10.00 1.00 100.00
1015.00 -0.40 -2.06 340.00 11.60 999999.00 999999.00 999999.00 1013.80 0.00 0.00 0.00 0.00 0.00 8.00 8.00 8.00 0.00
01001 1001.00 70.94 -8.67 10.00 31.00 2300.00
1015.20 -0.40 -2.23 341.00 10.40 999999.00 999999.00 999999.00 1014.00 0.00 0.00 0.00 0.00 0.00 8.00 8.00 8.00 0.00
01001 1001.00 70.94 -8.67 10.00 31.00 2100.00
1015.80 -0.20 -1.89 340.00 13.60 999999.00 999999.00 999999.00 1014.60 0.00 0.00 0.00 0.00 0.00 8.00 8.00 8.00 0.00
01001 1001.00 70.94 -8.67 10.00 1.00 0.00
1015.00 -0.20 -1.58 344.00 12.10 999999.00 0.00 999999.00 1013.80 0.00 0.00 0.00 0.00 0.00 8.00 0.00 8.00 0.00
01002 1002.00 80.06 16.25 8.00 1.00 100.00
1020.50 -1.90 -2.89 109.00 6.80 999999.00 999999.00 999999.00 1019.70 0.00 0.00 0.00 0.00 0.00 8.00 8.00 8.00 0.00
01002 1002.00 80.06 16.25 8.00 31.00 2200.00
1020.80 -0.20 -2.30 89.00 6.90 999999.00 999999.00 999999.00 1020.00 0.00 0.00 0.00 0.00 0.00 8.00 8.00 8.00 0.00
01002 1002.00 80.06 16.25 8.00 31.00 2300.00
1020.70 -1.20 -2.59 111.00 6.30 999999.00 999999.00 999999.00 1019.80 0.00 0.00 0.00 0.00 0.00 8.00 8.00 8.00 0.00
01002 1002.00 80.06 16.25 8.00 31.00 2100.00
1020.70 0.00 -1.96 85.00 7.20 999999.00 999999.00 999999.00 1019.90 0.00 0.00 0.00 0.00 0.00 8.00 8.00 8.00 0.00
01002 1002.00 80.06 16.25 8.00 1.00 0.00
1020.70 -1.90 -3.02 119.00 7.30 999999.00 999999.00 999999.00 1019.80 0.00 0.00 0.00 0.00 0.00 8.00 8.00 8.00 0.00
01002 1002.00 80.06 16.25 8.00 1.00 200.00
1020.30 -1.70 -2.96 111.00 8.60 999999.00 999999.00 999999.00 1019.50 0.00 0.00 0.00 0.00 0.00 8.00 8.00 8.00 0.00
01003 1003.00 77.00 15.54 10.00 1.00 100.00
1014.70 -1.30 -2.83 110.00 13.70 999999.00 999999.00 999999.00 1013.30 0.00 0.00 0.00 0.00 0.00 8.00 8.00 8.00 0.00
01003 1003.00 77.00 15.54 10.00 31.00 2300.00
1014.40 1.50 -3.16 62.00 7.60 999999.00 999999.00 999999.00 1013.00 0.00 0.00 0.00 0.00 0.00 8.00 8.00 8.00 0.00
01003 1003.00 77.00 15.54 10.00 31.00 2200.00
1014.00 1.40 -3.26 59.00 12.50 999999.00 999999.00 999999.00 1012.60 0.00 0.00 0.00 0.00 0.00 8.00 8.00 8.00 0.00
01003 1003.00 77.00 15.54 10.00 31.00 2100.00
1013.50 1.40 -3.45 57.00 13.10 999999.00 999999.00 999999.00 1012.10 0.00 1.00 1.00 0.00 0.00 8.00 8.00 8.00 0.00
01003 1003.00 77.00 15.54 10.00 1.00 0.00
1014.40 1.10 -2.99 53.00 9.80 999999.00 0.00 999999.00 1013.00 0.00 0.00 0.00 0.00 0.00 8.00 0.00 8.00 0.00
RGWST 2019 6 1 0 374065 6 9 9
06110 6110.00 43.64 89.80 1385.00 31.00 2100.00
999999.00 13.80 999999.00 178.00 5.20 0.00 999999.00 999999.00 999999.00 7.00 0.00 7.00 0.00 0.00 0.00 9.00 9.00 7.00
06110 6110.00 43.64 89.80 1385.00 31.00 2300.00
999999.00 13.70 999999.00 172.00 7.00 0.00 999999.00 999999.00 999999.00 7.00 0.00 7.00 0.00 0.00 0.00 9.00 9.00 7.00
06110 6110.00 43.64 89.80 1385.00 1.00 0.00
999999.00 16.00 999999.00 194.00 3.90 0.00 999999.00 999999.00 999999.00 7.00 0.00 7.00 0.00 0.00 0.00 9.00 9.00 7.00
06110 6110.00 43.64 89.80 1385.00 1.00 100.00
999999.00 19.10 999999.00 160.00 5.90 0.00 999999.00 999999.00 999999.00 7.00 0.00 7.00 0.00 0.00 0.00 9.00 9.00 7.00
06110 6110.00 43.64 89.80 1385.00 1.00 200.00
999999.00 22.00 999999.00 332.00 3.30 0.00 999999.00 999999.00 999999.00 7.00 0.00 7.00 0.00 0.00 0.00 9.00 9.00 7.00
06110 6110.00 43.64 89.80 1385.00 31.00 2200.00
999999.00 13.40 999999.00 171.00 7.30 0.00 999999.00 999999.00 999999.00 7.00 0.00 7.00 0.00 0.00 0.00 9.00 9.00 7.00
07129 7129.00 44.85 84.70 455.00 1.00 0.00
999999.00 20.40 999999.00 39.00 1.50 0.00 999999.00 999999.00 999999.00 7.00 0.00 7.00 0.00 0.00 0.00 9.00 9.00 7.00
07129 7129.00 44.85 84.70 455.00 1.00 100.00
999999.00 24.30 999999.00 67.00 0.90 0.00 999999.00 999999.00 999999.00 7.00 0.00 7.00 0.00 0.00 0.00 9.00 9.00 7.00
07129 7129.00 44.85 84.70 455.00 31.00 2200.00
999999.00 17.60 999999.00 239.00 2.50 0.00 999999.00 999999.00 999999.00 7.00 0.00 7.00 0.00 0.00 0.00 9.00 9.00 7.00
07129 7129.00 44.85 84.70 455.00 1.00 200.00
999999.00 25.00 999999.00 166.00 1.60 0.00 999999.00 999999.00 999999.00 7.00 0.00 7.00 0.00 0.00 0.00 9.00 9.00 7.00
Data extractor¶
A python code is used to extract the desired information from this CIMISS file:
> cd /g5/nwpc_ep8/obsproc/nwprod/decoders
> rm cimiss_data_surface
> ./read_nmc_cimiss_rsurf_rgwst.py -f /g3/tianwh/share/conobs/rec_RSURF_2019060406_g_06.dat
and
> ./read_nmc_cimiss_rsurf_rgwst.py -f /g3/tianwh/share/conobs/rec_RGWST_2019060406_g_06.dat
# it outputs the file like : gts_data_201906040600, will be linked as cimiss_data_surface
If you want to batch process number of CIMISS files, you can use following command:
> # This command will find all CIMISS files and prcessing the file one by one
> rm cimiss_data_surface
> decod_nmc_cimiss_rsurf.py -d /g3/tianwh/share/conobs
> decod_nmc_cimiss_rgwst.py -d /g3/tianwh/share/conobs
注解
We have to process rec_RSURF and rec_RGWST data seprately.
The information we want to extract from CIMISS is:
header_line = ff.FortranRecordReader('(A5, 8I8)') id_line = ff.FortranRecordReader('(A8, 6f10.2)') record_line = ff.FortranRecordReader('(18f10.2)') output_line = ff.FortranRecordWriter('(A8, 3f10.2, 5A8, 4f10.2, I8, 4f10.2)') with open(filepath) as fp: line = fp.readline() [RTYPE,yyyy,mon,dd1,hh,num_synop,num_head,num_dat,num_qcm] = header_line.read(line) output = open('gts_data_'+str(yyyy)+str(mon).zfill(2)+str(dd1).zfill(2)+str(hh).zfill(2)+'00', "w") output_buoy = open('gts_buoy_data_'+str(yyyy)+str(mon).zfill(2)+str(dd1).zfill(2)+str(hh).zfill(2)+'00', "w") for station in range(num_synop): line = fp.readline() [call_name, id, lat, lon, elv, day, hm] = id_line.read(line) yyyymmddhhMM = datetime(yyyy, mon, int(day), int(hm/100), int(hm - int(hm/100)*100 )) obstime = datetime(yyyy, mon, int(day), int(hm/100), int(hm - int(hm/100)*100)) line = fp.readline() [p,T,Td,dd,ff,r1,r6,r24,ps,flag_p,flag_T,flag_Td,flag_dd,flag_ff,flag_r1,flag_r6,flag_r24,flag_ps] = record_line.read(line) rmiss = 999999.0 if Td > 9999.0 : Td = rmiss if T > 9999.0 : T = rmiss if r1 > 9999.0 : r1 = rmiss if r6 > 9999.0 : r6 = rmiss if r24 > 9999.0 : r24 = rmiss if p > 9999.0 : p = rmiss if ps > 9999.0 : ps = rmiss if dd > 9999.0 : dd = rmiss if ff > 9999.0 : ff = rmiss if id > 0 and id < 99999.0: output.write(output_line.write([call_name, lat, lon, elv, obstime.strftime("%Y"), obstime.strftime("%m"), \ obstime.strftime("%d"), obstime.strftime("%H"), obstime.strftime("%M"), \ p, ps, T, Td, round(dd), ff, r1, r6, r24]) + "\n") else: output_buoy.write(output_line.write([call_name, lat, lon, elv, obstime.strftime("%Y"), obstime.strftime("%m"), \ obstime.strftime("%d"), obstime.strftime("%H"), obstime.strftime("%M"), \ p, ps, T, Td, round(dd), ff, r1, r6, r24]) + "\n")
the content of cimiss_data_surface is:
> less cimiss_data_surface 57489 30.52 114.01 23.60 2019 07 26 15 00 1000.30 997.50 32.20 26.50 185 2.60 0.00 0.00 0.00 57489 30.52 114.01 23.60 2019 07 26 18 00 1000.50 997.70 30.80 25.60 179 1.60 0.00 0.00 0.00 57491 30.87 114.40 31.40 2019 07 26 18 00 1000.80 997.20 29.60 25.60 5 0.30 0.00 0.00 0.00 57491 30.87 114.40 31.40 2019 07 26 15 00 1000.40 996.80 30.50 26.70 152 1.10 0.00 0.00 0.00 57492 30.84 114.84 40.70 2019 07 26 18 00 1001.00 996.40 29.50 29.30 999999 0.00 0.00 0.00 0.00 57492 30.84 114.84 40.70 2019 07 26 15 00 1000.80 996.20 31.10 28.70 139 1.10 0.00 0.00 0.00 57493 30.35 114.33 73.50 2019 07 26 18 00 1000.60 992.40 31.00 24.40 166 1.60 0.00 0.00 0.00 57493 30.35 114.33 73.50 2019 07 26 15 00 1000.40 992.20 32.60 24.40 192 3.20 0.00 0.00 0.00 57494 30.60 114.05 23.60 2019 07 26 18 00 1000.80 998.10 31.30 25.60 186 2.20 0.00 0.00 0.00 57494 30.60 114.05 23.60 2019 07 26 15 00 1000.50 997.80 32.50 26.10 205 2.80 0.00 0.00 0.00 57495 30.67 114.88 28.10 2019 07 26 18 00 1001.00 997.70 30.00 27.20 121 1.80 0.00 0.00 0.00 57495 30.67 114.88 28.10 2019 07 26 15 00 1000.90 997.60 31.30 27.00 159 2.10 0.00 0.00 0.00 57496 30.25 114.62 35.30 2019 07 26 15 00 1001.10 997.00 32.10 27.10 176 2.40 0.00 0.00 0.10 57496 30.25 114.62 35.30 2019 07 26 18 00 1001.30 997.20 30.80 26.50 59 0.50 0.00 0.00 0.10 57498 30.52 114.94 26.20 2019 07 26 15 00 1001.10 998.10 31.30 27.20 150 1.30 0.00 0.00 0.00 57498 30.52 114.94 26.20 2019 07 26 18 00 1001.00 998.00 29.80 29.40 79 1.40 0.00 0.00 0.00 57499 30.07 114.88 40.30 2019 07 26 18 00 1000.80 996.20 28.60 26.20 203 1.60 0.00 0.00 0.00
Decoder source code¶
Source code directory:
> cd /g5/nwpc_ep8/obsproc/nwprod/decoders/decod_dccimisssurf/sorc
Subroutines to decode surface data
lsdcod.f
注解
open the files
open(10, file="../../cimiss_data_surface", status="old")
read in the records:
C* CALL LS_GRPT ( lenb, bulltn, jpos, lszrpt, lsfrpt, jret) read(10, *, iostat=jret) + stnid, xlat, xlong, xelev, iyear, imonth, + imnday, ihour, imins, pmsl, pres, + temperature, td, windd, winds, r1, r6, r24 write(lsfrpt,*) + stnid, xlat, xlong, xelev, iyear, imonth, + imnday, ihour, imins, pmsl, pres, + temperature, td, windd, winds, r1, r6, r24
Initialize array with missing values
C* Initialize report parameters to missing. CALL LS_IFIV ( jret ) CALL LS_INIT ( jret )Fill in observations
C* Save report ID. civals ( icstid ) = stnid C* 1 = FM 12 synoptic land C* 2 = FM 14 synoptic mobil ibrtyp = 1 C* It is an automatic station. C rivals ( irtost ) = 0.0 C irptdt(1) = iyear irptdt(2) = imonth irptdt(3) = imnday irptdt(4) = ihour irptdt(5) = imins C* Save date/time data interface array C rivals(iryear) = float ( irptdt(1) ) rivals(irmnth) = float ( irptdt(2) ) rivals(irdays) = float ( irptdt(3) ) rivals(irhour) = float ( irptdt(4) ) rivals(irminu) = float ( irptdt(5) ) C* Station dictionary location, elevation, latitude, C* longitude rivals ( irselv ) = xelev rivals ( irslat ) = xlat rivals ( irslon ) = xlong C* Get indicator for source and units of wind speed C* wind speed indicator * C* (WMO Code Table 1855) rivals ( irisws ) = FLOAT ( 1 ) .... .... if ( temperature .lt. 999999.0 ) + rivals ( irtmpc ) = temperature if ( pmsl .lt. 999999.0 ) + rivals ( irpmsl ) = pmsl if ( pres .lt. 999999.0 ) + rivals ( irpres ) = pres if ( td .lt. 999999.0 ) + rivals ( irdwpc ) = td if ( winds .lt. 999999.0 ) + rivals ( irsped ) = winds if ( windd .lt. 999999 ) + rivals ( irdrct ) = float ( windd ) rivals(irnpcv) = 3.0 rivals(irpprd(1)) = 1.0 if ( r1 .lt. 999999.0 ) + rivals(irpamt(1)) = r1 rivals(irpprd(2)) = 6.0 if ( r6 .lt. 999999.0 ) + rivals(irpamt(2)) = r6 rivals(irpprd(3)) = 24.0 if ( r24 .lt. 999999.0 ) + rivals(irpamt(4)) = r24Make sure it read all observations before and after nhours
C* Report time for BUFR must not be more than nhours C* before the system time, and not more than C* 60 minutes after. C IF ( ( ier1 .ne. 0 ) .or. ( imdif .gt. nhours * 60 ) + .or. ( imdif .lt. -60 * nhours ) ) THEN
注解
- The cimiss.tbl and
decod_WMO.Res40.headersare not used, although they are required as arguments and read in. - The path and file name of
cimiss_data_surfacefile are hard coded in the subroutines.
4. Compile the code
> make
Decode and convert to BUFR format¶
- enter into the exec directory:
> cd /g5/nwpc_ep8/obsproc/nwprod/decoders/decod_dccimisssurf/exec > ls -la lrwxr-xr-x 1 nwpc_ep8 nwpep 34 1月 10 2019 bufrtab.000 -> ../../decod_shared/fix/bufrtab.000 -rw-r--r-- 1 nwpc_ep8 nwpep 1121683 1月 10 2019 cimiss.tbl -rwxr-xr-x 1 nwpc_ep8 nwpep 941360 3月 19 17:51 decod_dccimisssurf -rw-r--r-- 1 nwpc_ep8 nwpep 44008406 3月 19 17:36 decod_dccimisssurf.log lrwxr-xr-x 1 nwpc_ep8 nwpep 31 1月 10 2019 decod_WMO.Res40.headers -> ../parm/decod_WMO.Res40.headers -rw-r--r-- 1 nwpc_ep8 nwpep 0 3月 19 16:45 fort.8 -rwxr-xr-x 1 nwpc_ep8 nwpep 859 2月 19 2019 run_dccimisssurf.py -rwxr-xr-x 1 nwpc_ep8 nwpep 568 3月 19 17:31 run.ksh drwxr-xr-x 2 nwpc_ep8 nwpep 4096 3月 19 18:17 tmp
注解
- 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
2. run the decoder script
> 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 -v 3 -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
注解
- -v 3 verbose level
- -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.
3. The generated BUFR format file will be saved at
> 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:
> /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
注解
- 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
/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
debufrto check the content of the bufr file:> /g5/nwpc_ep8/obsproc/nwprod/util/exec/debufr /g5/nwpc_ep8/obsproc/nwprod/dcom/us007003/20180901/b000/xx001the output is in
debufr.out.