[Thread Prev][Thread Next][Index]

[ferret_users] about loops and listing...



Hello to everyone,

I'm trying to wirte a script that gives me precipitaion over certain sites (39 sites) and i need the means over 6 and 24 hours of precipitation over those site as well.

I've made a script that gives me:

I / *:    "Acarau" "dia=0" "hora=03"  0.2029
I / *:    "Acarau" "dia=0" "hora=09"  0.3002
I / *:    "Acarau" "dia=0" "hora=15"  0.2963
I / *:    "Acarau" "dia=0" "hora=21"  0.1371
I / *:    "Acarau" "dia=1" "hora=03"  0.01867
I / *:    "Acarau" "dia=1" "hora=09"  0.01743
I / *:    "Acarau" "dia=1" "hora=15"  0.003194
I / *:    "Acarau" "dia=1" "hora=21"  0.09149
I / *:    "Acarau" "dia=2" "hora=03"  0.08146
I / *:    "Acarau" "dia=2" "hora=09"  0.2907
I / *:    "Acarau" "dia=2" "hora=15"  0.2202
I / *:    "Acarau" "dia=2" "hora=21"  0.2775
I / *:    "Acarau" "dia=3" "hora=03"  0.1548
I / *:    "Acarau" "dia=3" "hora=09"  0.4112

and I'de like to write these results at one line only like:

        "Acarau"  0.2029 0.3002  0.2963 0.1371 and so on...

The script that i'm using now is (its just a part of it, responsible for this list):

repeat/range=7:85:6/name=c ( \
let ndia = int((c-4)/24) ; \
let hora = (c-4)-ndia*24; if `hora lt 10` then let hora = "0`hora`" ; \
let med6 = media[l=`c`]-media[l=`c-6`] ; \   ! med6 = media de 6 horas do total acumulado
let time = "hora=`hora`" ; \
let time2 = "dia=`ndia`" ; \
list/append/nohead/file=`mod`-`label`-6hs.txt nome, time2, time, med6)

Where Acarau is the name of the 1st site, dia = day and hora = hour

I appreciate the help

--
Ms. Otacilio Leandro de Menezes Neto
Grupo de Modelagem Atmosférica
Departamento de Meteorologia e Oceanografia
Fundação Cearense de Meteorologia e Recursos Hídricos
Av. Rui Barbosa 1246 - CEP 60115-221
Fortaleza, Ceará
Fone: (85) 3101-1106 / 3101-1126

[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement