True, NCL does not have a function to read mixed format files.
Presumably, you are talking about binary file. You never stated
the details.
Still, there may be approaches to use.
[1] Create a fortran or C shared object to read the data and return to
the NCL script. See:
http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclExtend.shtml
[2] Let's say the mixed binary was written via fortran
integer ii, jj, kk, qq
real x(50,30)
write(...) ii, jj, kk, qq, x
You can read this in NCL. It requires a 'double read' of each record
which is a bit cumbersome but it works.
irec = fbinrecread(...,0,4,"integer") ; ii=irec(0),jj=irec(1), ...
frec = fbinrecread(...,0,50*30+4,"float")
x = onedtond(frec(5:), (/30,50/))
====
Another example. similar to [2]
z = new ( (/kdy,kvar,nlev,nlat/), "float","No_FillValue")
ihd = new ( 10, "integer", 999)
; specify binary "Endian"
; setfileoption("bin","ReadByteOrder","BigEndian")
irec=0
do kd=0,kdy-1
do kv=0,kvar-1
ihd = fbinrecread(diri+fili, irec, 10,"integer")
;print (ihd)
irec=irec+1
z(kd,kv,:,:) = fbinrecread(diri+fili, irec, (/nlev,nlat/), "float")
irec=irec+1
end do
end do
On 11/20/12 12:29 PM, David Brown wrote:
> Sorry, the answer is no.
> -dave
>
> On Nov 20, 2012, at 11:26 AM, Luo, Chao wrote:
>
>> Hi,
>>
>> Does anyone know that if NCL has the function to read mxd format data?
>> Any suggestions are very appreciated.
>>
>> CL
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Nov 21 07:07:04 2012
This archive was generated by hypermail 2.1.8 : Wed Nov 21 2012 - 11:16:05 MST