Project

General

Profile

convert .txt to .nc

Added by jungmin shin almost 5 years ago

Hi,
I have text file(.txt) and I want to convert into .nc file.
I tried
cdo -f nc input,r288x113 fwi19861.nc < fwi19861.txt

but it gives me an error.
Any help?

"LONG" "LAT" "YR" "MON" "DAY" "TEMP" "RH" "WS" "PREC" "FFMC" "DMC" "DC" "ISI" "BUI" "FWI" "DSR"
"1" 937.5 2525 1986 1 1 14.1915225982666 85.2440719604492 16.3857688903809 1.37104570865631 72.4907662583351 6.27778615137026 17.258474067688 1.55747292552278 6.57574172847833 0.758911232908087 0.0166919448229633
"2" 950 2525 1986 1 1 14.1888370513916 85.2251129150391 16.3368701934814 1.47253024578094 66.2723040724465 6.55588036584192 19.5164647369385 1.26064657696804 7.1267764551207 0.638637085913161 0.0122989694362664
"3" 962.5 2525 1986 1 1 14.1341190338135 85.5775680541992 16.294361114502 1.49168562889099 63.1115294940692 6.82636909556531 21.7646061630249 1.10389119573462 7.65239305720647 0.579281073356325 0.0103486341633739
"4" 975 2525 1986 1 1 14.132043838501 85.5711288452148 16.244176864624 1.56560218334198 61.0315098921768 6.53589232094084 24.0123740539551 0.987423056547013 7.77864211771215 0.522436274265132 0.00861961536969364
"5" 987.5 2525 1986 1 1 14.0906620025635 85.8279418945312 16.2025527954102 1.57032036781311 59.8299042883734 6.23408061804614 26.2526932144165 0.916235638873609 7.82359661642481 0.48618064826685 0.00758928351263955
"6" 1000 2525 1986 1 1 14.0831241607666 85.9578323364258 16.1627578735352 1.64964425563812 58.5382119489589 5.74775208193387 28.4916555633545 0.838440260931967 7.64157793422044 0.439670916086365 0.00635191972431036
"7" 1012.5 2525 1986 1 1 14.0215091705322 86.118278503418 16.1272716522217 1.69960808753967 57.3951887841728 5.16942489754552 30.7195272140503 0.769190038370407 7.27731656001461 0.393689673622764 0.00522385995621601

Thanks


Replies (1)

RE: convert .txt to .nc - Added by Karin Meier-Fleischer almost 5 years ago

Hi Jungmin,

in my opinion there is no operator for your type of ASCII data. Maybe you can use NCL to read and convert to netCDF.

-Karin

    (1-1/1)