Thanks Ansley for the
help. In principle, it works well and I have now my variable in an ASCII file
without the missing values. However, the latitudes and longitudes do not
coincide with the original value. For example, using the
original netcdf file: Yes? List/x=70:75/y=-11/l=1
my_var 11S 70E / 101: 13.6 71E / 102: 0.0 72E / 103: 5.8 73E / 104: 3.0 74E / 105: 0.0 75E / 106: 0.0 In the ASCII file these
values correspond to another coordinates LON LAT TVAR VARI 4 / 4: 70.00 -11.00 1.00 13.6 5 / 5: 72.00 -11.00 1.00 0.0 6 / 6: 73.00 -11.00 1.00 5.8 7 / 7: 22.00 -10.00 1.00 3.0 8 / 8: 23.00 -10.00 1.00 0.0 9 / 9: 40.00 -10.00 1.00 0.0 The error starts happening
in the first 0.0 value of my_var. I figured out that the solution is very
simple and would like to include here, as it may be useful for other ferreters.
Just adding “GT LET lonlist = IF varlist GT -1 THEN
XSEQUENCE(lon1d) Igaratza De: Ansley Manke [mailto:Ansley.B.Manke@xxxxxxxx] Hi - ! Define ariables containing a 1-D list of the x, y,
or t The way XSEQUENCE works, this will list the data with
LON varying fastest, then LAT, then TIME. Dear Ferreters, I would like to suppress the output
data that contains missing values when listing to an ASCII file. I have a three
dimensional netcdf file which contains plenty of missing values. Yes? Sh grid my_var
Name axis
#pts start end
XAX LONGITUDE
111 30W 80E
YAX
LATITUDE
61
30s 30n
NORMALl Z
TAX
T
12
1 12 I want to have an ASCII file with 3
columns only at the locations with good values of “my_var” (not a
missing value): latitude, longitude and the value my_var. I tried to list all
the missing values at the end, and then repeat the function for each longitude
and month. This works in principle OK, but the problem is that the index (the
corresponding longitude) does not coincide anymore with the original value. Yes? List/x=-30/l=1/nohead
compressi(my_var) The ASCII file looks like that: 1
/
1: 0.00 2
/
2: 1.12 3
/
3: 2.22 4
/
4: 1.34 5
/
5: …. 6
/
6: …. Does anyone know how to list only
the good values without losing the longitude and latitude information? |