-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFSTD_Sort.tcl
More file actions
50 lines (41 loc) · 1.21 KB
/
Copy pathFSTD_Sort.tcl
File metadata and controls
50 lines (41 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh
# the next line restarts using tclsh \
exec $SPI_PATH/tclsh "$0" "$@"
#============================================================================
# Environnement Canada
# Centre Meteorologique Canadien
# 2100 Trans-Canadienne
# Dorval, Quebec
#
# Projet : Exemple de scripts.
# Fichier : FSTD_Sort.tcl
# Creation : Mars 2005 - J.P. Gauthier - CMC/CMOE
# Description: On trie une liste de champs selon chaque point de grille afin
# par exemple d'obtenir un rang centile
#
# Parametres :
#
# Retour:
#
# Remarques :
#
#============================================================================
package require TclData
#package require TclGeoEER
package require Logger
Log::Start [info script] 0.1
fstdfile open 1 read $env(CI_DATA_IN)/2005120600_012
#----- Recuperer le champs pour la grille d'interpolation
set fldlist {}
puts -nonewline "Before sort:"
foreach fld [fstdfield find 1 -1 "" -1 -1 -1 "" "O3"] {
fstdfield read FLD$fld 1 $fld
lappend fldlist FLD$fld
puts -nonewline " [fstdfield stats FLD$fld -gridvalue 0 0]"
}
fstdfield sort $fldlist
puts -nonewline "\n\nAfter sort :"
foreach field $fldlist {
puts -nonewline " [fstdfield stats $field -gridvalue 0 0]"
}
Log::End