I have this part of my script which has 1D arrays, which are all the
same size, for the Depth (dep3d_1d), Lon, Lat, and Temperature.
This works to make strings (SQL inserts) of the data, but this includes
any values of Temperature which are "ismissing". That _FillValue for
Temperature is -99 (numeric) and I want it to be NULL (string? "" right?).
Can I change the _FillValue like that?
Maybe I should change the _FillValue to some outrageous value like
-9999. It looks like I know how to do that. [ ;) ]
Using -9999 will mean using a follow-up script which removes the -9999
values from the strings. :(
ncl 2> printVarSummary(xTemp)
Variable: xTemp
Type: float
Total Size: 9210168 bytes
2302542 values
Number of Dimensions: 3
Dimensions and sizes: [Depth | 22] x [Latitude | 261] x [Longitude | 401]
Coordinates:
Depth: [ 0..3500]
Latitude: [18..31]
Longitude: [-98..-78]
Number Of Attributes: 5
Time : 252
long_name : Potential Temperature
units : deg C
FORTRAN_format : f8.3
_FillValue : -99
ncl 3> xTemp@_FillValue=-9999
ncl 4> printVarSummary(xTemp)
<snip>
_FillValue : -9999
ncl 5>
;;;;;;;;;;;;;;;; snip of script:
data = "INSERT INTO iasnowcast " \
+ "(datadatetime, depth, latitude, longitude, the_geog " \
+ ", temperature) VALUES ( "+newstring+", " \
+ sprintf("%7.16f " , dep3d_1d)+", " \
+ sprintf("%7.16f " , lon3d_1d)+", " \
+ sprintf("%7.16f " , lat3d_1d)+", ST_MakePoint(" \
+ sprintf("%7.16f " , lon3d_1d)+", " \
+ sprintf("%7.16f " , lat3d_1d)+", " \
+ sprintf("%7.16f " , dep3d_1d)+"), " \
+ sprintf("%10.3f ", xTemp)+" );"
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Feb 16 17:55:12 2011
This archive was generated by hypermail 2.1.8 : Thu Feb 17 2011 - 22:00:17 MST