1 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
2 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
3 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
10 varnames = (/"psi","chi_u","t_u","rh","ps_u"/)
11 nvar = dimsizes(varnames)
13 setfileoption("bin","ReadByteOrder","BigEndian")
14 dims = fbinrecread(filename,0,15,"integer")
18 print("ni, nj, nk = "+ni+", "+nj+", "+nk)
20 v = fbinrecread(filename,1,(/5,nk,nj,ni/),"double")
22 system("/bin/rm -f "+filename+".nc") ; remove any pre-existing file
23 ncdf = addfile(filename+".nc" ,"c") ; open output netCDF file
25 ;===================================================================
26 ; make time an UNLIMITED dimension; recommended for most applications
27 ;===================================================================
28 ; filedimdef(ncdf,"time",-1,True)
30 ;v1 = new((/nk, nj,ni/),double)
31 ;v2 = new((/nk, nj,ni/),double)
32 ;v3 = new((/nk, nj,ni/),double)
33 v4 = new((/nk, nj,ni/),double)
34 v5 = new((/nk, nj,ni/),double)
39 ; v1(k,j,i) = v(i,j,k,1)
40 ; v2(k,j,i) = v(i,j,k,2)
41 ; v3(k,j,i) = v(i,j,k,3)
42 ; v4(k,j,i) = v(i,j,k,4)
43 ; ;v5(k,j,i) = v(i,j,k,5)
48 ;v1(:,:,:) = v(1,:,:,:)
49 ;v2(:,:,:) = v(2,:,:,:)
50 ;v3(:,:,:) = v(3,:,:,:)
51 v4(:,:,:) = v(4,:,:,:)
52 ;v5(:,:,:) = v(5,:,:,:)
60 ;************************************************
61 ; end of reading be.dat data
62 ;************************************************