question about reading ascii : declaring a format?

From: Erik N <nobleeu_at_nyahnyahspammersnyahnyah>
Date: Wed Nov 30 2011 - 12:16:27 MST

Dear NCL, I have read the example pages, but I don't see an example of
how a user tells ncl to read (not write) formatted data (i.e.
10f8.2...).

Am I missing something? Is this even a necessary step does the NCL
software figure it out?

Below is an example snip of code I've used to successfully read .txt
file with NCL and I already know that the data is in 10f.82 format. Do
I need to declare this format before reading the data?
-Erik

; **************************
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
; **************************
; USER CHANGES BEGIN
; **************************
; RM3 Model
dirI = "./" ; Input directry
filI = "uv7_4x_ek_sep2-14-2006" ; Input file
nrow = numAsciiRow("vort.b2")
ncol = numAsciiCol("vort.b2")
print("rows: "+nrow )
print("columns: "+ncol )
dirO = dirI
filO = "test_rm3_dvdx"
ntime = 56 ; 13 days, 4x daily BUT FOR 2 VARIABLES !!! (so
56 x 2 = 112)
nlat = 111 ; latitude gridpoints
nlon = 141 ; longitude gridpoints
; **************************
; END USER CHANGES
; **************************
begin

        data = asciiread(filI, (/ntime,nlat,nlon/), "float") ; read the whole file
        printVarSummary(data)
.
.
.
<snip>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Nov 30 12:16:38 2011

This archive was generated by hypermail 2.1.8 : Wed Nov 30 2011 - 19:52:47 MST