[ncl-talk] CMORPH Rainfall
Geeta Geeta
geetag54 at yahoo.com
Sun Dec 20 04:39:55 MST 2015
I have to plot 8km_30minutes resolution CMORPH rainfall. The data is binary format. and has 24 files of each hour.
-rw-r--r-- 1 aditya aditya 48955512 Dec 1 19:33 CMORPH_8KM-30MIN_2015113021
-rw-r--r-- 1 aditya aditya 48955512 Dec 1 19:33 CMORPH_8KM-30MIN_2015113022-rw-r--r-- 1 aditya aditya 48955512 Dec 1 19:33 CMORPH_8KM-30MIN_2015113023
As per the documentation of this data from (ftp://ftp.cpc.ncep.noaa.gov/precip/global_CMORPH/CMORPH_8km-30-minute.ctl)DSET /your-data-set-path/advt-8km-intrp-prim-sat-spat-2lag-2.5+5dovlp8kmIR-%y4%m2%d2%h2
OPTIONS yrev big_endian template
UNDEF 255
TITLE correlation estimates
XDEF 4948 LINEAR 0.036378335 0.072756669
YDEF 1649 LINEAR -59.963614 0.072771377
ZDEF 01 LEVELS 1
TDEF 99999 LINEAR 00z21dec2002 30mn
VARS 3
cmorph 1 -1,40,1,-1 xxxxxx yyyyy (mult. by 0.2 to get mm/hr units)
time 1 -1,40,1,-1 xxxxxx yyyyy
satid 1 -1,40,1,-1 xxxxxx yyyyy
ENDVARS
there are 3 records, 1st record being the desired parameter. (ftp://ftp.cpc.ncep.noaa.gov/precip/global_CMORPH/README.cmorph.8km_30minute). I have to plot each hourly file and then get 24 hrs rainfall for a day. ;;;;;;;Code; print(isbigendian)
; ----Defining for Once -----
wks = gsn_open_wks("ps","CMO-v1")
gsn_define_colormap(wks,"prcp_2")
nlat = 1649
nlon = 4948
;--------------------------------------------------
lat = -59.963614 + ispan(0,nlat-1,1)*0.072771377
; print(lat)
lon = 0.036378335 + ispan(0,nlon-1,1)*0.072756669
; print(lon)
setfileoption("bin","ReadByteOrder","BigEndian")
; cmorrf = fbinrecread("test.bin",0,(/nlat,nlon/),"float") ; print 0th record.
cmorrf = fbinrecread("test.bin",0,-1,"float") ; print 0th record. print("Sizeof rf ="+dimsizes(cmorrf)); print(cmorrf) asciiwrite("rf.txt",cmorrf)When I run this,
See http://www.ncl.ucar.edu/ for more details.(0) Falsewarning:fbinrecread: size specified is greater than record size, filling with missing values(0) Sizeof rf =1649(1) Sizeof rf =4948
when I use -1 in line defining cmorphh, I get this output.
aditya at agniilap:~/geeta/ncl/CMORPH$ See http://www.ncl.ucar.edu/ for more details.(0) False(0) Sizeof rf =0
no rainfall is written to the file.
Also the 1st and 2nd records are not being shown.
Pls suggest.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151220/d733c43d/attachment.html
More information about the ncl-talk
mailing list