The fortran code of this format is
a=-888888.0 !(array of dim=13)
b=0 !(array of dim=13)
WRITE(101,'(2f20.5,4A40,f20.5,5I10,3L10,2I10,A20,13(f13.5,I7))')&
lat(r),lon(r),&
' ',&
' ',&
'FM-12 SYNOP ',&
' ',&
elev(r),-888888,-888888,-888888,&
i,-888888,is_sound,bogus,discard, & ! 3 logic is False
-888888,-888888,date(r),&
slp(r),0,((a(k),b(k)),k=1,12)
There are 20 fields required.
From little_r format, if we want to make litter_r format for FM-12 SYNOP, only needed is pressure, height, speed, wind direction, temperature and relative humidity.
Code | Obs Type | Mandatory variables | Optional variables | Unused variables | Notes |
---|---|---|---|---|---|
FM‑12 FM-14 | SYNOP SYNOP MOBIL | /P and/or H | Sp,Dr,T,RH† | Td,U,V,Th |
The fortran code is
WRITE(101,'(10(F13.5,I7))') p(r),qc,ht(r),qc,temp(r),qc,dp(r),qc,&
sp(r),qc,dr(r),qc,((a(k),b(k)),k=1,2),rh(r),b(1),a(1),b(1)
The fortran code is
WRITE(101,'(10(F13.5,I7))') -777777.,0,-777777.,0,((a(k),b(k)),k=1,8)
WRITE(101,'(3I7)') 50,0,0
Ref: the graphs are from [WRFDA_obs](https://chchoiw.files.wordpress.com/2017/08/wrfda_obs.pdf), which can be downloaded.
My observation data is xml2 format, so the FORTRAN code for transformation can be downloaded for your reference.