Hi it seems that I was premature in my celebrations yesterday. The file I sent for runs of trcit below zero degress work okay .........except picking up the files. When I ran the script for various numbers of years (year per file) it was clear that my values were around the same regardless of how many years (or files) that I inputted.
Then I remembered that I had changed the following;
spell_tot_uk(:,nr,:,:) = dim_sum_n(cold_uk1(:,{spell(nr)},:,:,:),0)
spell_tot_uk(0,nr,:,:) = dim_sum_n(cold_uk1(0,{spell(nr)},:,:,:),0) as I was trying to get around a dimension #0 mis-match. This is the variable that relates to file that has been inputted.
So can I ask another NCL-Talk question on how to get around this please?
The portion of the script it relates to is below and a copy of the full script and summary of the key variables are attached (join relates to number of files, spell the length of the cold run taking the tcrit from all ensembles at all times/steps)
n1 = 1
n2 = 60 ; ispan to specify all spells
spell = ispan(n1,n2,1) ; eg n1=1, n2=20
;;spell = (/1, 1, 10/) ; manually specify
nspell = dimsizes(spell)
spell_tot_uk = new( (/njoin,nspell,nlat,mlon/), "float") ; preallocate
dimspell = dimsizes(spell_tot_uk)
njoin = dimspell(0)
nspell = dimspell(1) ; same as "run_length"
nlat = dimspell(2)
mlon = dimspell(3)
do nr=0,nspell-1
spell_tot_uk(:,nr,:,:) = dim_sum_n(cold_uk1(:,{spell(nr)},:,:,:),0)
end do
spell_tot_uk!1 = "spell"
spell_tot_uk&spell = spell
copy_VarCoords(cold_uk1(0,0,0,:,:), spell_tot_uk(0,0,:,:)) ; trick for coords
printVarSummary(spell_tot_uk)
Any help greatly appreciated
kind regards
Dominique
_______________________________________________
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