Hi NCL Talk,
I get the following error when I run the attached script. Looking at some previous online posts I think it is something to do with how it is picking up my lat/lon range but I am not sure how to resolve it.
fatal:NclOneDValGetClosestIndex: Non-monotonic coordinate value being used, can't complete coordinate subscript
fatal:Could not obtain coordinate indexes, unable to perform subscript
fatal:["Execute.c":7556]:Execute: Error occurred at or near line 213 in file ECMWF_DEMETER/demeter_v1_models_check_wrap.ncl
The line is is referring to is
spell_tot_uk(nr,:,:) = dim_sum_n(cold_uk1({spell(nr)},:,:,:),0)
which is part of a do loop
do nr=0,nspell-1
spell_tot_uk(nr,:,:) = dim_sum_n(cold_uk1({spell(nr)},:,:,:),0)
end do
I replaced the line ukmo = short2flt(a[:]->ukmo)
with the line below (just looking at some of the previous posts on similar error messages)
ukmo= short2flt(a[:]->ukmo(:,:,{32.5:75},{-27.5:45})) but I get the same error
The variables I extracted from the files (concat) were ukmo used to get tc2, the number of cold spells when tc2 falls below a critical value is extracted to using dim_numrum_n and then the number of each of the cold runs totalled up using the dim_sum_n loop above. The main variables are given below and a copy of the full script and all the variables attached. The length of the spell or run (1,2.....59,60) is manually entered in the script.
Any help would be much appreciated.
kind regards
Dominique
Variable: ukmo
Type: float
Total Size: 6998400 bytes
1749600 values
Number of Dimensions: 4
Dimensions and sizes: [step | 360] x [number | 9] x [latitude | 18] x [longitude | 30]
Coordinates:
step: [24..4320]
number: [0..8]
latitude: [32.5..75]
longitude: [-27.5..45]
Number Of Attributes: 6
_FillValue_original : -32767
_FillValue : -32767
missing_value_original : -32767
units : K
long_name : Minimum 2 metre temperature
missing_value : -32767
Variable: t2_uk
Type: float
Total Size: 6998400 bytes
1749600 values
Number of Dimensions: 4
Dimensions and sizes: [step | 360] x [number | 9] x [latitude | 18] x [longitude | 30]
Coordinates:
step: [24..4320]
number: [0..8]
latitude: [32.5..75]
longitude: [-27.5..45]
Number Of Attributes: 6
missing_value : -32767
long_name : Minimum 2 metre temperature
units : degC
missing_value_original : -32767
_FillValue : -32767
_FillValue_original : -32767
Variable: cold_uk1
Type: integer
Total Size: 6998400 bytes
1749600 values
Number of Dimensions: 4
Dimensions and sizes: [run_length | 360] x [number | 9] x [latitude | 18] x [longitude | 30]
Coordinates:
run_length: [24..4320]
number: [0..8]
latitude: [32.5..75]
longitude: [-27.5..45]
Number Of Attributes: 2
cold_crit_values : 0
long_name : unique cold runs
Variable: spell_tot_uk
Type: float
Total Size: 129600 bytes
32400 values
Number of Dimensions: 3
Dimensions and sizes: [60] x [latitude | 18] x [longitude | 30]
Coordinates:
latitude: [32.5..75]
longitude: [-27.5..45]
Number Of Attributes: 1
_FillValue : 9.96921e+36
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2.1.8 : Wed Jul 18 2012 - 14:33:00 MDT