+This work was produced at the University of California, Lawrence
+Livermore
+National Laboratory (UC LLNL) under contract no. W-7405-ENG-48
+(Contract 48) between the U.S. Department of Energy (DOE) and The
+Regents of
+the University of California (University) for the operation of UC LLNL.
+The rights of
+the Federal Government are reserved under Contract 48 subject to the
+restrictions agreed upon by the DOE and University as allowed under DOE
+Acquisition Letter 97-1.
+
DISCLAIMER
+
This work was prepared as an account of work sponsored by an
+agency of the United States Government. Neither the United States
+Government
+nor the University of California
+nor any of their employees, makes any warranty, express or implied, or
+assumes
+any liability or responsibility for the accuracy, completeness, or
+usefulness
+of any information, apparatus, product, or process disclosed, or
+represents
+that its use would not infringe privately-owned rights.
+Reference herein to any specific commercial
+products, process, or service by trade name, trademark, manufacturer or
+otherwise does not necessarily constitute or imply its endorsement,
+recommendation, or favoring by the United States Government or the
+University
+of California. The views and opinions of authors expressed herein do
+not necessarily
+state or reflect those of the United States Government or the
+University of California, and shall not be
+used for advertising or product endorsement purposes.
+
NOTIFICATION OF
+COMMERCIAL USE
+
Commercialization of this product is prohibited without
+notifying the Department of Energy (DOE) or Lawrence Livermore National
+Laboratory (LLNL).
+
NOTE
+
Portions of this software, including especially portions
+of the contents of subdirectories pysrc, contrib, and cdat/Tars, were
+not written by us and are redistributed here under the terms of their
+own licenses.
+
External License Agreements
+
This release of CDAT incorporates modules from other organizations
+besides LLNL some of which are distributed under software licenses
+of their choosing, and therefore may be subject to different terms and
+conditions. We ask that users respect these all terms and conditions as
+well as any copyright notices requirements.
+
+
This release is subject to different terms and conditions associated
+with some component parts.
+By installing software components covered by third party licenses you
+are agreeing to their terms and conditions. (Terms and Conditions can
+be found below.)
+
CCLRC License for CCLRC Software forming part of the
+Climate Data Analysis Tools Package
+
The Council for the Central Laboratory of the Research Councils
+(CCLRC) grants any person who obtains a copy of this software (the
+Software), free of charge, the non-exclusive, worldwide right to use,
+copy, modify, distribute and sub-license the use of the Software on the
+terms and conditions appearing below:
+
+1)The Software may be used only as part of the Climate Data Analysis
+Tools Package, made available to users free of charge.
+
+2)The CCLRC copyright notice and any other notice placed by CCLRC on
+the Software must be reproduced on every copy of the Software, and on
+every Derived Work. A Derived Work means any modification of, or
+enhancement or improvement to, any of the Software, and any software or
+other work developed or derived from any of the Software.
+3)CCLRC gives no warranty and makes no representation in relation to
+the Software. The Licensee and anyone to whom the Licensee makes the
+Software or any Derived Work available, use the Software at their own
+risk.
+4)All warranties, conditions, terms, undertakings and obligations on
+the part of CCLRC, implied by statute, common law, custom, trade usage,
+course of dealing or in any other way are excluded to the fullest
+extent permitted by law.
+
+5)Subject to condition 6, CCLRC will not be liable for:
+
+
+a)any loss of profits, loss of revenue, loss or corruption of data,
+loss of contracts or opportunity, loss of savings or third party claims
+(in each case whether direct or
+indirect);
+
+
+b)any indirect loss or damage arising out of or in connection with the
+Software;
+
+
+c)any direct loss or damage arising out of, or in connection with, the
+Software
+in each case, whether that loss arises as a result of CCLRC’s
+negligence, or in any other way, even if CCLRC has been advised of the
+possibility of that loss arising, or if it was within CCLRC's
+contemplation.
+
+6)None of these conditions limits or excludes CCLRC's liability for
+death or personal injury caused by its negligence or for any fraud, or
+for any sort of liability that, by law, cannot be limited or excluded.
+
+7)These conditions set out the entire agreement relating to the
+Software. The licensee acknowledges that it has not relied on any
+warranty, representation, statement, agreement or undertaking given by
+CCLRC, and waives any claim in respect of any of the same.
+
+8)The rights granted above will cease immediately on any breach of
+these conditions and the licensee will destroy all copies of the
+Software and any Derived Work in its control or possession. Conditions
+3, 4, 5, 6, 7, 8, 9 and 10 will survive termination and continue
+indefinitely.
+
+9)The licence and these conditions are governed by, and are to be
+construed in accordance with, English law. The English Courts will have
+exclusive jurisdiction to deal with any dispute which has arisen or may
+arise out of or in connection with the Software, the rights granted and
+these conditions, except that CCLRC may bring proceedings for an
+injunction in any jurisdiction.
+
+10)If the whole or any part of these conditions are void or
+unenforceable in any jurisdiction, the other provisions, and the rest
+of the void or unenforceable provision, will continue in force in that
+jurisdiction, and the validity and enforceability of that provision in
+any other jurisdiction will not be affected.
+
+
diff --git a/LEGAL.txt b/LEGAL.txt
new file mode 100644
index 0000000..ddb7725
--- /dev/null
+++ b/LEGAL.txt
@@ -0,0 +1,51 @@
+Climate Data Analysis Tools (CDAT)
+
+
+UCRL-CODE-2002-0021
+
+ This work was produced at the University of California, Lawrence Livermore National Laboratory (UC LLNL) under contract no. W-7405-ENG-48 (Contract 48) between the U.S. Department of Energy (DOE) and The Regents of the University of California (University) for the operation of UC LLNL. The rights of the Federal Government are reserved under Contract 48 subject to the restrictions agreed upon by the DOE and University as allowed under DOE Acquisition Letter 97-1.
+
+DISCLAIMER
+
+
+This work was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor the University of California nor any of their employees, makes any warranty, express or implied, or assumes any liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately-owned rights. Reference herein to any specific commercial products, process, or service by trade name, trademark, manufacturer or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or the University of California. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or the University of California, and shall not be used for advertising or product endorsement purposes.
+
+
+NOTIFICATION OF COMMERCIAL USE
+
+
+Commercialization of this product is prohibited without notifying the Department of Energy (DOE) or Lawrence Livermore National Laboratory (LLNL).
+
+
+NOTE
+
+
+Portions of this software, including especially portions of the contents of subdirectories pysrc, contrib, and cdat/Tars, were not written by us and are redistributed here under the terms of their own licenses.
+
+
+External License Agreements
+
+
+This release of CDAT incorporates modules from other organizations besides LLNL some of which are distributed under software licenses of their choosing, and therefore may be subject to different terms and conditions. We ask that users respect these all terms and conditions as well as any copyright notices requirements.
+
+
+
+This release is subject to different terms and conditions associated with some component parts. By installing software components covered by third party licenses you are agreeing to their terms and conditions. (Terms and Conditions can be found below.)
+
+
+CCLRC Licence for CCLRC Software forming part of the Climate Data Analysis Tools Package
+
+
+ The Council for the Central Laboratory of the Research Councils (CCLRC) grants any person who obtains a copy of this software (the Software), free of charge, the non-exclusive, worldwide right to use, copy, modify, distribute and sub-license the use of the Software on the terms and conditions appearing below:
+ 1)The Software may be used only as part of the Climate Data Analysis Tools Package, made available to users free of charge.
+ 2)The CCLRC copyright notice and any other notice placed by CCLRC on the Software must be reproduced on every copy of the Software, and on every Derived Work. A Derived Work means any modification of, or enhancement or improvement to, any of the Software, and any software or other work developed or derived from any of the Software. 3)CCLRC gives no warranty and makes no representation in relation to the Software. The Licensee and anyone to whom the Licensee makes the Software or any Derived Work available, use the Software at their own risk.
+ 4)All warranties, conditions, terms, undertakings and obligations on the part of CCLRC, implied by statute, common law, custom, trade usage, course of dealing or in any other way are excluded to the fullest extent permitted by law.
+ 5)Subject to condition 6, CCLRC will not be liable for:
+ a)any loss of profits, loss of revenue, loss or corruption of data, loss of contracts or opportunity, loss of savings or third party claims (in each case whether direct or indirect);
+ b)any indirect loss or damage arising out of or in connection with the Software;
+ c)any direct loss or damage arising out of, or in connection with, the Software in each case, whether that loss arises as a result of CCLRC’s negligence, or in any other way, even if CCLRC has been advised of the possibility of that loss arising, or if it was within CCLRC's contemplation.
+ 6)None of these conditions limits or excludes CCLRC's liability for death or personal injury caused by its negligence or for any fraud, or for any sort of liability that, by law, cannot be limited or excluded.
+ 7)These conditions set out the entire agreement relating to the Software. The licensee acknowledges that it has not relied on any warranty, representation, statement, agreement or undertaking given by CCLRC, and waives any claim in respect of any of the same.
+ 8)The rights granted above will cease immediately on any breach of these conditions and the licensee will destroy all copies of the Software and any Derived Work in its control or possession. Conditions 3, 4, 5, 6, 7, 8, 9 and 10 will survive termination and continue indefinitely.
+ 9)The licence and these conditions are governed by, and are to be construed in accordance with, English law. The English Courts will have exclusive jurisdiction to deal with any dispute which has arisen or may arise out of or in connection with the Software, the rights granted and these conditions, except that CCLRC may bring proceedings for an injunction in any jurisdiction.
+ 10)If the whole or any part of these conditions are void or unenforceable in any jurisdiction, the other provisions, and the rest of the void or unenforceable provision, will continue in force in that jurisdiction, and the validity and enforceability of that provision in any other jurisdiction will not be affected.
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..6ab06a1
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,66 @@
+CCLRC License for CCLRC Software forming part of the Ultrascale Visualization
+Climate Data Analysis Tools Package.
+
+The Council for the Central Laboratory of the Research Councils (CCLRC)
+grants any person who obtains a copy of this software (the Software),
+free of charge, the non-exclusive, worldwide right to use, copy, modify,
+distribute and sub-license the use of the Software on the terms and
+conditions appearing below:
+
+1)The Software may be used only as part of the Climate Data Analysis
+Tools Package, made available to users free of charge.
+
+2)The CCLRC copyright notice and any other notice placed by CCLRC on the
+Software must be reproduced on every copy of the Software, and on every
+Derived Work. A Derived Work means any modification of, or enhancement
+or improvement to, any of the Software, and any software or other work
+developed or derived from any of the Software.
+
+3)CCLRC gives no warranty and makes no representation in relation to
+the Software. The Licensee and anyone to whom the Licensee makes the
+Software or any Derived Work available, use the Software at their own
+risk.
+
+4)All warranties, conditions, terms, undertakings and obligations on the
+part of CCLRC, implied by statute, common law, custom, trade usage,
+course of dealing or in any other way are excluded to the fullest extent
+permitted by law.
+
+5)Subject to condition 6, CCLRC will not be liable for:
+ a)any loss of profits, loss of revenue, loss or corruption
+ of data, loss of contracts or opportunity, loss of savings or third
+ party claims (in each case whether direct or indirect);
+ b)any indirect loss or damage arising out of or in
+ connection with the Software;
+ c)any direct loss or damage arising out of, or in connection
+ with, the Software in each case, whether that loss arises as a result of
+ CCLRC's negligence, or in any other way, even if CCLRC has been
+ advised of the possibility of that loss arising, or if it was within
+ CCLRC's contemplation.
+
+6)None of these conditions limits or excludes CCLRC's liability for
+death or personal injury caused by its negligence or for any fraud, or
+for any sort of liability that, by law, cannot be limited or excluded.
+
+7)These conditions set out the entire agreement relating to the
+Software. The licensee acknowledges that it has not relied on any
+warranty, representation, statement, agreement or undertaking given by
+CCLRC, and waives any claim in respect of any of the same.
+
+8)The rights granted above will cease immediately on any breach of these
+conditions and the licensee will destroy all copies of the Software and
+any Derived Work in its control or possession. Conditions 3, 4, 5, 6, 7,
+8, 9 and 10 will survive termination and continue indefinitely.
+
+9)The licence and these conditions are governed by, and are to be
+construed in accordance with, English law. The English Courts will have
+exclusive jurisdiction to deal with any dispute which has arisen or may
+arise out of or in connection with the Software, the rights granted and
+these conditions, except that CCLRC may bring proceedings for an
+injunction in any jurisdiction.
+
+10)If the whole or any part of these conditions are void or
+unenforceable in any jurisdiction, the other provisions, and the rest of
+the void or unenforceable provision, will continue in force in that
+jurisdiction, and the validity and enforceability of that provision in
+any other jurisdiction will not be affected.
diff --git a/Lib/region.py b/Lib/region.py
index c847dd6..cc9e233 100644
--- a/Lib/region.py
+++ b/Lib/region.py
@@ -223,7 +223,7 @@ def post(self,fetched,slab,axes,specifications,confined_by,aux,axismap):
ax.designateLatitude()
faxes[axismap[i]]=ax
- a=cdms.createVariable(fetched.filled(),mask=fetched.mask,axes=faxes)
+ a=cdms.createVariable(fetched.filled(),mask=fetched.mask,axes=faxes,attributes=fetched.attributes)
return a
def domain(*args, **kargs):
diff --git a/Lib/times.py b/Lib/times.py
index 44a9875..05c79e2 100644
--- a/Lib/times.py
+++ b/Lib/times.py
@@ -162,12 +162,11 @@ def isMonthly(s):
units=tim.units
monthly=1
for i in range(len(tim)-1):
- month1=cdtime.reltime(tim[i],units).torel('months since 2000').value
- month2=cdtime.reltime(tim[i+1],units).torel('months since 2000').value
+ month1=cdtime.reltime(tim[i],units).torel('months since 2000',tim.getCalendar()).value
+ month2=cdtime.reltime(tim[i+1],units).torel('months since 2000',tim.getCalendar()).value
if month2-month1!=1 : monthly=0
return monthly
-
def mergeTime(ds,statusbar=1,fill_value=1.e20):
"""
Merge chronologically a bunch of slabs
@@ -500,7 +499,7 @@ def departures(self,slab,slicerarg=None,criteriaarg=None,ref=None,statusbar=None
:returns: The departures of slab from the result of get
"""
- sliced=TimeSlicer.get(self,slab,slicerarg,criteriaarg,statusbar=statusbar,sum=sum)
+ sliced=TimeSlicer.get(self, slab, slicerarg, criteriaarg, statusbar=statusbar, sum=sum)
if sliced is None:
return None
@@ -509,17 +508,20 @@ def departures(self,slab,slicerarg=None,criteriaarg=None,ref=None,statusbar=None
if order[0]!='t' : sliced=sliced(order='t...')
order2=sliced.getOrder(ids=1)
+ weights = self.slicer(sliced.getTime(), slicerarg)
if ref is None:
if sum is False:
- ref=numpy.ma.average(sliced,0)
+ ref = numpy.ma.average(sliced, axis=0, weights=zip(*weights[2])[0])
else:
- ref = numpy.ma.sum(sliced,0)
+ ref = numpy.ma.sum(sliced, axis=0, weights=zip(*weights[2])[0])
elif len(order2[1:])>0:
ref=ref(order=order2[1:])
+
if cdms2.isVariable(ref):
out=cdms2.asVariable(sliced(raw=1)-ref(raw=1))
else:
out=cdms2.asVariable(sliced(raw=1)-ref)
+
# put the axes back
out.id=slab.id
for i in range(len(sliced.shape)):
@@ -820,7 +822,7 @@ def dayBasedSlicer(tim,arg=None):
subarg='feb-29'
else:
t=cdtime.reltime(index,'month since 1997')
- t=t.tocomp()
+ t=t.tocomp(tim.getCalendar())
subarg=str(t.month)+'-'+str(t.day)
except:
raise Exception,"Error, dayBasedSlicer args must have '-' or '/' as month/day separator"
diff --git a/build/lib/cdutil/ValidationFunctions.py b/build/lib/cdutil/ValidationFunctions.py
deleted file mode 100644
index dc32080..0000000
--- a/build/lib/cdutil/ValidationFunctions.py
+++ /dev/null
@@ -1,193 +0,0 @@
-# Adapted for numpy/ma/cdms2 by convertcdms.py
-import string
-import types
-import numpy
-import numpy.ma
-import cdms2
-import os
-import cdutil
-
-def checkStringOrNone(self,name,value):
- """
- Checks to see if value is a string or None
- :param name: The name of the value
- :type name: str
-
- :param value: The value to check the type of
- :type value: any
-
- :returns: If value is None or a string, value will be returned. If not, an error will be raised.
- """
- if not type(value) in [types.StringType,types.NoneType]:
- raise ValueError,name+' must be a string or None'
- return value
-
-
-def checkListNumbers(self,name,value):
- """
- Checks to make sure a list or tuple contains values that are only numbers
- :param name: string name of the value being checked
- :type name: str
- :param value: A list or tuple, which will be checked to determine if the contents are all numbers.
- :type value: list or tuple
- :returns: If value contains only numbers, value will be returned. Else, an exception is raised.
- """
- if not type(value) in [types.ListType,types.TupleType,types.NoneType]:
- raise ValueError, name + ' must be a list/tuple/None'
- if not value is None:
- for v in value:
- if not type(v) in [types.IntType,types.LongType,types.FloatType]:
- raise ValueError, name + ' list/tuple elements must be numbers'
- return value
-
-def setSlab(self,name,value):
- """
- If value is a numpy ndarray or numpy MA, this function sets the object's data field to the value.
- :param name: string name of the value being checked
- :type name: str
- :param value:
- :returns: If value is a numpy ndarray or numpy MA, returns ('data',value).
- If value is a string, and the string is a filename in the system's path, returns ('file',value).
- If value is None, returns name,value.
- """
- if isinstance (value,numpy.ndarray ) or numpy.ma.isMA(value):
- self.data=value
- return ('data',value)
- elif type(value) == types.StringType:
- if os.path.exists(value):
- return('file',value)
- else:
- raise ValueError, value+" : file does not exist...."
- elif type(value) == types.NoneType:
- return name,value
- else:
- raise ValueError, name+" must be a slab, a file name or None"
-
-def checkAxisType(self,name,value):
- return checkInStringsListInt(self,name,value,[
- ['uniform','rect','linear'],
- 'gaussian',
- ['equal','equal area','equalarea','equal-area'],]
- )
-
-def checkAction(self,name,value):
- return checkInStringsListInt(self,name,value,['select','mask'])
-
-def setDataSetGrid(self,name,value):
- if isinstance(value,cdutil.WeightedGridMaker):
- return value
- else:
- self.grid.grid=value
-
-def setGrid(self,name,value):
- if isinstance(value,cdms2.grid.AbstractGrid):
- return value
- elif value is None:
- self.var=None
- self.file=None
- self.longitude.__init__()
- self.latitude.__init__()
- self.weightsMaker=None
- return None
- else:
- raise ValueError, name+" must be a grid object or None"
-
-def setSlabOnly(self,name,value):
- if isinstance (value,numpy.ndarray ) or numpy.ma.isMA(value):
- return value
- elif type(value) == types.NoneType:
- return value
- else:
- raise ValueError, name+" must be a slab or None"
-
-def getSlab(self,name):
- value=getattr(self,'_'+name)
- try:
- times=self.times
- times_type=self.times_type
- except:
- times=None
- times_type=''
- if times_type == 'indices':
- times=slice(times[0],times[1])
-
- if isinstance (value,numpy.ndarray ) or numpy.ma.isMA(value):
- return value
- elif type(value)==types.StringType:
- f=cdms2.open(value)
- if not times is None:
- v=f(self.var,time=times)
- else:
- v=f(self.var)
- f.close()
- return v
- else:
- return None
-
-def checkNumberOrNone(self,name,value):
- if not type(value) in [types.IntType,types.FloatType,types.LongType,types.NoneType]:
- raise ValueError,name+' must be an integer, a float, or None'
- return value
-
-def checkIntOrNone(self,name,value):
- if not type(value) in [types.IntType,types.LongType,types.NoneType]:
- raise ValueError,name+' must be an integer or None'
- return value
-
-
-def checkInStringsList(self,name,value,values):
- """ check if value is in values"""
- if not type(value)==types.StringType:
- raise ValueError, name + 'must be a string'
- elif not string.lower(value) in values:
- err=name+" must be in ('"+values[0]
- for v in values[1:-1]:
- err=err+", '"+v+"'"
- err=err+" or '"+values[-1]+"')"
- raise ValueError, err
- self._basic_set(name,string.lower(value))
-
-def checkInStringsListInt(self,name,value,values):
- """ checks the line type"""
- val=[]
- str1=name + ' can either be ('
- str2=' or ('
- i=0
- for v in values:
- if not v=='': # skips the invalid/non-contiguous values
- str2=str2+str(i)+', '
- if type(v) in [types.ListType,types.TupleType]:
- str1=str1+"'"+v[0]+"', "
- for v2 in v:
- val.append(v2)
- else:
- val.append(v)
- str1=str1+"'"+v+"', "
- i=i+1
- err=str1[:-2]+')'+str2[:-2]+')'
- if type(value)==types.StringType:
- value=string.lower(value)
- if not value in val:
- raise ValueError, err
- i=0
- for v in values:
- if type(v) in [types.ListType,types.TupleType]:
- if value in v:
- return i
- elif value==v:
- return i
- i=i+1
- elif type(value)==types.IntType or (type(value)==types.FloatType and int(value)==value):
- if not value in range(len(values)):
- raise ValueError, err
- else:
- return int(value)
- else:
- raise ValueError, err
-
-
-def checkNumber(self,name,value):
- if not type(value) in [types.IntType,types.FloatType,types.LongType]:
- raise ValueError,name+' must be an integer or a float'
- return value
-
diff --git a/build/lib/cdutil/__init__.py b/build/lib/cdutil/__init__.py
deleted file mode 100644
index aa803be..0000000
--- a/build/lib/cdutil/__init__.py
+++ /dev/null
@@ -1,12 +0,0 @@
-"""Module cdutil contains miscellaneous routines for manipulating variables.
-"""
-import region
-#import continent_fill
-from genutil.averager import averager, AveragerError, area_weights, getAxisWeight, getAxisWeightByName,__check_weightoptions
-from times import *
-from retrieve import WeightsMaker, WeightedGridMaker, VariableConditioner, VariablesMatcher
-from vertical import sigma2Pressure, reconstructPressureFromHybrid, logLinearInterpolation, linearInterpolation
-from create_landsea_mask import generateLandSeaMask
-from sftbyrgn import generateSurfaceTypeByRegionMask
-import cdat_info
-cdat_info.pingPCMDIdb("cdat","cdutil")
diff --git a/build/lib/cdutil/cdutil_version.py b/build/lib/cdutil/cdutil_version.py
deleted file mode 100644
index 83393aa..0000000
--- a/build/lib/cdutil/cdutil_version.py
+++ /dev/null
@@ -1 +0,0 @@
-version='1.0'
diff --git a/build/lib/cdutil/continent_fill.py b/build/lib/cdutil/continent_fill.py
deleted file mode 100644
index 9983c42..0000000
--- a/build/lib/cdutil/continent_fill.py
+++ /dev/null
@@ -1,182 +0,0 @@
-#!/usr/bin/env python
-# Adapted for numpy/ma/cdms2 by convertcdms.py
-
-import sys,string,vcs,cdms2 as cdms,copy,numpy
-
-
-class Gcf:
- def __init__(self):
- self.name='default'
- self.g_name='Gcf'
- self.line='n'
- self.line_width=1
- self.line_color=241
- self.fill='y'
- self.fill_color=252
- self.datawc_x1 = -180.0
- self.datawc_x2 = 180.0
- self.datawc_y1 = - 90.0
- self.datawc_y2 = 90.0
- self.projection='linear'
-
- def readData(self):
- """This function reads the continents outline"""
- import worldmap
- xs=[]
- ys=[]
- for area in dir(worldmap):
-## print 'AREA:',area,type(area),area
- if area[:3]=='far':
- exec('area = worldmap.'+area)
- x=[]
- y=[]
- n=len(area)
- for i in range(0,n,2):
- y.append(float(area[i])/100.)
- x.append(float(area[i+1])/100.)
- if i!=0:
- if x[-1]<0. and x[-2]>150:
- x[-1]=x[-1]+360.
-
- xs.append(x)
- ys.append(y)
- return xs,ys
-
- def plot(self,x=None,template=None,bg=0,ratio=None):
- try:
- if x is None:
- x=vcs.init()
- if ratio is None:
- ratio=x.ratio
- if not template is None:
- ## print 'you passed a template'
- if not vcs.istemplate(template):
- ## print 'Getting it from string'
- t=x.gettemplate(template)
- else:
- ## print 'Getting it from object'
- t=template
- else:
- t=x.gettemplate()
- ovp=x.viewport
- owc=copy.copy(x.worldcoordinate)
- ## print 'OWC',owc
- wc=x.worldcoordinate
- if not (self.datawc_x1 is None) and self.datawc_x1!='*':
- wc[0]=self.datawc_x1
- if not (self.datawc_x2 is None) and self.datawc_x2!='*':
- wc[1]=self.datawc_x2
- if not (self.datawc_y1 is None) and self.datawc_y1!='*':
- wc[2]=self.datawc_y1
- if not (self.datawc_y2 is None) and self.datawc_y2!='*':
- wc[3]=self.datawc_y2
- ## print 'Ratio:',x.ratio
- if ratio in ['auto','autot']:
- t.ratio_linear_projection(wc[0],wc[1],wc[2],wc[3])
- elif isinstance(ratio,str):
- if ratio[-1]=='t':
- r=float(ratio[:-1])
- else:
- r=float(ratio)
- t.ratio(r)
- elif ratio!=0:
- t.ratio(ratio)
- ## t.data.list()
- vp = [ t.data.x1, t.data.x2, t.data.y1, t.data.y2 ]
- fa=x.createfillarea()
- li=x.createline()
- fa.projection=self.projection
- li.projection=self.projection
- fa.viewport=vp
- fa.worldcoordinate=wc
- fa.priority=t.data.priority+1
- li.worldcoordinate=wc
- li.viewport=vp
- li.priority=t.data.priority+1
- # Now plots the stuff
- xs,ys=self.readData()
- ## xs=xs[15]
- ## ys=ys[15]
- fa.x=xs
- fa.y=ys
- fa.color=self.fill_color
- fa.priority=t.data.priority+1
- li.x=xs
- li.y=ys
- li.color=self.line_color
- li.width=self.line_width
- li.priority=t.data.priority+1
- if self.fill=='y':
- x.plot(fa,bg=bg)
- if self.line=='y':
- x.plot(li,bg=bg)
- xs=fa.x
- for i in range(len(xs)):
- for j in range(len(xs[i])):
- xs[i][j]=xs[i][j]-360.
- fa2=x.createfillarea()
- li2=x.createline()
-
- fa2.viewport=vp
- fa2.worldcoordinate=wc
-
- fa2.x=xs
- li2.x=xs
- if self.fill=='y':
- x.plot(fa2,bg=bg)
- if self.line=='y':
- x.plot(li2,bg=bg)
- xs=fa2.x
- for i in range(len(xs)):
- for j in range(len(xs[i])):
- xs[i][j]=xs[i][j]+720.
- icont=1
- fa3=x.createfillarea(source = fa.name)
- li3=x.createline(source = li.name)
- fa3.viewport=vp
- fa3.worldcoordinate=wc
- fa3.x=xs
- li3.x=xs
- if self.fill=='y':
- x.plot(fa3,bg=bg)
- if self.line=='y':
- x.plot(li3,bg=bg)
- ## x.viewport=ovp
- ## x.worldcoordinate=owc
- except Exception,err:
- print 'Error in continents:',err
-
-if __name__ == '__main__':
- import os,sys,cdutil,vcs,cdms2 as cdms
- fnm=os.path.join(vcs.sample_data,'clt.nc')
- f=cdms.open(fnm)
- s=f('clt',0,longitude=(-180.,180.))
- x=vcs.init()
- iso=x.createisoline('new')
- iso.datawc_x1=-180.
- iso.datawc_x2=180.
- iso.datawc_y1=-90.
- iso.datawc_y2=90.
- t=x.createtemplate('new')
- t.data.priority=1
- t.legend.priority=0
- x.plot(s,t,iso,continents=0)
- co=cdutil.continent_fill.Gcf()
- co.line='y'
- co.line_width=1
- co.line_color=241
- co.fill='y'
- co.fill_color=252
- co.datawc_x1 = -180.0
- co.datawc_x2 = 180.0
- co.datawc_y1 = - 90.0
- co.datawc_y2 = 90.0
- co.projection='linear'
- co.plot(x)
- x.postscript('tmp.ps')
- sys.stdin.readline()
-
-
-
-
-
diff --git a/build/lib/cdutil/create_landsea_mask.py b/build/lib/cdutil/create_landsea_mask.py
deleted file mode 100644
index 5795861..0000000
--- a/build/lib/cdutil/create_landsea_mask.py
+++ /dev/null
@@ -1,218 +0,0 @@
-import cdms2,MV2,sys,os
-import cdat_info
-
-
-def create_surrounds(data):
- sh=list(data.shape)
- L=data.getAxis(1)
- bL=L.getBounds()
- if L.isCircular() and bL[-1][1]-bL[0][0] % L.modulo == 0:
- sh[0]=sh[0]-2
- else:
- sh[0]=sh[0]-2
- sh[1]=sh[1]-2
-
- UL=MV2.ones(sh)
- UC=MV2.ones(sh)
- UR=MV2.ones(sh)
- ML=MV2.ones(sh)
- MC=MV2.ones(sh)
- MR=MV2.ones(sh)
- LL=MV2.ones(sh)
- LC=MV2.ones(sh)
- LR=MV2.ones(sh)
-
- if L.isCircular() and bL[-1][1]-bL[0][0] % L.modulo == 0:
- UC[:,:]=data[2:]
-
- LC[:,:]=data[:-2]
-
- ML[:,1:]=data[1:-1,:-1]
- ML[:,0]=data[1:-1,-1]
-
- MR[:,:-1]=data[1:-1,1:]
- MR[:,-1]=data[1:-1,0]
-
-
- UL[:,1:]=data[2:,:-1]
- UL[:,0]=data[2:,-1]
-
- UR[:,:-1]=data[2:,1:]
- UR[:,-1]=data[2:,0]
-
- LL[:,1:]=data[:-2,:-1]
- LL[:,0]=data[:-2,-1]
-
- LR[:,:-1]=data[:-2,1:]
- LR[:,-1]=data[:-2,0]
- else:
- UC[:,:]=data[2:,1:-1]
-
- LC[:,:]=data[:-2,1:-1]
- ML[:,:]=data[1:-1,:-2]
-
- MR[:,:]=data[1:-1,2:]
-
-
- UL[:,:]=data[2:,:-2]
-
- UR[:,:]=data[2:,2:]
-
- LL[:,:]=data[:-2,:-2]
-
- LR[:,:]=data[:-2,2:]
-
- return UL,UC,UR,ML,MR,LL,LC,LR
-
-
-def map2four(data,target,regridTool='regrid2'):
- lons=target.getLongitude()
- lats=target.getLatitude()
- lonso=cdms2.createAxis(lons[::2])
- lonse=cdms2.createAxis(lons[1::2])
- latso=cdms2.createAxis(lats[::2])
- latse=cdms2.createAxis(lats[1::2])
-
- oo=cdms2.createRectGrid(latso,lonso)
- oe=cdms2.createRectGrid(latso,lonse)
- eo=cdms2.createRectGrid(latse,lonso)
- ee=cdms2.createRectGrid(latse,lonse)
-
- doo = data.regrid(oo,regridTool=regridTool)
- doe = data.regrid(oe,regridTool=regridTool)
- deo = data.regrid(eo,regridTool=regridTool)
- dee = data.regrid(ee,regridTool=regridTool)
-
- out=MV2.zeros(data.shape,dtype='f')
-
- out[::2,::2]=doo
- out[::2,1::2]=doe
- out[1::2,::2]=deo
- out[1::2,1::2]=dee
-
- out.id=data.id
- out.setAxisList((lats,lons))
-
- return out
-
-
-def improve(mask,navy_frac_t,threshold_1,threshold_2,UL,UC,UR,ML,MR,LL,LC,LR,regridTool='regrid2'):
- mask_approx = map2four(mask,mask.getGrid(),regridTool=regridTool)
- diff = navy_frac_t - mask_approx
- ## Land point conversion
- c1 = MV2.greater(diff,threshold_1)
- c2 = MV2.greater(navy_frac_t,threshold_2)
- c= MV2.logical_and(c1,c2)
-## x.plot(c.astype("i"))
-## raw_input()
-## x.clear()
- ## Now figures out local maxima
- cUL,cUC,cUR,cML,cMR,cLL,cLC,cLR = create_surrounds(c)
- L=c.getAxis(1)
- bL=L.getBounds()
- if L.isCircular() and bL[-1][1]-bL[0][0] % L.modulo == 0:
- c=c[1:-1] # elimnitates north and south poles
- tmp = navy_frac_t[1:-1]
- else:
- c=c[1:-1,1:-1] # elimnitates north and south poles
- tmp = navy_frac_t[1:-1,1:-1]
- m = MV2.logical_and(c,MV2.greater(tmp,MV2.where(cUL,UL,0.)))
- m = MV2.logical_and(m,MV2.greater(tmp,MV2.where(cUC,UC,0.)))
- m = MV2.logical_and(m,MV2.greater(tmp,MV2.where(cUR,UR,0.)))
- m = MV2.logical_and(m,MV2.greater(tmp,MV2.where(cML,ML,0.)))
- m = MV2.logical_and(m,MV2.greater(tmp,MV2.where(cMR,MR,0.)))
- m = MV2.logical_and(m,MV2.greater(tmp,MV2.where(cLL,LL,0.)))
- m = MV2.logical_and(m,MV2.greater(tmp,MV2.where(cLC,LC,0.)))
- m = MV2.logical_and(m,MV2.greater(tmp,MV2.where(cLR,LR,0.)))
- # Ok now update the mask by setting these points to land
- mask2 = mask*1.
- if L.isCircular() and bL[-1][1]-bL[0][0] % L.modulo == 0:
- mask2[1:-1] = MV2.where(m,1,mask[1:-1])
- else:
- mask2[1:-1,1:-1] = MV2.where(m,1,mask[1:-1,1:-1])
-
- ## ocean point conversion
- c1 = MV2.less(diff,-threshold_1)
- c2 = MV2.less(navy_frac_t,1.-threshold_2)
- c= MV2.logical_and(c1,c2)
- cUL,cUC,cUR,cML,cMR,cLL,cLC,cLR = create_surrounds(c)
- L=c.getAxis(1)
- bL=L.getBounds()
- if L.isCircular() and bL[-1][1]-bL[0][0] % L.modulo == 0:
- c=c[1:-1] # elimnitates north and south poles
- tmp = navy_frac_t[1:-1]
- else:
- c=c[1:-1,1:-1] # elimnitates north and south poles
- tmp = navy_frac_t[1:-1,1:-1]
- ## Now figures out local maxima
- m = MV2.logical_and(c,MV2.less(tmp,MV2.where(cUL,UL,1.)))
- m = MV2.logical_and(m,MV2.less(tmp,MV2.where(cUC,UC,1.)))
- m = MV2.logical_and(m,MV2.less(tmp,MV2.where(cUR,UR,1.)))
- m = MV2.logical_and(m,MV2.less(tmp,MV2.where(cML,ML,1.)))
- m = MV2.logical_and(m,MV2.less(tmp,MV2.where(cMR,MR,1.)))
- m = MV2.logical_and(m,MV2.less(tmp,MV2.where(cLL,LL,1.)))
- m = MV2.logical_and(m,MV2.less(tmp,MV2.where(cLC,LC,1.)))
- m = MV2.logical_and(m,MV2.less(tmp,MV2.where(cLR,LR,1.)))
- # Ok now update the mask by setting these points to ocean
- if L.isCircular() and bL[-1][1]-bL[0][0] % L.modulo == 0:
- mask2[1:-1] = MV2.where(m,0,mask2[1:-1])
- else:
- mask2[1:-1,1:-1] = MV2.where(m,0,mask2[1:-1,1:-1])
- mask2.setAxisList(mask.getAxisList())
- return mask2
-
-
-def generateLandSeaMask(target,source=None,threshold_1 = .2, threshold_2 = .3,regridTool='regrid2'):
- """
- Generates a best guess mask on any rectilinear grid, using the method described in `PCMDI's report #58`_
-
- .. _PCMDI's report #58: http://www-pcmdi.llnl.gov/publications/pdf/58.pdf
-
- :param target: either a MV2 object with a grid, or a cdms2 grid (rectilinear grid only)
- :type target: MV2 or cdms2
-
- :param source: A fractional (0.0 to 1.0) land sea mask, where 1 means all land
- :type source: float
-
- :param threshold_1: criteria 1 for detecting cells with possible increment see report for detail
- difference threshold
- :type threshold_1: float
-
- :param threshold_2: criteria 2 for detecting cells with possible increment see report for detail
- water/land content threshold
- :type threshold_2: float
-
- :param regridTool: which cdms2 regridder tool to use, default is regrid2
- :type regridTool:
-
- :returns: landsea mask on target grid
- :rtype:
- """
- cdat_info.pingPCMDIdb("cdat","cdutil.generateLandSeaMask")
- if cdms2.isVariable(target):
- target = target.getGrid()
- if target is None:
- raise Exception,"Error target data passed do not have a grid"
- if not isinstance(target,cdms2.grid.TransientRectGrid):
- raise Exception, "Error: target grid must be rectilinear"
-
- if source is None:
- source = cdms2.open(os.path.join(cdat_info.get_prefix(),'share','cdutil','navy_land.nc'))('sftlf')
-
- try:
- navy_frac_t = source.regrid(target,regridTool='regrid2')
- except Exception,err:
- raise "error, cannot regrid source data to target, got error message: %s" % err
-
- mask = MV2.greater(navy_frac_t,.5).astype('i') # First guess, anything greater than 50% is land
- UL,UC,UR,ML,MR,LL,LC,LR = create_surrounds(navy_frac_t)
- cont = True
- i=0
- while cont:
- mask2 = improve(mask,navy_frac_t,threshold_1,threshold_2,UL,UC,UR,ML,MR,LL,LC,LR,regridTool=regridTool)
- if MV2.allequal(mask2,mask) or i>25: # shouldn't be more than 10 at max, 25 is way safe
- cont=False
- mask=mask2
- i+=1
- mask.id='sftlf'
- return mask
diff --git a/build/lib/cdutil/netcdfwriter.py b/build/lib/cdutil/netcdfwriter.py
deleted file mode 100644
index dac5f9d..0000000
--- a/build/lib/cdutil/netcdfwriter.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# Adapted for numpy/ma/cdms2 by convertcdms.py
-"""writenetcdf
- see also dataset write method
-"""
-import cdms2
-
-def writenetcdf (slab, filename, mode="a"):
- """
- writenetcdf(slab, filename, mode="a") writes slab to the file.
- :param mode: One of 'a' append, or 'w' replace
- :type mode: str
-
- :param slab: Anything :py:func:`cdms2.asVariable` will accept
- :type: see :py:func:`cdms2.asVariable`
- """
- if mode == 'r': mode = 'w'
- slab = cdms2.asVariable(slab, 0)
- f = cdms2.openDataset(filename, mode)
- f.write(slab)
- f.close()
-
-if __name__ == '__main__':
- from numpy.ma import allclose
- import pcmdi
- g = cdms2.openDataset('clt.nc','r')
- c = g.variables['clt']
- t = cdms2.asVariable([1.,2.,3.])
- t.id = 't'
- writenetcdf(c, 'test.nc', 'w')
- writenetcdf(t, 'test.nc', 'a')
- f = cdms2.open('test.nc')
- d = f.variables['clt']
- assert allclose(c,d)
- for name in ['clt', 't']:
- pcmdi.slabinfo(f.variables[name])
-
-
diff --git a/build/lib/cdutil/region.py b/build/lib/cdutil/region.py
deleted file mode 100644
index 7b4f47e..0000000
--- a/build/lib/cdutil/region.py
+++ /dev/null
@@ -1,239 +0,0 @@
-# Adapted for numpy/ma/cdms2 by convertcdms.py
-from cdms2.selectors import SelectorComponent
-import cdat_info
-class DomainComponent(SelectorComponent):
- """Gets a domain, and by default adjusts the bounds to the domain
- or if exact is set to 0 or None gets all the domain that has
- parts of the domain requested, also post processing allows you to apply a mask
- dimension names can be passed as keywords,
- but if no name is passed arguments are taken in order and applied to the corresponding axis
- Overwriting an axis (2 keywords or keyword + argument) is not allowed
-
- :Example:
-
- NH=cdms.selectors.Selector(domain(latitude=(0.,90.)))
- """
-
- def __init__(self,*args,**kargs):
- """ initialise some value such as tolerances for equality"""
- self.args=args
- self.kargs=kargs
- self.atol=kargs.get('atol',1.E-8)
- self.rtol=kargs.get('rtol',1.E-5)
- self.exact=kargs.get('exact',1)
- if not (self.exact is None or type(self.exact)==type(0)):
- raise 'Error keyword: ''exact'' value: '+str(exact)+' not legal'
-
- def __str__(self):
- s='Exact Region Selector\n'
- if len(self.args)>0:
- s+='Arguments: ('
- for a in len(self.args):
- s+=str(a)+', '
- s+=')\n'
- if self.kargs!={}:
- s+='Keywords:\n'
- for k in self.kargs.keys():
- s+='\t'+str(k)+':'+str(self.kargs[k])+'\n'
- return s
-
- def specify(self,slab,axes,specification,confined_by,aux):
- """ First part: confine the slab within a Domain wide enough to do the exact in post"""
- import string,copy
- from numpy.ma import minimum,maximum
- # myconfined is for later, we can't confine a dimension twice with an argument plus a keyword or 2 keywords
- myconfined=[None]*len(axes)
- self.aux=copy.copy(specification)
- # First look at the arguments (i.e not keywords) and confine the dimensions
- # in the order of the arguments
- for i in range(len(self.args)):
- if confined_by[i] is None : # Check it hasn't been confined by somebody else
- myconfined[i]=1 # dim confined by argument list
- confined_by[i]=self # for cdms I want to confine this dimension
- self.aux[i]=specs=list(self.args[i]) # How do we want to confine this dim ?
- if type(specs)==type(slice(0)):
- specification[i]=specs # If it's a slicing nothing to do
- else: # But if it's not...
- if specs[0] is None:
- tmp=axes[i].getBounds()
- if tmp is None:
- raise ValueError, 'Region error, axis:'+axes[i].id+' has no bounds'
- specs[0]=minimum(minimum(tmp[0],tmp[-1]))
- if specs[1] is None:
- tmp=axes[i].getBounds()
- if tmp is None:
- raise ValueError, 'Region error, axis:'+axes[i].id+' has no bounds'
- specs[1]=maximum(maximum(tmp[0],tmp[-1]))
- if axes[i].isTime(): # Time is as always "Special"
- import cdtime
- tc=type(cdtime.comptime(0)) # component time type
- tr=type(cdtime.reltime(0,'months since 0')) # relative time type
- t=type(specs[0]) # my first spec type
- if t==type(''): #if my first spec is passed as a string
- specs[0]=cdtime.s2r(specs[0],axes[i].units)
- elif t==tc or t==tr: #if my first spec is passed as a cdtime object
- specs[0]=cdtime.torel(specs[0],axes[i].units)
- else: # If not it has to be that the users knows the time values in the axis
- pass
- t=type(specs[1]) # my second spec type
- if t==type(''): #if my second spec is passed as a string
- specs[1]=cdtime.s2r(specs[1],axes[i].units)
- elif t==tc or t==tr: #if my second spec is passed as a cdtime object
- specs[1]=cdtime.torel(specs[1],axes[i].units)
- sp=[specs[0],specs[1],'oob'] # Now retrieve the values wide enough for the exact specification[i]=sp # sets the specifications
- else:
- return 1
- for kw in self.kargs.keys():
- axis=None
- for i in range(len(axes)):
- if axes[i].id==kw : axis=i
- if axis is None:
- if kw=='time' :
- for i in range(len(axes)):
- if axes[i].isTime() : axis=i
- elif kw=='level' :
- for i in range(len(axes)):
- if axes[i].isLevel() : axis=i
- elif kw=='longitude' :
- for i in range(len(axes)):
- if axes[i].isLongitude() : axis=i
- elif kw=='latitude' :
- for i in range(len(axes)):
- if axes[i].isLatitude() : axis=i
- elif not kw in ['exact','atol','rtol']: # keyword not a recognised keyword or dimension name
- raise 'Error, keyword: '+kw+' not recognized'
- # At this point, if axis is None:
- # we are dealing with a keyword for the selector
- # so we'll skip it
- if not axis is None :
- if confined_by[axis] is None:
- confined_by[axis]=self
- myconfined[axis]=1
- self.aux[axis]=specs=list(self.kargs[kw])
- if type(specs)!=type(slice(0)):
- if specs[0] is None:
- tmp=axes[axis].getBounds()
- if tmp is None:
- raise ValueError, 'Region error, axis:'+axes[axis].id+' has no bounds'
- specs[0]=minimum(minimum(tmp[0],tmp[-1]))
- if specs[1] is None:
- tmp=axes[axis].getBounds()
- if tmp is None:
- raise ValueError, 'Region error, axis:'+axes[axis].id+' has no bounds'
- specs[1]=maximum(maximum(tmp[0],tmp[-1]))
- if axes[axis].isTime():
- import cdtime
- tc=type(cdtime.comptime(0))
- tr=type(cdtime.reltime(0,'months since 0'))
- t=type(specs[0])
- if t==type(''):
- specs[0]=cdtime.s2r(specs[0],axes[i].units)
- elif t==tc or t==tr:
- specs[0]=cdtime.torel(specs[0],axes[i].units)
- t=type(specs[1])
- if t==type(''):
- specs[1]=cdtime.s2r(specs[1],axes[i].units)
- elif t==tc or t==tr:
- specs[1]=cdtime.torel(specs[1],axes[i].units)
- sp=[specs[0],specs[1],'oob']
- specification[axis]=sp
- else:
- specification[axis]=specs
-
- else:
- if myconfined[axis]==1:
- raise 'Error you are attempting to set the axis: '+str(axes[axis].id)+' more than once'
- else:
- return 1
- return 0
-
- def same(self,data,value):
- """ Check if data is basically the same than value"""
- return abs(data-value)lbound : # if the first bound is smaller then flip it
- tmp=fbound*1.
- fbound=lbound*1.
- lbound=tmp
- b0=xb[0] # bounds of lower value of the axis
- b1=xb[1] # bounds of greater value of the axis
- """ The folowing reset the values of the axis
- sets it to the middle of the new cell
- also reset the bounds accordingly"""
- if not(b0[0]>fbound and b0[0]fbound and b0[1]fbound and b1[0]fbound and b1[1]ax[0]:
- bounds[0],bounds[-1]=xb # Extreme bounds
- ax[-1]=ax1
- ax[0]=ax0
- else:
- bounds[-1],bounds[0]=xb # Extreme bounds
- ax[-1]=ax0
- ax[0]=ax1
- ax.setBounds(bounds)
- if faxes[axismap[i]].isLatitude():
- ax.designateLatitude()
- faxes[axismap[i]]=ax
-
- a=cdms.createVariable(fetched.filled(),mask=fetched.mask,axes=faxes)
- return a
-
-def domain(*args, **kargs):
- """construct the selector"""
- import cdms2 as cdms
- cdat_info.pingPCMDIdb("cdat","cdutil.region.domain")
- a=cdms.selectors.Selector(DomainComponent(*args,**kargs))
- return a
-
-NH=NorthernHemisphere=domain(latitude=(0.,None))
-SH=SouthernHemisphere=domain(latitude=(None,0.))
-Tropics=domain(latitude=(-23.4,23.4))
-NPZ=AZ=ArcticZone=domain(latitude=(66.6,None))
-SPZ=AAZ=AntarcticZone=domain(latitude=(None,-66.6))
-
-
-
diff --git a/build/lib/cdutil/retrieve.py b/build/lib/cdutil/retrieve.py
deleted file mode 100644
index c5a8732..0000000
--- a/build/lib/cdutil/retrieve.py
+++ /dev/null
@@ -1,1039 +0,0 @@
-# Adapted for numpy/ma/cdms2 by convertcdms.py
-import types
-import string
-import numpy
-import numpy.ma
-import MV2
-import cdms2
-import regrid2
-import cdtime
-import ValidationFunctions
-import exceptions
-import genutil
-
-class WeightsMakerError(exceptions.Exception):
- def __init__(self,args):
- self.args=args
-
-class WeightsMaker(object):
- """
- The WeightsMaker generates a transient variable containing fractions (between 0 and 1), with the value 0 identifying
- which cells should be excluded from consideration (i.e., masked out). In calculating the mean value of a variable,
- these fractions are typically used to "weight" grid cells
- (in addition to possibly weighting by the area of the grid cell). In the simplest case, only 0's and 1's will be
- generated, indicating which cells will be masked or not.
- """
- def __init__(self,source=None,var=None,values=None,actions=[MV2.equal,],combiningActions=[MV2.multiply,]):
- """
- :param source: either a file name or a transient variable.
- :type source: str
-
- :param var: the name of the variable that is needed from the file specified in the "source" argument
- (except when "source" is a transient variable, in which case this argument is ignored).
- :type var: str
-
- :param values: a list (with the same number of elements as the "actions" list) containing the values that will
- be passed to each function contained in the "actions" list. If "values" is defined as a list or tuple
- whose first element is 'input', then the variable passed to action is not the one referred to by
- "source" but the one sent to the "get" function (i.e. when the function is executed).
- :type values: list
-
- :param actions: a list (or a tuple) of functions that will be used by the WeightsMaker to create the weights.
- Each of these functions must accept two arguments: the first argument is an array
- (of the same shape as the mask), and the second is a scalar or a tuple.
- For example, "actions=MV.equal" will generate weights with 1's assigned to cells where elements of the
- array equal to the scalar specified in values (see below) and 0's assigned to all other cells.
- By default the array passed to the function is the one defined by "source," but an alternative "source"
- can be passed at the time of the mask creation (see the "get" and "values" explanations below).
- The default action (if "actions" is set to None) is: MV.equal.
- :type actions: list or tuple
-
- :param combiningActions: a list (with one element less than the number of elements in the "actions" list)
- containing functions used to combine the actions of the functions specified in the "actions" list.
- There is no need to define combiningActions when there is only one "action" defined.
- The first "combining-action" will be used to produce a new temporary mask representing the result of
- combining the first and second masks generated by the functions specified in the "actions" list.
- This result will be used subsequently with the result of action 3 and the second "combiningAction",
- and so on. The default logical action is MV.multiply.
- :type combiningActions: list
-
- .. note::
-
- When calling the get function of the WeightsMaker object, the variable being processed may be passed,
- allowing a mask to be generated based on the data itself. (If, for example, the WeightsMaker is passed
- values=["input", 273.15] and actions=[MV.less], temperatures below freezing would be masked.)
- """
- if type(source)==types.StringType:
- self.file=source
- self.mask=None
- else:
- self.mask=source
- self.file=None
- self.var=var
- self.values=values
- self.actions=actions
- self.combiningActions=combiningActions
-
- def get(self,input=None):
- v=self.mask
- if type(self.file)==types.StringType:
- f=cdms2.open(self.file)
- v=f(self.var,squeeze=1)
- f.close()
-## if v is None: return v
- if self.values is None:
- return v
- else:
-## if not v is None:
-## m=MV2.zeros(v.shape)
-## m.setAxisList(v.getAxisList())
-## else:
-## # if it is still None that means we didn't define a mask slab
-## # probably all coming from input
-## m=MV2.zeros(input.shape)
-## m.setAxisList(input.getAxisList())
- for iv in range(len(self.values)):
- val=self.values[iv]
- comp=v
- if type(val) in [types.ListType,types.TupleType]:
- if val[0]=='input':
- val=val[1]
- comp=input
- m2=self.actions[iv](comp,val)
- if iv==0 :
- m=m2
- else:
- m=self.combiningActions[iv-1](m,m2)
- return m
-
- __call__=get
-
- # Representation of Mask object
- def __str__(self):
- s='WeightsMaker Object: '
- if self.file is None and ((self.mask is None) or (self.mask is MV2.nomask)):
- s+='None'
- else:
- if not self.file is None: s+='\nfile:'+str(self.file)+'\nVar:'+str(self.var)
-## if not self.data is None: s+='\ndata:'+str(self.data)
- if not ((self.mask is None) or (self.mask is MV2.nomask)): s+='\nmask:'+str(self.mask)
- if not self.values is None:
- s+='\nvalues: ['
- for v in self.values:
- s+=str(v)+', '
- s+=']\nactions: ['
- for a in self.actions:
- s+=str(a)+', '
- s+=']\ncombiningActions: ['
- for c in self.combiningActions:
- s+=str(c)
- s+=']\n'
- return s
-
- __slots__=['mask','var','values','actions','file','combiningActions','data','_var']
-
- def _set_var(self,value):
- self._var=ValidationFunctions.checkStringOrNone(self,'var',value)
-
- def _get_var(self):
- return self._var
-
- def _del_var(self):
- del self._var
- var=property(_get_var,_set_var)
-
-
-class WeightedGridMakerError(WeightsMakerError):
- pass
-
-class GridAxis(object):
- def __init__(self):
- self.first=None
- self.n=None
- self.delta=None
- self.type='Uniform'
- def __str__(self):
- s ='first:'+str(self.first)+'\n'
- s+='n:'+str(self.n)+'\n'
- s+='delta:'+str(self.delta)+'\n'
- s+='type:'+str(self.type)
- return s
-
- __slots__=['first','n','delta','type','_first','_n','_delta','_type',]
-
- def _set_first(self,value):
- self._first=ValidationFunctions.checkNumberOrNone(self,'first',value)
- def _get_first(self):
- return self._first
- first=property(_get_first,_set_first)
-
- def _set_delta(self,value):
- self._delta=ValidationFunctions.checkNumberOrNone(self,'delta',value)
- def _get_delta(self):
- return self._delta
- delta=property(_get_delta,_set_delta)
-
- def _set_n(self,value):
- self._n=ValidationFunctions.checkIntOrNone(self,'n',value)
- def _get_n(self):
- return self._n
- n=property(_get_n,_set_n)
-
- def _set_type(self,value):
- self._type=ValidationFunctions.checkAxisType(self,'type',value)
- def _get_type(self):
- return self._type
- type=property(_get_type,_set_type)
-
-
-class WeightedGridMaker(object):
- """The WeightedGridMaker generates a cdms grid object (see cdms documentation for a description)
- and may also associate a WeightsMaker object with that grid. The WeightedGridMaker object may be used by the
- VariableConditioner object to define a "target" grid to which the variable will be mapped.
- The WeightedGridMaker must be either provided with a cdms grid object or with information needed to generate a grid.
- """
- def __init__(self,
- source=None,
- var=None,
- nlat=None,flat=None,dellat=None,
- grid_type='uniform',
- nlon=None,flon=None,dellon=None,
- weightsMaker=None
- ):
- """
-
- :param source: a cdms grid object or a file name (in which case the keyword "var" must be defined).
- Other keywords (except "var" and "WeightsMaker") will be ignored if "source" is a file name.
- :type source:
-
- :param var: the name of the variable that is needed from the file specified in the "source" argument
- (except when "source" refers directly to a grid object, in which case this argument is ignored).
- :type var: str
-
- :param nlat: the number of latitudes spanning the domain (which is ignored if "source" is a file name).
- :type nlat: float
-
- :param flat: the location of the first latitude (which is ignored if "source" is a file name or if "type" is
- 'gaussian' or 'equal').
- :type flat: float
-
- :param dellat: the latitude spacing (which is ignored if "source" is a file name or if "type" is
- 'gaussian' or 'equal').
- :type dellat: float
-
- :param grid_type: the type of grid that will be generated. Options include: 'uniform' (equally spaced),
- 'gaussian' (for use with spectral models), and 'equal' (for latitude spacing giving equal area grid
- cells as in the lmd5 model). This keyword will be ignored if "source" is a file name.
- :type grid_type: str
-
- :param nlon: the number of longitudes spanning the domain (which is ignored if "source" is a file name).
- :type nlon: float
-
- :param flon: the location of the first longitude (which by default is set to 0.0 but is ignored if "source"
- is a file name).
- :type flon: float
-
- :param dellon: the longitude spacing (which is ignored if the "source" is a file name).
- :type dellon: float
-
- :param weightsMaker: a :py:class:`WeightsMaker` object that should occupy the same grid as that returned by
- :py:class:`WeightedGridMaker`.
- :type weightsMaker: :py:class:`WeightsMaker`
- """
- self.longitude=GridAxis()
- self.latitude=GridAxis()
- self.longitude.n=nlon
- self.longitude.first=flon
- self.longitude.delta=dellon
- self.latitude.n=nlat
- self.latitude.first=flat
- self.latitude.delta=dellat
- self.latitude.type=grid_type
- if isinstance(source,cdms2.grid.AbstractGrid):
- self.grid=source
- elif isinstance(source,(str,unicode)):
- self.file=source
- f=cdms2.open(source)
- V=f[var]
- self.grid=V.getGrid()
- else:
- self.grid=None
- self.file=None
- if isinstance(weightsMaker,WeightsMaker):
- self.weightsMaker=weightsMaker
- elif weightsMaker is None:
- self.weightsMaker=WeightsMaker()
- else:
- raise WeightedGridMakerError, "WeightedGridMaker: weightsMaker must be None or WeightsMaker instance, you passed:"+repr(weightsMaker)
- self.var=var
-
- def __str__(self):
- s='GridMaker Object:'
- if not self.grid is None:
- s+='\n'+str(self.grid)
- elif not self.latitude.n is None:
- s+='\nLongitude:\n'+str(self.longitude)
- s+='\nLatitude:\n'+str(self.latitude)
- elif not self.file is None:
- s+='\nFile:'+str(self.file)+'\n'
- s+='Variable:'+str(self.var)
- else:
- s+='None'
- s+='\n'+str(self.weightsMaker)
- return s
-
- def get(self):
- value=self.grid
- if value is None:
- if not self.latitude.n is None: # Ok we seem to have grid definition
- if self.latitude.type == 1: # Gaussian
- if self.longitude.first is None:
- value=cdms2.createGaussianGrid(self.latitude.n)
- else:
- value=cdms2.createGaussianGrid(self.latitude.n,self.longitude.first)
- elif self.latitude.type == 0: # Uniform
- value=cdms2.createUniformGrid(self.latitude.first,
- self.latitude.n,
- self.latitude.delta,
- self.longitude.first,
- self.longitude.n,
- self.longitude.delta)
- elif self.latitude.type== 2: # Equalarea
- lat=cdms2.createEqualAreaAxis(self.latitude.n)
- lon=cdms2.createUniformLongitude(self.longitude.first,
- self.longitude.n,
- self.longitude.delta)
- value=cdms2.createGenericGrid(lat[:],lon[:],lat.getBounds(),lon.getBounds())
- elif not self.file is None:
- f=cdms2.open(self.file)
- value=f[self.var].getGrid()
- ## Ok temporary stuff to try to be able to close the file
- lat=value.getLatitude()
- lon=value.getLongitude()
- value=cdms2.createRectGrid(lat,lon)
- f.close()
- return value
-
- __call__=get
-
-
- __slots__=['grid','var','file','longitude','latitude','weightsMaker','_var','_file','_grid']
-
- def _get_var(self):
- return self._var
- def _set_var(self,value):
- self._var=ValidationFunctions.checkStringOrNone(self,'var',value)
- var=property(_get_var,_set_var)
-
- def _get_file(self):
- return self._file
- def _set_file(self,value):
- name,value=ValidationFunctions.setSlab(self,'file',value)
- if name=='file':
- self._file=value
- else:
- setattr(self,name,value)
- file=property(_get_file,_set_file)
-
- def _get_grid(self):
- return self._grid
- def _set_grid(self,value):
- self._grid=ValidationFunctions.setGrid(self,'grid',value)
- grid=property(_get_grid,_set_grid)
-
-class VariableConditionerError(WeightedGridMakerError):
- pass
-
-class VariableConditioner(object):
- """The VariableConditioner constructor must be provided either with a transient variable or with information
- that will be used to define a masked variable. Optional, additional information may be provided to indicate
- how the data should be mapped to a new grid, what masks should be applied, and how to scale and offset the data
- (to transform, for example, to alternative units). """
- def __init__(self,source,var=None,weightsMaker=None,weightedGridMaker=None,offset=0.,slope=1.,cdmsArguments=None,cdmsKeywords=None,id=None,preprocess=None,preprocessKeywords={},comments=''):
- """
- :param source: a file name or a transient variable. If an array is passed, a second associated array may also
- be passed (in which case source is a tuple), which contains the fraction of each grid cell
- for which the data value applies. This fraction will be used if the variable is regridded.
- :type source:
-
- :param var: the name of the variable that is needed from the file specified in the "source" argument
- (except when "source" refers directly to a variable, in which case this argument is ignored).
- :type var: str
-
- :param cdmsArguments: a tuple or list of optional arguments used when retrieving a variable with cdms.
- For example, cdmsArguments=(cdutil.region.NH) specifies that data should be retrieved from the
- Northern Hemisphere only). See the cdms documentation for more information.
- :type cdmsArguments: tuple
-
- :param cdmsKeywords: a dictionary defining "keyword:value" pairs used when retrieving a variable with cdms.
- For example, cdmsKeywords= {'latitude:(-90.0, 0.0)} specifies that data should be retrieved from the
- Southern Hemisphere only. See the cdms documentation for more information.
- :type cdmsKeywords: dict
-
- :param weightsMaker: a WeightsMaker object that should be applied to the masked variable (before any regridding).
- :type weightsMaker:
-
- :param weightedGridMaker: a WeightedGridMaker object that defines the target grid to which the data should be
- mapped.
-
- .. note::
-
- If a WeightsMaker is associated with the WeightedGridMaker object, then that mask will be
- applied to the data after regridding.
- :type weightedGridMaker: :py:class:`WeightsMaker`
-
- :param offset: used to change units of the variable by multiplying the data by "slope" and adding "offset"
- to the result.
- :type offset: float
-
- :param slope: used to change units of the variable by multiplying the data by "slope" and adding "offset"
- to the result.
- :type slope: float
-
- :param id: a string that can be used to identify your VariableConditioner object,
- but it is purely informational and not used otherwise.
- :type id: str
- """
- self.id=id
- self.var=var
- self.offset=offset
- self.slope=slope
- if cdmsArguments is None:
- self.cdmsArguments=[]
- else:
- self.cdmsArguments=cdmsArguments
- if cdmsKeywords is None:
- self.cdmsKeywords={}
- else:
- self.cdmsKeywords=cdmsKeywords
- if weightsMaker is None:
- self.weightsMaker=WeightsMaker()
- elif isinstance(weightsMaker,WeightsMaker) or weightsMaker is None:
- self.weightsMaker=weightsMaker
- else:
- raise VariableConditionerError,"WeightsMaker is wrong"
- if weightedGridMaker is None:
- self.weightedGridMaker=WeightedGridMaker()
- elif isinstance(weightedGridMaker,WeightedGridMaker):
- self.weightedGridMaker=weightedGridMaker
- elif isinstance(weightedGridMaker,cdms2.grid.AbstractGrid):
- self.weightedGridMaker=WeightedGridMaker()
- self.weightedGridMaker.grid=weightedGridMaker
-
- if type(source)==types.StringType :
- self.file=source
- self.data=None
- else:
- self.data=source
- self.file=None
- self.preprocess=preprocess
- self.preprocessKeywords=preprocessKeywords
- self.comments=comments
-
- def __str__(self):
- s='VariableConditioner Object\n'
- s+='id:'+str(self.id)
- if not self.file is None:
- s+='\nfile:'+str(self.file)
- s+='\nvar:'+str(self.var)
- else:
- s+='\ndata:'+str(self.data)
- if not self.cdmsArguments is None:
- s+='\ncdmsArguments:'
- for a in self.cdmsArguments:
- s+=str(a)+', '
- if not self.cdmsKeywords is None:
- s+='\ncdmsKeywords:'
- for k in self.cdmsKeywords.keys():
- s+='\n\t'+k+':'+str(self.cdmsKeywords[k])
- s+='\n'+str(self.weightsMaker)
- s+='\n'+str(self.weightedGridMaker)
- if self.slope!=1. : s+='\nslope:'+str(self.slope)
- if self.offset!=0. : s+='\noffset:'+str(self.offset)
- if self.comments!='':
- s+='\ncomments:'+str(self.comments)
- return s
-
- def get(self,returnTuple=1):
- value=self.data
- frc=None
- if type(value) in [types.TupleType, types.ListType]:
- value,frc=value
- if isinstance (value,numpy.ndarray ) or numpy.ma.isMA(value): # Variable defined from array
- if frc is None: frc=numpy.ma.ones(value.shape,dtype=numpy.float32)
- kw={}
- args=[]
- # Add user defined cdmsArguments
- for a in self.cdmsArguments:
- args.append(a)
- # Add user defined cdmsKeywords
- for k in self.cdmsKeywords.keys():
- kw[k]=self.cdmsKeywords[k]
- # try to apply, if not forget about it
- try:
- v=value(*args,**kw)
- frc=frc(*args,**kw)
- # Now removes the slice types
- # because they can't be used twice
- for k in kw.keys():
- if type(kw[k])==types.SliceType:
- del(kw[k])
- for i in range(len(args)):
- if type(args[i])==types.SliceType:
- pop(args,i)
- i=i-1
- except:
- v=value
- else: # Variable comes from a file, need to be retrieved
- f=cdms2.open(self.file)
- kw={}
- args=[]
- # Add user defined cdmsArguments
- for a in self.cdmsArguments:
- args.append(a)
- # Add user defined cdmsKeywords
- for k in self.cdmsKeywords.keys():
- kw[k]=self.cdmsKeywords[k]
- v=f(self.var,*args,**kw)
- f.close()
- # Now removes the slice types
- # because they can't be used twice
- for k in kw.keys():
- if type(kw[k])==types.SliceType:
- del(kw[k])
- for i in range(len(args)):
- if type(args[i])==types.SliceType:
- pop(args,i)
- i=i-1
-
- ## At that stage applied the preprocess function
- if self.preprocess is not None:
- v=apply(self.preprocess,(v,),self.preprocessKeywords)
-
- # Create the fractions
- if frc is None:
- frc=v.mask
- if frc is numpy.ma.nomask: #no mask
- # Create a bunch of ones (100%)
- frc=numpy.ones(v.shape,numpy.float32)
- else:
- # Fraction are actually just the opposite of the mask at that stage !
- frc=frc.astype(MV2.float32) # Sometimes if it is bytes it doesn't work
- frc=1.-frc
- frc=frc.astype(MV2.float32) # no need for double precision here !
- else:
- m=v.mask
- if not m is numpy.ma.nomask:
- frc=MV2.where(m,0.,frc).filled(0.)
- # Now get the associted weights object
- # Note that we pass v in case some of the values are defined as "input"
- # in which case it would use v instead of the weights for weightsing
- m=self.weightsMaker(v)
- if not m is None:
- # grows the variable and the weights for possible Xtra dimensions
- m=m(*args,**kw)
- v,m=genutil.grower(v,m)
- # make sure variable and weights are compatible
- if m.shape != v.shape:
- raise VariableConditionerError, 'weights and variable have different shapes: weights is '+str(m.shape)+' and grid is '+str(v.shape)
- # make sure they're on the same grid (in case one starts at 0 and one at -180 for example
-
- if not m.getGrid() is v.getGrid() :
- m = m.astype("i").regrid(v.getGrid())
-
- # Mask the dataset where the fraction are 0.
- v = MV2.masked_where(MV2.equal(m.filled(0),0.),v)
- # Update the fractions
- frc=m.filled(0.)
- m=v.mask
- if not m is numpy.ma.nomask:
- frc=numpy.where(m,0.,frc)
-## # Filll the mask with ones, i.e. set fraction to 0 when the mask is masked hahah
-## frc = numpy.where(m.filled(1),0.,frc)
- # Now get the target grid
- g=self.weightedGridMaker()
- if not g is None: # we do have a target grid to go to !
- # Create the regridder object
- rf=regrid2.Horizontal(v.getGrid(),g)
- # and regrid passing the weights to use to each grid cell
- # at this point it should be only 0/1
- v,frc=rf(v,mask=1.-frc,returnTuple=1)
- frc=MV2.array(frc)
- frc.setAxisList(v.getAxisList())
- v=v(*args,**kw)
- frc=frc(*args,**kw).filled(0.)
- # Note that now frc is not necessarily 0. and 1. but actuall fraction
- # of the grid cell that has real data in it.
- # do we weights after this regridding ?
- # once again pass v in case the weightsing wants
- # to work on the variable
- m=self.weightedGridMaker.weightsMaker(v)
- if not m is None: # we have a weights
- m=m(*args,**kw) # apply the extra cdmsKeywords to it
- v,m=genutil.grower(v,m)
- # make sure variable and weights are compatible
- if m.shape != v.shape:
- raise VariableConditionerError, 'weights and variable have different shapes: weights is '+str(m.shape)+' and grid is '+str(v.shape)
- # make sure they're on the same grid (in case one starts at 0 and one at -180 for example
-
- if not m.getGrid() is v.getGrid() :
- m = m.astype("i").regrid(v.getGrid())
-
- v=MV2.masked_where(MV2.equal(m.filled(0.),0.),v)
- # weights the fraction where needed
- frc=m.filled(0.)
- m=v.mask
- if not m is numpy.ma.nomask:
- frc=numpy.where(m,0.,frc)
-## frc=numpy.where(m.filled(1),0.,frc)
- # Now make the fraction an MV2 and puts the dim from v on it
- frc=MV2.array(frc)
- frc.setAxisList(v.getAxisList())
- # just in case applies the cdmsKeywords again
- # usefull in case your final grid is global
- # and you specified Nino3 region for example.
- v = v (*args,**kw)
- frc = frc(*args,**kw) .filled(0.)
- if v.missing_value is None:
- v.missing_value=1.e20
- v=MV2.masked_where(MV2.equal(frc,0.),v)
- # Now applies the slope and offset if necessary
- if self.slope!=1.:
- v=v*self.slope
- if self.offset!=0.:
- v=v+self.offset
-
- if not ((v.mask is None) or (v.mask is MV2.nomask)):
- if numpy.ma.allclose(v.mask,0.):
- v._mask=numpy.ma.nomask
- # Returns the variable and the fractions or just the variable
- if returnTuple:
-## if not ((frc.mask is None) or (frc.mask is MV2.nomask)):
-## if numpy.ma.allclose(frc.mask,0.):
-## frc._mask=None
- return v,frc
- else:
- return v
-
- # makes get the default function
- __call__=get
-
-
- __slots__=['source','var','data','file','weightsMaker','weightedGridMaker','slope','offset','cdmsArguments','cdmsKeywords','id','preprocessKeywords','preprocess','comments','_var','_id','_slope','_offset','_file','_data','_weightedGridMaker']
-
- def _get_var(self):
- return self._var
- def _set_var(self,value):
- self._var=ValidationFunctions.checkStringOrNone(self,'var',value)
- var=property(_get_var,_set_var)
-
- def _get_id(self):
- return self._id
- def _set_id(self,value):
- self._id=ValidationFunctions.checkStringOrNone(self,'id',value)
- id=property(_get_id,_set_id)
-
- def _get_slope(self):
- return self._slope
- def _set_slope(self,value):
- self._slope=ValidationFunctions.checkNumber(self,'slope',value)
- slope=property(_get_slope,_set_slope)
-
- def _get_offset(self):
- return self._offset
- def _set_offset(self,value):
- self._offset=ValidationFunctions.checkNumber(self,'offset',value)
- offset=property(_get_offset,_set_offset)
-
- def _get_file(self):
- return self._file
- def _set_file(self,value):
- name,value=ValidationFunctions.setSlab(self,'file',value)
- if name=='file':
- self._file=value
- else:
- setattr(self,name,value)
- file=property(_get_file,_set_file)
-
- def _get_data(self):
- return self._data
- def _set_data(self,value):
- self._data=ValidationFunctions.setSlabOnly(self,'data',value)
- data=property(_get_data,_set_data)
-
- def _get_weightedGridMaker(self):
- return self._weightedGridMaker
- def _set_weightedGridMaker(self,value):
- self._weightedGridMaker=ValidationFunctions.setDataSetGrid(self,'weightedGridMaker',value)
- weightedGridMaker=property(_get_weightedGridMaker,_set_weightedGridMaker)
-
-
-class VariablesMatcherError(VariableConditionerError):
- pass
-
-class VariablesMatcher(object):
- """
- The VariablesMatcher is defined to facilitate comparisons of two different variables by preprocessing them and
- ensuring that they are expressed in the same units and are placed on a common grid.
- Preprocessing includes selection of the spatial domain and time-period and provides for various masking and
- regridding options.
-
- The VariablesMatcher relies on three different kinds of supporting objects: the VariableConditioner,
- the WeightedGridMaker, and the WeightsMaker. The VariableConditioner can modify a field in various ways
- (e.g., applying masks, mapping it to a new grid, applying scale factors and adding a constant to it, which is useful
- in transforming the units). The WeightsMaker defines a mask, and the WeightedGridMaker defines a grid
- (and possibly associates a WeightsMaker object with it). The WeightsMaker object will be described first, because
- it may be needed by the other two. The WeightedGridMaker will be described next because it may be needed by the
- VariableConditioner.
- """
- def __init__(self,variableConditioner1=None,variableConditioner2=None,externalVariableConditioner=None,weightedGridMaker=None,cdmsArguments=[],cdmsKeywords={}):
- """
- :param variableConditioner1: a VariableConditioner object or a file name or a transient variable
- (from which a VariableConditioner will be constructed). It may also be a tuple comprising a transient
- variable plus a fraction associated with each cell (which will be used in constructing "weights").
- If variableConditioner1 is a file name, then the user must also define the name of the variable
- (e.g., VM.variableConditioner1.var='tas').
- :type :py:class:`VariableConditioner` or str or transient variable
-
- :param variableConditioner2: as variableConditioner1, except if variable 2 is not on the same grid as variable 1
- after all processing is completed, then variable 2 will be mapped to variable 1's grid.
- :type variableConditioner2: :py:class:`VariableConditioner`
-
- :param externalVariableConditioner: optional argument used to mask both variable 1 and variable 2 with its own
- mask. Variable 1 and variable 2 are mapped to the external variable grid before applying the mask.
- The external variable weights are applied (except where the weights associated with the variables are
- zero) The externalVariableConditioner is generally not needed unless an external time-varying mask is
- to be applied.
- :type externalVariableConditioner: :py:class:`VariableConditioner`
-
- :param weightedGridMaker: an optional :py:class:`WeightedGridMaker` object that defines the target grid to which
- variable 1 and variable 2 should be mapped as a last step.
-
- .. note::
-
- If a :py:class:`WeightsMaker` is associated with the :py:class:`WeightedGridMaker` object,
- then the mask will be applied to the data after regridding.
- :type weightedGridMaker: :py:class:`WeightedGridMaker`
-
- :param cdmsArguments: a tuple of optional arguments used when retrieving a variable with cdms. (For example,
- cdmsArguments=(cdutil.region.NH) specifies that data should be retrieved from the Northern Hemisphere
- only). See the cdms documentation for more information. The cdmsArguments set here will replace all
- arguments that might be set for individual VariableConditioner objects (i.e., "1", "2" and "external").
- :type cdmsArguments: tuple
-
- :param cdmsKeywords: a dictionary defining "keyword:value" pairs used when retrieving a variable with cdms.
- For example, cdmsKeywords= {'latitude:(-90.0, 0.0)} specifies that data should be retrieved from the
- Southern Hemisphere only. See the cdms documentation for more information.
- The cdmsKeywords set here will be appended to or take the place of those that might be set for
- individual VariableConditioner objects (i.e., "1", "2" and "external").
- :type cdmsKeywords: dict
- """
- # First VariableConditioner
- if isinstance(variableConditioner1,VariableConditioner):
- self.variableConditioner1=variableConditioner1
- else:
- self.variableConditioner1=VariableConditioner(variableConditioner1)
- # Second VariableConditioner
- if isinstance(variableConditioner2,VariableConditioner):
- self.variableConditioner2=variableConditioner2
- else:
- self.variableConditioner2=VariableConditioner(variableConditioner2)
- # External VariableConditioner
- if isinstance(externalVariableConditioner,VariableConditioner):
- self.externalVariableConditioner=externalVariableConditioner
- elif externalVariableConditioner is None:
- self.externalVariableConditioner=None
- else:
- self.externalVariableConditioner=VariableConditioner(externalVariableConditioner)
- # Final Grid
- if weightedGridMaker is None:
- self.weightedGridMaker=WeightedGridMaker()
- elif isinstance(weightedGridMaker,WeightedGridMaker):
- self.weightedGridMaker=weightedGridMaker
- elif isinstance(weightedGridMaker,cdms2.grid.AbstractGrid):
- self.weightedGridMaker=weightedGridMaker()
- self.weightedGridMaker.grid=weightedGridMaker
-
- self.cdmsArguments=cdmsArguments
- self.cdmsKeywords=cdmsKeywords
-
- # aliases to make my life MUCH easier !
- self.V1=self.variableConditioner1
- self.V2=self.variableConditioner2
- self.EV=self.externalVariableConditioner
-
- def __str__(self):
- s='VariablesMatcher Object:\n'
- s+='---------\nVariableConditioner 1\n---------\n'+str(self.V1)
- s+='\n---------\nVariableConditioner 2\n---------\n'+str(self.V2)
- s+='\n----------------\nExternal VariableConditioner\n----------------\n'+str(self.EV)
- s+='\n----------\nFinal Grid\n----------\n'+str(self.weightedGridMaker)
- return s
-
- def get(self,returnTuple=1):
- # Ok now the tough part try to figure out everything for the user...
-
- # overwrite the defintion for the variableConditioners cdmsArguments
- if self.cdmsArguments!=[] :
- setattr(self.V1,'cdmsArguments',self.cdmsArguments)
- setattr(self.V2,'cdmsArguments',self.cdmsArguments)
- if not self.EV is None :
- setattr(self.EV,'cdmsArguments',self.cdmsArguments)
-
- # overwrite the defintion for the variableConditioners cdmsKeyowrds
- for k in self.cdmsKeywords.keys():
- self.V1.cdmsKeywords[k]=self.cdmsKeywords[k]
- self.V2.cdmsKeywords[k]=self.cdmsKeywords[k]
- if not self.EV is None:
- self.EV.cdmsKeywords[k]=self.cdmsKeywords[k]
-
- # Checks the time:
- # 2003-9-15: Added options if both var don't have time then still works
- d1 = None
- d2 = None
- frc1 = None
- frc2 = None
- autotime = None
-
- if not self.V1.cdmsKeywords.has_key('time'):
- if self.V2.cdmsKeywords.has_key('time'):
- d2=self.V2(returnTuple=returnTuple)
- if returnTuple:
- t=d2[0].getTime().asComponentTime()
- else:
- t=d2.getTime().asComponentTime()
- self.V1.cdmsKeywords['time']=(t[0],t[-1])
- d1=self.V1(returnTuple=returnTuple)
- del(self.V1.cdmsKeywords['time'])
- else: # Automatically gets the maximum common time
- d2=self.V2(returnTuple=returnTuple)
- if returnTuple:
- t=d2[0].getTime()
- if not t is None:
- t=t.asComponentTime()
- else:
- t=d2.getTime()
- if not t is None:
- t=t.asComponentTime()
- if not t is None:
- self.V1.cdmsKeywords['time']=(t[0],t[-1])
- d1=self.V1(returnTuple=returnTuple)
- if returnTuple:
- t1=d1[0].getTime()
- if not t1 is None:
- t1=t1.asComponentTime()
- else:
- t1=d1.getTime()
- if not t1 is None:
- t1=t1.asComponentTime()
- if not t1 is None:
- autotime=[t1[0],t1[-1],'ccb']
- if cdtime.compare(t1[0],t[0])==-1:
- autotime[0]=t[0]
- if cdtime.compare(t1[-1],t[-1])==1:
- autotime[1]=t[-1]
- self.V1.cdmsKeywords['time']=autotime
- d1=self.V1(returnTuple=returnTuple)
- if not t1 is None:
- del(self.V1.cdmsKeywords['time'])
- self.V2.cdmsKeywords['time']=autotime
- d2=self.V2(returnTuple=returnTuple)
- del(self.V2.cdmsKeywords['time'])
- elif not self.V2.cdmsKeywords.has_key('time'):
- d1=self.V1(returnTuple=returnTuple)
- if returnTuple:
- t=d1[0].getTime().asComponentTime()
- else:
- t=d1.getTime().asComponentTime()
- if not t is None:
- self.V2.cdmsKeywords['time']=(t[0],t[-1])
- d2=self.V2(returnTuple=returnTuple)
- if not t is None: del(self.V2.cdmsKeywords['time'])
-
-
- # Now get the variableConditioners 1 and 2 if necessary
- if d1 is None:
- d1=self.V1(returnTuple=returnTuple)
- if d2 is None:
- d2=self.V2(returnTuple=returnTuple)
-
- if returnTuple:
- # break the output if necessary
- frc2=d2[1]
- d2=d2[0]
- frc1=d1[1]
- d1=d1[0]
- frc1=MV2.array(frc1)
- frc2=MV2.array(frc2)
- else:
- frc1=MV2.ones(d1.shape,typecode=MV2.float32)
- frc2=MV2.ones(d2.shape,typecode=MV2.float32)
-
- frc1.setAxisList(d1.getAxisList())
- frc2.setAxisList(d2.getAxisList())
-
-## # Gets the common time period, only if time keyword isn't defined
-## if not(d1.getTime() is None) and not (d2.getTime() is None):
-## if len(d1.getTime())!=len(d2.getTime()) and not self.V1.cdmsKeywords.has_key('time') and not self.V2.cdmsKeywords.has_key('time'):
-## t1=d1.getTime().asComponentTime()
-## t2=d2.getTime().asComponentTime()
-## t=[t1[0],t1[-1]]
-## if cdtime.compare(t1[0],t2[0])<0:
-## t[0]=t2[0]
-## if cdtime.compare(t1[-1],t2[-1])>0:
-## t[1]=t2[-1]
-## d1 = d1 (time=(t[0],t[1]))
-## frc1 = frc1(time=(t[0],t[1]))
-## d2 = d2 (time=(t[0],t[1]))
-## frc2 = frc2(time=(t[0],t[1]))
-
-## # remember the number of element in d1 to see if we add non dummy dimensions
-## nd1=MV2.count(d1)
-## nd2=MV2.count(d2)
-
-## # Now tries to grow extra dims (like dummy levels, etc...)
-## o1=d1.getOrder(ids=1)
-## o2=d2.getOrder(ids=1)
-
- if d1.shape!=d2.shape:
- if d1.ndim>d2.ndim:
- d1,d2=genutil.grower(d1,d2,singleton=1)
- frc1,frc2=genutil.grower(frc1,frc2,singleton=1)
- else:
- d2,d1=genutil.grower(d2,d1,singleton=1)
- frc2,frc1=genutil.grower(frc2,frc1,singleton=1)
-
- # External variableConditioner ?
- if not self.EV is None:
- ed=None
- if not self.EV.cdmsKeywords.has_key('time'):
- t=d1.getTime().asComponentTime()
- if not t is None: self.EV.cdmsKeywords['time']=(t[0],t[-1])
- ed=self.EV(returnTuple=1)
- frced=ed[1]
- ed=ed[0]
- frced=MV2.array(frced)
- frced.setAxisList(ed.getAxisList())
-
-## # Gets the common time between d1 and ed
-## if not t is None: del(self.EV.cdmsKeywords['time'])
-## if (not ed.getTime() is None) and (not d1.getTime() is None):
-## if (len(ed.getTime())!=len(d1.getTime())):
-## t1=d1.getTime().asComponentTime()
-## t2=ed.getTime().asComponentTime()
-## t=[t1[0],t1[-1]]
-## if cdtime.compare(t1[0],t2[0])<0:
-## t[0]=t2[0]
-## if cdtime.compare(t1[-1],t2[-1])>0:
-## t[1]=t2[-1]
-## d1 = d1 (time=(t[0],t[1]))
-## d2 = d2 (time=(t[0],t[1]))
-## ed = ed (time=(t[0],t[1]))
-
-## frc1 = frc1(time=(t[0],t[1]))
-## frc2 = frc2(time=(t[0],t[1]))
-## frced = wed(time=(t[0],t[1]))
-
-
- if ed is None:
- ed=self.EV(returnTuple=1)
- frced=ed[1]
- ed=ed[0]
- frced=MV2.array(frced)
- frced.setAxisList(ed.getAxisList())
- g=ed.getGrid()
- g1=d1.getGrid()
- rf=regrid2.Horizontal(g1,g)
- d1,frc1=rf(d1,mask=1.-frc1.filled(0.),returnTuple=1)
- g2=d2.getGrid()
- rf=regrid2.Horizontal(g2,g)
- d2,frc2=rf(d2,mask=1.-frc2.filled(0.),returnTuple=1)
- frc1=MV2.array(frc1)
- frc1.setAxisList(d1.getAxisList())
- frc2=MV2.array(frc2)
- frc2.setAxisList(d2.getAxisList())
- d1,ed=genutil.grower(d1,ed,singleton=1)
- d2,ed=genutil.grower(d2,ed,singleton=1)
- ed,frced=genutil.grower(ed,frced,singleton=1)
-
- frc1=numpy.ma.where(numpy.ma.equal(frc1.filled(0.),0.),0.,frced.filled(0.))
- frc2=numpy.ma.where(numpy.ma.equal(frc2.filled(0.),0.),0.,frced.filled(0.))
-
- d1=MV2.masked_where(MV2.equal(frc1.filled(0.),0.),d1)
- d2=MV2.masked_where(MV2.equal(frc2.filled(0.),0.),d2)
-
- # Final grid ?
- g=self.weightedGridMaker()
- if not g is None:
- g1=d1.getGrid()
- g2=d2.getGrid()
- rf1=regrid2.Horizontal(g1,g)
- rf2=regrid2.Horizontal(g2,g)
- d1,frc1=rf1(d1,mask=1.-frc1.filled(0.),returnTuple=1)
-## m=1.-frc2.filled(0.)
- d2,frc2=rf2(d2,mask=1.-frc2.filled(0.),returnTuple=1)
- frc1=MV2.array(frc1)
- frc1.setAxisList(d1.getAxisList())
- frc2=MV2.array(frc2)
- frc2.setAxisList(d2.getAxisList())
- m=self.weightedGridMaker.weightsMaker(d1)
- if not m is None:
- d1,m=genutil.grower(d1,m)
- frc1,m=genutil.grower(frc1,m)
- frc1=m.filled(0.)
- d1=MV2.masked_where(MV2.equal(frc1,0.),d1)
- m=d1.mask
- if not m is None:
- frc1=numpy.where(m,0.,frc1)
- m=self.weightedGridMaker.weightsMaker(d2)
- if not m is None:
- d2,m=genutil.grower(d2,m)
- frc2,m=genutil.grower(frc2,m)
- frc2=m.filled(0.)
- d2=MV2.masked_where(MV2.equal(frc2,0.),d2)
- m=d2.mask
- if not m is numpy.ma.nomask:
- frc2=numpy.where(m,0.,frc2)
- elif d1.getGrid()!=d2.getGrid():
- g1=d1.getGrid()
- g2=d2.getGrid()
- rf=regrid2.Horizontal(g2,g1)
- d2,frc2=rf(d2,mask=1.-frc2.filled(0.),returnTuple=1)
- frc1=MV2.array(frc1)
- frc1.setAxisList(d1.getAxisList())
- frc2=MV2.array(frc2)
- frc2.setAxisList(d2.getAxisList())
-
- # CdmsArguments or CdmsKeywords
- if not self.cdmsArguments is None:
- d1=d1(*self.cdmsArguments)
- d2=d2(*self.cdmsArguments)
- frc1=frc1(*self.cdmsArguments)
- frc2=frc2(*self.cdmsArguments)
-
- if not self.cdmsKeywords is None:
- d1=d1(**self.cdmsKeywords)
- d2=d2(**self.cdmsKeywords)
- frc1=frc1(**self.cdmsKeywords)
- frc2=frc2(**self.cdmsKeywords)
-
- d1=MV2.masked_where(MV2.equal(frc1,0.),d1)
- d2=MV2.masked_where(MV2.equal(frc2,0.),d2)
- if not ((d1.mask is None) or (d1.mask is MV2.nomask)):
- if numpy.ma.allclose(d1.mask,0.):
- d1._mask=numpy.ma.nomask
- if not ((d2.mask is None) or (d2.mask is MV2.nomask)):
- if numpy.ma.allclose(d2.mask,0.):
- d2._mask=numpy.ma.nomask
- if returnTuple:
- if not ((frc1.mask is None) or (frc1.mask is MV2.nomask)):
- if numpy.ma.allclose(frc1.mask,0.):
- frc1._mask=numpy.ma.nomask
- if not ((frc2.mask is None) or (frc2.mask is MV2.nomask)):
- if numpy.ma.allclose(frc2.mask,0.):
- frc2._mask=numpy.ma.nomask
- return (d1,frc1),(d2,frc2)
- else:
- return d1,d2
-
- __call__=get
diff --git a/build/lib/cdutil/sftbyrgn.py b/build/lib/cdutil/sftbyrgn.py
deleted file mode 100644
index 2367c3b..0000000
--- a/build/lib/cdutil/sftbyrgn.py
+++ /dev/null
@@ -1,194 +0,0 @@
-# Adapted for numpy/ma/cdms2 by convertcdms.py
-"""
-This module contains functions to map an array of "regions" onto a mask
-"""
-
-import regrid2,cdutil,MV2,genutil,cdms2,os
-import cdat_info
-
-
-def sumregions(potential_reg,potential):
- out = potential_reg[0]*1.
- wts = potential[0]*1.
- for i in range(1,potential.shape[0]):
- c = MV2.greater(potential[i]-wts,0)
- out = MV2.where(c,potential_reg[i],out)
- wts = MV2.where(c,potential[i],wts)
- return out
-
-
-def loop(potential,potential_reg,c2,w3,region):
- nmax = potential.shape[0]
- c3 = MV2.not_equal(w3,0.)
- c = MV2.logical_and(c2,c3)
- thisturn = MV2.ones(c.shape)
- for i in range(nmax):
- c1 = MV2.logical_or(MV2.equal(potential_reg[i],region),MV2.equal(potential[i],-999))
- c2 = MV2.logical_and(c,c1)
- c2 = MV2.logical_and(c2,thisturn)
- potential_reg[i] = MV2.where(c2,region,potential_reg[i])
- thisturn = MV2.where(c2,0,thisturn)
- c1 = MV2.logical_and(c2,MV2.equal(potential[i],-999))
- c2 = MV2.logical_and(c2,MV2.not_equal(potential[i],-999))
- potential[i] = MV2.where(c1,w3,potential[i])
- potential[i] = MV2.where(c2,potential[i]+w3,potential[i])
- ## Ultimate test to see if more would be needed !
- if not MV2.allequal(MV2.logical_and(c,thisturn),0):
- raise 'OOPS WE COULD USE MORE REGIONS BUDDY !'
- return
-
-
-def generateSurfaceTypeByRegionMask(mask,sftbyrgn=None,sftbyrgnmask=215,regions=range(201,223),maximum_regions_per_cell=4,extend_up_to=3,verbose=True):
- """
- Maps a "regions" dataset onto a user provided land/sea mask or grid
-
- :Example:
-
- .. doctest:: sftbyrgn_generateSurfaceTypeByRegionMask
-
- >>> mapped,found = generateSurfaceTypeByRegionMask(mask)
-
- :param mask: User provided land/sea mask (100/0) or grid (the land/sea mask will be generated automagically)
- which will be mapped using the "sftbyrgn" internal dataset (will generate a land/sea mask for you)
- :param sftbyrgn: Mask you wish to map onto your grid (if None uses internal "sftbyrgn" dataset (old ezget type))
- :param sftbyrgnmask: Land/sea mask for sftbyrgn (or a number specifying value limits for sftbyrgn which indicates
- land/sea threshold (greater values are land) - see URL below for integer region map)
- :param regions: Numbers from sftbyrgn array that you want to map onto mask (integers from 201-222)
- :param maximum_regions_per_cell: Maximum number of regions considered for a single cell
- :param extend_up_to: How many grid cells around a cell can we extend to identify a guess
- :param verbose: Prints to the screen what's going on (default is True)
-
- :returns: The mapped input grid/mask using provided (or default) regions - sftbyrgn -> user provided grid/mask AND
- A matrix containing number of regions matched for each output cell
-
- .. note::
-
- More detailed information, including a region map and tabulated region numbers are available from
- http://www-pcmdi.llnl.gov/publications/pdf/34.pdf
- """
-
- cdat_info.pingPCMDIdb("cdat","cdutil.generateSurfaceTypeByRegionMask")
- ## OK first determine which regions are available
- ## Must be integer values
- if isinstance(mask,cdms2.grid.TransientRectGrid):
- mask = cdutil.generateLandSeaMask(mask)*100.
-
- if sftbyrgn is None:
- sftbyrgn = cdms2.open(os.path.join(cdat_info.get_prefix(),'share','cdutil','sftbyrgn.nc'))('sftbyrgn')
-
- if regions is None:
- if verbose: print 'Preparing regions'
- #regions = range(201,223)
-
- regions = []
- for i in range(0,10000):
- genutil.statusbar(i,9999)
- c = float(MV2.sum(MV2.ravel(MV2.equal(sftbyrgn,i)),0))
- if c != 0: regions.append(i)
-
- if verbose: print 'Regions:',regions
- ## If no mask passed fr sftbyrgn, assumes everything greater 5000 is land)
- if isinstance(sftbyrgnmask,int):
- split = sftbyrgnmask
- n = MV2.maximum(mask)
- sftbyrgnmask = MV2.greater_equal(sftbyrgn,sftbyrgnmask)*n
- else:
- split = MV2.maximum(sftbyrgnmask)/2.
- ## Now guess the type for each regions
- keys = {}
- ## ## Nice way to do it
- ## for r in regions:
- ## c=MV2.not_equal(sftbyrgn,r)
- ## c=MV2.masked_where(c,sftbyrgnmask)
- ## n=MV2.count(c)
- ## c=float(MV2.sum(MV2.ravel(c),0)/n)
- ## print r,c,n
- ## keys[r]=c
- ## Fast but not so "general" way to do it
- for r in regions:
- if r< split:
- keys[r] = 0.
- else:
- keys[r] = 100.
- sh = list(mask.shape)
- sh.insert(0,maximum_regions_per_cell)
- potential = MV2.ones(sh,dtype='d')*-999
- potential_reg = MV2.ones(sh,dtype='d')*-999
-
- g1 = sftbyrgn.getGrid()
- g2 = mask.getGrid()
- r1 = regrid2.Horizontal(g1,g2)
- w = cdutil.area_weights(sftbyrgn)
-
- if verbose: print 'First pass'
- itmp = 0.
- for ireg in keys.keys():
- genutil.statusbar(itmp,len(keys.keys())-1)
- itmp += 1.
- c = MV2.equal(sftbyrgn,ireg)
- w2 = 1.-c*w
- s2,w3 = r1(sftbyrgn,mask=w2.filled(),returnTuple=1)
- c2 = MV2.equal(mask,keys[ireg])
- loop(potential,potential_reg,c2,w3,ireg)
-
- found = MV2.zeros(sh[1:],typecode='f')
- for i in range(maximum_regions_per_cell):
- found = found+MV2.not_equal(potential[i],-999)
- sh2 = list(sh)
- for k in range(extend_up_to):
- sh2[1] = sh[1]+2*(k+1)
- sh2[2] = sh[2]+2*(k+1)
- ## Form the possible i/j couples !
- s = MV2.sum(MV2.ravel(MV2.equal(potential[0],-999)),0)
- if verbose: print 'Expanding up to',k+1,'cells while trying to fix',s,'cells'
- #if dump:
- #f=cdms2.open('tmp_'+str(k)+'.nc','w')
- #f.write(sumregions(potential_reg,potential).astype('f'),id='sftbyrgn',axes=mask.getAxisList())
- #f.close()
- #g=sumregions(potential_reg,potential).astype('d')
- #g=MV2.masked_equal(g,-999)
- #g=MV2.greater(g,4999)*100.
- #g=MV2.absolute(mask-g)
- #g=MV2.masked_equal(g,0.)
- #print 'Number of differences:',MV2.count(g)
-
- if float(s) != 0:
- c0 = MV2.equal(potential[0],-999)
- couples = []
- sft2 = MV2.zeros(sh2[1:],dtype='d')-888.
- sft2[k+1:-k-1,k+1:-k-1] = mask
- for i in range(-k-1,k+2):
- for j in range(-k-1,k+2):
- if abs(i)>k or abs(j)>k: couples.append([i,j])
- ntot = len(keys.keys())*len(couples)-1
- itmp = 0
- for ireg in keys.keys():
- c = MV2.equal(sftbyrgn,ireg)
- w2 = 1.-c*w
- s2,w3 = r1(sftbyrgn,mask=w2.filled(),returnTuple=1)
- w4 = MV2.zeros(sh2[1:],typecode='d')
- w4[k+1:-k-1,k+1:-k-1] = w3
- for i,j in couples:
- if verbose: genutil.statusbar(itmp,ntot)
- itmp += 1.
- c2 = MV2.equal(sft2[j+k+1:j+k+1+sh[1],i+k+1:i+k+1+sh[2]],keys[ireg])
- c3 = MV2.equal(sft2[j+k+1:j+k+1+sh[1],i+k+1:i+k+1+sh[2]],mask)
- c2 = MV2.logical_and(c2,c3)
- c2 = MV2.logical_and(c2,c0)
- loop(potential,potential_reg,c2,w4[j+k+1:j+k+1+sh[1],i+k+1:i+k+1+sh[2]],ireg)
-
- found = MV2.where(MV2.equal(potential[0],-999),found-1,found)
-
- out = sumregions(potential_reg,potential)
- out.setAxisList(mask.getAxisList())
- out.id = 'sftbyrgn'
- out = out.astype('i')
- out.missing_value = -999
- found.setAxisList(mask.getAxisList())
- found.id = 'found'
- found = found.astype('i')
- found.missing_value = -999
-
- del(out.name)
- del(found.name)
- return out,found
diff --git a/build/lib/cdutil/times.py b/build/lib/cdutil/times.py
deleted file mode 100644
index 44a9875..0000000
--- a/build/lib/cdutil/times.py
+++ /dev/null
@@ -1,1516 +0,0 @@
-# Adapted for numpy/ma/cdms2 by convertcdms.py
-import numpy
-import MV2
-import cdms2,cdtime,string,types,numpy.ma,sys
-import cdat_info
-
-def centroid(msk,bounds,coords=None):
- """
- Computes the centroid of a bunch of points.
- Authors: Charles Doutriaux/Karl Taylor
- Date: April 2001
- :param msk: A slab (cdms2 TransientVariable)
- :type msk: cdms2.tvariable.TransientVariable
-
- :param bounds: The bounds of the overall thing.
- :param coords : The coordinates spanned by each subset
-
- :returns: A slab representing the centroid. Values are between 0 (data evenly distributed evenly across the center)
- and +/-1 (data not evenly distributed). Centroid is 1D less than msk
- """
- # determine the length,spread, shape and mean
- sh=msk.shape
- mean=float(bounds[1]+bounds[0])/2.
- if coords is None:
- coords=msk.getAxis(0).getBounds() # if MV2 then gets the bounds from there
- n=len(coords)
- mask=numpy.ma.getmask(msk)
- if mask is None:
- msk=numpy.zeros(msk.shape,numpy.float)
- else:
- msk=mask.astype(numpy.float)
- sw=0.
- for i in range(n):
- w=float(coords[i][1]-coords[i][0]) # width
- if isinstance(msk,numpy.ndarray):
- sw=sw+w*(1.-msk[i])
- else:
- sw=sw+w*(1.-msk)
- c=float(coords[i][0]+coords[i][1])/2.-mean # location
- w=w*c/float(bounds[1]-bounds[0]) # factor to multiply by plus normalization
- if isinstance(msk,numpy.ndarray):
- msk[i]=(1.-msk[i])*w
- else:
- msk = (1.-msk)*w
- msk=numpy.ma.sum(msk, axis=0) # sums it
- sw=sw/2.
- msk=msk/sw
- return msk
-
-def cyclicalcentroid(s,bounds,coords=None):
- """
- Returns the centroid, but this assumes cyclical axis.
-
- :Example:
-
- .. doctest:: times_cyclicalcentroid
-
- >>> import cdms2
- >>> import vcs
- >>> vcs.download_sample_data_files()
- >>> f=cdms2.open(vcs.sampledata + '/clt.nc')
- >>> s=f('clt')
- >>> cyclecentroid=cyclicalcentroid(s,bounds)
-
- :param s: A slab (cdms2 TransientVariable)
- :type s: cdms2.tvariable.TransientVariable
- :param bounds: The bounds of the overall thing
- :param coords: The coordinates spanned by each subset
-
- :returns: A slab representing the cyclecentroid, which is the same shape as s but without the 1st dimension
- :rtype: cdms2.tvariable.TransientVariable
- """
- if coords is None:
- coords=s.getAxis(0).getBounds() # if MV2 then gets the bounds from there
- n=len(coords)
- length=float(bounds[1]-bounds[0])
- nax=numpy.zeros((n,2),numpy.float)
- for i in range(n):
- nax[i][0]=coords[i][0]/length*2.*numpy.pi
- nax[i][1]=coords[i][1]/length*2.*numpy.pi
- # Places the point evenly around the axis
- # Compute the centroid on x and y
- xc=centroid(s,[0,2.*numpy.pi],numpy.cos(nax))
- yc=centroid(s,[0,2.*numpy.pi],numpy.sin(nax))
- # compute the new centroid
- return numpy.sqrt(xc*xc+yc*yc)/numpy.sqrt(2.)
-
-def getMonthString(my_list):
- """Given a list of months creates the string representing the sequence"""
- if not type(my_list) in [types.ListType,types.TupleType]:
- my_list=[my_list]
- dic = {
- 1:'JANUARY',2:'FEBRUARY',3:'MARCH',
- 4:'APRIL',5:'MAY',6:'JUNE',
- 7:'JULY',8:'AUGUST',9:'SEPTEMBER',
- 10:'OCTOBER',11:'NOVEMBER',12:'DECEMBER'}
- out=[]
- for i in my_list:
- out.append(dic[i][0])
- if len(out)==1: out=[dic[my_list[0]]]
- return string.join(out,'')
-
-def getMonthIndex(my_str):
- """
- Given a string representing a month or a season (common abrev)
- Returns the ordered indices of the month.
- Author: Krishna Achutarao
- Date: April 2001
-
- :param my_str: string reperesenting month or season
- :type my_str: str
-
- :returns: The ordered indices of the month
- :rtype: list
- """
- my_str = string.upper(my_str)
- mon_list = ['JANUARY', 'FEBRUARY', 'MARCH', 'APRIL', 'MAY', 'JUNE', 'JULY',
- 'AUGUST', 'SEPTEMBER', 'OCTOBER', 'NOVEMBER', 'DECEMBER']
- if my_str in mon_list:
- return [mon_list.index(my_str)+1]
- # end of if string.upper(my_str) in yr_arr:
- #
-
- # Determine if my_str is an abbreviated month, if my_str has
- # at least 3 characters.
- # * If my_str has one character, the same result will be found by using
- # the 'yrs' string below (ambiguous result because we choose the
- # first matching char...)
- # * If my_str has 2 characters, we assume that we are looking for 2
- # consecutive months that will be found with 'yrs'
- # i.e. 'JA' -> July AND August (NOT January!)
- if len(my_str) >= 3:
- for mon in mon_list:
- if string.find(mon, my_str) != -1:
- return [mon_list.index(mon)+1]
- # end of if string.find(mon, my_str) != -1:
- # end of for mon in mon_list:
-
- yr = 'JFMAMJJASOND'
- yrs = yr+yr
- #
- result = string.find(yrs, my_str)
- if result == -1: return []
- month = result + 1
- lis = range(month, month+len(my_str))
- for i in range(len(lis)):
- if lis[i] > 12: lis[i] -= 12
- return lis
-
-
-def isMonthly(s):
- """
- This function test if the data are monthly data from the time axis.
-
- :param s: A cdms2 TransientVariable
- :type s: cdms2.tvariable.TransientVariable
-
- :returns: An integer flag indicating whether s has monthly data (1), or does not (0).
- :rtype: int
- """
- tim=s.getTime()
- units=tim.units
- monthly=1
- for i in range(len(tim)-1):
- month1=cdtime.reltime(tim[i],units).torel('months since 2000').value
- month2=cdtime.reltime(tim[i+1],units).torel('months since 2000').value
- if month2-month1!=1 : monthly=0
- return monthly
-
-
-def mergeTime(ds,statusbar=1,fill_value=1.e20):
- """
- Merge chronologically a bunch of slabs
- Version 1.0
- Author: Charles Doutriaux, doutriaux1@llnl.gov
-
- :Example:
-
- .. doctest:: times_mergeTime
-
- >>> import cdms2
- >>> import vcs
- >>> vcs.download_sample_data_files()
- >>> f=cdms2.open(vcs.sampledata + '/clt.nc')
- >>> clt=f('clt')
- >>> u=f('u')
- >>> v=f('v')
- >>> ds=[clt,u,v]
- >>> mymerged=mergeTime(ds)
-
- :param ds: A list or an array of slabs to merge. Each slab MUST be in chronological order.
- :type ds: list
- :param statusbar: Integer flag indicating whether to show status bar or not.
- :type statusbar: int
- :param fill_value: Float used to set the fill value of the generated slab.
- :type fill_value: float
-
- :returns: A slab merging all the slabs of ds. Order is the order of the first slab
- :rtype: cdms2.tvariable.TransientVariable
- """
- allNone = True
- for s in ds:
- if s is not None:
- allNone = False
- break
- if allNone:
- return None
- # first determine the number of slabs
- nslab=len(ds)
- order0=None
- initialgrid = ds[0].getGrid()
- times=[[]]*nslab
- vals=[]
- ax=ds[0].getAxisList()
- # Now makes sure time is first
- timesleft=[]
- for i in range(nslab):
- order=ds[i].getOrder(ids=1)
- if order0 is None : order0=order
- if order[0]!='t' :
- ds[i]=ds[i](order='t...')
- ax=ds[i].getAxisList()
- times[i]=ds[i].getTime()
- units=times[i].units
- cal=times[i].getCalendar()
- tmpdic={}
- for ii in range(len(times[i])): # creates the dictionary of times not matched yet
- t=times[i][ii]
- tmpval=cdtime.reltime(times[i][ii],units).torel('seconds since 2000',cal)
- tmpdic[ii]=tmpval
- vals.append(tmpval.value)
- timesleft.append(tmpdic)
- vals.sort()
- nt=len(vals)
- # sys.exit()
- # Quick error check (no duplicate)
- if len(numpy.unique(vals))!=nt:
- for i in range(nt-1):
- if vals[i]==vals[i+1] :
- errtime=cdtime.reltime(vals[i],'seconds since 2000').tocomp()
- err='Error in merging process : duplicate time point\n'
- err=err+str(errtime)+' is duplicated, cannot merge'+str(vals[i-2:i+3])
- raise Exception,err
-
- # Now create the big array that will be the merged
- sh=list(ds[0].shape)
- sh[0]=nt
- out=numpy.ma.zeros(tuple(sh),MV2.float)
- # bounds array
- bnds=numpy.zeros((nt,2),MV2.float)
- fvals=numpy.zeros((nt),MV2.float)
- if not statusbar is None:
- import genutil
- prev=0
- for v in range(nt):
- if not statusbar is None and nt!=1:
- if not type(statusbar) in [type([]),type(())]:
- statusbar=float(v)/(nt-1.)
- elif v==0:
- statusbar.insert(0,float(v)/(nt-1.))
- else:
- statusbar[0]=float(v)/(nt-1.)
-
- prev=genutil.statusbar(statusbar,prev=prev,title='Merging')
- try: # In order to speeed up, raise an execption to exit the inner loops
- for i in range(nslab):
- tim=times[i]
- for it in numpy.sort(timesleft[i].keys()):
- t=tim[it]
- val=timesleft[i][it]
- if val.value==vals[v]:
- out[v]=ds[i][it]
- fvals[v]=val.torel(times[0].units,times[0].getCalendar()).value
- bnds[v]=tim.getBounds()[it]
- bnds[v][0]=switchCalendars(bnds[v][0],tim.units,tim.getCalendar(),times[0].units,times[0].getCalendar()).value
- bnds[v][1]=switchCalendars(bnds[v][1],tim.units,tim.getCalendar(),times[0].units,times[0].getCalendar()).value
- del(timesleft[i][it])
- raise Exception # to exit the it and i loops
- elif val.value>vals[v]:
- break
- except:
- pass
- if not statusbar is None and nt!=1:
- if type(prev[0])!=type(0) : prev[0].destroy()
-
- t=cdms2.createAxis(fvals,bounds=bnds)
- t.designateTime()
- t.id='time'
- t.units=times[0].units
- t.setCalendar(times[0].getCalendar())
- ax[0]=t
- out=cdms2.createVariable(out,id=ds[0].id,copy=0,fill_value=fill_value)
- out.setAxisList(ax)
- out.set_fill_value(fill_value)
- if initialgrid is not None:
- out.setGrid(initialgrid)
- if out.getOrder(ids=1)!=order0:
- return out(order=order0)
- else:
- return out
-
-
-def switchCalendars(t1,u1,c1,u2,c2=None):
- """
- Converts a relative time from one calendar to another, assuming that they are in different calendars
-
- :Example:
-
- .. doctest:: times_switchCalendars
-
- >>> switchCalendars(t1,c1,u2,c2)
-
- :param t1: A cdtime reltime object or a value. If it is a value, then u1 is needed.
- :param c1: cdtime calendar
- :param c2: cdtime calendar
- :param u1: units in the calendar to be converted
- :param u2: units in the final calendar
- """
- if not (type(t1)==types.IntType or type(t1)==types.FloatType):
- c2=u2
- u2=c1
- c1=u1
- u1=t1.units
- t1=t1.value
- # makes t1 a cdtime object
- t1=cdtime.reltime(t1,u1)
- # Converts t1 to comptime
- t1=t1.tocomp(c1)
- return t1.torel(u2,c2)
-
-
-
-class TimeSlicer:
- """
- Author : Charles Doutriaux: doutriaux1@llnl.gov
- Date: April 2001
-
- Returns masked average of specific time slices
- "slicer" determine which slices of the Transient Variable (TV) are processed
- "criteria" gets TV (with time dimension) and returns a "timeless" mask, used to mask the averaged slices
-
- "slicer"
- Input:
- - Time Axis
- - User argument (can be anything) (in a list if more than one argument)
- Output:
- indices : the indices for each season:
- [[i1,i2,...,il],
- [j1,j2,...,jm],
- ...,
- [k1,k2,...kn]]
- bounds : the bounds covered by each slice for each season:
- [[[i1b1,i1b2],[i2b1,i2b2],...,[ilb1,ilb2]],
- [[[j1b1,j1b2],[j2b1,j2b2],...,[jmb1,jmb2]],
- ...,
- [[k1b1,k1b2],[k2b1,k2b2],...,[knb1,knb2]]]
- norm : the actual length of each "season", and its start
- [[Li,Si],
- [Lj,Sj],
- ...,
- [Lk,Sk]]
- "criteria"
- Input:
- - slab : a slab
- - mask: the actual percentage of data in each subset used to produce the slab
- the bounds of its first (time) dimension must be correct
- they will be used by centroid
- - spread: the begining and end time of the slice processed
- - User argument (can be anything)
- Output:
- - the slab, masked
-
- Once constructed the object, beside "slicer" and "criteria" has 3 functions:
-
- "get" : which returns the slices wanted, appropriately masked
- Input:
- slab : the slab on which to operate
- sliceruserargument : anything your slicer function needs, default is None
- criteriauserargument: anything your criteria function needs, default is None
- Output:
- out : averaged and masked slices of slab
-
- "departures" : which returns the departures of slab from the result of get
- Input:
- slab : slab from which the we want to get the departure
- sliceruserargument : anything your slicer function needs, default is None
- criteriauserargument: anything your criteria function needs, default is None
- (ref): optional : result from get or equivalent precomputed
-
- Output:
- out : departure of slab from ref
-
- "average" : which return the average of the result of get
- Input:
- slab : the slab on which to operate
- slices : the slices for each part
- bounds : the length of each slice
- norm : the actual length of each "season"
- criteriaarg : arguments for criteria thing
- Output:
- out : the average of slab, masked by criteria
-
- Example of construction:
- TS=TimeSlicer(slicerfunc,criteriafunc)
- myres=TS(myslab,[[slicerarg,[criteriaarg]])
- myresdeparture=TS(myslab,[[slicerarg,[criteriaarg,ref]]]
- """
- def __init__(self,slicerfunction=None,criteriafunction=None):
- self.slicer=slicerfunction
- self.criteria=criteriafunction
- self.__call__=self.get
- self.prev=0
- self.title=''
-
- def get(self,slab,slicerarg=None,criteriaarg=None,statusbar=None,weights=False,sum=False):
- """
- :param slab: the slab on which to operate
- :param slicerarg: anything your slicer function needs, default is None
- :param criteriaarg: anything your criteria function needs, default is None
- :param statusbar: see :py:func:`statusbar` for details
-
- :returns: averaged and masked slices of slab
- """
-
-
- # Makes sure time is first
- initialorder=slab.getOrder(ids=1)
- initialgrid = slab.getGrid()
- if initialorder[0]!='t' : slab=slab(order='t...')
-
- # retrieve the time axis
- tim=slab.getTime()
- # Let slicer figure out wich slices we want
- slices,bounds,norm=self.slicer(tim,slicerarg)
-## print 'Slices:',slices,len(slices)
-## print 'Bounds:',bounds
-## print 'Norm:',norm
-## print 'Slices:',slices[-3:]
-## print 'Bounds:',bounds[-3:]
-## print 'Norm:',norm[-3:]
-
- # Check we have something
- if slices==[] :
- return None
-## raise Exception,'Error Slicer return nothing for: '+str(slicerarg)
- # How many slices ?
- out=self.average(slab,slices,bounds,norm,criteriaarg,statusbar,weights=weights,sum=sum)
- if weights:
- out,w = out
- # Put the dimensions
- out=cdms2.createVariable(out,id=slab.id,copy=0)
- for i in range(1,len(slab.shape)):
- out.setAxis(i,slab.getAxis(i))
- # Time axis
- n=len(slices)
- vals=numpy.zeros((n),MV2.float) # time values
- bnds=numpy.zeros((n,2),MV2.float) # time bounds
- # Retrieve the bounds
- sh=out.shape
- for i in range(sh[0]):
- b0=norm[i][1]
- b1=norm[i][0]+b0
- bnds[i]=b0,b1
- v=cdtime.reltime(b0,tim.units).value
- v=v+cdtime.reltime(b1,tim.units).value
- v=v/2.
- vals[i]=v
- t=cdms2.createAxis(vals,bounds=bnds)
- t.designateTime()
- t.id=tim.id
- t.units=tim.units
- t.setCalendar(tim.getCalendar())
- out.setAxis(0,t)
- if weights:
-## print out.shape,w.shape
- w=MV2.array(w,id='weights')
- w.setAxisList(out.getAxisList())
- if out.getOrder(ids=1)!=initialorder:
- out = out(order=initialorder)
- if weights:
- w = w(order=initialorder)
- if initialgrid is not None:
- out.setGrid(initialgrid)
- if weights:
- w.setGrid(initialgrid)
-
- if weights:
- return out,w
- else:
- return out
-
-
- def departures(self,slab,slicerarg=None,criteriaarg=None,ref=None,statusbar=None,sum=False):
- """
- :param slab: slab from which the we want to get the departure
- :param slicerarg: anything your slicer function needs, default is None
- :param criteriaarg: anything your criteria function needs, default is None
- :param ref: result from get or equivalent precomputed
- :param statusbar: see :py:func:`statusbar` for details
-
- :returns: The departures of slab from the result of get
- """
- sliced=TimeSlicer.get(self,slab,slicerarg,criteriaarg,statusbar=statusbar,sum=sum)
-
- if sliced is None:
- return None
- order=sliced.getOrder(ids=1)
- initialgrid=sliced.getGrid()
-
- if order[0]!='t' : sliced=sliced(order='t...')
- order2=sliced.getOrder(ids=1)
- if ref is None:
- if sum is False:
- ref=numpy.ma.average(sliced,0)
- else:
- ref = numpy.ma.sum(sliced,0)
- elif len(order2[1:])>0:
- ref=ref(order=order2[1:])
- if cdms2.isVariable(ref):
- out=cdms2.asVariable(sliced(raw=1)-ref(raw=1))
- else:
- out=cdms2.asVariable(sliced(raw=1)-ref)
- # put the axes back
- out.id=slab.id
- for i in range(len(sliced.shape)):
- out.setAxis(i,sliced.getAxis(i))
-
- if initialgrid is not None:
- out.setGrid(initialgrid)
-
- if out.getOrder(ids=1)!=order:
- return out(order=order)
- else:
- return out
-
- def average(self,slab,slices,bounds,norm,criteriaarg=None,statusbar=None,weights=False,sum=False):
- """
- Return the average of the result of slicer
-
- :param slab: the slab on which to operate
- :param slices: the slices for each part
- :param bounds: the length of each slice
- :param norm: the actual length of each "season"
- :param criteriaarg: arguments for criteria thing
-
- :returns: the average of slab, masked by criteria
- """
- n=len(slices)
- sh=list(slab.shape)
- sh[0]=n
- out = numpy.ma.zeros(sh,dtype=numpy.float)
- wout = numpy.ma.ones(sh,dtype=numpy.float)
- for i in range(n):
- self.statusbar1(i,n,statusbar)
- sub=slices[i]
- sh[0]=len(sub)
- msk=numpy.ma.ones(sh,dtype=numpy.float)
- subb=bounds[i]
- nrm=norm[i][0]
-## print sub,subb,nrm,'are subb, nrm',len(sub),sum
-## if len(sub)==1:
-## out[i]=slab[sub[0]]
-## w=float(subb[0][1]-subb[0][0])/nrm
-## msk=msk*w
-## else:
- for j in range(len(sub)):
- w=float(subb[j][1]-subb[j][0])/nrm
-## print j,w
- m=numpy.ma.getmask(slab[sub[j]])
- if m is not None:
- msk[j]=msk[j]*(1.-m.astype(MV2.float))*w
- else:
- msk[j]=msk[j]*w
- if len(sub)>1:
- out[i]=numpy.ma.sum(msk*slab[sub[0]:sub[-1]+1].asma(),axis=0)
- wout[i]=numpy.ma.sum(msk,axis=0)
- if sum is False : out[i]=out[i]/wout[i]
-## print 'case long:',wout[i,0,0]
- else:
-## print 'case 1:',out.shape,msk.shape,slab[sub[0]].asma().shape
- out[i] = MV2.array(slab[sub[0]]).asma()
-## if sum is False:
-## out[i] = out[i]/msk
-
- if criteriaarg is not None:
- msk=cdms2.asVariable(msk)
- ax=msk.getAxis(0)
- b=numpy.array(bounds[i])
- ax.setBounds(b)
- msk.setAxis(0,ax)
- out[i]=self.criteria(out[i],msk,[norm[i][1],norm[i][1]+norm[i][0],],criteriaarg)
- self.statusbar2(statusbar)
- if weights:
- return out,wout
- else:
- return out
-
- def statusbar1(self,i,n,statusbar):
- if not statusbar is None and n!=1:
- import genutil
- if not type(statusbar) in [type([]),type(())]:
- if type(statusbar)!=type(''):
- status=float(i)/(n-1.)
- else:
- status=float(i+eval(statusbar)[0]*n)/(eval(statusbar)[1]*n)
- else:
- status=statusbar[1:]
- tot=eval(statusbar[0])
- if type(tot)==type(''):
- status.insert(0,float(i+eval(statusbar)[0]*n)/(eval(statusbar)[1]*n))
- else:
- status.insert(0,float(i)/(n-1.))
- self.prev=genutil.statusbar(status,prev=self.prev,title=self.title)
-
- def statusbar2(self,statusbar):
- if not statusbar is None:
- if not type(statusbar) in [type([]),type(())]:
- if type(statusbar)!=type(''):
- if type(self.prev) in [type([]),type(())] :
- if type(self.prev[0])!=type(0):self.prev[0].destroy()
- self.prev=0
- elif eval(statusbar)[0]==eval(statusbar)[1]-1:
- if type(self.prev) in [type([]),type(())] :
- if type(self.prev[0])!=type(0):self.prev[0].destroy()
- self.prev=0
- else:
- status=statusbar[1:]
- tot=eval(statusbar[0])
- if type(tot)==type(''):
- if eval(statusbar)[0]==eval(statusbar)[1]-1:
- if type(self.prev) in [type([]),type(())] :
- if type(self.prev[0])!=type(0):self.prev[0].destroy()
- self.prev=0
- else:
- if type(self.prev) in [type([]),type(())] :
- if type(self.prev[0])!=type(0):self.prev[0].destroy()
- self.prev=0
- if type(statusbar) in [type([]),type(())]: statusbar.pop(0)
-
-
-def monthBasedSlicer(tim,arg=None):
- """
- slicer function for the TimeSlicer class
- select months
- Author : Charles Doutriaux, doutriaux1@llnl.gov
- Original Date: April 2001
- Last Modified: October, 2001
- Input:
- :param tim: time axis
- :param arg: character string representing the desired month/season or integer(s)
- also you can pass a list of the months you want (string or integer)
- you can mix integer and strings
- Output:
- -
- """
- # First convert the input
- if not type(arg) in [types.ListType , types.TupleType]:
- arg=[arg]
- # Now convert the strings and add to the valid months
- months=[]
- for i in range(len(arg)):
- if type(arg[i])==types.StringType:
- vals=getMonthIndex(arg[i])
- for j in vals: months.append(j)
- else:
- months.append(arg[i])
- slices=[]
- bounds=[]
- seaslength=[]
- sub=[]
- subb=[]
- subs=[]
- bnds=tim.getBounds()
- cal=tim.getCalendar()
- units=tim.units
- nt=len(tim)
- for i in range(nt):
- b0=cdtime.reltime(bnds[i][0],units)
- b1=cdtime.reltime(bnds[i][1],units)
- iout=0
- # Now figures out what the length of
- # the requested season
- b=b0.tocomp(cal)
- yr=b.year
- if months[-1]==12:
- bb=cdtime.comptime(b.year+1)
- else:
- bb=cdtime.comptime(b.year,months[-1]+1)
-## if b.cmp(bb)>0:
-## yr=yr+1
- # do we span 2 years ?
- if months[0]>months[-1] : # yes
- ## Are we in the part before the year's end
- if b.month0:
- t1=t1.add(-1,cdtime.Year)
- t0=t0.add(-1,cdtime.Year)
- if t1.cmp(b0.tocomp(cal))<0:
- t1=t1.add(1,cdtime.Year)
- t0=t0.add(1,cdtime.Year)
- t1=t1.torel(units,cal)
-## if i<5:print 't1 after:',t1.tocomp(cal)
- t0=t0.torel(units,cal)
- lenseas=float(t1.value-t0.value)
- # Now checks if we overlap the season
-## if i<5: print '---',i,b0.tocomp(cal),b1.tocomp(cal),t0.tocomp(cal),t1.tocomp(cal)
-## if i<5: print '---',i,t0.cmp(b0),b1.cmp(t1),t1.cmp(b0)
- if t0.cmp(b0)>-1: # cell starts after season started
- if b1.cmp(t1)>=0 : # and ends before the season ends
- sub.append(i)
- subb.append([t0.value,t1.value])
- subs.append([lenseas,t0.value])
- elif t0.cmp(b1)>-1: # all before the season
- iout=1
- else: # ends during the season
- sub.append(i)
- subb.append([t0.value,b1.value])
- subs.append([lenseas,t0.value])
- # Now check if if this is exactly one season long !
- if (b1.value-b0.value==lenseas) and t0.cmp(b0)==0:
- iout=1
-
- elif t1.cmp(b0)==1: # end season after beginning of cell ?
-## print 'index,t1>b0 time',i,tim[i],t1.tocomp(),b0.tocomp(),b
- if b1.cmp(t1)>0: # and ends after the end
- sub.append(i)
- subb.append([b0.value,t1.value])
- subs.append([lenseas,t0.value])
-## print 'haha',len(months),t0.value
-## if len(months)==12 or lenseas==(b1.value-b1.value):
- if len(months)==12:
-## print "i:",i,tim[i]
-## print "sub :",sub
-## print "subb:",subb
-## print "subs:",subs
- slices.append(sub)
- bounds.append(subb)
- seaslength.append([lenseas,t0.value])
- sub=[i]
- subb=[[t1.value,b1.value]]
- subs=[[lenseas,t1.value]]
- else: # but ends during
- sub.append(i)
- subb.append([b0.value,b1.value])
- subs.append([lenseas,t0.value])
- if len(months)==12 and b1.cmp(t1)==0:
- slices.append(sub)
- bounds.append(subb)
- seaslength.append([lenseas,t0.value])
- sub=[]
- subb=[]
- subs=[]
- else:
- iout=1
-## if i<5: print "ok we got iuot: ",iout,sub
- if iout:
- if sub!=[]:
- slices.append(sub)
- bounds.append(subb)
- seaslength.append(subs[-1])
- sub=[]
- subb=[]
- subs=[]
- ## ??? Add something here for 12 omnths span....
- ## like remenbering which season we're at, etc....
- if sub!=[]:
- slices.append(sub)
- bounds.append(subb)
-## print 'using:',subs
- seaslength.append(subs[-1])
- # Now looks for the cyclical thing
- # ??? do something here as well......
- return slices,bounds,seaslength
-
-
-def dayBasedSlicer(tim,arg=None):
- """
- slicer function for the TimeSlicer class
- select days
- Author : Charles Doutriaux, doutriaux1@llnl.gov
- Original Date: June, 2003
-
- :param tim: time axis
- :param arg: string representing the desired day/days or day number(s) (jan 1st, is day 0, feb 29th is day 59.5...)
- day are represented as "Jan-01" "January-01" "jan-1", "1-january", case does not matter
- days can be represented by 2 numbers but then month is assumed to be first ! e.g "01-25" = "jan-25"
- you can mix definitions
- :type arg: str
- Output:
- -
- """
- # First convert the input
- if not type(arg) in [types.ListType , types.TupleType]:
- arg=[arg]
- # Now convert the strings and add to the valid month/day tupples
- tupples=[]
- for i in range(len(arg)):
- subarg=arg[i]
- if type(subarg)!=types.StringType:
- raise Exception,"Error, arguments to dayBasedSlicer must be strings"
- sp=string.split(subarg,"-")
- if sp[0]==subarg:
- sp=string.split(subarg,'/')
- if sp[0]==subarg:
- try:
- index=string.atof(subarg)
- if index==59.5:
- subarg='feb-29'
- else:
- t=cdtime.reltime(index,'month since 1997')
- t=t.tocomp()
- subarg=str(t.month)+'-'+str(t.day)
- except:
- raise Exception,"Error, dayBasedSlicer args must have '-' or '/' as month/day separator"
- try:
- day=string.atoi(sp[1])
- try:
- month=getMonthIndex(sp[0])
- except:
- month=string.atoi(sp[0])
- except:
- try:
- day=string.atoi(sp[0])
- try:
- month=getMonthIndex(sp[1])
- except:
- month=string.atoi(sp[1])
- except:
- raise Exception,"Error dayBasedSlicer couldn't understand argument: "+subarg
- tupples.append([day,month])
- slices=[]
- bounds=[]
- seaslength=[]
- sub=[]
- subb=[]
- subs=[]
- bnds=tim.getBounds()
- cal=tim.getCalendar()
- units=tim.units
- nt=len(tim)
- for i in range(nt):
- b0=cdtime.reltime(bnds[i][0],units)
- b1=cdtime.reltime(bnds[i][1],units)
- iout=0
- # Now figures out what the length of
- # the requested season
- b=b0.tocomp(cal)
- yr=b.year
- if months[-1]==12:
- bb=cdtime.comptime(b.year+1)
- else:
- bb=cdtime.comptime(b.year,months[-1]+1)
- if b.cmp(bb)>0:
- yr=yr+1
- # do we span 2 years ?
- if months[0]>months[-1] : # yes
- t0=cdtime.comptime(yr-1,months[0])
- if months[-1]!=12:
- t1=cdtime.comptime(yr,months[-1]+1)
- else:
- t1=cdtime.comptime(yr+1)
- else:
- t0=cdtime.comptime(yr,months[0])
- if months[-1]!=12:
- t1=cdtime.comptime(yr,months[-1]+1)
- else:
- t1=cdtime.comptime(yr+1)
- t1=t1.torel(units,cal)
- t0=t0.torel(units,cal)
- lenseas=float(t1.value-t0.value)
-## print 't0,b0,t1,b1',t0,b0,t1,b1
- # Now checks if we overlap the season
- if t0.cmp(b0)>-1: # cell starts before season
- if b1.cmp(t1)>0 : # and ends after the season
- sub.append(i)
- subb.append([t0.value,t1.value])
- subs.append([lenseas,t0.value])
- elif t0.cmp(b1)>-1: # all before the season
- iout=1
- else: # ends during the season
- sub.append(i)
- subb.append([t0.value,b1.value])
- subs.append([lenseas,t0.value])
- # Now check if if this is exactly one season long !
- if (b1.value-b0.value==lenseas) and t0.cmp(b0)==0:
- iout=1
-
- elif t1.cmp(b0)==1: # end season after beginning of cell ?
-## print 'index,time',i,tim[i]
- if b1.cmp(t1)>0: # and ends after the end
- sub.append(i)
- subb.append([b0.value,t1.value])
- subs.append([lenseas,t0.value])
-## print 'haha',len(months),t0.value
-## if len(months)==12 or lenseas==(b1.value-b1.value):
- if len(months)==12:
-## print "i:",i,tim[i]
-## print "sub :",sub
-## print "subb:",subb
-## print "subs:",subs
- slices.append(sub)
- bounds.append(subb)
- seaslength.append([lenseas,t0.value])
- sub=[i]
- subb=[[t1.value,b1.value]]
- subs=[[lenseas,t1.value]]
- else: # but ends during
- sub.append(i)
- subb.append([b0.value,b1.value])
- subs.append([lenseas,t0.value])
- if len(months)==12 and b1.cmp(t1)==0:
- slices.append(sub)
- bounds.append(subb)
- seaslength.append([lenseas,t0.value])
- sub=[]
- subb=[]
- subs=[]
- else:
- iout=1
- if iout:
- if sub!=[]:
- slices.append(sub)
- bounds.append(subb)
- seaslength.append(subs[-1])
- sub=[]
- subb=[]
- subs=[]
- ## ??? Add something here for 12 omnths span....
- ## like remenbering which season we're at, etc....
- if sub!=[]:
- slices.append(sub)
- bounds.append(subb)
-## print 'using:',subs
- seaslength.append(subs[-1])
- # Now looks for the cyclical thing
- # ??? do something here as well......
- return slices,bounds,seaslength
-
-def weekday(a,calendar=None):
- if calendar is None:
- b=a.torel('days since 0')
- else:
- b=a.torel('days since 0',calendar)
- d=(b.value - 3) % 7
- if d==1:
- return 'monday'
- elif d==2:
- return 'tuesday'
- elif d==3:
- return 'wednesday'
- elif d==4:
- return 'thursday'
- elif d==5:
- return 'friday'
- elif d==6:
- return 'saturday'
- else:
- return 'sunday'
-
-
-
-def generalCriteria(slab,mask,spread,arg):
- """
- Default Conditions:
- 50% of the data
- AND
- Centroid < x (in absolute value), centroid is always between 0 (perfect) and 1, (not perfect)
- by default centroid is not used
-
- Author: Charles Doutriaux, doutriaux1@llnl.gov
-
- Usage:
- generalCriteria(slab,sliced,slices,arg)
- :param slab: the original slab
- :param mask: the actual percentage of data in each subset used to produce the slab
- the bounds of its first (time) dimension must be correct
- they will be used by centroid
- :param spread: the begining and end time of the slice processed
- :param arg: A list of arguments
- First represent the % of value present to retain a slice
- Second represent the value of the centroid (between 0: perfect and 1: bad
- If you do not want to use one these criteria pass None
- if you would rather use a cyclicalcnetroid pass: "cyclical" as an extra argument
- """
- # Reads the arguments
- slab=MV2.asVariable(slab)
- sh=slab.shape
-## print slab,mask,spread,arg
- if not arg is None:
- min=arg[0]
- centro=arg[1]
- # prepare the mask
-## print 'Mask shape',mask.shape
- if not min is None:
- fmask=MV2.sum(mask, axis=0).filled()
- fmask=numpy.less(fmask,min)
-## print 'fmask,slab',fmask.shape,slab.shape
-## import sys,vcs
-## x=vcs.init()
-## x.plot(mask)
-## sys.stdin.readline()
-## x.clear()
-## x.plot(fmask)
- slab=numpy.ma.masked_where(fmask,slab)
- if not centro is None:
- a=numpy.ma.equal(mask,0.)
- a=MV2.masked_where(a,a)
- a.setAxis(0,mask.getAxis(0))
- mask=a
- if 'cyclical' in arg:
- c=cyclicalcentroid(mask,spread)
- else:
- c=centroid(mask,spread)
- c=numpy.ma.absolute(c)
- slab=numpy.ma.masked_where(numpy.ma.greater_equal(c,centro),slab)
- return slab
-
-
-def setAxisTimeBoundsDaily(axis,frequency=1):
- """
- Sets the bounds correctly for the time axis (beginning to end of day)
- Usage:
- tim=s.getTime()
- cdutil.times.setAxisTimeBoundsMonthly(tim,frequency=1)
- e.g. for twice-daily data use frequency=2
- for 6 hourly data use frequency=4
- for hourly data use frequency=24
- Origin of day is always midnight
- """
- tim=axis
- if not tim.isTime():
- raise ValueError,'Time Axis only please !'
- if tim is None:
- return
- units=tim.units
- timc=tim.asComponentTime()
- n=len(tim)
- bnds=numpy.zeros((n,2),numpy.float)
- frequency=int(frequency)
- for i in range(n):
- t=timc[i]
- d=t.day
- m=t.month
- y=t.year
- h=t.hour
- for f in range(frequency):
- if f*(24/frequency)<=h<(f+1)*(24/frequency):
- t1=cdtime.comptime(y,m,d,f*(24/frequency))
- t2=t1.add(24/frequency,cdtime.Hours,tim.getCalendar())
- t1=t1.torel(units,tim.getCalendar())
- t2=t2.torel(units,tim.getCalendar())
- bnds[i,0]=t1.value
- bnds[i,1]=t2.value
- tim.setBounds(bnds)
- return
-
-
-def setSlabTimeBoundsDaily(slab,frequency=1):
- """
- Sets the bounds correctly for the time axis (beginning to end of day)
- for 'frequency'-daily data
- Usage:
- cdutil.times.setSlabTimeBoundsDaily(slab,frequency=1)
- e.g. for twice-daily data use frequency=2
- for 6 hourly data use frequency=4
- for hourly data use frequency=24
- Origin of day is always midnight
- """
- tim=slab.getTime()
- setAxisTimeBoundsDaily(tim,frequency=frequency)
- return
-
-
-def setTimeBoundsDaily(obj,frequency=1):
- """
- Sets the bounds correctly for the time axis (beginning to end of day)
- for 'frequency'-daily data
- Usage:
- cdutil.times.setSlabTimeBoundsDaily(slab,frequency=1)
- or
- cdutil.times.setSlabTimeBoundsDaily(time_axis,frequency=1)
- e.g. for twice-daily data use frequency=2
- for 6 hourly data use frequency=4
- for hourly data use frequency=24
- Origin of day is always midnight
- """
- if isinstance(obj,cdms2.AbstractAxis):
- setAxisTimeBoundsDaily(obj,frequency=frequency)
- elif isinstance(obj,cdms2.MV2.AbstractVariable):
- setSlabTimeBoundsDaily(obj,frequency=frequency)
- return
-
-
-def setAxisTimeBoundsMonthly(axis,stored=0):
- """
- Sets the bounds correctly for the time axis (beginning to end of month)
- Set stored to 1 to indicate that your data are stored at the end of the month
- Usage:
- tim=s.getTime()
- cdutil.times.setAxisTimeBoundsMonthly(tim,stored=0)
- """
- tim=axis
- if not tim.isTime():
- raise ValueError,'Time Axis only please !'
- if tim is None:
- return
- units=tim.units
- timc=tim.asComponentTime()
- n=len(tim)
- bnds=numpy.zeros((n,2),numpy.float)
- for i in range(n):
- t=timc[i]
- d=t.day
- m=t.month
- y=t.year
- if stored == 1 and d<2: #data stored at the end of the month
- if m==1 : y=y-1
- m=m-1
- if m==0 : m=12
- t1=cdtime.comptime(y,m)
- t2=t1.add(1,cdtime.Month,tim.getCalendar())
- t1=t1.torel(units,tim.getCalendar())
- t2=t2.torel(units,tim.getCalendar())
- bnds[i,0]=t1.value
- bnds[i,1]=t2.value
- tim.setBounds(bnds)
- return
-
-
-def setSlabTimeBoundsMonthly(slab,stored=0):
- """ Sets the bounds correctly for the time axis for monthly data stored
- without bounds.
- Set stored to 1 to indicate that your data are stored at the end of the month
- Usage:
- cdutil.times.setSlabTimeBoundsMonthly(slab,stored=0)
- """
- tim=slab.getTime()
- setAxisTimeBoundsMonthly(tim,stored=stored)
- return
-
-
-def setTimeBoundsMonthly(obj,stored=0):
- """ Sets the bounds correctly for the time axis (beginning to end of month)
- Set stored to 1 to indicate that your data are stored at the end of the month
- Usage:
- tim=s.getTime()
- cdutil.times.setAxisTimeBoundsMonthly(s,stored=0)
- or
- cdutil.times.setAxisTimeBoundsMonthly(tim,stored=0)
- """
- if isinstance(obj,cdms2.AbstractAxis):
- setAxisTimeBoundsMonthly(obj,stored=stored)
- elif isinstance(obj,cdms2.MV2.AbstractVariable):
- setSlabTimeBoundsMonthly(obj,stored=stored)
- return
-
-
-def setAxisTimeBoundsYearly(axis):
- """ Sets the bounds correctly for the time axis (beginning to end of year)
- Usage:
- tim=s.getTime()
- cdutil.times.setAxisTimeBoundsYearly(tim)
- """
- tim=axis
- if tim is None:
- return
- units=tim.units
- timc=tim.asComponentTime()
- n=len(tim)
- bnds=numpy.zeros((n,2),numpy.float)
- for i in range(n):
- t=timc[i]
- y=t.year
- t1=cdtime.comptime(y)
- t2=t1.add(1,cdtime.Year,tim.getCalendar())
- t1=t1.torel(units,tim.getCalendar())
- t2=t2.torel(units,tim.getCalendar())
- bnds[i,0]=t1.value
- bnds[i,1]=t2.value
- tim.setBounds(bnds)
- return
-
-
-def setSlabTimeBoundsYearly(slab):
- """ Sets the bounds correctly for the time axis for yearly data
- Usage:
- cdutil.times.setSlabTimeBoundsYearly(slab)
-"""
- tim=slab.getTime()
- setAxisTimeBoundsYearly(tim)
- return
-
-
-def setTimeBoundsYearly(obj):
- """ Sets the bounds correctly for the time axis for yearly data
- Usage:
- cdutil.times.setSlabTimeBoundsYearly(slab)
- or
- cdutil.times.setSlabTimeBoundsYearly(time_axis)
-"""
- if isinstance(obj,cdms2.AbstractAxis):
- setAxisTimeBoundsYearly(obj)
- elif isinstance(obj,cdms2.MV2.AbstractVariable):
- setSlabTimeBoundsYearly(obj)
- return
-
-
-def insert_monthly_seasons(data,seasons):
- """ Takes data assumed to be in monthly increments (1,2,3,etc...)
- And tries to add seasons into it is actually missing
- For this takes each time step, and see if a number of "season" could be inserted between these two
- """
- t = data.getTime()
- axes=data.getAxisList()
- cal = t.getCalendar()
- tc = t.asComponentTime()
- tbnd = t.getBounds()
- sh = list(data.shape)
- sh[0]=1
- adds = []
- for season in seasons:
-## print 'Dealing with season:',season
- axv = []
- bnds =[]
- idx = getMonthIndex(season)
- for i in range(data.shape[0]-1):
- tscan=cdtime.reltime(tbnd[i][1] ,t.units).tocomp(t.getCalendar()) # end of current time step
- tnext=cdtime.reltime(tbnd[i+1][0],t.units).tocomp(t.getCalendar()) # beginnig of next time step
-
- # Begining of the season
- tb = cdtime.comptime(tscan.year,idx[0])
- if tb.cmp(tscan) == -1:
- tb.add(1,cdtime.Year)
- # end of season
- te=tb.add(len(idx),cdtime.Month)
-## print season,tb,te,tscan,tnext,tb.cmp(tscan)>-1, te.cmp(tnext)<1,tb.cmp(tscan)>-1 and te.cmp(tnext)<1
- # ok now we're going to create the "n" seasons
- while te.cmp(tnext)<1:
- if tb.cmp(tscan)>-1:
- t0 = tb.torel(t.units,cal).value
- t1 = te.torel(t.units,cal).value
- bnds.append([t0,t1])
- # ok that was the bounds, now computes the mid value
- tm = cdtime.reltime((t0+t1)/2.,t.units)
- # ok sometimes we need to round up these things (months since especially)
- tm = tm.torel(tm.units,t.getCalendar()).value
- axv.append(tm)
-## print 'adding:',i,season,tb,te
- tb=tb.add(1,cdtime.Year)
- te=te.add(1,cdtime.Year)
- n=len(axv)
-## print 'N is:',n,'for season',season
- if n!=0:
- sh[0]=n
- tmp = MV2.array(numpy.ma.masked_all(sh,dtype=data.dtype))
- ax = cdms2.createAxis(axv,bounds=numpy.array(bnds))
- ax.id = t.id
- ax.designateTime()
- ax.units=t.units
- ax.setCalendar(cal)
- axes[0]=ax
- tmp.setAxisList(axes)
- adds.append(tmp)
- if adds!=[]:
- adds.insert(0,data)
- return mergeTime(adds,statusbar=None,fill_value=getattr(data,'fill_value',1.e20))
- return data
-
-class ASeason(TimeSlicer):
- def __init__(self):
- self.prev=0
- self.title=''
- self.slicer=monthBasedSlicer
- self.criteria=generalCriteria
-
-class Seasons(ASeason):
- def __init__(self,*seasons):
- self.__call__=self.get
- if len(seasons)==1:
- seasons=seasons[0]
- if type(seasons)==types.StringType:
- seasons=[seasons]
- for i in range(len(seasons)):
- if type(seasons[i]) in [types.ListType,types.TupleType,types.IntType]:
- seasons[i]=getMonthString(seasons[i])
- self.seasons=seasons
- self.slicer=monthBasedSlicer
- self.criteria=generalCriteria
- self.prev=0
- self.title=''
-
- def month_fix(self,slab):
- t=slab.getTime()
- u = t.units
- if u.split()[0][:5].lower()=="month":
- tc=cdtime.reltime(t[0],u).tocomp(t.getCalendar())
- tc2=cdtime.reltime(t[-1],u).tocomp(t.getCalendar())
- relyear = int(u.split()[2].split("-")[0])
- #if tc.cmp(cdtime.comptime(relyear))<1 and tc2.cmp(cdtime.comptime(relyear))>-1:
- #slab.__saved_time__=t.units
- #t.toRelativeTime("months since %i" % (relyear - len(t)/10))
- #t.toRelativeTime("months since 1")# % (relyear - len(t)/10))
- slab.__saved_time__ = t.units
- t.toRelativeTime("months since "+str(tc))
- return u
-
- def month_restore(self,merged,slab):
- t = getattr(slab,"__saved_time__",None)
- if t is not None:
- T=slab.getTime()
- T.toRelativeTime(t,T.getCalendar())
- T=merged.getTime()
- T.toRelativeTime(t,T.getCalendar())
- del(slab.__saved_time__)
-
- def get(self,slab,slicerarg=None,criteriaarg=None,statusbar=None,sum=False):
- """Get the seasons asked for and return them in chronological order
- i.e. if you asked for DJF and JJA and the first season of your dataset is JJA you will have a JJA first !!!!
- Check your time axis coordinate !!!
- slicerarg will be ignored
- it is recomended to use Season(slab,criteria=mycriteriaarguments) syntax
- rather than Season(slab,None,None,mycriteriaarguments)
- Now for the original doc of the get function see get2__doc__:
- """
- cdat_info.pingPCMDIdb("cdat","cdutil.times.Seasons.get -%s-" % self.seasons)
- u=self.month_fix(slab)
- s=[]
- i=-1
- missing_seasons = []
- for season in self.seasons:
- i=i+1
- self.statusbar1(i,len(self.seasons),statusbar)
- s.append(TimeSlicer.get(self,slab,season,criteriaarg,statusbar=statusbar,sum=sum))
- if s[-1] is None: # ok no data for that season
- s.pop(-1)
- missing_seasons.append(season)
- self.statusbar2(statusbar)
- m = mergeTime(s,statusbar=statusbar,fill_value=getattr(slab,'fill_value',1.e20))
- self.month_restore(m,slab)
- return m
-
- def departures(self,slab,slicerarg=None,criteriaarg=None,ref=None,statusbar=None,sum=False):
- """ Return the departures for the list of season you specified, returned in chronological order
- i.e. if you asked for DJF and JJA and the first season of your dataset is JJA you will have a JJA first !!!!
- Check your time axis coordinate !!!
- To pass a specific array from which to compute departures, please pass 1 per season (or None if we should compute it)
- for info one default departures see: departures2.__doc__
- """
- cdat_info.pingPCMDIdb("cdat","cdutil.times.Seasons.departures -%s-" % self.seasons)
- u=self.month_fix(slab)
- if not cdms2.isVariable(ref) and ref is not None:
- raise RuntimeError,"reference must be a variable (MV2)"
- s=[]
- # Loop through the seasons
- self.departures_seasons=[]
- for ss in self.seasons:
- self.departures_seasons.append(ss)
- n = len(self.departures_seasons)
- for i in range(n):
- self.seasons=[self.departures_seasons[i],]
- # Do we want a statusbar ?
- if not statusbar is None:
- if not type(statusbar) in [type([]),type(())]:
- statusbar=str([float(i),len(self.departures_seasons)])
- elif i==0:
- statusbar.insert(0,str([float(i),len(self.departures_seasons)]))
- else:
- statusbar[0]=str([float(i),len(self.departures_seasons)])
- # Did we pass a reference to copmute the departures from ?
- if not ref is None :
- if not ref.getAxis(0).isTime():
- ref = ref(order='t...')
- if ref.shape[0]!=len(self.departures_seasons):
- self.seasons=self.departures_seasons
- raise ValueError,"The reference time (or first) dimension does not match the number of dimensions"
- newref=ref[i]
- else:
- newref=None
- # now computes the departures
- out=TimeSlicer.departures(self,slab,slicerarg=self.departures_seasons[i],criteriaarg=criteriaarg,statusbar=statusbar,ref=newref,sum=sum)
- # Adds it to the list
- if out is not None:
- s.append(out)
- self.seasons=self.departures_seasons
- if not statusbar is None and len(self.seasons)!=1 :
- if type(statusbar) in [type([]),type(())]: statusbar.pop(0)
- # Now merges the stuff
- m = mergeTime(s,statusbar=statusbar,fill_value=getattr(slab,'fill_value',1.e20))
- self.month_restore(m,slab)
- return m
-
- def climatology(self,slab,criteriaarg=None,criteriaargclim=None,statusbar=None,sum=False):
- """ Compute the climatology from a slab
-
- :param slab: A cdms2 transient variable
- :type slab: cdms2.tvariable.TransientVariable
-
- :param criteriaarg: the argument for criteria function when slicing the season (and clim)
- :param criteriaargclim: the argument for criteria function when averaging the seasons together
- if different from criteriarg
-
- :returns: The Average of the seasons in the order passed when constructing it
- i.e if DJF and JJA are asked, the output will have the average DJF first, then the average JJA
- 2 criteria can be passed one for the slicing part and one for the climatology part
- """
- cdat_info.pingPCMDIdb("cdat","cdutil.times.Seasons.climatology -%s-" % self.seasons)
- u=self.month_fix(slab)
- #if criteriaargclim is None: criteriaargclim=criteriaarg
- order=slab.getOrder(ids=1)
- initialgrid = slab.getGrid()
-
- if order[0]!='t' : slab=slab(order='t...')
- timeaxis=slab.getAxis(0)
- timecalendar=timeaxis.getCalendar()
- sh=list(slab.shape)
- nseason=len(self.seasons)
- sh[0]=nseason
- s=numpy.ma.zeros(sh,MV2.float)
- vals=numpy.zeros(nseason,MV2.float)
- bnds=numpy.zeros((nseason,2),MV2.float)
- tim=slab.getTime()
- for i in range(nseason):
- if not statusbar is None:
- if not type(statusbar) in [type([]),type(())]:
- statusbar=str([float(i),len(self.seasons)])
- elif i==0:
- statusbar.insert(0,str([float(i),len(self.seasons)]))
- else:
- statusbar[0]=str([float(i),len(self.seasons)])
- months=getMonthIndex(self.seasons[i])
- if len(months)==1 : months=months*2
- if months[0]>months[1] : months[0]=months[0]-12
- v1=cdtime.reltime(months[0]-1,'months since 0').torel('days since 0',timecalendar)
- v2=cdtime.reltime(months[-1],'months since 0').torel('days since 0',timecalendar)
- vals[i]=float(v1.value+v2.value)/2.
- bnds[i]=[v1.value,v2.value]
- tmp = TimeSlicer.get(self,slab,self.seasons[i],criteriaarg,statusbar=statusbar,weights=True,sum=sum)
- if tmp is None:
- return None
- tmp,w=tmp
- tmp2=numpy.ma.getmask(tmp)
- if tmp2 is None:
- tmp2=numpy.ones(tmp.shape,dtype=numpy.float)*w
- else:
- tmp2=tmp2.astype(MV2.float)
- tmp2=(1.-tmp2)*w
- tim=tmp.getTime()
- bnd=tim.getBounds()
- tot=0
- if not cdms2.isVariable(tmp2):
- tmp2=cdms2.asVariable(tmp2)
- tmp2.setAxis(0,tim)
- if criteriaargclim is not None:
- tmp=self.criteria(tmp,tmp2,bnds[i],criteriaargclim)
- else:
- if sum is False:
- tmp=numpy.ma.average(tmp,weights=tmp2,axis=0)
- else:
- tmp = numpy.ma.sum(tmp*tmp2,axis=0)
- s[i]=tmp
- if not statusbar is None and len(self.seasons)!=1 :
- if type(statusbar) in [type([]),type(())]: statusbar.pop(0)
- t=cdms2.createAxis(vals,bounds=bnds)
- t.id='time'
- t.units='days since 0'
- t.designateTime()
- t.setCalendar(tim.getCalendar())
- ax=slab.getAxisList()
- ax[0]=t
- s=cdms2.createVariable(s,id=slab.id,copy=0,fill_value=getattr(slab,'fill_value',1.e20))
- s.setAxisList(ax)
- if initialgrid is not None:
- s.setGrid(initialgrid)
- self.month_restore(s,slab)
-
- if s.getOrder(ids=1)!=order:
- return s(order=order)
- else:
- return s
-
-## Seasons.get.__doc__=Seasons.get.__doc__+Seasons._get.__doc__
-## Seasons.departures.__doc__=Seasons.departures.__doc__+Seasons._departures.__doc__
-
-ANNUALCYCLE=Seasons([1,2,3,4,5,6,7,8,9,10,11,12])
-SEASONALCYCLE=Seasons(['DJF','MAM','JJA','SON'])
-
-DJF=Seasons('DJF')
-MAM=Seasons('MAM')
-JJA=Seasons('JJA')
-SON=Seasons('SON')
-JAN=Seasons('JAN')
-FEB=Seasons('FEB')
-MAR=Seasons('MAR')
-APR=Seasons('APR')
-MAY=Seasons('MAY')
-JUN=Seasons('JUN')
-JUL=Seasons('JUL')
-AUG=Seasons('AUG')
-SEP=Seasons('SEP')
-OCT=Seasons('OCT')
-NOV=Seasons('NOV')
-DEC=Seasons('DEC')
-
-YEAR=Seasons('JFMAMJJASOND')
diff --git a/build/lib/cdutil/vertical.py b/build/lib/cdutil/vertical.py
deleted file mode 100644
index e8c7ab5..0000000
--- a/build/lib/cdutil/vertical.py
+++ /dev/null
@@ -1,289 +0,0 @@
-# Adapted for numpy/ma/cdms2 by convertcdms.py
-import MV2
-import genutil
-import cdms2
-import numpy
-import cdat_info
-
-
-def reconstructPressureFromHybrid(ps, A, B, Po):
- """
- Reconstruct the Pressure field on sigma levels, from the surface pressure
-
-
- :param Ps: Surface pressure
- :param A: Hybrid Conversion Coefficient, such as: p=B.ps+A.Po.
- :param B: Hybrid Conversion Coefficient, such as: p=B.ps+A.Po.
- :param Po: Hybrid Conversion Coefficient, such as: p=B.ps+A.Po
- :param Ps: surface pressure
-
- .. note::
-
- A and B are 1d sigma levels.
- Po and Ps must have same units.
-
-
- :returns: Pressure field, such as P=B*Ps+A*Po.
-
- :Example:
-
- .. doctest:: vertical_reconstructPressureFromHybrid
-
- >>> P=reconstructPressureFromHybrid(ps,A,B,Po)
- """
- # Compute the pressure for the sigma levels
- cdat_info.pingPCMDIdb(
- "cdat",
- "cdutil.vertical.reconstructPressureFromHybrid")
- ps, B = genutil.grower(ps, B)
- ps, A = genutil.grower(ps, A)
- p = ps * B
- p = p + A * Po
- p.setAxisList(ps.getAxisList())
- p.id = 'P'
- try:
- p.units = ps.units
- except:
- pass
- t = p.getTime()
- if not t is None:
- p = p(order='tz...')
- else:
- p = p(order='z...')
- return p
-
-
-def linearInterpolation(
- A, I, levels=[100000, 92500, 85000, 70000, 60000, 50000, 40000,
- 30000, 25000, 20000, 15000, 10000, 7000, 5000, 3000, 2000, 1000], status=None, axis='z'):
- """
- Linear interpolation to interpolate a field from some levels to another set of levels
- Values below "surface" are masked.
-
-
- :param A: array to interpolate
- :type A:
- :param I: interpolation field (usually Pressure or depth) from TOP (level 0) to BOTTOM (last level)
- i.e P value going up with each level.
- :type I:
- :param levels: levels to interpolate to (same units as I).
- Default levels:[100000, 92500, 85000, 70000, 60000, 50000, 40000,
- 30000, 25000, 20000, 15000, 10000, 7000, 5000, 3000, 2000, 1000]
- :type levels:
- :param axis: Axis over which to do the linear interpolation.
- Can provide either an int representing axis index, or the axis name.
- Default: 'z'.
- :type axis: str or int
-
- .. note::
-
- I and levels must have same units
-
- :returns: array on new levels (levels)
-
- :Examples:
-
- .. doctest:: vertical_linearInterpolation
-
- >>> A=interpolate(A,I) # interpolates A over default levels
- """
-
- cdat_info.pingPCMDIdb("cdat", "cdutil.vertical.linearInterpolation")
- try:
- nlev = len(levels) # Number of pressure levels
- except:
- nlev = 1 # if only one level len(levels) would breaks
- levels = [levels, ]
- order = A.getOrder()
- A = A(order='%s...' % axis)
- I = I(order='%s...' % axis)
- sh = list(I.shape)
- nsigma = sh[0] # number of sigma levels
- sh[0] = nlev
- t = MV2.zeros(sh, typecode=MV2.float32)
- sh2 = I[0].shape
- prev = -1
- for ilev in range(nlev): # loop through pressure levels
- if status is not None:
- prev = genutil.statusbar(ilev, nlev - 1., prev)
- lev = levels[ilev] # get value for the level
- Iabv = MV2.ones(sh2, MV2.float)
- Aabv = -1 * Iabv # Array on sigma level Above
- Abel = -1 * Iabv # Array on sigma level Below
- Ibel = -1 * Iabv # Pressure on sigma level Below
- Iabv = -1 * Iabv # Pressure on sigma level Above
- Ieq = MV2.masked_equal(Iabv, -1) # Area where Pressure == levels
- for i in range(1, nsigma): # loop from second sigma level to last one
- a = MV2.greater_equal(
- I[i],
- lev) # Where is the pressure greater than lev
- b = MV2.less_equal(
- I[i - 1],
- lev) # Where is the pressure less than lev
- # Now looks if the pressure level is in between the 2 sigma levels
- # If yes, sets Iabv, Ibel and Aabv, Abel
- a = MV2.logical_and(a, b)
- Iabv = MV2.where(a, I[i], Iabv) # Pressure on sigma level Above
- Aabv = MV2.where(a, A[i], Aabv) # Array on sigma level Above
- Ibel = MV2.where(
- a,
- I[i - 1],
- Ibel) # Pressure on sigma level Below
- Abel = MV2.where(a, A[i - 1], Abel) # Array on sigma level Below
- Ieq = MV2.where(MV2.equal(I[i], lev), A[i], Ieq)
-
- val = MV2.masked_where(
- MV2.equal(Ibel, -1.), numpy.ones(Ibel.shape) * lev)
- # set to missing value if no data below lev if
- # there is
-
- tl = (val - Ibel) / (Iabv - Ibel) * \
- (Aabv - Abel) + Abel # Interpolation
- if ((Ieq.mask is None) or (Ieq.mask is MV2.nomask)):
- tl = Ieq
- else:
- tl = MV2.where(1 - Ieq.mask, Ieq, tl)
- t[ilev] = tl.astype(MV2.float32)
-
- ax = A.getAxisList()
- autobnds = cdms2.getAutoBounds()
- cdms2.setAutoBounds('off')
- lvl = cdms2.createAxis(MV2.array(levels).filled())
- cdms2.setAutoBounds(autobnds)
- try:
- lvl.units = I.units
- except:
- pass
- lvl.id = 'plev'
-
- try:
- t.units = I.units
- except:
- pass
-
- ax[0] = lvl
- t.setAxisList(ax)
- t.id = A.id
- for att in A.listattributes():
- setattr(t, att, getattr(A, att))
- return t(order=order)
-
-
-def logLinearInterpolation(
- A, P, levels=[100000, 92500, 85000, 70000, 60000, 50000, 40000,
- 30000, 25000, 20000, 15000, 10000, 7000, 5000, 3000, 2000, 1000], status=None, axis='z'):
- """
- Log-linear interpolation to convert a field from sigma levels to pressure levels.
- Values below surface are masked.
-
- :param A: array on sigma levels
- :type A:
-
- :param P: pressure field from TOP (level 0) to BOTTOM (last level)
- :type P:
-
- :param levels: pressure levels to interplate to (same units as P), default levels are:
- [100000, 92500, 85000, 70000, 60000, 50000, 40000, 30000, 25000, 20000, 15000, 10000, 7000, 5000,
- 3000, 2000, 1000]
- :type levels: list
-
- :param axis: axis over which to do the linear interpolation
- :type axis: str
-
- .. note::
-
- P and levels must have same units
-
- :returns: array on pressure levels (levels)
-
- :Example:
-
- .. doctest:: vertical_logLinearInterpolation
-
- >>> A=logLinearInterpolation(A,P) # interpolate A using pressure field P over the default levels
- """
-
- cdat_info.pingPCMDIdb("cdat", "cdutil.vertical.logLinearInterpolation")
- try:
- nlev = len(levels) # Number of pressure levels
- except:
- nlev = 1 # if only one level len(levels) would breaks
- levels = [levels, ]
- order = A.getOrder()
- A = A(order='%s...' % axis)
- P = P(order='%s...' % axis)
- sh = list(P.shape)
- nsigma = sh[0] # number of sigma levels
- sh[0] = nlev
- t = MV2.zeros(sh, typecode=MV2.float32)
- sh2 = P[0].shape
- prev = -1
- for ilev in range(nlev): # loop through pressure levels
- if status is not None:
- prev = genutil.statusbar(ilev, nlev - 1., prev)
- lev = levels[ilev] # get value for the level
- Pabv = MV2.ones(sh2, MV2.float)
- Aabv = -1 * Pabv # Array on sigma level Above
- Abel = -1 * Pabv # Array on sigma level Below
- Pbel = -1 * Pabv # Pressure on sigma level Below
- Pabv = -1 * Pabv # Pressure on sigma level Above
- Peq = MV2.masked_equal(Pabv, -1) # Area where Pressure == levels
- for i in range(1, nsigma): # loop from second sigma level to last one
- a = MV2.greater_equal(
- P[i],
- lev) # Where is the pressure greater than lev
- b = MV2.less_equal(
- P[i - 1],
- lev) # Where is the pressure less than lev
- # Now looks if the pressure level is in between the 2 sigma levels
- # If yes, sets Pabv, Pbel and Aabv, Abel
- a = MV2.logical_and(a, b)
- Pabv = MV2.where(a, P[i], Pabv) # Pressure on sigma level Above
- Aabv = MV2.where(a, A[i], Aabv) # Array on sigma level Above
- Pbel = MV2.where(
- a,
- P[i - 1],
- Pbel) # Pressure on sigma level Below
- Abel = MV2.where(a, A[i - 1], Abel) # Array on sigma level Below
- Peq = MV2.where(MV2.equal(P[i], lev), A[i], Peq)
-
- val = MV2.masked_where(
- MV2.equal(Pbel, -1), numpy.ones(Pbel.shape) * lev)
- # set to missing value if no data below lev if
- # there is
-
- tl = MV2.log(
- val / Pbel) / MV2.log(
- Pabv / Pbel) * (
- Aabv - Abel) + Abel # Interpolation
- if ((Peq.mask is None) or (Peq.mask is MV2.nomask)):
- tl = Peq
- else:
- tl = MV2.where(1 - Peq.mask, Peq, tl)
- t[ilev] = tl.astype(MV2.float32)
-
- ax = A.getAxisList()
- autobnds = cdms2.getAutoBounds()
- cdms2.setAutoBounds('off')
- lvl = cdms2.createAxis(MV2.array(levels).filled())
- cdms2.setAutoBounds(autobnds)
- try:
- lvl.units = P.units
- except:
- pass
- lvl.id = 'plev'
-
- try:
- t.units = P.units
- except:
- pass
-
- ax[0] = lvl
- t.setAxisList(ax)
- t.id = A.id
- for att in A.listattributes():
- setattr(t, att, getattr(A, att))
- return t(order=order)
-
-sigma2Pressure = logLinearInterpolation
-
diff --git a/build/lib/cdutil/worldmap.py b/build/lib/cdutil/worldmap.py
deleted file mode 100644
index ee8b502..0000000
--- a/build/lib/cdutil/worldmap.py
+++ /dev/null
@@ -1,2330 +0,0 @@
-# Beginning data structures for the fine continental outline.
-
-
-#Antarctica
-farc1 = [
- # Point added by C Doutriaux to make it look nicer
- -9000,-18000,
- -8383,-18000, -8433,-17800, -8450,-17400, -8467,-17000, -8492,-16600,
- -8542,-16300, -8542,-15800, -8558,-15200, -8533,-14600, -8483,-14700,
- -8450,-15100, -8400,-15350, -8350,-15300, -8300,-15400, -8250,-15400,
- -8200,-15400, -8150,-15450, -8117,-15300, -8100,-15000, -8092,-14650,
- -8067,-14550, -8033,-14800, -8000,-15000, -7967,-15250, -7925,-15500,
- -7883,-15700, -7850,-15800, -7842,-15667, -7850,-15450, -7817,-15450,
- -7808,-15667, -7783,-15800, -7750,-15833, -7717,-15867, -7700,-15700,
- -7717,-15400, -7758,-15300, -7783,-15050, -7767,-14800, -7725,-14600,
- -7675,-14600, -7633,-14633, -7592,-14667, -7583,-14400, -7558,-14200,
- -7575,-14067, -7542,-14000, -7525,-13833, -7500,-13667, -7475,-13550,
- -7475,-13300, -7500,-13200, -7542,-13083, -7575,-12967, -7600,-12800,
- -7600,-12700, -7567,-12683, -7517,-12633, -7467,-12550, -7433,-12450,
- -7383,-12333, -7325,-12367, -7325,-12233, -7375,-12133, -7400,-12000,
- -7358,-12000, -7367,-11833, -7367,-11667, -7383,-11633, -7417,-11767,
- -7467,-11767, -7517,-11633, -7525,-11367, -7500,-11233, -7450,-11250,
- -7400,-11267, -7367,-11200, -7400,-11150, -7450,-11100, -7500,-11033,
- -7517,-10867, -7467,-10850, -7450,-10950, -7400,-10950, -7400,-10833,
- -7433,-10800, -7467,-10850, -7508,-10750, -7508,-10600, -7492,-10450,
- -7458,-10450, -7458,-10267, -7475,-10133, -7500,-10000, -7475, -9950,
- -7433,-10133, -7400,-10067, -7375,-10150, -7350,-10150, -7358,-10000,
-
- -7358,-10000, -7342, -9900, -7308,-10000, -7325,-10133, -7275,-10250,
- -7267,-10133, -7300,-10150, -7292, -9967, -7333, -9850, -7308, -9800,
- -7342, -9750, -7375, -9750, -7375, -9633, -7342, -9600, -7308, -9600,
- -7292, -9750, -7250, -9850, -7217, -9967, -7192,-10100, -7175, -9983,
- -7200, -9833, -7183, -9700, -7208, -9567, -7242, -9567, -7258, -9400,
- -7275, -9225, -7292, -9050, -7292, -8875, -7292, -8700, -7308, -8550,
- -7292, -8433, -7283, -8300, -7292, -8125, -7300, -7950, -7325, -7850,
- -7283, -7867, -7242, -7800, -7258, -7650, -7283, -7500, -7300, -7400,
- -7350, -7450, -7342, -7300, -7333, -7150, -7317, -7000, -7308, -6850,
- -7283, -6750, -7233, -6700, -7183, -6700, -7150, -6750, -7092, -6750,
- -7042, -6800, -7000, -6850, -6942, -6850, -6942, -6733, -6908, -6667,
- -6883, -6733, -6850, -6683, -6808, -6683, -6775, -6750, -6742, -6750,
- -6775, -6850, -6775, -6925, -6733, -6933, -6692, -6867, -6667, -6783,
- -6708, -6767, -6700, -6700, -6733, -6633, -6683, -6633, -6658, -6550,
- -6625, -6583, -6592, -6500, -6550, -6400, -6508, -6400, -6517, -6300,
- -6475, -6267, -6467, -6167, -6425, -6150, -6400, -6100, -6383, -5967,
- -6358, -5883, -6333, -5800, -6325, -5717, -6358, -5667, -6358, -5733,
- -6383, -5817, -6383, -5725, -6442, -5733, -6433, -5817, -6400, -5867,
- -6450, -5900, -6433, -5967, -6467, -6050, -6500, -6133, -6542, -6200,
- -6575, -6217, -6608, -6233, -6650, -6267, -6625, -6350, -6650, -6400,
-
- -6650, -6400, -6692, -6367, -6692, -6467, -6733, -6533, -6783, -6550,
- -6808, -6483, -6833, -6533, -6875, -6483, -6875, -6367, -6908, -6267,
- -6967, -6233, -7017, -6200, -7058, -6150, -7092, -6167, -7117, -6100,
- -7158, -6083, -7200, -6167, -7233, -6083, -7267, -6100, -7300, -5983,
- -7333, -6017, -7342, -6150, -7375, -6100, -7433, -6067, -7467, -6167,
- -7508, -6167, -7517, -6300, -7567, -6300, -7608, -6367, -7650, -6550,
- -7700, -6733, -7717, -6500, -7708, -6250, -7708, -6000, -7725, -5767,
- -7758, -5600, -7792, -5367, -7825, -5167, -7850, -4933, -7875, -4767,
- -7883, -4400, -7883, -4100, -7875, -3850, -7833, -3633, -7783, -3500,
- -7750, -3333, -7717, -3167, -7683, -3000, -7650, -2833, -7608, -2700,
- -7567, -2600, -7533, -2400, -7475, -2367, -7442, -2233, -7408, -2067,
- -7375, -1933, -7342, -1767, -7308, -1633, -7292, -1467, -7283, -1350,
- -7258, -1233, -7225, -1133, -7192, -1117, -7167, -1200, -7133, -1217,
- -7125, -1150, -7158, -1100, -7125, -1050, -7100, -975, -7117, -900,
- -7142, -867, -7183, -850, -7167, -733, -7142, -767, -7108, -733,
- -7083, -767, -7075, -683, -7075, -583, -7100, -583, -7133, -600,
- -7133, -450, -7125, -300, -7067, -300, -7042, -333, -7025, -250,
- -7042, -167, -7067, -100, -7100, -150, -7125, -067, -7150, 000,
- -7125, 133, -7092, 267, -7058, 350, -7033, 467, -7033, 633,
- -7008, 733, -7008, 867, -7017, 1000, -7008, 1133, -7008, 1267,
-
- -7008, 1267, -7017, 1433, -7017, 1567, -7017, 1700, -7017, 1833,
- -7033, 2000, -7042, 2150, -7058, 2300, -7042, 2467, -7017, 2533,
- -7017, 2700, -6992, 2833, -6983, 3000, -6958, 3133, -6950, 3200,
- -6950, 3350, -6900, 3333, -6867, 3350, -6858, 3433, -6892, 3500,
- -6933, 3600, -6950, 3700, -6958, 3833, -7008, 3867, -6967, 3933,
- -6950, 3983, -6917, 3983, -6883, 4000, -6850, 4133, -6817, 4200,
- -6783, 4333, -6775, 4450, -6775, 4600, -6758, 4700, -6767, 4817,
- -6742, 4850, -6742, 4933, -6783, 4983, -6758, 5050, -6700, 5017,
- -6650, 5050, -6625, 5150, -6592, 5217, -6583, 5367, -6592, 5517,
- -6625, 5600, -6642, 5717, -6667, 5717, -6675, 5633, -6692, 5700,
- -6700, 5800, -6717, 5900, -6750, 5933, -6733, 6067, -6758, 6167,
- -6767, 6267, -6750, 6367, -6758, 6500, -6775, 6633, -6783, 6767,
- -6783, 6867, -6767, 6950, -6817, 6950, -6858, 7000, -6900, 7050,
- -6917, 6950, -6958, 6983, -7008, 6983, -7050, 7067, -7042, 7167,
- -7008, 7100, -6975, 7233, -6958, 7350, -6967, 7450, -6983, 7550,
- -6950, 7617, -6917, 7717, -6908, 7800, -6850, 7833, -6825, 7900,
- -6800, 8050, -6783, 8167, -6733, 8250, -6717, 8367, -6700, 8500,
- -6683, 8633, -6667, 8767, -6675, 8850, -6675, 8967, -6667, 9100,
- -6650, 9200, -6658, 9300, -6658, 9400, -6650, 9500, -6667, 9600,
- -6650, 9700, -6667, 9767, -6650, 9850, -6658, 9933, -6642, 10000,
-
- -6642, 10000, -6642, 10067, -6608, 10150, -6583, 10267, -6592, 10400,
- -6608, 10500, -6625, 10600, -6650, 10700, -6658, 10800, -6683, 10900,
- -6658, 10950, -6667, 11033, -6642, 11067, -6608, 11067, -6592, 11167,
- -6583, 11267, -6575, 11367, -6600, 11450, -6633, 11550, -6650, 11650,
- -6675, 11767, -6683, 11900, -6683, 12033, -6667, 12150, -6642, 12250,
- -6675, 12333, -6675, 12433, -6650, 12483, -6658, 12583, -6625, 12650,
- -6625, 12700, -6650, 12767, -6692, 12833, -6700, 12900, -6717, 12950,
- -6692, 13000, -6633, 13000, -6608, 13083, -6617, 13200, -6608, 13333,
- -6617, 13433, -6608, 13533, -6633, 13633, -6633, 13733, -6650, 13833,
- -6658, 13933, -6667, 14050, -6675, 14200, -6700, 14250, -6683, 14333,
- -6700, 14433, -6750, 14433, -6758, 14500, -6750, 14600, -6783, 14683,
- -6825, 14700, -6842, 14833, -6825, 14900, -6850, 15033, -6833, 15100,
- -6867, 15150, -6858, 15267, -6858, 15433, -6908, 15500, -6933, 15600,
- -6900, 15650, -6908, 15750, -6925, 15867, -6950, 16000, -6967, 16100,
- -7008, 16100, -7050, 16117, -7083, 16167, -7058, 16217, -7017, 16233,
- -7008, 16333, -7058, 16317, -7058, 16467, -7050, 16600, -7083, 16733,
- -7117, 16867, -7150, 17000, -7117, 17017, -7175, 17100, -7200, 17017,
- -7250, 17050, -7283, 16967, -7317, 16850, -7325, 16700, -7367, 16700,
- -7408, 16667, -7417, 16533, -7450, 16533, -7483, 16433, -7517, 16300,
- -7567, 16267, -7608, 16267, -7650, 16300, -7692, 16333, -7733, 16367,
-
- -7733, 16367, -7775, 16367, -7800, 16467, -7842, 16600, -7850, 16400,
- -7875, 16150, -7917, 16000, -7967, 16000, -8000, 16000, -8050, 16033,
- -8100, 16033, -8150, 16100, -8192, 16233, -8242, 16400, -8283, 16600,
- -8325, 16850, -8350, 17150, -8350, 17600, -8383, 18000,
- # Point added by C Doutriaux to make it look nicer
- -9000,18000,]
-
-# Little islands of AA
-farc7 = [
- -7758, 16633, -7767, 16817, -7742, 16967, -7733, 16817, -7708, 16667,
- -7758, 16633]
-
-farc8 = [
- -7875,-16400, -7908,-16300, -7933,-16367, -7983,-16367, -8025,-16167,
- -7992,-16000, -7950,-16000, -7908,-16067, -7875,-16167, -7875,-16400]
-
-farc9 = [
- -7658,-15017, -7675,-14850, -7642,-14717, -7617,-14817, -7658,-15017]
-
-farc10 = [
- -7108, -7617, -7133, -7650, -7167, -7600, -7183, -7500, -7217, -7433,
- -7225, -7333, -7258, -7300, -7267, -7150, -7258, -7000, -7233, -6883,
- -7192, -6850, -7150, -6833, -7100, -6850, -7050, -6883, -7000, -6933,
- -6942, -6967, -6883, -7033, -6892, -7117, -6908, -7167, -6958, -7150,
- -7008, -7100, -7058, -7067, -7083, -7100, -7092, -7183, -7100, -7300,
- -7108, -7467, -7108, -7617, ]
-
-farc11 = [
- -7058, -7617, -7058, -7500, -7050, -7400, -7025, -7375, -6992, -7367,
- -6975, -7450, -7000, -7575, -7025, -7567, -7058, -7617, ]
-
-farc12 = [
- -6467, -6433, -6483, -6350, -6458, -6300, -6433, -6200, -6400, -6250,
- -6458, -6300, -6425, -6350, -6467, -6433]
-
-farc13 = [
- -6325, -5650, -6350, -5600, -6342, -5500, -6300, -5583, -6325, -5650]
-
-farc14 = [
- -6267, -6100, -6275, -6033, -6233, -5933, -6225, -5867, -6200, -5767,
- -6200, -5883, -6233, -5933, -6250, -6033, -6267, -6100]
-
-farc15 = [
- -6063, -4633, -6070, -4500, -6033, -4600, -6063, -4633]
-
-# America
-farc16 = [
- 000, -8008, -033, -8050, -83, -8050, -100, -8092, -167, -8075,
- -217, -8075, -233, -8092, -250, -8058, -300, -8017, -250, -8008,
- -250, -7967, -283, -7983, -333, -8000, -350, -8033, -383, -8083,
- -425, -8133, -467, -8133, -517, -8117, -567, -8083, -600, -8117,
- -625, -8083, -650, -8033, -683, -8000, -725, -7967, -783, -7950,
- -817, -7900, -867, -7867, -917, -7850, -967, -7833, -1017, -7817,
- -1083, -7767, -1133, -7750, -1183, -7717, -1217, -7700, -1250, -7667,
- -1300, -7650, -1367, -7617, -1417, -7625, -1467, -7583, -1500, -7550,
- -1533, -7517, -1575, -7450, -1583, -7400, -1625, -7350, -1658, -7283,
- -1667, -7250, -1700, -7200, -1725, -7150, -1767, -7117, -1783, -7083,
- -1825, -7033, -1875, -7033, -1933, -7025, -2000, -7008, -2050, -7017,
- -2100, -7017, -2150, -7008, -2200, -7017, -2250, -7025, -2300, -7050,
- -2350, -7050, -2400, -7050, -2450, -7058, -2500, -7050, -2542, -7050,
- -2575, -7075, -2633, -7058, -2700, -7092, -2750, -7092, -2800, -7117,
- -2850, -7125, -2900, -7150, -2933, -7133, -3000, -7125, -3025, -7158,
- -3075, -7167, -3133, -7158, -3183, -7150, -3217, -7150, -3250, -7133,
- -3317, -7167, -3367, -7158, -3400, -7183, -3450, -7192, -3500, -7217,
- -3550, -7250, -3600, -7267, -3650, -7283, -3667, -7308, -3717, -7308,
- -3717, -7350, -3775, -7367, -3817, -7342, -3858, -7342, -3900, -7333,
- -3950, -7325, -4000, -7367, -4058, -7367, -4100, -7383, -4142, -7375,
-
-## farc17 = [
- -4142, -7375, -4175, -7358, -4183, -7317, -4150, -7300, -4167, -7250,
- -4200, -7275, -4217, -7250, -4233, -7275, -4300, -7275, -4342, -7300,
- -4375, -7283, -4417, -7317, -4442, -7300, -4467, -7342, -4500, -7333,
- -4550, -7358, -4517, -7367, -4500, -7383, -4467, -7358, -4442, -7367,
- -4417, -7350, -4383, -7383, -4417, -7425, -4458, -7450, -4500, -7433,
- -4525, -7450, -4558, -7467, -4583, -7450, -4592, -7500, -4617, -7475,
- -4658, -7550, -4692, -7550, -4667, -7500, -4683, -7450, -4683, -7400,
- -4742, -7442, -4783, -7450, -4833, -7450, -4775, -7492, -4783, -7533,
- -4817, -7542, -4858, -7542, -4917, -7558, -4942, -7542, -4983, -7550,
- -4992, -7500, -5017, -7533, -5075, -7533, -5000, -7450, -5042, -7467,
- -5075, -7450, -5067, -7483, -5117, -7500, -5158, -7533, -5133, -7450,
- -5100, -7433, -5150, -7417, -5183, -7433, -5175, -7500, -5225, -7500,
- -5242, -7450, -5217, -7417, -5258, -7400, -5267, -7350, -5292, -7350,
- -5317, -7317, -5342, -7250, -5317, -7200, -5275, -7150, -5283, -7108,
- -5317, -7133, -5342, -7225, -5367, -7200, -5383, -7125, -5375, -7092,
- -5325, -7092, -5275, -7075, -5250, -7000, -5250, -6958, -5225, -6950,
- -5225, -6900, -5233, -6833, -5183, -6883, -5142, -6900, -5100, -6917,
- -5050, -6900, -5017, -6850, -5000, -6783, -4950, -6767, -4900, -6750,
- -4867, -6700, -4833, -6633, -4800, -6583, -4750, -6567, -4717, -6575,
- -4717, -6650, -4683, -6700, -4650, -6742, -4600, -6750, -4550, -6717,
-## farc18 = [
- -4550, -6717, -4525, -6683, -4500, -6617, -4500, -6558, -4467, -6558,
- -4450, -6517, -4400, -6517, -4367, -6525, -4333, -6500, -4300, -6433,
- -4283, -6500, -4250, -6450, -4283, -6417, -4283, -6367, -4258, -6358,
- -4208, -6375, -4233, -6450, -4208, -6500, -4150, -6500, -4100, -6517,
- -4075, -6483, -4100, -6433, -4117, -6383, -4117, -6300, -4092, -6233,
- -4058, -6225, -4033, -6242, -3983, -6217, -3950, -6200, -3917, -6233,
- -3875, -6225, -3900, -6200, -3900, -6125, -3892, -6050, -3883, -6000,
- -3875, -5933, -3858, -5867, -3842, -5817, -3817, -5758, -3775, -5742,
- -3733, -5700, -3683, -5667, -3633, -5675, -3625, -5717, -3583, -5742,
- -3533, -5717, -3500, -5750, -3467, -5833, -3433, -5850, -3400, -5833,
- -3442, -5783, -3442, -5717, -3467, -5683, -3483, -5625, -3475, -5567,
- -3483, -5500, -3475, -5450, -3450, -5400, -3417, -5358, -3383, -5350,
- -3350, -5300, -3300, -5258, -3250, -5242, -3217, -5200, -3183, -5150,
- -3150, -5100, -3100, -5067, -3050, -5033, -3000, -5017, -2950, -4983,
- -2900, -4942, -2867, -4900, -2850, -4875, -2800, -4858, -2750, -4850,
- -2700, -4858, -2633, -4858, -2583, -4858, -2542, -4817, -2500, -4775,
- -2458, -4725, -2417, -4683, -2400, -4633, -2367, -4575, -2383, -4542,
- -2333, -4500, -2333, -4450, -2300, -4467, -2292, -4400, -2300, -4350,
- -2300, -4300, -2292, -4250, -2292, -4200, -2250, -4200, -2225, -4150,
- -2200, -4100, -2150, -4100, -2100, -4083, -2050, -4033, -2000, -4017,
-## farc19 = [
- -2000, -4017, -1950, -3967, -1900, -3958, -1850, -3958, -1800, -3950,
- -1767, -3917, -1717, -3917, -1658, -3908, -1600, -3892, -1550, -3900,
- -1500, -3900, -1450, -3908, -1400, -3900, -1333, -3892, -1300, -3842,
- -1258, -3800, -1200, -3758, -1150, -3733, -1100, -3700, -1075, -3675,
- -1042, -3625, -1000, -3600, -958, -3558, -917, -3533, -867, -3508,
- -817, -3483, -750, -3475, -700, -3483, -642, -3500, -583, -3517,
- -525, -3542, -508, -3600, -517, -3650, -508, -3700, -475, -3733,
- -450, -3783, -417, -3817, -383, -3850, -350, -3900, -317, -3950,
- -283, -4000, -283, -4050, -300, -4100, -300, -4150, -275, -4200,
- -275, -4250, -250, -4300, -242, -4350, -267, -4400, -283, -4458,
- -233, -4442, -192, -4467, -150, -4483, -167, -4533, -133, -4550,
- -117, -4617, -100, -4667, -067, -4725, -067, -4783, -83, -4817,
- -158, -4850, -142, -4875, -100, -4858, -033, -4842, -017, -4900,
- -025, -4950, -017, -5000, -042, -5042, -100, -5042, -167, -5058,
- -100, -5083, -125, -5142, -067, -5133, -017, -5117, 017, -5075,
- 050, -5042, 100, -5000, 175, -4992, 183, -5050, 250, -5067,
- 317, -5100, 375, -5100, 425, -5150, 450, -5183, 483, -5233,
- 517, -5275, 542, -5325, 558, -5367, 567, -5400, 583, -5450,
- 592, -5500, 592, -5550, 583, -5600, 583, -5650, 592, -5708,
- 625, -5733, 650, -5767, 683, -5817, 675, -5858, 717, -5850,
-## farc20 = [
- 717, -5850, 758, -5867, 792, -5917, 825, -5967, 858, -6025,
- 842, -6100, 900, -6083, 950, -6100, 967, -6158, 983, -6200,
- 975, -6233, 1017, -6267, 1050, -6300, 1067, -6217, 1067, -6275,
- 1067, -6342, 1067, -6400, 1025, -6450, 1008, -6500, 1017, -6558,
- 1033, -6600, 1058, -6617, 1058, -6658, 1050, -6700, 1050, -6758,
- 1042, -6817, 1075, -6833, 1117, -6842, 1142, -6883, 1150, -6933,
- 1150, -6975, 1217, -6992, 1192, -7033, 1150, -7017, 1125, -7058,
- 1108, -7100, 1092, -7142, 1033, -7142, 975, -7108, 917, -7108,
- 900, -7167, 942, -7175, 975, -7200, 1025, -7175, 1058, -7150,
- 1100, -7167, 1150, -7192, 1167, -7142, 1208, -7117, 1233, -7133,
- 1242, -7167, 1217, -7200, 1183, -7225, 1167, -7267, 1142, -7300,
- 1117, -7350, 1125, -7417, 1092, -7442, 1100, -7483, 1083, -7525,
- 1050, -7550, 1000, -7558, 950, -7558, 942, -7600, 900, -7625,
- 858, -7675, 783, -7675, 833, -7717, 867, -7750, 900, -7783,
- 933, -7825, 942, -7867, 958, -7908, 958, -7958, 925, -7983,
- 908, -8033, 892, -8083, 875, -8142, 900, -8175, 900, -8217,
- 942, -8233, 967, -8275, 1000, -8317, 1042, -8342, 1083, -8367,
- 1125, -8383, 1167, -8367, 1217, -8367, 1275, -8350, 1325, -8350,
- 1383, -8350, 1425, -8325, 1500, -8325, 1517, -8342, 1533, -8383,
- 1575, -8425, 1583, -8467, 1592, -8500, 1583, -8550, 1592, -8600,
-## farc21 = [
- 1592, -8600, 1575, -8650, 1567, -8700, 1583, -8758, 1558, -8817,
- 1583, -8858, 1600, -8900, 1633, -8850, 1700, -8825, 1750, -8825,
- 1833, -8817, 1792, -8792, 1842, -8767, 1900, -8758, 1950, -8750,
- 2000, -8742, 2050, -8725, 2092, -8683, 2133, -8683, 2150, -8708,
- 2150, -8758, 2158, -8800, 2150, -8850, 2133, -8900, 2125, -8950,
- 2117, -9000, 2100, -9033, 2042, -9042, 2000, -9050, 1967, -9067,
- 1925, -9067, 1908, -9100, 1883, -9133, 1858, -9125, 1842, -9183,
- 1858, -9183, 1867, -9242, 1842, -9300, 1833, -9358, 1817, -9417,
- 1817, -9450, 1850, -9483, 1867, -9533, 1883, -9583, 1925, -9617,
- 1967, -9642, 2017, -9667, 2050, -9700, 2083, -9725, 2125, -9742,
- 2158, -9725, 2192, -9775, 2242, -9792, 2283, -9775, 2333, -9775,
- 2383, -9775, 2433, -9775, 2483, -9758, 2533, -9742, 2575, -9717,
- 2617, -9725, 2667, -9725, 2717, -9742, 2767, -9733, 2800, -9700,
- 2833, -9650, 2867, -9600, 2875, -9550, 2900, -9517, 2925, -9483,
- 2967, -9508, 2983, -9475, 2942, -9475, 2967, -9425, 2975, -9383,
- 2983, -9325, 2967, -9275, 2958, -9225, 2983, -9183, 2950, -9133,
- 2917, -9125, 2908, -9075, 2917, -9017, 2933, -8983, 2925, -8950,
- 2900, -8925, 2917, -8908, 2950, -8958, 2967, -8958, 2983, -8933,
- 3008, -8925, 3008, -8967, 3000, -9008, 3008, -9042, 3050, -9017,
- 3025, -8967, 3050, -8917, 3050, -8875, 3042, -8825, 3067, -8800,
-## farc22 = [
- 3067, -8800, 3033, -8783, 3033, -8733, 3042, -8683, 3050, -8633,
- 3025, -8600, 3008, -8550, 2967, -8533, 2975, -8483, 3000, -8442,
- 3008, -8392, 2975, -8350, 2917, -8308, 2908, -8283, 2858, -8267,
- 2817, -8275, 2783, -8275, 2792, -8242, 2742, -8258, 2708, -8250,
- 2675, -8217, 2633, -8192, 2583, -8167, 2550, -8125, 2508, -8108,
- 2517, -8067, 2533, -8042, 2583, -8017, 2642, -8008, 2700, -8008,
- 2758, -8033, 2817, -8058, 2850, -8058, 2900, -8092, 2950, -8108,
- 3000, -8133, 3050, -8142, 3100, -8150, 3150, -8125, 3200, -8100,
- 3242, -8050, 3267, -8000, 3300, -7950, 3333, -7917, 3367, -7892,
- 3392, -7842, 3400, -7800, 3433, -7758, 3467, -7717, 3475, -7658,
- 3500, -7633, 3500, -7683, 3533, -7633, 3533, -7600, 3558, -7583,
- 3592, -7583, 3592, -7625, 3592, -7675, 3608, -7633, 3617, -7600,
- 3608, -7575, 3575, -7550, 3608, -7575, 3650, -7583, 3683, -7600,
- 3717, -7642, 3750, -7642, 3792, -7633, 3825, -7692, 3817, -7642,
- 3850, -7650, 3900, -7658, 3933, -7642, 3950, -7600, 3917, -7617,
- 3883, -7617, 3842, -7633, 3825, -7592, 3800, -7600, 3800, -7567,
- 3767, -7583, 3717, -7600, 3725, -7575, 3775, -7558, 3817, -7525,
- 3842, -7500, 3900, -7542, 3950, -7558, 3933, -7525, 3900, -7500,
- 3933, -7450, 3983, -7417, 4033, -7400, 4050, -7433, 4083, -7400,
- 4108, -7350, 4125, -7300, 4125, -7250, 4125, -7200, 4142, -7150,
-## farc23 = [
- 4142, -7150, 4175, -7133, 4150, -7108, 4167, -7067, 4150, -7067,
- 4167, -7000, 4200, -7000, 4175, -7000, 4175, -7050, 4217, -7067,
- 4233, -7100, 4258, -7075, 4283, -7083, 4317, -7058, 4350, -7025,
- 4367, -7025, 4383, -6975, 4400, -6917, 4442, -6883, 4425, -6858,
- 4442, -6800, 4458, -6750, 4483, -6700, 4517, -6700, 4517, -6625,
- 4533, -6558, 4567, -6483, 4533, -6492, 4542, -6425, 4508, -6492,
- 4492, -6533, 4458, -6592, 4417, -6617, 4375, -6600, 4350, -6550,
- 4383, -6500, 4417, -6450, 4450, -6417, 4450, -6367, 4475, -6300,
- 4500, -6200, 4517, -6117, 4550, -6100, 4567, -6042, 4600, -5983,
- 4633, -6050, 4683, -6042, 4700, -6067, 4658, -6100, 4617, -6150,
- 4575, -6150, 4583, -6200, 4567, -6258, 4575, -6325, 4608, -6400,
- 4625, -6458, 4675, -6492, 4733, -6500, 4775, -6483, 4758, -6567,
- 4808, -6633, 4808, -6533, 4825, -6483, 4850, -6425, 4883, -6425,
- 4908, -6458, 4925, -6525, 4917, -6600, 4908, -6675, 4883, -6742,
- 4867, -6800, 4842, -6867, 4808, -6925, 4767, -6967, 4733, -7008,
- 4700, -7050, 4683, -7117, 4717, -7075, 4750, -7042, 4783, -7000,
- 4817, -6967, 4858, -6925, 4892, -6867, 4933, -6800, 4933, -6733,
- 4975, -6717, 5008, -6675, 5025, -6600, 5025, -6542, 5025, -6475,
- 5033, -6400, 5025, -6342, 5025, -6283, 5025, -6217, 5008, -6167,
- 5017, -6092, 5017, -6000, 5050, -5950, 5083, -5908, 5117, -5867,
-## farc24 = [
- 5117, -5867, 5142, -5783, 5150, -5683, 5183, -5617, 5208, -5567,
- 5275, -5600, 5317, -5583, 5367, -5650, 5367, -5725, 5408, -5733,
- 5417, -5833, 5450, -5750, 5475, -5800, 5483, -5892, 5517, -5925,
- 5525, -6033, 5567, -6050, 5592, -6133, 5625, -6175, 5675, -6175,
- 5708, -6133, 5733, -6183, 5767, -6183, 5800, -6233, 5850, -6283,
- 5900, -6325, 5950, -6383, 6000, -6433, 6033, -6467, 6000, -6517,
- 5975, -6558, 5942, -6525, 5900, -6567, 5875, -6642, 5842, -6675,
- 5817, -6775, 5875, -6842, 5883, -6900, 5925, -6950, 5958, -6950,
- 6008, -6942, 6050, -6967, 6092, -6950, 6100, -7025, 6100, -7100,
- 6125, -7175, 6158, -7150, 6183, -7225, 6217, -7292, 6242, -7367,
- 6225, -7483, 6225, -7550, 6242, -7642, 6250, -7742, 6225, -7808,
- 6183, -7808, 6158, -7750, 6117, -7775, 6075, -7808, 6050, -7758,
- 6000, -7742, 5958, -7742, 5917, -7792, 5908, -7858, 5875, -7867,
- 5842, -7808, 5825, -7750, 5767, -7717, 5725, -7700, 5667, -7675,
- 5600, -7675, 5558, -7725, 5517, -7800, 5483, -7875, 5458, -7950,
- 5417, -7917, 5375, -7892, 5317, -7883, 5267, -7883, 5217, -7842,
- 5167, -7900, 5133, -7983, 5100, -7975, 5133, -8042, 5175, -8075,
- 5208, -8125, 5250, -8167, 5292, -8233, 5342, -8217, 5383, -8217,
- 5425, -8242, 5500, -8217, 5525, -8300, 5525, -8400, 5525, -8500,
- 5567, -8600, 5583, -8683, 5600, -8750, 5642, -8808, 5675, -8900,
-## farc25 = [
- 5675, -8900, 5692, -9000, 5725, -9100, 5708, -9175, 5692, -9233,
- 5725, -9233, 5767, -9267, 5808, -9267, 5867, -9308, 5875, -9375,
- 5867, -9442, 5908, -9475, 5958, -9475, 6017, -9467, 6058, -9442,
- 6100, -9417, 6150, -9367, 6192, -9317, 6208, -9250, 6258, -9250,
- 6275, -9158, 6292, -9058, 6342, -9067, 6400, -9000, 6400, -8850,
- 6450, -8775, 6500, -8700, 6550, -8700, 6617, -8600, 6650, -8675,
- 6658, -8550, 6633, -8508, 6617, -8375, 6658, -8267, 6700, -8142,
- 6758, -8117, 6783, -8242, 6833, -8242, 6858, -8133, 6920, -8133,
- 6933, -8275, 6967, -8292, 6983, -8425, 6983, -8550, 6933, -8550,
- 6875, -8542, 6817, -8542, 6783, -8650, 6742, -8650, 6725, -8725,
- 6783, -8817, 6833, -8800, 6875, -8800, 6925, -8892, 6858, -8992,
- 6908, -9067, 6950, -9133, 6975, -9242, 7017, -9133, 7067, -9192,
- 7100, -9267, 7142, -9350, 7192, -9417, 7225, -9350, 7258, -9400,
- 7275, -9308, 7275, -9192, 7317, -9133, 7358, -9067, 7383, -9017,
- 7402, -9117, 7417, -9317, 7400, -9517, 7358, -9558, 7317, -9525,
- 7267, -9500, 7225, -9500, 7175, -9500, 7150, -9583, 7097, -9625,
- 7042, -9675, 6983, -9567, 6942, -9400, 6900, -9467, 6850, -9425,
- 6800, -9517, 6798, -9550, 6750, -9583, 6782, -9683, 6838, -9692,
- 6875, -9558, 6933, -9642, 6983, -9792, 6933, -9858, 6900, -9958,
- 6858, -9800, 6825, -9867, 6767, -9875, 6758,-10000, 6775,-10175,
-
-## farc26 = [
- 6775,-10175, 6803,-10300, 6835,-10458, 6890,-10567, 6875,-10692,
- 6858,-10825, 6825,-10900, 6800,-10783, 6758,-10817, 6775,-10925,
- 6800,-11025, 6783,-11158, 6767,-11300, 6783,-11417, 6783,-11533,
- 6817,-11508, 6830,-11408, 6872,-11467, 6897,-11600, 6900,-11750,
- 6922,-11883, 6947,-12025, 6983,-12133, 6983,-12300, 6937,-12350,
- 6942,-12433, 7000,-12442, 6942,-12533, 6958,-12617, 7008,-12667,
- 7058,-12800, 7000,-12850, 6983,-12942, 7025,-12983, 6998,-13117,
- 6967,-13258, 6938,-13333, 6958,-13417, 6950,-13517, 6917,-13592,
- 6875,-13600, 6900,-13733, 6932,-13833, 6958,-13950, 6962,-14100,
- 6983,-14183, 7008,-14283, 7008,-14400, 7000,-14508, 7022,-14617,
- 7022,-14750, 7047,-14900, 7048,-15033, 7048,-15150, 7087,-15250,
- 7087,-15433, 7113,-15483, 7133,-15633, 7087,-15758, 7083,-15900,
- 7042,-16042, 7033,-16158, 6992,-16267, 6945,-16300, 6908,-16350,
- 6892,-16483, 6883,-16600, 6833,-16617, 6798,-16525, 6767,-16400,
- 6717,-16350, 6683,-16250, 6642,-16175, 6608,-16217, 6608,-16375,
- 6650,-16383, 6650,-16467, 6625,-16575, 6600,-16683, 6558,-16783,
- 6542,-16725, 6533,-16633, 6500,-16667, 6467,-16633, 6450,-16492,
- 6458,-16367, 6442,-16267, 6467,-16192, 6483,-16100, 6442,-16125,
- 6400,-16075, 6350,-16100, 6342,-16225, 6300,-16300, 6325,-16392,
- 6300,-16467, 6267,-16483, 6217,-16550, 6150,-16600, 6108,-16525,
-## ,]
-## farc27 = [
- 6108,-16525, 6058,-16492, 6008,-16433, 5967,-16383, 5967,-16300,
- 6008,-16217, 5950,-16167, 5917,-16192, 5875,-16158, 5892,-16100,
- 5892,-15958, 5842,-15892, 5875,-15867, 5867,-15800, 5875,-15742,
- 5817,-15750, 5758,-15767, 5725,-15833, 5683,-15900, 5650,-15992,
- 5600,-16050, 5592,-16142, 5567,-16233, 5525,-16292, 5500,-16392,
- 5458,-16492, 5433,-16475, 5467,-16367, 5500,-16283, 5517,-16200,
- 5542,-16142, 5558,-16050, 5583,-15958, 5600,-15875, 5642,-15842,
- 5667,-15767, 5700,-15667, 5742,-15617, 5783,-15525, 5817,-15433,
- 5850,-15383, 5892,-15333, 5908,-15408, 5942,-15383, 5967,-15308,
- 6008,-15250, 6058,-15225, 6092,-15167, 6125,-15067, 6125,-14992,
- 6092,-15042, 6075,-15133, 6017,-15142, 5967,-15192, 5950,-15142,
- 5917,-15192, 5925,-15092, 5958,-15017, 5992,-14950, 5992,-14867,
- 6042,-14817, 6100,-14833, 6083,-14750, 6083,-14667, 6058,-14600,
- 6025,-14500, 6000,-14400, 6000,-14300, 6000,-14200, 5975,-14108,
- 5967,-14025, 5992,-13967, 5942,-13950, 5917,-13867, 5875,-13792,
- 5842,-13725, 5817,-13650, 5767,-13617, 5725,-13550, 5675,-13517,
- 5617,-13475, 5683,-13475, 5742,-13500, 5792,-13500, 5825,-13567,
- 5825,-13517, 5867,-13500, 5825,-13467, 5792,-13475, 5742,-13450,
- 5700,-13450, 5725,-13400, 5758,-13375, 5725,-13342, 5692,-13300,
- 5708,-13383, 5675,-13433, 5625,-13417, 5633,-13367, 5592,-13367,
-## farc28 = [
- 5592,-13367, 5558,-13342, 5533,-13308, 5508,-13250, 5467,-13208,
- 5525,-13208, 5583,-13258, 5625,-13300, 5608,-13250, 5608,-13200,
- 5575,-13208, 5533,-13175, 5500,-13133, 5475,-13075, 5492,-13008,
- 5442,-13042, 5417,-13017, 5392,-13075, 5342,-13033, 5317,-12975,
- 5258,-12917, 5233,-12842, 5183,-12817, 5150,-12775, 5117,-12775,
- 5083,-12700, 5067,-12625, 5042,-12550, 5008,-12492, 4975,-12433,
- 4950,-12375, 4975,-12317, 4925,-12317, 4900,-12275, 4858,-12242,
- 4842,-12258, 4800,-12225, 4750,-12250, 4767,-12258, 4750,-12300,
- 4792,-12258, 4817,-12317, 4817,-12383, 4842,-12467, 4817,-12475,
- 4792,-12458, 4750,-12433, 4700,-12408, 4667,-12400, 4633,-12392,
- 4617,-12317, 4617,-12392, 4583,-12392, 4542,-12383, 4500,-12400,
- 4450,-12400, 4400,-12408, 4342,-12425, 4283,-12450, 4233,-12442,
- 4200,-12417, 4150,-12400, 4100,-12408, 4050,-12433, 4025,-12433,
- 4000,-12400, 3967,-12375, 3933,-12375, 3892,-12367, 3858,-12333,
- 3833,-12292, 3800,-12300, 3792,-12250, 3817,-12250, 3808,-12217,
- 3792,-12233, 3750,-12208, 3775,-12250, 3733,-12242, 3700,-12217,
- 3700,-12183, 3658,-12183, 3633,-12192, 3600,-12142, 3558,-12108,
- 3508,-12058, 3458,-12058, 3442,-11983, 3425,-11925, 3408,-11875,
- 3408,-11842, 3375,-11833, 3375,-11800, 3342,-11750, 3300,-11725,
- 3250,-11708, 3200,-11675, 3158,-11658, 3125,-11633, 3100,-11633,
-## farc29 = [
- 3100,-11633, 3075,-11600, 3033,-11600, 3025,-11575, 2967,-11567,
- 2950,-11517, 2908,-11467, 2875,-11433, 2842,-11400, 2800,-11400,
- 2775,-11442, 2783,-11500, 2750,-11450, 2717,-11433, 2700,-11400,
- 2675,-11358, 2675,-11317, 2642,-11283, 2617,-11233, 2567,-11208,
- 2517,-11208, 2483,-11233, 2458,-11167, 2425,-11125, 2383,-11083,
- 2350,-11033, 2283,-11000, 2333,-10942, 2375,-10975, 2425,-11017,
- 2425,-11058, 2467,-11083, 2483,-11067, 2517,-11100, 2550,-11100,
- 2600,-11133, 2650,-11150, 2700,-11200, 2750,-11233, 2783,-11275,
- 2833,-11292, 2875,-11325, 2917,-11367, 2958,-11400, 2983,-11442,
- 3017,-11467, 3058,-11458, 3100,-11475, 3142,-11483, 3175,-11475,
- 3150,-11417, 3158,-11383, 3133,-11350, 3117,-11308, 3075,-11308,
- 3025,-11283, 2992,-11275, 2950,-11242, 2900,-11217, 2850,-11167,
- 2800,-11117, 2792,-11058, 2742,-11058, 2700,-11000, 2667,-10975,
- 2667,-10950, 2633,-10925, 2600,-10942, 2575,-10942, 2550,-10900,
- 2525,-10833, 2467,-10800, 2433,-10758, 2400,-10717, 2350,-10675,
- 2317,-10642, 2275,-10600, 2242,-10567, 2175,-10550, 2150,-10517,
- 2117,-10517, 2083,-10550, 2058,-10533, 2033,-10567, 1983,-10533,
- 1933,-10492, 1908,-10433, 1875,-10383, 1833,-10350, 1808,-10283,
- 1800,-10225, 1800,-10200, 1767,-10158, 1725,-10100, 1708,-10050,
- 1692,-10000, 1667, -9950, 1658, -9900, 1633, -9850, 1608, -9800,
-## farc30 = [
- 1608, -9800, 1600, -9742, 1583, -9683, 1567, -9625, 1592, -9567,
- 1617, -9517, 1617, -9467, 1608, -9425, 1592, -9383, 1567, -9342,
- 1542, -9317, 1500, -9275, 1467, -9233, 1433, -9200, 1408, -9150,
- 1392, -9100, 1392, -9050, 1367, -9000, 1342, -8975, 1342, -8933,
- 1317, -8883, 1317, -8842, 1317, -8783, 1342, -8767, 1300, -8733,
- 1300, -8767, 1258, -8733, 1225, -8700, 1183, -8658, 1150, -8617,
- 1117, -8575, 1075, -8575, 1033, -8583, 992, -8567, 983, -8533,
- 967, -8517, 1000, -8483, 967, -8458, 933, -8400, 900, -8367,
- 850, -8375, 842, -8325, 817, -8300, 833, -8275, 825, -8225,
- 808, -8175, 775, -8150, 775, -8100, 717, -8092, 725, -8050,
- 750, -8000, 783, -8042, 817, -8050, 833, -8008, 858, -7975,
- 900, -7950, 900, -7917, 875, -7875, 833, -7850, 833, -7817,
- 800, -7842, 742, -7817, 700, -7775, 658, -7742, 617, -7750,
- 550, -7742, 500, -7742, 450, -7733, 400, -7750, 367, -7717,
- 325, -7750, 267, -7775, 267, -7833, 217, -7867, 175, -7858,
- 167, -7900, 125, -7883, 100, -7933, 067, -8000, 000, -8008,
- ]
-
-#America's lakes
-farc31 = [
- 6608,-12508, 6613,-12358, 6625,-12200, 6600,-12100, 6575,-12200,
- 6558,-12275, 6500,-12325, 6500,-12175, 6533,-12158, 6567,-12067,
- 6533,-12050, 6483,-12100, 6537,-11933, 6582,-12000, 6567,-11842,
- 6608,-11808, 6642,-11767, 6633,-11908, 6642,-12050, 6667,-11975,
- 6692,-11892, 6708,-12000, 6675,-12133, 6658,-12267, 6637,-12383,
- 6608,-12508, ]
-
-farc32 = [
- 6117,-11700, 6083,-11600, 6083,-11525, 6100,-11442, 6092,-11392,
- 6125,-11375, 6142,-11292, 6158,-11217, 6208,-11175, 6233,-11092,
- 6242,-10983, 6267,-11017, 6267,-10900, 6283,-11000, 6283,-11075,
- 6267,-11158, 6242,-11192, 6208,-11242, 6200,-11308, 6217,-11383,
- 6242,-11417, 6242,-11533, 6217,-11508, 6183,-11450, 6175,-11525,
- 6142,-11533, 6117,-11583, 6117,-11700, ]
-
-farc33 = [
- 5867,-11125, 5858,-11033, 5892,-11000, 5908,-10925, 5908,-10825,
- 5925,-10742, 5942,-10800, 5942,-10858, 5967,-10917, 5967,-10967,
- 5925,-11017, 5900,-11067, 5867,-11125,]
-
-farc34 = [
- 5633,-10308, 5658,-10217, 5700,-10217, 5742,-10217, 5767,-10158,
- 5817,-10208, 5775,-10250, 5742,-10283, 5700,-10250, 5667,-10275,
- 5633,-10308, ]
-
-farc35 = [
- 5333, -9925, 5300, -9892, 5250, -9867, 5225, -9817, 5192, -9817,
- 5192, -9742, 5142, -9733, 5158, -9683, 5117, -9692, 5075, -9700,
- 5033, -9700, 5050, -9642, 5117, -9617, 5158, -9658, 5217, -9700,
- 5267, -9725, 5317, -9758, 5367, -9783, 5375, -9842, 5375, -9900,
- 5333, -9925, ]
-
-farc36 = [
- 5308,-10117, 5258,-10083, 5283,-10042, 5258,-10000, 5233,-10025,
- 5183,-10025, 5158, -9967, 5117, -9900, 5083, -9900, 5050, -9867,
- 5017, -9875, 5025, -9800, 5067, -9825, 5092, -9858, 5125, -9883,
- 5167, -9867, 5175, -9917, 5158, -9967, 5217, -9983, 5242, -9958,
- 5275, -9958, 5308,-10025, 5308,-10117,]
-
-farc37 = [
- 4667, -9208, 4667, -9158, 4692, -9092, 4650, -9050, 4675, -8975,
- 4700, -8900, 4742, -8825, 4742, -8775, 4708, -8842, 4675, -8842,
- 4683, -8775, 4642, -8733, 4642, -8667, 4667, -8583, 4675, -8500,
- 4650, -8500, 4650, -8450, 4692, -8475, 4733, -8467, 4758, -8500,
- 4792, -8500, 4792, -8575, 4825, -8617, 4875, -8650, 4875, -8733,
- 4900, -8808, 4867, -8842, 4842, -8908, 4808, -8942, 4783, -8983,
- 4767, -9050, 4733, -9100, 4700, -9158, 4667, -9208,]
-
-farc38 = [
- 4458, -8800, 4492, -8725, 4450, -8750, 4417, -8758, 4358, -8775,
- 4317, -8792, 4275, -8783, 4217, -8783, 4167, -8750, 4167, -8708,
- 4183, -8667, 4217, -8642, 4275, -8625, 4325, -8633, 4367, -8650,
- 4408, -8650, 4450, -8625, 4492, -8608, 4517, -8533, 4567, -8500,
- 4567, -8450, 4550, -8408, 4533, -8358, 4500, -8333, 4442, -8333,
- 4392, -8383, 4358, -8383, 4392, -8342, 4408, -8292, 4358, -8267,
- 4308, -8242, 4333, -8175, 4392, -8175, 4442, -8150, 4483, -8133,
- 4517, -8150, 4475, -8092, 4450, -8008, 4483, -7975, 4542, -8025,
- 4592, -8075, 4608, -8167, 4617, -8233, 4617, -8300, 4625, -8367,
- 4625, -8417, 4592, -8400, 4592, -8483, 4600, -8525, 4592, -8575,
- 4575, -8675, 4575, -8700, 4542, -8733, 4500, -8767, 4458, -8800,]
-farc39 = [
- 4583, -8308, 4567, -8242, 4550, -8192, 4592, -8175, 4583, -8233,
- 4583, -8308, ]
-
-farc40 = [
- 4175, -8350, 4150, -8283, 4150, -8225, 4158, -8167, 4183, -8108,
- 4200, -8050, 4225, -7983, 4250, -7925, 4283, -7883, 4283, -7950,
- 4283, -8017, 4258, -8050, 4267, -8092, 4258, -8150, 4225, -8183,
- 4200, -8250, 4200, -8308, 4175, -8350, ]
-
-farc41 = [
- 4325, -7975, 4317, -7925, 4333, -7858, 4333, -7800, 4325, -7742,
- 4333, -7683, 4350, -7617, 4400, -7625, 4433, -7608, 4417, -7667,
- 4392, -7700, 4400, -7767, 4392, -7817, 4383, -7883, 4367, -7942,
- 4325, -7975, ]
-
-farc42 = [
- 8, -9142, -042, -9150, -067, -9117, -92, -9150, -108, -9117,
- -75, -9083, -033, -9108, 8, -9142, ]
-
-farc43 = [
- -4183, -7400, -4233, -7417, -4267, -7417, -4333, -7433, -4342, -7375,
- -4300, -7350, -4267, -7367, -4233, -7333, -4200, -7342, -4183, -7400,]
-
-# Islands....
-farc44 = [
- -5258, -6875, -5267, -6917, -5258, -6950, -5283, -6975, -5283, -7025,
- -5333, -7042, -5350, -7017, -5333, -6942, -5350, -6933, -5375, -7008,
- -5425, -7000, -5417, -7033, -5367, -7050, -5417, -7100, -5400, -7133,
- -5383, -7208, -5358, -7250, -5325, -7333, -5300, -7400, -5275, -7467,
- -5300, -7450, -5325, -7400, -5333, -7350, -5358, -7383, -5383, -7333,
- -5408, -7333, -5408, -7267, -5442, -7250, -5442, -7200, -5467, -7200,
- -5500, -7117, -5517, -7050, -5500, -7000, -5533, -6983, -5550, -6933,
- -5542, -6867, -5567, -6800, -5525, -6817, -5525, -6733, -5500, -6650,
- -5500, -6567, -5492, -6525, -5467, -6517, -5467, -6583, -5450, -6633,
- -5425, -6675, -5400, -6742, -5367, -6800, -5333, -6817, -5300, -6825,
- -5258, -6875, ]
-
-farc45 = [
- -5183, -6117, -5225, -6050, -5200, -6000, -5208, -5967, -5233, -5950,
- -5225, -5883, -5200, -5850, -5183, -5775, -5150, -5775, -5133, -5833,
- -5150, -5900, -5133, -5967, -5142, -6050, -5175, -6017, -5200, -6050,
- -5183, -6117, ]
-
-farc46 = [
- -5400, -3800, -5425, -3725, -5450, -3658, -5492, -3600, -5458, -3583,
- -5433, -3625, -5408, -3700, -5400, -3800, ]
-
-farc47 = [
- 1000, -6183, 1000, -6125, 1025, -6100, 1075, -6100, 1067, -6167,
- 1058, -6150, 1017, -6150, 1000, -6183, ]
-
-farc48 = [
- 1235, -6913, 1207, -6880, 1220, -6890, 1235, -6913, ]
-
-farc49 = [
- 1817, -7833, 1817, -7800, 1783, -7767, 1775, -7725, 1792, -7692,
- 1783, -7658, 1783, -7625, 1817, -7642, 1833, -7683, 1842, -7733,
- 1850, -7783, 1833, -7825, 1817, -7833, ]
-
-farc50 = [
- 2177, -8307, 2160, -8295, 2147, -8305, 2143, -8283, 2153, -8250,
- 2182, -8265, 2198, -8287, 2177, -8307, ]
-
-# Cuba and Carabeans
-farc51 = [
- 2183, -8483, 2183, -8417, 2217, -8400, 2217, -8342, 2242, -8308,
- 2267, -8275, 2258, -8225, 2250, -8158, 2233, -8208, 2208, -8175,
- 2200, -8125, 2200, -8050, 2175, -8017, 2167, -7975, 2150, -7925,
- 2158, -7875, 2142, -7858, 2100, -7850, 2067, -7800, 2067, -7725,
- 2033, -7708, 2008, -7742, 1983, -7767, 1983, -7700, 1992, -7650,
- 1992, -7600, 1983, -7550, 1983, -7500, 2000, -7467, 2008, -7417,
- 2025, -7425, 2025, -7450, 2058, -7483, 2067, -7533, 2058, -7567,
- 2100, -7558, 2108, -7600, 2117, -7650, 2150, -7700, 2167, -7742,
- 2192, -7783, 2217, -7833, 2233, -7883, 2233, -7933, 2267, -7967,
- 2283, -8008, 2300, -8050, 2300, -8100, 2317, -8150, 2317, -8200,
- 2300, -8250, 2292, -8300, 2283, -8350, 2258, -8400, 2233, -8433,
- 2200, -8433, 2183, -8483, ]
-
-farc52 = [
- 1833, -7450, 1800, -7383, 1817, -7367, 1817, -7317, 1808, -7275,
- 1817, -7233, 1808, -7183, 1758, -7142, 1800, -7108, 1825, -7108,
- 1842, -7058, 1817, -7058, 1825, -7008, 1842, -6950, 1842, -6900,
- 1808, -6867, 1850, -6833, 1892, -6875, 1908, -6958, 1933, -6917,
- 1933, -6975, 1967, -6992, 1975, -7050, 1983, -7100, 1983, -7167,
- 1967, -7200, 1992, -7258, 1992, -7317, 1967, -7350, 1967, -7300,
- 1933, -7275, 1900, -7275, 1858, -7233, 1833, -7275, 1833, -7325,
- 1850, -7367, 1858, -7417, 1833, -7450, ]
-
-farc53 = [
- 1800, -6717, 1792, -6675, 1800, -6633, 1800, -6592, 1825, -6567,
- 1850, -6600, 1850, -6658, 1850, -6717, 1800, -6717,]
-
-farc54 = [
- 1625, -6183, 1592, -6175, 1617, -6158, 1617, -6133, 1642, -6150,
- 1617, -6158, 1625, -6183, ]
-
-farc55 = [
- 1483, -6117, 1448, -6083, 1465, -6090, 1483, -6117, ]
-
-farc56 = [
- 2517, -7825, 2483, -7817, 2458, -7842, 2417, -7792, 2367, -7767,
- 2400, -7750, 2433, -7775, 2467, -7775, 2517, -7800, 2517, -7825,]
-farc57 = [
- 2092, -7367, 2092, -7317, 2133, -7300, 2108, -7317, 2117, -7350,
- 2092, -7367, ]
-
-farc58 = [
- 2670, -7900, 2650, -7870, 2667, -7823, 2667, -7793, 2647, -7780,
- 2660, -7800, 2640, -7875, 2670, -7900, ]
-
-farc59 = [
- 2687, -7757, 2647, -7710, 2597, -7730, 2647, -7725, 2687, -7757,
-]
-farc60 = [
-
- 2550, -7673, 2513, -7613, 2467, -7613,
-]
-farc61 = [
- 2467, -7567, 2417, -7530,
-]
-farc62 = [
- 2367, -7530, 2287, -7483,
-]
-farc63 = [
- 2283, -7433, 2257, -7383, 2220, -7420,
-]
-farc64 = [
- 2242, -7313, 2233, -7273,
-]
-farc65 = [
- 2167, -7247, 2190, -7210, 2167, -7147,
-]
-farc66 = [
- 2455, -8182, 2467, -8130,
-]
-farc67 = [
- 3508, -7600, 3525, -7558, 3558, -7542,
-]
-farc68 = [
- 4058, -7400, 4067, -7333, 4075, -7267, 4100, -7200, 4117, -7233,
- 4100, -7283, 4092, -7333, 4083, -7392, 4058, -7400,
-]
-farc69 = [
- 4983, -6442, 4958, -6375, 4933, -6350, 4917, -6292, 4908, -6225,
- 4908, -6167, 4942, -6200, 4958, -6250, 4975, -6308, 4983, -6375,
- 4983, -6442,
-]
-farc70 = [
- 4667, -6425, 4642, -6392, 4617, -6333, 4592, -6250, 4625, -6250,
- 4650, -6200, 4642, -6275, 4642, -6333, 4658, -6392, 4692, -6400,
- 4667, -6425,
-]
-farc71 = [
- 6217, -8367, 6225, -8283, 6267, -8192, 6275, -8192, 6275, -8258,
- 6258, -8333, 6217, -8367,
-]
-farc72 = [
- 6233, -8008, 6175, -8017, 6150, -7975, 6192, -7933, 6233, -7925,
- 6233, -8008,
-]
-farc73 = [
- 5625, -8000, 5633, -7942, 5592, -8008, 5592, -7950, 5617, -7917,
- 5575, -7917, 5633, -7892, 5658, -7917, 5625, -8000,
-]
-farc74 = [
- 5300, -8200, 5283, -8142, 5267, -8075, 5308, -8100, 5317, -8142,
- 5300, -8200, ]
-
-# Canada islands...
-farc75 = [
- 4792, -5933, 4750, -5917, 4767, -5842, 4758, -5758, 4758, -5683,
- 4758, -5608, 4750, -5542, 4717, -5542, 4692, -5592, 4683, -5533,
- 4733, -5483, 4742, -5442, 4733, -5392, 4683, -5417, 4708, -5367,
- 4667, -5367, 4667, -5308, 4717, -5292, 4767, -5275, 4758, -5325,
- 4808, -5300, 4800, -5333, 4758, -5367, 4775, -5392, 4808, -5375,
- 4858, -5300, 4850, -5375, 4883, -5400, 4925, -5350, 4942, -5400,
- 4942, -5467, 4933, -5533, 4967, -5592, 4992, -5550, 5008, -5608,
- 4975, -5683, 5025, -5650, 5058, -5617, 5108, -5575, 5158, -5550,
- 5158, -5600, 5133, -5667, 5100, -5700, 5058, -5725, 5008, -5767,
- 4950, -5792, 4900, -5842, 4858, -5875, 4850, -5842, 4817, -5892,
- 4792, -5933, ]
-
-farc76 = [
- 6367, -8717, 6367, -8583, 6317, -8575, 6325, -8483, 6367, -8417,
- 6400, -8358, 6400, -8283, 6375, -8200, 6342, -8117, 6383, -8025,
- 6408, -8125, 6450, -8175, 6483, -8250, 6517, -8367, 6558, -8467,
- 6608, -8500, 6567, -8600, 6525, -8625, 6467, -8642, 6408, -8617,
- 6367, -8717, ]
-
-farc77 = [
- 6767, -7725, 6717, -7683, 6725, -7567, 6750, -7500, 6792, -7483,
- 6825, -7533, 6825, -7650, 6767, -7725, ]
-
-# Labradorish ?
-farc78 = [
- 7175, -9000, 7133, -8900, 7083, -8825, 7042, -8733, 7008, -8575,
- 7008, -8433, 6992, -8233, 7000, -8133, 6958, -7983, 6975, -7900,
- 7025, -7808, 6983, -7750, 6933, -7583, 6867, -7617, 6900, -7500,
- 6850, -7425, 6817, -7300, 6767, -7267, 6725, -7233, 6692, -7300,
- 6650, -7375, 6617, -7458, 6567, -7367, 6533, -7467, 6533, -7600,
- 6550, -7750, 6517, -7767, 6508, -7825, 6467, -7858, 6425, -7800,
- 6425, -7650, 6450, -7575, 6442, -7467, 6417, -7367, 6400, -7275,
- 6375, -7192, 6333, -7192, 6300, -7108, 6283, -7033, 6267, -6933,
- 6242, -6900, 6217, -6808, 6200, -6717, 6192, -6617, 6233, -6617,
- 6267, -6692, 6308, -6775, 6342, -6850, 6383, -6892, 6358, -6775,
- 6325, -6683, 6292, -6575, 6292, -6450, 6358, -6425, 6400, -6500,
- 6450, -6508, 6483, -6575, 6525, -6683, 6575, -6742, 6642, -6717,
- 6592, -6550, 6533, -6500, 6500, -6383, 6550, -6350, 6567, -6233,
- 6608, -6208, 6667, -6142, 6700, -6217, 6733, -6317, 6767, -6425,
- 6808, -6517, 6808, -6675, 6850, -6808, 6900, -6808, 6917, -6675,
- 6958, -6792, 7000, -6750, 7050, -6833, 7083, -6975, 7142, -7125,
- 7167, -7242, 7175, -7400, 7225, -7400, 7258, -7433, 7250, -7575,
- 7270, -7683, 7280, -7783, 7247, -7900, 7247, -8017, 7217, -8117,
- 7267, -8083, 7313, -8150, 7358, -8117, 7383, -8167, 7375, -8292,
- 7342, -8433, 7300, -8550, 7250, -8558, 7208, -8567, 7167, -8533,]
-
-farc79 = [
- 7167, -8533, 7200, -8633, 7242, -8642, 7283, -8650, 7325, -8608,
- 7353, -8550, 7380, -8400, 7383, -8542, 7383, -8700, 7358, -8800,
- 7317, -8908, 7275, -8958, 7233, -9000, 7175, -9000, ]
-
-farc80 = [
- 7375, -8050, 7342, -8083, 7298, -8050, 7283, -7917, 7298, -7817,
- 7287, -7658, 7317, -7642, 7358, -7675, 7378, -7783, 7383, -7925,
- 7375, -8050, ]
-
-farc81 = [
- 7500, -9658, 7482, -9533, 7467, -9375, 7520, -9375, 7555, -9450,
- 7555, -9567, 7500, -9658,]
-
-farc82 = [
- 7703, -9617, 7667, -9625, 7625, -9508, 7633, -9325, 7608, -9217,
- 7567, -9183, 7525, -9217, 7475, -9200, 7453, -9000, 7447, -8817,
- 7442, -8650, 7442, -8475, 7475, -8367, 7450, -8217, 7467, -8042,
- 7508, -7983, 7547, -7983, 7572, -8158, 7572, -8308, 7582, -8483,
- 7558, -8675, 7570, -8875, 7598, -9017, 7617, -8967, 7637, -9075,
- 7665, -9125, 7665, -9300, 7692, -9433, 7703, -9617, ]
-
-farc83 = [
- 8000, -9500, 7972, -9383, 7933, -9317, 7898, -9367, 7853, -9333,
- 7817, -9200, 7817, -8925, 7853, -8808, 7900, -8725, 7925, -8592,
- 7963, -8592, 7975, -8767, 8017, -8717, 8042, -8800, 8050, -9025,
- 8080, -9133, 8125, -9200, 8125, -9358, 8080, -9375, 8045, -9500,
- 8000, -9500, ]
-
-farc84 = [
- 8150, -9050, 8100, -9000, 8067, -8825, 8067, -8550, 8080, -8350,
- 8080, -8067, 8092, -7767, 8063, -7958, 8047, -8250, 8025, -8367,
- 8042, -8583, 7987, -8667, 7970, -8517, 7925, -8517, 7887, -8458,
- 7875, -8600, 7817, -8758, 7792, -8558, 7783, -8800, 7742, -8800,
- 7725, -8700, 7713, -8817, 7683, -8950, 7642, -8950, 7633, -8775,
- 7625, -8517, 7642, -8400, 7633, -8267, 7650, -8158, 7617, -8100,
- 7642, -7900, 7683, -7775, 7725, -7925, 7758, -7767, 7792, -7800,
- 7800, -7583, 7850, -7500, 7900, -7500, 7950, -7400, 7972, -7150,
- 8020, -7000, 8058, -6883, 8095, -6675, 8142, -6433, 8167, -6425,
- 8195, -6250, 8220, -6117, 8242, -6117, 8255, -6292, 8280, -6442,
- 8292, -6717, 8308, -6975, 8308, -7250, 8298, -7450, 8305, -7683,
- 8292, -8075, 8258, -8258, 8233, -8500, 8213, -8667, 8192, -8667,
- 8192, -8900, 8150, -9050, ]
-
-farc85 = [
- 7990, -9950, 7975, -9767, 8017, -9883, 7990, -9950,
-]
-farc86 = [
- 7920,-10633, 7900,-10592, 7883,-10417, 7853,-10500, 7830,-10417,
- 7817,-10217, 7817,-10083, 7775,-10000, 7792, -9883, 7797, -9717,
- 7800, -9583, 7830, -9542, 7855, -9583, 7890, -9800, 7848, -9817,
- 7808, -9858, 7813, -9958, 7848,-10000, 7888,-10000, 7920,-10142,
- 7920,-10300, 7938,-10425, 7938,-10567, 7920,-10633,
-]
-farc87 = [
- 7767, -9700, 7747, -9517, 7735, -9317, 7757, -9233, 7780, -9250,
- 7783, -9500, 7767, -9700,
-]
-farc88 = [
- 7767,-10567, 7718,-10533, 7708,-10400, 7743,-10458, 7775,-10475,
- 7767,-10567,
-]
-farc89 = [
- 7658,-10500, 7617,-10425, 7583,-10400, 7542,-10300, 7563,-10150,
- 7507,-10058, 7507, -9833, 7558, -9783, 7600, -9800, 7638, -9800,
- 7667, -9950, 7670,-10125, 7642,-10192, 7600,-10200, 7637,-10300,
- 7663,-10400, 7658,-10500,
-]
-farc90 = [
- 7512,-10475, 7513,-10358, 7547,-10425, 7512,-10475,
-]
-farc91 = [
- 7292,-10292, 7263,-10233, 7225,-10200, 7225,-10092, 7183, -9992,
- 7133, -9900, 7167, -9783, 7183, -9642, 7242, -9625, 7298, -9667,
- 7317, -9808, 7363, -9708, 7413, -9775, 7392, -9883, 7400,-10017,
- 7383,-10125, 7350,-10142, 7303,-10050, 7307,-10200, 7292,-10292,
- ]
-farc92 = [
- 7825,-11375, 7830,-11200, 7817,-11100, 7820,-10958, 7838,-10892,
- 7858,-11075, 7850,-11300, 7825,-11375,
-]
-farc93 = [
- 7792,-11550, 7770,-11483, 7775,-11408, 7808,-11425, 7792,-11550,
- ]
-farc94 = [
- 7775,-11358, 7742,-11325, 7733,-11175, 7758,-11017, 7803,-11000,
- 7802,-11108, 7787,-11225, 7775,-11358,
-]
-farc95 = [
- 7558,-11950, 7548,-11850, 7575,-11808, 7613,-11775, 7590,-11892,
- 7558,-11950,
-]
-farc96 = [
- 7625,-12417, 7587,-12308, 7592,-12192, 7583,-12058, 7617,-11950,
- 7650,-11892, 7630,-11750, 7672,-11617, 7708,-11658, 7733,-11550,
- 7758,-11675, 7730,-11767, 7733,-11933, 7715,-12050, 7688,-12167,
- 7650,-12275, 7625,-12417, ]
-
-farc97 = [
- 7525,-11775, 7513,-11633, 7497,-11525, 7525,-11425, 7492,-11325,
- 7472,-11450, 7450,-11400, 7442,-11275, 7453,-11167, 7480,-11067,
- 7500,-10950, 7495,-10742, 7503,-10617, 7547,-10600, 7587,-10567,
- 7602,-10700, 7633,-10858, 7680,-10917, 7658,-11000, 7625,-11075,
- 7610,-10983, 7583,-11008, 7550,-10942, 7557,-11142, 7592,-11200,
- 7617,-11275, 7642,-11433, 7647,-11575, 7613,-11642, 7567,-11717,
- 7525,-11775,
-]
-farc98 = [
- 7160,-11900, 7137,-11775, 7103,-11808, 7075,-11708, 7067,-11542,
- 7070,-11400, 7042,-11267, 7017,-11400, 7017,-11550, 7012,-11675,
- 6950,-11642, 6925,-11517, 6925,-11375, 6858,-11308, 6865,-11167,
- 6875,-11000, 6900,-10842, 6917,-10708, 6950,-10600, 6915,-10508,
- 6887,-10383, 6900,-10258, 6930,-10150, 6967,-10200, 6975,-10083,
- 7022,-10067, 7040,-10233, 7067,-10375, 7105,-10475, 7163,-10458,
- 7217,-10517, 7258,-10550, 7305,-10467, 7342,-10417, 7370,-10500,
- 7367,-10658, 7317,-10742, 7267,-10800, 7300,-10958, 7285,-11083,
- 7308,-11192, 7272,-11325, 7330,-11367, 7330,-11483, 7302,-11575,
- 7283,-11700, 7258,-11800, 7230,-11800, 7203,-11883, 7160,-11900,
- ]
-farc99 = [
- 7208,-12525, 7167,-12383, 7108,-12308, 7133,-12175, 7142,-12058,
- 7192,-11967, 7258,-11925, 7292,-11783, 7320,-11650, 7350,-11508,
- 7383,-11658, 7425,-11758, 7425,-11942, 7450,-12117, 7425,-12267,
- 7408,-12442, 7350,-12375, 7298,-12400, 7250,-12467, 7208,-12525,
- ]
-farc100 = [
- 5525, 16583, 5467, 16667,
-]
-farc101 = [
- 5292, 17250, 5275, 17292, 5283, 17333, 5300, 17283, 5292, 17250,
- ]
-farc102 = [
- 5192,-17825, 5178,-17783, 5158,-17808,
-]
-farc103 = [
- 5167,-17692, 5175,-17633, 5192,-17675, 5167,-17692,
-]
-farc104 = [
- 5208,-17483, 5217,-17433, 5242,-17417,
-]
-farc105 = [
- 5275,-16917, 5317,-16833, 5333,-16800, 5358,-16800, 5350,-16850,
- 5275,-16917,
-]
-farc106 = [
- 5333,-16767, 5350,-16700, 5370,-16642, 5400,-16642, 5400,-16717,
- 5367,-16717, 5333,-16767,
-]
-farc107 = [
- 6367,-17175, 6333,-17175, 6342,-17075, 6308,-16983, 6333,-16883,
- 6342,-16983, 6367,-17050, 6367,-17175,
-]
-farc108 = [
- 6017,-16742, 5992,-16683, 5983,-16617, 6000,-16550, 6025,-16550,
- 6033,-16608, 6025,-16675, 6017,-16742,
-]
-farc109 = [
- 5725,-15483, 5675,-15408, 5700,-15342, 5733,-15308, 5750,-15225,
- 5783,-15250, 5792,-15300, 5817,-15208, 5842,-15250, 5808,-15325,
- 5775,-15392, 5725,-15483,
-]
-farc110 = [
- 5417,-13308, 5358,-13300, 5333,-13250, 5283,-13225, 5242,-13183,
- 5200,-13100, 5250,-13133, 5275,-13183, 5308,-13167, 5358,-13200,
- 5408,-13167, 5408,-13233, 5417,-13308,
-]
-farc111 = [
- 5067,-12833, 5017,-12775, 4992,-12708, 4967,-12642, 4942,-12650,
- 4925,-12592, 4900,-12550, 4900,-12500, 4875,-12500, 4850,-12425,
- 4833,-12367, 4850,-12317, 4892,-12367, 4933,-12442, 4975,-12500,
- 5025,-12550, 5042,-12625, 5058,-12717, 5083,-12792, 5067,-12833,
-]
-
-# Greenland
-farc112 = [
- 7817, -7300, 7787, -7167, 7792, -7033, 7758, -7000, 7735, -6842,
- 7725, -7000, 7702, -7117, 7680, -7025, 7660, -6875, 7638, -6950,
- 7613, -6850, 7592, -6658, 7613, -6533, 7617, -6342, 7617, -6167,
- 7582, -6000, 7567, -5833, 7532, -5833, 7497, -5750, 7450, -5650,
- 7400, -5650, 7358, -5567, 7317, -5550, 7258, -5583, 7217, -5533,
- 7168, -5575, 7142, -5525, 7142, -5400, 7175, -5333, 7117, -5275,
- 7100, -5158, 7050, -5125, 7080, -5283, 7083, -5425, 7025, -5458,
- 6967, -5483, 6930, -5367, 6947, -5217, 6992, -5125, 6933, -5075,
- 6858, -5100, 6858, -5258, 6817, -5333, 6758, -5367, 6700, -5375,
- 6650, -5350, 6600, -5350, 6550, -5242, 6492, -5200, 6433, -5200,
- 6400, -5133, 6358, -5125, 6283, -5033, 6250, -5008, 6192, -4950,
- 6142, -4900, 6083, -4800, 6075, -4667, 6058, -4575, 6017, -4517,
- 5983, -4392, 6000, -4325, 6050, -4283, 6100, -4275, 6150, -4250,
- 6200, -4200, 6267, -4242, 6300, -4150, 6350, -4075, 6400, -4050,
- 6450, -4042, 6517, -4100, 6508, -4000, 6550, -3967, 6567, -3850,
- 6567, -3700, 6600, -3567, 6633, -3475, 6667, -3392, 6708, -3342,
- 6750, -3300, 6792, -3217, 6817, -3133, 6817, -3000, 6842, -2875,
- 6858, -2750, 6883, -2625, 6908, -2525, 6942, -2425, 6975, -2317,
- 7008, -2250, 7017, -2375, 7042, -2508, 7017, -2633, 7042, -2633,
- 7067, -2525, 7117, -2550, 7133, -2450, 7100, -2425, 7058, -2400,
-
-## farc113 = [
- 7058, -2400, 7042, -2308, 7050, -2183, 7100, -2175, 7142, -2175,
- 7183, -2258, 7217, -2367, 7250, -2458, 7230, -2333, 7208, -2200,
- 7242, -2175, 7292, -2200, 7305, -2300, 7325, -2217, 7342, -2158,
- 7347, -2033, 7383, -2033, 7400, -2150, 7425, -1925, 7467, -1883,
- 7467, -2008, 7520, -1942, 7570, -1942, 7620, -2000, 7630, -2150,
- 7667, -2142, 7692, -2033, 7675, -1842, 7708, -1817, 7758, -1883,
- 7792, -1967, 7842, -1917, 7883, -1950, 7913, -1850, 7953, -1808,
- 7997, -1717, 8042, -1583, 8075, -1433, 8132, -1167, 8168, -1325,
- 8180, -1642, 8148, -1817, 8158, -1950, 8132, -2075, 8108, -2250,
- 8092, -2483, 8137, -2367, 8163, -2200, 8180, -2133, 8208, -2167,
- 8203, -2367, 8175, -2367, 8168, -2533, 8207, -2533, 8207, -2983,
- 8225, -2825, 8222, -2558, 8232, -2217, 8257, -2000, 8285, -2167,
- 8298, -2400, 8325, -2483, 8355, -2733, 8358, -3150, 8365, -3600,
- 8342, -3950, 8320, -4400, 8283, -4650, 8242, -4733, 8247, -5050,
- 8200, -5125, 8233, -5450, 8208, -5933, 8175, -6200, 8142, -6125,
- 8113, -6183, 8118, -6375, 8092, -6500, 8053, -6675, 8008, -6767,
- 8008, -6500, 7975, -6450, 7920, -6567, 7902, -6867, 7875, -7033,
- 7858, -7233, 7817, -7300, ]
-
-# Iceland
-farc114 = [
- 6550, -2433, 6542, -2358, 6558, -2275, 6542, -2208, 6508, -2283,
- 6475, -2400, 6475, -2258, 6425, -2200, 6383, -2275, 6383, -2100,
- 6358, -2000, 6342, -1875, 6375, -1767, 6383, -1675, 6417, -1583,
- 6442, -1450, 6492, -1367, 6550, -1367, 6575, -1467, 6633, -1475,
- 6625, -1567, 6650, -1625, 6617, -1683, 6600, -1758, 6617, -1825,
- 6608, -1925, 6583, -1967, 6608, -2025, 6558, -2033, 6542, -2142,
- 6600, -2150, 6633, -2225, 6642, -2300, 6617, -2300, 6617, -2367,
- 6583, -2375, 6550, -2433, ]
-
-farc115 = [
- 7083, -900, 7117, -800,]
-
-farc116 = [
- 7540, -1883, 7500, -1883, 7505, -1792, 7540, -1883,
-]
-
-
-# Africa, Asia and Europe
-farc117 = [
- 000, 933, -050, 925, -83, 875, -133, 900, -183, 917,
- -225, 950, -275, 983, -308, 1033, -342, 1067, -375, 1100,
- -408, 1133, -450, 1158, -492, 1192, -533, 1217, -575, 1217,
- -600, 1233, -642, 1242, -675, 1267, -725, 1292, -775, 1300,
- -817, 1325, -867, 1342, -917, 1300, -942, 1317, -992, 1333,
- -1033, 1358, -1067, 1383, -1125, 1392, -1183, 1383, -1225, 1367,
- -1267, 1342, -1292, 1300, -1333, 1267, -1392, 1250, -1450, 1233,
- -1500, 1217, -1550, 1208, -1600, 1183, -1650, 1183, -1700, 1175,
- -1742, 1175, -1792, 1183, -1850, 1208, -1883, 1242, -1925, 1267,
- -1975, 1292, -2025, 1325, -2083, 1342, -2125, 1375, -2167, 1392,
- -2208, 1433, -2250, 1450, -2292, 1442, -2350, 1450, -2400, 1450,
- -2442, 1458, -2500, 1483, -2550, 1483, -2592, 1492, -2642, 1508,
- -2700, 1525, -2750, 1533, -2783, 1567, -2825, 1592, -2858, 1642,
- -2900, 1675, -2958, 1692, -3000, 1717, -3058, 1733, -3100, 1758,
- -3142, 1792, -3200, 1825, -3258, 1833, -3283, 1808, -3283, 1783,
- -3342, 1825, -3383, 1842, -3425, 1842, -3408, 1875, -3442, 1917,
- -3475, 1958, -3475, 2017, -3450, 2050, -3442, 2108, -3442, 2175,
- -3417, 2208, -3408, 2267, -3417, 2325, -3400, 2367, -3417, 2425,
- -3425, 2475, -3400, 2508, -3400, 2575, -3375, 2600, -3375, 2658,
- -3367, 2708, -3333, 2750, -3300, 2808, -3275, 2850, -3242, 2883,
-
-## farc118 = [
- -3242, 2883, -3200, 2925, -3167, 2958, -3133, 3000, -3092, 3042,
- -3050, 3067, -3000, 3092, -2958, 3125, -2917, 3150, -2883, 3200,
- -2858, 3242, -2808, 3258, -2750, 3275, -2700, 3292, -2658, 3292,
- -2625, 3292, -2608, 3258, -2550, 3292, -2533, 3342, -2517, 3375,
- -2492, 3442, -2475, 3492, -2450, 3525, -2400, 3550, -2350, 3542,
- -2308, 3550, -2250, 3550, -2208, 3533, -2142, 3517, -2083, 3500,
- -2050, 3467, -2000, 3475, -1967, 3517, -1942, 3550, -1900, 3583,
- -1883, 3625, -1833, 3667, -1792, 3700, -1750, 3733, -1733, 3783,
- -1717, 3825, -1708, 3892, -1675, 3925, -1633, 3975, -1600, 4008,
- -1558, 4042, -1517, 4067, -1467, 4075, -1408, 4058, -1358, 4058,
- -1300, 4042, -1242, 4050, -1200, 4050, -1150, 4042, -1100, 4050,
- -1050, 4050, -1017, 4017, -992, 3983, -942, 3967, -883, 3942,
- -817, 3933, -758, 3933, -708, 3958, -658, 3917, -608, 3875,
- -558, 3892, -508, 3908, -458, 3933, -417, 3958, -358, 3992,
- -300, 4025, -242, 4025, -250, 4067, -208, 4108, -175, 4150,
- -125, 4175, -92, 4208, -042, 4242, 000, 4292, 042, 4317,
- 075, 4358, 100, 4400, 142, 4442, 175, 4483, 192, 4533,
- 225, 4575, 258, 4617, 300, 4650, 342, 4692, 375, 4725,
- 417, 4767, 458, 4792, 508, 4817, 542, 4850, 575, 4892,
- 633, 4908, 675, 4925, 725, 4950, 767, 4975, 817, 4992,
-
-## farc119 = [
- 817, 4992, 850, 5017, 892, 5042, 942, 5075, 1000, 5075,
- 1042, 5100, 1100, 5108, 1175, 5117, 1192, 5058, 1150, 5017,
- 1133, 4958, 1117, 4900, 1125, 4850, 1108, 4800, 1108, 4742,
- 1075, 4683, 1067, 4633, 1075, 4575, 1050, 4525, 1033, 4475,
- 1042, 4425, 1067, 4392, 1108, 4358, 1142, 4325, 1167, 4292,
- 1192, 4342, 1242, 4325, 1283, 4283, 1325, 4242, 1367, 4208,
- 1408, 4158, 1458, 4117, 1475, 4067, 1500, 4008, 1550, 3983,
- 1558, 3950, 1600, 3925, 1650, 3917, 1708, 3908, 1758, 3883,
- 1800, 3858, 1842, 3808, 1867, 3758, 1925, 3733, 1967, 3725,
- 2025, 3717, 2075, 3725, 2108, 3725, 2150, 3692, 2208, 3692,
- 2225, 3658, 2250, 3617, 2275, 3583, 2325, 3558, 2358, 3550,
- 2400, 3558, 2433, 3525, 2483, 3500, 2525, 3475, 2575, 3450,
- 2617, 3433, 2667, 3400, 2708, 3392, 2742, 3367, 2783, 3358,
- 2817, 3325, 2858, 3292, 2900, 3267, 2942, 3258, 2983, 3233,
- 3000, 3258, 2958, 3275, 2908, 3300, 2875, 3325, 2842, 3342,
- 2808, 3375, 2775, 3417, 2792, 3442, 2833, 3442, 2892, 3467,
- 2950, 3500, 2900, 3500, 2850, 3483, 2800, 3467, 2800, 3517,
- 2758, 3550, 2717, 3575, 2667, 3608, 2617, 3642, 2583, 3675,
- 2533, 3708, 2483, 3725, 2433, 3750, 2408, 3800, 2375, 3842,
- 2325, 3875, 2275, 3900, 2225, 3908, 2192, 3900, 2150, 3908,
-
-## farc120 = [
- 2150, 3908, 2092, 3917, 2058, 3950, 2025, 3967, 2008, 4033,
- 1967, 4075, 1917, 4100, 1867, 4125, 1817, 4150, 1775, 4175,
- 1750, 4208, 1700, 4242, 1650, 4267, 1608, 4275, 1567, 4267,
- 1517, 4275, 1458, 4292, 1400, 4308, 1375, 4325, 1325, 4317,
- 1275, 4350, 1267, 4392, 1275, 4442, 1283, 4492, 1300, 4542,
- 1333, 4567, 1333, 4608, 1325, 4658, 1333, 4708, 1358, 4742,
- 1392, 4783, 1392, 4833, 1408, 4883, 1450, 4917, 1475, 4967,
- 1492, 5025, 1508, 5075, 1525, 5125, 1542, 5175, 1558, 5225,
- 1592, 5225, 1625, 5242, 1650, 5292, 1667, 5342, 1692, 5392,
- 1700, 5442, 1692, 5483, 1717, 5525, 1767, 5542, 1783, 5592,
- 1792, 5633, 1808, 5658, 1858, 5675, 1883, 5708, 1892, 5750,
- 1908, 5792, 1950, 5775, 2000, 5783, 2042, 5808, 2042, 5850,
- 2083, 5875, 2117, 5900, 2142, 5933, 2192, 5958, 2242, 5983,
- 2267, 5942, 2308, 5908, 2350, 5883, 2367, 5825, 2375, 5775,
- 2400, 5725, 2433, 5683, 2475, 5642, 2533, 5642, 2583, 5642,
- 2608, 5650, 2617, 5625, 2583, 5608, 2558, 5567, 2525, 5533,
- 2492, 5500, 2458, 5450, 2417, 5425, 2408, 5383, 2417, 5325,
- 2417, 5275, 2392, 5242, 2400, 5183, 2425, 5167, 2425, 5125,
- 2475, 5158, 2525, 5167, 2575, 5158, 2608, 5133, 2600, 5108,
- 2558, 5100, 2517, 5067, 2542, 5050, 2583, 5017, 2625, 5025,
-
-## farc121 = [
- 2625, 5025, 2667, 5008, 2700, 4967, 2742, 4925, 2783, 4883,
- 2825, 4858, 2875, 4833, 2925, 4817, 2942, 4775, 2958, 4833,
- 3000, 4858, 3050, 4892, 3025, 4925, 3000, 4958, 3017, 5000,
- 2983, 5033, 2925, 5067, 2875, 5108, 2825, 5125, 2783, 5150,
- 2767, 5217, 2742, 5258, 2700, 5300, 2692, 5350, 2658, 5383,
- 2667, 5433, 2642, 5475, 2667, 5533, 2683, 5575, 2700, 5625,
- 2700, 5675, 2667, 5708, 2625, 5717, 2575, 5733, 2567, 5800,
- 2558, 5858, 2542, 5917, 2533, 5967, 2533, 6017, 2525, 6075,
- 2517, 6117, 2508, 6183, 2517, 6242, 2525, 6292, 2525, 6350,
- 2542, 6383, 2525, 6425, 2517, 6467, 2525, 6517, 2533, 6558,
- 2542, 6608, 2533, 6658, 2500, 6683, 2475, 6717, 2433, 6733,
- 2392, 6742, 2375, 6792, 2350, 6833, 2308, 6867, 2275, 6917,
- 2275, 6975, 2292, 7033, 2242, 7017, 2225, 6967, 2225, 6908,
- 2175, 6933, 2142, 6967, 2100, 7008, 2075, 7058, 2075, 7117,
- 2092, 7167, 2125, 7208, 2183, 7217, 2225, 7233, 2217, 7258,
- 2167, 7250, 2125, 7258, 2083, 7283, 2025, 7275, 1975, 7267,
- 1925, 7283, 1900, 7300, 1867, 7283, 1808, 7300, 1750, 7317,
- 1700, 7325, 1642, 7333, 1600, 7350, 1550, 7375, 1500, 7408,
- 1450, 7442, 1400, 7450, 1350, 7467, 1300, 7483, 1242, 7500,
- 1200, 7525, 1158, 7558, 1117, 7583, 1067, 7600, 1017, 7617,
-
-## farc122 = [
- 1017, 7617, 958, 7633, 900, 7650, 858, 7683, 825, 7717,
- 808, 7758, 833, 7800, 892, 7817, 917, 7858, 925, 7900,
- 975, 7900, 1025, 7933, 1025, 7983, 1083, 7983, 1125, 7975,
- 1175, 7975, 1217, 8000, 1267, 8025, 1325, 8033, 1383, 8025,
- 1442, 8017, 1500, 8008, 1542, 8017, 1583, 8042, 1575, 8100,
- 1617, 8117, 1625, 8150, 1633, 8200, 1658, 8225, 1700, 8233,
- 1717, 8258, 1742, 8300, 1783, 8333, 1808, 8367, 1825, 8408,
- 1858, 8450, 1900, 8483, 1933, 8508, 1967, 8550, 1975, 8592,
- 1992, 8642, 2033, 8675, 2075, 8700, 2108, 8692, 2142, 8708,
- 2158, 8758, 2175, 8800, 2208, 8817, 2150, 8833, 2158, 8875,
- 2167, 8925, 2175, 8975, 2183, 9025, 2217, 9058, 2242, 9092,
- 2275, 9142, 2233, 9175, 2192, 9192, 2150, 9200, 2108, 9217,
- 2067, 9250, 2025, 9292, 1992, 9317, 1992, 9350, 1950, 9375,
- 1925, 9358, 1883, 9383, 1883, 9417, 1833, 9433, 1775, 9450,
- 1717, 9458, 1658, 9442, 1608, 9425, 1583, 9475, 1575, 9508,
- 1575, 9550, 1608, 9583, 1633, 9625, 1658, 9675, 1692, 9692,
- 1675, 9725, 1633, 9758, 1583, 9775, 1533, 9783, 1475, 9792,
- 1425, 9808, 1367, 9825, 1308, 9858, 1250, 9875, 1192, 9850,
- 1142, 9875, 1100, 9875, 1067, 9850, 1017, 9850, 958, 9850,
- 900, 9825, 850, 9825, 808, 9842, 825, 9867, 783, 9908,
-
-## farc123 = [
- 783, 9908, 733, 9942, 700, 9975, 667, 10008, 608, 10033,
- 567, 10033, 508, 10042, 475, 10067, 425, 10058, 375, 10092,
- 333, 10133, 283, 10142, 250, 10192, 217, 10225, 192, 10275,
- 167, 10317, 142, 10350, 142, 10425, 200, 10408, 258, 10375,
- 292, 10342, 342, 10342, 392, 10342, 442, 10342, 492, 10342,
- 542, 10308, 575, 10267, 608, 10225, 642, 10183, 683, 10150,
- 692, 10092, 717, 10058, 775, 10042, 825, 10025, 858, 9992,
- 925, 9983, 917, 9933, 967, 9917, 1025, 9917, 1083, 9933,
- 1117, 9958, 1167, 9975, 1208, 9992, 1275, 9992, 1333, 10000,
- 1350, 10042, 1333, 10092, 1275, 10092, 1267, 10142, 1267, 10183,
- 1225, 10225, 1208, 10258, 1175, 10283, 1133, 10300, 1092, 10325,
- 1058, 10367, 1058, 10425, 1025, 10450, 1008, 10500, 958, 10483,
- 908, 10483, 867, 10500, 900, 10542, 933, 10583, 942, 10633,
- 983, 10667, 1042, 10667, 1042, 10725, 1067, 10767, 1092, 10808,
- 1117, 10850, 1142, 10900, 1175, 10917, 1217, 10917, 1283, 10925,
- 1325, 10925, 1375, 10925, 1425, 10917, 1475, 10900, 1533, 10883,
- 1575, 10842, 1617, 10808, 1650, 10767, 1692, 10717, 1733, 10683,
- 1775, 10642, 1808, 10633, 1842, 10592, 1900, 10558, 1950, 10575,
- 1992, 10592, 2025, 10642, 2067, 10667, 2100, 10708, 2125, 10758,
- 2150, 10800, 2167, 10850, 2167, 10900, 2142, 10942, 2142, 10975,
-
-## farc124 = [
- 2142, 10975, 2100, 10967, 2075, 10975, 2033, 10992, 2033, 11025,
- 2050, 11050, 2092, 11025, 2125, 11042, 2142, 11092, 2150, 11150,
- 2175, 11200, 2183, 11250, 2200, 11300, 2250, 11308, 2217, 11350,
- 2267, 11367, 2225, 11417, 2267, 11450, 2267, 11500, 2275, 11550,
- 2283, 11600, 2308, 11650, 2342, 11700, 2367, 11742, 2400, 11783,
- 2425, 11817, 2458, 11817, 2458, 11867, 2500, 11883, 2525, 11917,
- 2558, 11942, 2600, 11967, 2633, 11975, 2675, 11967, 2667, 12000,
- 2700, 12033, 2742, 12058, 2783, 12083, 2817, 12108, 2817, 12142,
- 2842, 12158, 2867, 12150, 2917, 12167, 2917, 12192, 2975, 12200,
- 3000, 12208, 3008, 12167, 3025, 12133, 3017, 12075, 3033, 12042,
- 3042, 12092, 3067, 12117, 3083, 12150, 3092, 12192, 3125, 12183,
- 3167, 12125, 3167, 12183, 3208, 12167, 3242, 12125, 3258, 12092,
- 3300, 12083, 3342, 12067, 3383, 12050, 3433, 12033, 3458, 11975,
- 3483, 11917, 3525, 11942, 3558, 11967, 3592, 12017, 3617, 12067,
- 3658, 12083, 3675, 12150, 3700, 12200, 3683, 12233, 3733, 12258,
- 3742, 12208, 3742, 12158, 3750, 12117, 3775, 12083, 3758, 12033,
- 3733, 12000, 3708, 11975, 3708, 11933, 3733, 11892, 3775, 11883,
- 3800, 11833, 3825, 11792, 3858, 11758, 3892, 11767, 3925, 11800,
- 3908, 11842, 3917, 11900, 3942, 11925, 3975, 11942, 4000, 11992,
- 4017, 12042, 4058, 12083, 4092, 12125, 4083, 12192, 4042, 12225,
-
-## farc125 = [
- 4042, 12225, 4000, 12192, 3975, 12150, 3950, 12133, 3917, 12167,
- 3875, 12117, 3883, 12158, 3908, 12208, 3942, 12242, 3958, 12300,
- 3975, 12350, 3983, 12408, 3967, 12467, 3958, 12508, 3942, 12542,
- 3892, 12517, 3850, 12500, 3808, 12475, 3767, 12533, 3775, 12608,
- 3742, 12658, 3700, 12675, 3692, 12617, 3633, 12650, 3575, 12675,
- 3533, 12633, 3483, 12633, 3433, 12658, 3467, 12717, 3483, 12775,
- 3492, 12850, 3517, 12908, 3558, 12933, 3600, 12942, 3650, 12942,
- 3700, 12933, 3750, 12917, 3792, 12883, 3825, 12850, 3867, 12825,
- 3900, 12783, 3925, 12733, 3958, 12750, 3983, 12733, 3992, 12783,
- 4008, 12825, 4033, 12875, 4067, 12925, 4083, 12967, 4133, 12967,
- 4158, 12958, 4208, 13008, 4225, 13067, 4258, 13083, 4258, 13117,
- 4300, 13150, 4325, 13175, 4325, 13233, 4292, 13233, 4267, 13308,
- 4283, 13375, 4317, 13433, 4342, 13500, 4392, 13550, 4433, 13567,
- 4475, 13633, 4525, 13692, 4567, 13750, 4608, 13792, 4650, 13825,
- 4708, 13850, 4750, 13900, 4800, 13950, 4850, 14017, 4900, 14033,
- 4942, 14050, 5000, 14050, 5050, 14042, 5100, 14050, 5142, 14075,
- 5183, 14108, 5217, 14133, 5242, 14108, 5283, 14108, 5325, 14133,
- 5350, 14075, 5375, 14025, 5400, 14017, 5417, 13950, 5417, 13883,
- 5367, 13825, 5350, 13733, 5383, 13767, 5425, 13767, 5417, 13708,
- 5375, 13667, 5417, 13667, 5458, 13667, 5450, 13592, 5467, 13525,
-
-## farc126 = [
- 5467, 13525, 5492, 13517, 5517, 13592, 5558, 13658, 5592, 13725,
- 5633, 13792, 5683, 13850, 5717, 13900, 5750, 13967, 5775, 14025,
- 5808, 14058, 5842, 14100, 5867, 14167, 5900, 14200, 5925, 14267,
- 5933, 14367, 5933, 14467, 5933, 14558, 5917, 14592, 5942, 14650,
- 5925, 14742, 5933, 14817, 5925, 14883, 5942, 14892, 5967, 14900,
- 5975, 14950, 5958, 15017, 5950, 15083, 5958, 15133, 5933, 15167,
- 5908, 15108, 5883, 15133, 5883, 15200, 5900, 15292, 5917, 15333,
- 5908, 15400, 5917, 15517, 5942, 15483, 5950, 15417, 6000, 15450,
- 6042, 15500, 6075, 15575, 6117, 15633, 6158, 15692, 6175, 15792,
- 6183, 15883, 6167, 15950, 6183, 16033, 6125, 15983, 6092, 15992,
- 6058, 16017, 6092, 16100, 6125, 16167, 6158, 16225, 6167, 16292,
- 6208, 16292, 6250, 16325, 6267, 16442, 6250, 16475, 6225, 16408,
- 6175, 16392, 6117, 16375, 6083, 16350, 6067, 16267, 6042, 16192,
- 6008, 16158, 5967, 16092, 5925, 16008, 5883, 15967, 5842, 15900,
- 5800, 15825, 5775, 15750, 5775, 15683, 5742, 15700, 5700, 15667,
- 5683, 15600, 5633, 15575, 5583, 15550, 5525, 15542, 5483, 15550,
- 5433, 15567, 5392, 15583, 5333, 15600, 5275, 15608, 5217, 15642,
- 5167, 15650, 5125, 15650, 5092, 15667, 5125, 15733, 5167, 15792,
- 5225, 15842, 5283, 15858, 5317, 15917, 5317, 15992, 5358, 15983,
- 5408, 15992, 5442, 16042, 5458, 16117, 5450, 16167, 5475, 16208,
-
-## farc127 = [
- 5475, 16208, 5517, 16167, 5567, 16158, 5608, 16192, 5625, 16242,
- 5600, 16283, 5617, 16325, 5667, 16308, 5683, 16267, 5725, 16267,
- 5767, 16317, 5792, 16258, 5775, 16208, 5817, 16192, 5858, 16233,
- 5900, 16292, 5942, 16317, 5983, 16333, 6000, 16417, 5983, 16475,
- 6017, 16533, 6033, 16617, 5975, 16617, 6017, 16683, 6042, 16750,
- 6058, 16825, 6050, 16917, 6025, 16983, 5992, 17033, 6042, 17067,
- 6067, 17150, 6100, 17233, 6133, 17308, 6167, 17383, 6175, 17458,
- 6208, 17533, 6225, 17625, 6250, 17700, 6250, 17817, 6225, 17900,
- 6267, 17967, 6300, 17925, 6350, 17883, 6400, 17858, 6433, 17833,
- 6433, 17750, 6475, 17750, 6467, 17867, 6492, 17958, 6505, 18000,
-
-## farc128 = [
- 6505,-18000, 6517,-17967, 6567,-17925, 6600,-17992, 6633,-17900,
- 6592,-17883, 6550,-17850, 6542,-17767, 6558,-17700, 6542,-17600,
- 6500,-17583, 6475,-17508, 6442,-17400, 6425,-17300, 6467,-17275,
- 6500,-17217, 6550,-17217, 6550,-17108, 6583,-17058, 6608,-16983,
- 6650,-17083, 6692,-17167, 6708,-17317, 6708,-17450, 6750,-17500,
- 6783,-17583, 6817,-17692, 6842,-17817, 6875,-17908, 6908,-18000,
-
-## farc129 = [
- 6908, 18000, 6917, 17975, 6942, 17867, 6958, 17742, 6983, 17617,
- 6983, 17467, 6992, 17333, 7000, 17200, 7008, 17058, 6950, 17058,
- 6908, 17100, 6883, 17042, 6875, 16958, 6908, 16933, 6925, 16833,
- 6958, 16825, 6958, 16917, 6983, 16942, 7000, 16825, 6967, 16767,
- 6942, 16700, 6958, 16567, 6967, 16400, 6958, 16225, 6958, 16067,
- 6983, 15950, 7025, 16000, 7067, 15967, 7092, 15883, 7100, 15750,
- 7108, 15600, 7092, 15458, 7092, 15350, 7083, 15242, 7117, 15242,
- 7142, 15158, 7142, 15067, 7167, 15000, 7217, 14983, 7233, 14850,
- 7233, 14683, 7258, 14525, 7267, 14383, 7275, 14242, 7283, 14067,
- 7250, 14117, 7250, 13975, 7225, 13933, 7192, 13967, 7150, 14017,
- 7158, 13858, 7150, 13667, 7167, 13583, 7158, 13500, 7133, 13442,
- 7150, 13350, 7192, 13258, 7150, 13225, 7108, 13200, 7075, 13125,
- 7092, 13033, 7133, 12942, 7183, 12875, 7225, 12950, 7275, 12983,
- 7325, 12858, 7342, 12692, 7367, 12483, 7367, 12300, 7333, 12283,
- 7300, 12333, 7292, 12200, 7300, 12000, 7317, 11850, 7358, 11867,
- 7358, 11725, 7375, 11592, 7367, 11483, 7350, 11367, 7408, 11283,
- 7442, 11333, 7450, 11208, 7433, 11158, 7408, 11283, 7367, 11300,
- 7367, 11200, 7383, 11117, 7400, 11017, 7375, 10950, 7350, 11017,
- 7333, 10883, 7317, 10758, 7317, 10650, 7358, 10717, 7375, 10833,
- 7417, 10967, 7450, 11100, 7492, 11250, 7525, 11367, 7575, 11383,
-
-## farc130 = [
- 7575, 11383, 7617, 11350, 7650, 11242, 7667, 11117, 7675, 10958,
- 7675, 10817, 7650, 10783, 7650, 10642, 7700, 10750, 7708, 10600,
- 7708, 10425, 7742, 10608, 7775, 10408, 7742, 10250, 7700, 10100,
- 7650, 10100, 7650, 9900, 7617, 9942, 7600, 9667, 7633, 9700,
- 7608, 9475, 7608, 9325, 7575, 9217, 7558, 9058, 7533, 8867,
- 7500, 8750, 7467, 8658, 7433, 8650, 7392, 8700, 7383, 8525,
- 7367, 8375, 7358, 8200, 7350, 8033, 7292, 8083, 7242, 8083,
- 7225, 8217, 7183, 8283, 7167, 8158, 7208, 8058, 7233, 7950,
- 7233, 7850, 7258, 7775, 7233, 7700, 7200, 7833, 7183, 7775,
- 7208, 7692, 7192, 7608, 7150, 7658, 7125, 7800, 7100, 7850,
- 7117, 7692, 7133, 7533, 7183, 7533, 7225, 7575, 7275, 7550,
- 7308, 7450, 7292, 7417, 7267, 7508, 7233, 7517, 7200, 7467,
- 7183, 7375, 7133, 7317, 7100, 7383, 7058, 7433, 7017, 7383,
- 6967, 7367, 6908, 7392, 6900, 7550, 6875, 7458, 6825, 7450,
- 6767, 7483, 6725, 7400, 6683, 7350, 6650, 7250, 6625, 7158,
- 6667, 7050, 6700, 7183, 6733, 7250, 6775, 7317, 6817, 7317,
- 6858, 7358, 6900, 7258, 6950, 7258, 7008, 7267, 7058, 7267,
- 7108, 7267, 7150, 7183, 7192, 7242, 7233, 7283, 7267, 7283,
- 7292, 7133, 7317, 7167, 7350, 7117, 7333, 7008, 7292, 6950,
- 7250, 6892, 7200, 6875, 7158, 6825, 7125, 6700, 7083, 6683,
-
-## farc131 = [
- 7083, 6683, 7042, 6733, 7000, 6692, 6967, 6692, 6950, 6783,
- 6900, 6833, 6875, 6908, 6825, 6858, 6850, 6775, 6883, 6708,
- 6900, 6600, 6925, 6508, 6933, 6408, 6967, 6300, 6975, 6175,
- 7008, 6017, 7050, 5908, 7017, 5858, 6992, 5917, 6967, 6017,
- 6933, 6050, 6900, 6108, 6875, 6050, 6867, 5983, 6833, 5983,
- 6842, 5908, 6900, 5908, 6883, 5817, 6850, 5725, 6858, 5617,
- 6850, 5517, 6817, 5483, 6850, 5400, 6900, 5392, 6875, 5300,
- 6850, 5208, 6833, 5100, 6808, 5017, 6783, 4908, 6767, 4817,
- 6708, 4817, 6683, 4733, 6683, 4633, 6717, 4583, 6733, 4492,
- 6775, 4550, 6783, 4667, 6825, 4625, 6850, 4567, 6850, 4450,
- 6867, 4325, 6825, 4417, 6767, 4417, 6717, 4383, 6700, 4450,
- 6650, 4450, 6617, 4392, 6633, 4317, 6642, 4217, 6608, 4150,
- 6583, 4050, 6550, 3967, 6508, 4017, 6458, 4067, 6467, 3950,
- 6483, 3867, 6508, 3775, 6517, 3692, 6483, 3650, 6442, 3725,
- 6442, 3800, 6392, 3800, 6392, 3675, 6433, 3575, 6458, 3467,
- 6508, 3467, 6550, 3467, 6600, 3467, 6642, 3367, 6667, 3283,
- 6717, 3225, 6683, 3317, 6667, 3433, 6642, 3533, 6633, 3625,
- 6625, 3725, 6608, 3833, 6617, 3950, 6642, 4058, 6675, 4125,
- 6725, 4125, 6767, 4092, 6800, 4000, 6825, 3900, 6858, 3800,
- 6892, 3700, 6917, 3583, 6933, 3450, 6942, 3308, 6975, 3308,
-
-## farc132 = [
- 6975, 3308, 6992, 3208, 6975, 3125, 6983, 3000, 7017, 2875,
- 7008, 3000, 7042, 3117, 7067, 3017, 7092, 2908, 7108, 2775,
- 7050, 2683, 7092, 2658, 7058, 2558, 7117, 2567, 7100, 2483,
- 7067, 2425, 7092, 2333, 7067, 2233, 7025, 2150, 7008, 2017,
- 7008, 1892, 6958, 1808, 6942, 1700, 6908, 1700, 6900, 1758,
- 6867, 1667, 6900, 1658, 6875, 1592, 6925, 1617, 6892, 1533,
- 6867, 1442, 6842, 1500, 6825, 1367, 6783, 1292, 6817, 1400,
- 6825, 1500, 6833, 1617, 6783, 1500, 6742, 1467, 6700, 1383,
- 6658, 1333, 6617, 1300, 6575, 1258, 6525, 1217, 6492, 1133,
- 6433, 1067, 6392, 1008, 6350, 950, 6375, 892, 6333, 850,
- 6300, 800, 6292, 700, 6250, 633, 6217, 567, 6183, 492,
- 6150, 525, 6117, 483, 6075, 500, 6033, 508, 5992, 558,
- 5958, 525, 5925, 542, 5933, 617, 5900, 567, 5858, 558,
- 5833, 600, 5808, 683, 5800, 767, 5825, 850, 5858, 900,
- 5900, 975, 5900, 1025, 5933, 1058, 5908, 1108, 5850, 1133,
- 5800, 1167, 5742, 1200, 5692, 1233, 5650, 1292, 5617, 1267,
- 5575, 1300, 5542, 1300, 5542, 1367, 5542, 1425, 5575, 1417,
- 5617, 1467, 5617, 1533, 5617, 1592, 5675, 1633, 5733, 1650,
- 5775, 1667, 5825, 1667, 5858, 1683, 5892, 1758, 5917, 1833,
- 5933, 1800, 5958, 1858, 5983, 1883, 6017, 1858, 6050, 1792,
-
-## farc133 = [
- 6050, 1792, 6083, 1725, 6125, 1717, 6175, 1733, 6225, 1742,
- 6250, 1775, 6300, 1842, 6333, 1917, 6358, 1983, 6383, 2067,
- 6417, 2100, 6450, 2167, 6475, 2100, 6508, 2150, 6533, 2142,
- 6550, 2200, 6583, 2242, 6575, 2317, 6575, 2383, 6583, 2450,
- 6550, 2533, 6500, 2533, 6483, 2467, 6433, 2408, 6392, 2325,
- 6342, 2242, 6300, 2158, 6250, 2117, 6200, 2125, 6150, 2167,
- 6100, 2133, 6067, 2133, 6042, 2208, 6017, 2258, 6000, 2350,
- 6008, 2442, 6025, 2533, 6042, 2625, 6058, 2717, 6058, 2833,
- 6017, 2908, 6025, 2975, 5983, 3017, 6000, 2917, 5967, 2833,
- 5942, 2792, 5942, 2683, 5958, 2592, 5950, 2500, 5942, 2417,
- 5917, 2350, 5875, 2350, 5833, 2375, 5825, 2433, 5775, 2433,
- 5725, 2433, 5700, 2383, 5708, 2325, 5742, 2292, 5767, 2242,
- 5758, 2167, 5708, 2133, 5675, 2100, 5617, 2100, 5567, 2108,
- 5517, 2075, 5492, 2000, 5450, 1975, 5433, 1925, 5433, 1867,
- 5483, 1833, 5475, 1750, 5458, 1667, 5425, 1600, 5417, 1517,
- 5392, 1433, 5400, 1383, 5417, 1325, 5433, 1367, 5467, 1333,
- 5442, 1292, 5433, 1225, 5417, 1183, 5392, 1133, 5392, 1075,
- 5425, 1092, 5450, 1000, 5475, 1000, 5500, 942, 5550, 975,
- 5600, 1017, 5617, 1083, 5650, 1083, 5650, 1025, 5683, 1025,
- 5725, 1050, 5758, 1050, 5750, 983, 5717, 942, 5708, 867,
-
-## farc134 = [
- 5708, 867, 5683, 825, 5650, 808, 5600, 808, 5558, 817,
- 5533, 867, 5483, 867, 5450, 900, 5433, 867, 5408, 900,
- 5383, 858, 5350, 850, 5367, 800, 5367, 733, 5342, 700,
- 5342, 608, 5325, 550, 5283, 550, 5275, 592, 5250, 592,
- 5225, 550, 5242, 508, 5292, 508, 5283, 475, 5242, 458,
- 5208, 433, 5175, 400, 5142, 358, 5125, 300, 5100, 233,
- 5083, 175, 5050, 158, 5008, 150, 4992, 108, 4983, 58,
- 4967, 017, 4925, 000, 4933, -58, 4925, -108, 4967, -133,
- 4967, -192, 4917, -158, 4858, -142, 4858, -200, 4850, -267,
- 4883, -300, 4875, -367, 4858, -417, 4850, -475, 4800, -467,
- 4783, -425, 4783, -375, 4758, -317, 4750, -250, 4733, -233,
- 4700, -192, 4675, -200, 4650, -175, 4625, -125, 4583, -100,
- 4525, -108, 4467, -117, 4425, -125, 4367, -142, 4342, -167,
- 4333, -217, 4342, -275, 4350, -358, 4333, -442, 4350, -508,
- 4358, -583, 4350, -658, 4350, -725, 4375, -800, 4333, -833,
- 4325, -892, 4300, -917, 4242, -875, 4200, -883, 4167, -875,
- 4117, -858, 4075, -867, 4025, -883, 3967, -892, 3933, -925,
- 3883, -933, 3850, -908, 3850, -867, 3800, -875, 3750, -875,
- 3708, -892, 3717, -833, 3708, -783, 3725, -742, 3725, -700,
- 3700, -650, 3675, -633, 3625, -600, 3608, -550, 3650, -500,
-
-## farc135 = [
- 3650, -500, 3667, -450, 3675, -392, 3675, -333, 3675, -275,
- 3675, -217, 3717, -183, 3767, -133, 3767, -83, 3808, -067,
- 3842, -033, 3875, 025, 3908, -025, 3950, -033, 3992, 000,
- 4042, 050, 4100, 100, 4117, 150, 4133, 208, 4167, 267,
- 4192, 317, 4250, 308, 4300, 300, 4325, 358, 4350, 400,
- 4333, 458, 4325, 525, 4300, 583, 4308, 642, 4342, 683,
- 4367, 742, 4383, 800, 4417, 825, 4433, 867, 4425, 917,
- 4408, 950, 4400, 1008, 4350, 1017, 4308, 1042, 4267, 1092,
- 4233, 1100, 4233, 1150, 4192, 1200, 4150, 1242, 4125, 1292,
- 4125, 1358, 4092, 1400, 4067, 1442, 4058, 1475, 4017, 1500,
- 4000, 1567, 3967, 1575, 3925, 1600, 3883, 1608, 3858, 1583,
- 3817, 1567, 3792, 1567, 3792, 1600, 3817, 1617, 3842, 1650,
- 3883, 1650, 3900, 1700, 3942, 1700, 3967, 1650, 4017, 1667,
- 4050, 1692, 4033, 1733, 4025, 1783, 3992, 1792, 3983, 1825,
- 4017, 1842, 4058, 1792, 4083, 1742, 4108, 1692, 4133, 1633,
- 4150, 1583, 4183, 1608, 4183, 1525, 4208, 1467, 4233, 1417,
- 4258, 1392, 4300, 1383, 4342, 1358, 4367, 1308, 4392, 1267,
- 4425, 1225, 4458, 1217, 4492, 1233, 4517, 1208, 4550, 1217,
- 4550, 1258, 4575, 1308, 4567, 1358, 4542, 1342, 4508, 1350,
- 4483, 1375, 4500, 1408, 4533, 1417, 4500, 1483, 4458, 1492,
-
-## farc136 = [
- 4458, 1492, 4433, 1517, 4400, 1517, 4375, 1575, 4350, 1600,
- 4342, 1658, 4300, 1733, 4258, 1792, 4233, 1850, 4200, 1900,
- 4175, 1950, 4133, 1942, 4075, 1933, 4025, 1933, 4000, 1975,
- 3958, 2008, 3925, 2033, 3875, 2067, 3833, 2108, 3825, 2183,
- 3833, 2258, 3800, 2292, 3792, 2350, 3758, 2400, 3817, 2400,
- 3800, 2458, 3817, 2417, 3850, 2408, 3867, 2367, 3892, 2333,
- 3925, 2317, 3958, 2283, 4000, 2250, 4058, 2258, 4017, 2308,
- 4017, 2358, 4042, 2375, 4067, 2350, 4067, 2400, 4092, 2425,
- 4083, 2475, 4092, 2517, 4083, 2575, 4050, 2608, 4058, 2658,
- 4025, 2617, 4000, 2617, 4033, 2658, 4067, 2708, 4092, 2742,
- 4100, 2817, 4100, 2883, 4067, 2942, 4058, 2892, 4033, 2900,
- 4033, 2842, 4033, 2775, 4033, 2717, 4033, 2658, 4000, 2617,
- 3942, 2600, 3950, 2683, 3925, 2667, 3867, 2675, 3842, 2692,
- 3833, 2667, 3858, 2633, 3825, 2625, 3808, 2675, 3792, 2717,
- 3758, 2708, 3733, 2750, 3700, 2717, 3700, 2767, 3700, 2817,
- 3675, 2800, 3675, 2858, 3633, 2925, 3617, 2975, 3642, 3050,
- 3683, 3067, 3675, 3125, 3650, 3200, 3617, 3225, 3600, 3275,
- 3617, 3317, 3617, 3358, 3650, 3408, 3683, 3450, 3658, 3517,
- 3658, 3550, 3692, 3600, 3667, 3608, 3633, 3575, 3600, 3592,
- 3567, 3575, 3500, 3575, 3450, 3583, 3408, 3550, 3350, 3525,
-
-## farc137 = [
- 3350, 3525, 3300, 3500, 3250, 3483, 3200, 3467, 3150, 3433,
- 3117, 3400, 3108, 3325, 3100, 3267, 3125, 3233, 3092, 3217,
- 3108, 3175, 3142, 3183, 3150, 3117, 3142, 3058, 3117, 3000,
- 3092, 2950, 3083, 2900, 3108, 2842, 3108, 2783, 3125, 2733,
- 3142, 2692, 3150, 2633, 3158, 2575, 3150, 2517, 3192, 2492,
- 3192, 2433, 3208, 2375, 3217, 2317, 3258, 2308, 3275, 2250,
- 3283, 2183, 3275, 2125, 3258, 2067, 3217, 2008, 3183, 1983,
- 3150, 2000, 3108, 2008, 3067, 1992, 3042, 1958, 3025, 1917,
- 3033, 1867, 3067, 1817, 3100, 1750, 3117, 1667, 3125, 1608,
- 3150, 1558, 3175, 1533, 3225, 1533, 3242, 1475, 3267, 1417,
- 3275, 1358, 3283, 1283, 3283, 1217, 3300, 1167, 3325, 1108,
- 3367, 1092, 3358, 1050, 3375, 1008, 3417, 1000, 3442, 1033,
- 3475, 1075, 3517, 1100, 3558, 1092, 3575, 1058, 3633, 1042,
- 3650, 1075, 3692, 1100, 3667, 1033, 3717, 1008, 3725, 958,
- 3717, 908, 3692, 867, 3683, 817, 3700, 742, 3683, 700,
- 3700, 625, 3675, 583, 3667, 533, 3683, 500, 3692, 442,
- 3692, 383, 3683, 342, 3683, 292, 3667, 242, 3658, 175,
- 3650, 100, 3625, 050, 3592, 000, 3583, -050, 3575, -100,
- 3542, -125, 3517, -192, 3508, -242, 3533, -300, 3525, -342,
- 3525, -408, 3517, -450, 3550, -517, 3583, -542, 3575, -592,
-
-## farc138 = [
- 3575, -592, 3525, -617, 3483, -633, 3442, -658, 3400, -683,
- 3367, -742, 3350, -800, 3325, -850, 3283, -883, 3250, -925,
- 3217, -925, 3175, -950, 3150, -983, 3067, -983, 3033, -958,
- 2975, -983, 2933, -1017, 2892, -1058, 2867, -1117, 2825, -1150,
- 2800, -1217, 2792, -1292, 2750, -1325, 2700, -1342, 2667, -1367,
- 2642, -1417, 2617, -1442, 2567, -1458, 2525, -1475, 2467, -1500,
- 2425, -1542, 2383, -1575, 2342, -1600, 2275, -1625, 2233, -1650,
- 2208, -1683, 2158, -1692, 2108, -1700, 2075, -1658, 2033, -1617,
- 1983, -1617, 1950, -1650, 1900, -1617, 1850, -1600, 1800, -1600,
- 1750, -1608, 1700, -1625, 1650, -1642, 1583, -1642, 1542, -1675,
- 1500, -1700, 1475, -1742, 1450, -1700, 1400, -1675, 1342, -1667,
- 1292, -1675, 1233, -1675, 1208, -1633, 1183, -1592, 1192, -1550,
- 1125, -1542, 1108, -1500, 1067, -1467, 1025, -1442, 1000, -1400,
- 958, -1358, 917, -1325, 867, -1317, 825, -1308, 783, -1292,
- 733, -1242, 708, -1192, 683, -1142, 642, -1100, 608, -1033,
- 558, -983, 525, -942, 492, -892, 450, -833, 433, -783,
- 425, -742, 458, -692, 467, -633, 500, -592, 508, -533,
- 517, -475, 525, -433, 525, -383, 508, -308, 500, -258,
- 475, -200, 500, -158, 517, -108, 525, -067, 550, -025,
- 583, 033, 583, 100, 617, 125, 633, 183, 642, 233,
-
-## farc139 = [
- 642, 233, 642, 283, 650, 342, 650, 400, 633, 450,
- 592, 500, 525, 525, 458, 542, 425, 600, 425, 650,
- 433, 700, 442, 750, 442, 800, 450, 842, 450, 883,
- 400, 892, 392, 933, 350, 958, 308, 992, 250, 975,
- 192, 967, 150, 950, 108, 925, 92, 958, 050, 933,
- 000, 933,
-]
-
-# Internal lakes and stuff
-farc140 = [
- 1408, 1308, 1375, 1333, 1333, 1350, 1308, 1383, 1275, 1392,
- 1250, 1417, 1275, 1458, 1292, 1508, 1342, 1525, 1342, 1475,
- 1350, 1417, 1383, 1417, 1417, 1392, 1425, 1342, 1408, 1308,
-]
-farc141 = [
- -208, 3167, -275, 3183, -233, 3225, -250, 3275, -250, 3342,
- -217, 3383, -208, 3325, -175, 3358, -133, 3392, -075, 3408,
- -042, 3425, 8, 3400, 025, 3350, 025, 3300, 017, 3242,
- -017, 3183, -075, 3167, -117, 3183, -158, 3175, -208, 3167,
- ]
-farc142 = [
- -600, 2925, -650, 2950, -700, 2983, -742, 3033, -808, 3058,
- -858, 3050, -875, 3108, -825, 3100, -775, 3075, -717, 3050,
- -683, 3058, -650, 3017, -617, 2975, -575, 3000, -517, 2983,
- -458, 2967, -400, 2942, -333, 2933, -400, 2908, -450, 2925,
- -500, 2908, -558, 2933, -600, 2925,
-]
-farc143 = [
- -1217, 3408, -1258, 3417, -1300, 3433, -1342, 3433, -1375, 3467,
- -1417, 3475, -1408, 3508, -1450, 3533, -1383, 3525, -1342, 3492,
- -1283, 3483, -1225, 3483, -1167, 3500, -1108, 3467, -1058, 3458,
- -992, 3450, -958, 3408, -983, 3400, -1083, 3425, -1100, 3425,
- -1175, 3442, -1217, 3408,
-]
-farc144 = [
- 4250, 2750, 4208, 2792, 4167, 2808, 4133, 2858, 4117, 2917,
- 4108, 2983, 4117, 3050, 4108, 3108, 4133, 3158, 4158, 3208,
- 4183, 3258, 4200, 3325, 4192, 3383, 4192, 3450, 4200, 3500,
- 4167, 3533, 4167, 3600, 4125, 3633, 4125, 3675, 4100, 3725,
- 4108, 3767, 4092, 3817, 4100, 3875, 4108, 3933, 4100, 3992,
- 4108, 4050, 4142, 4108, 4167, 4158, 4200, 4167, 4233, 4142,
- 4275, 4125, 4292, 4100, 4317, 4033, 4342, 3983, 4367, 3950,
- 4408, 3900, 4433, 3850, 4442, 3800, 4458, 3767, 4475, 3725,
- 4508, 3700, 4508, 3667, 4500, 3608, 4508, 3558, 4483, 3508,
- 4475, 3458, 4450, 3425, 4433, 3375, 4458, 3342, 4500, 3358,
- 4517, 3325, 4533, 3267, 4575, 3308, 4592, 3375, 4617, 3317,
- 4600, 3258, 4625, 3183, 4658, 3208, 4658, 3142, 4658, 3083,
- 4617, 3058, 4583, 3017, 4567, 2958, 4517, 2967, 4483, 2950,
- 4467, 2900, 4433, 2867, 4392, 2867, 4342, 2858, 4333, 2800,
- 4283, 2792, 4250, 2750,
-]
-farc145 = [
- 4592, 3442, 4575, 3475, 4542, 3500, 4525, 3550, 4542, 3608,
- 4542, 3667, 4533, 3733, 4583, 3775, 4625, 3825, 4642, 3792,
- 4667, 3767, 4667, 3817, 4700, 3875, 4708, 3933, 4725, 3900,
- 4717, 3842, 4708, 3758, 4675, 3683, 4667, 3608, 4642, 3542,
- 4608, 3500, 4592, 3442,
-]
-farc146 = [
- 4475, 4667, 4442, 4667, 4425, 4708, 4375, 4742, 4342, 4742,
- 4300, 4742, 4250, 4783, 4208, 4825, 4183, 4867, 4142, 4900,
- 4100, 4917, 4058, 4967, 4042, 5025, 4033, 4975, 4000, 4942,
- 3950, 4925, 3917, 4917, 3917, 4875, 3858, 4883, 3808, 4892,
- 3758, 4900, 3742, 4950, 3733, 5017, 3708, 5033, 3675, 5100,
- 3658, 5158, 3675, 5242, 3692, 5317, 3683, 5392, 3717, 5400,
- 3783, 5375, 3850, 5375, 3908, 5400, 3917, 5358, 3958, 5342,
- 4000, 5350, 4000, 5275, 4033, 5267, 4083, 5292, 4067, 5350,
- 4067, 5417, 4100, 5475, 4133, 5433, 4167, 5392, 4208, 5367,
- 4200, 5300, 4167, 5267, 4125, 5275, 4175, 5242, 4217, 5233,
- 4258, 5267, 4283, 5250, 4283, 5183, 4317, 5133, 4367, 5117,
- 4417, 5075, 4433, 5017, 4458, 5025, 4458, 5092, 4450, 5142,
- 4500, 5117, 4533, 5175, 4542, 5250, 4517, 5308, 4525, 5367,
- 4525, 5425, 4550, 5392, 4592, 5383, 4642, 5367, 4683, 5317,
- 4717, 5258, 4717, 5208, 4717, 5142, 4725, 5092, 4683, 5017,
- 4675, 4950, 4658, 4892, 4633, 4900, 4625, 4850, 4592, 4825,
- 4608, 4758, 4567, 4733, 4517, 4700, 4475, 4667,
- ]
-farc147 = [
- 4500, 5817, 4450, 5817, 4425, 5833, 4367, 5833, 4367, 5900,
- 4367, 5967, 4350, 5983, 4367, 6050, 4417, 6108, 4467, 6108,
- 4475, 6150, 4500, 6183, 4533, 6150, 4575, 6100, 4600, 6100,
- 4642, 6133, 4675, 6167, 4650, 6100, 4667, 6075, 4650, 6008,
- 4617, 6008, 4633, 5975, 4592, 5950, 4592, 5900, 4583, 5867,
- 4542, 5858, 4500, 5817,
-]
-farc148 = [
- 4558, 7342, 4525, 7383, 4492, 7408, 4567, 7425, 4600, 7417,
- 4617, 7475, 4642, 7517, 4658, 7600, 4642, 7683, 4658, 7733,
- 4633, 7800, 4642, 7875, 4675, 7925, 4675, 7875, 4658, 7833,
- 4667, 7783, 4658, 7733, 4667, 7683, 4675, 7608, 4667, 7525,
- 4675, 7475, 4642, 7417, 4617, 7367, 4558, 7342,
- ]
-farc149 = [
- 5158, 10358, 5133, 10450, 5150, 10525, 5167, 10592, 5217, 10625,
- 5250, 10700, 5267, 10783, 5300, 10833, 5350, 10900, 5400, 10942,
- 5450, 10950, 5508, 10967, 5558, 10992, 5575, 10950, 5550, 10925,
- 5517, 10917, 5475, 10883, 5433, 10850, 5392, 10817, 5350, 10758,
- 5308, 10700, 5275, 10658, 5250, 10608, 5217, 10567, 5183, 10525,
- 5175, 10450, 5158, 10358,
-]
-farc150 = [
- 6108, 3000, 6075, 3058, 6033, 3092, 5992, 3108, 5992, 3150,
- 6017, 3175, 6017, 3250, 6050, 3283, 6083, 3283, 6117, 3250,
- 6133, 3183, 6158, 3142, 6158, 3075, 6133, 3017, 6108, 3000,
- ]
-farc151 = [
- 6175, 3450, 6150, 3483, 6133, 3550, 6092, 3550, 6092, 3600,
- 6108, 3642, 6142, 3642, 6167, 3600, 6200, 3575, 6242, 3583,
- 6267, 3525, 6283, 3450, 6258, 3483, 6250, 3533, 6217, 3533,
- 6217, 3467, 6175, 3450,
-]
-farc152 = [
- -2192, 4325, -2233, 4325, -2283, 4333, -2325, 4358, -2392, 4367,
- -2450, 4375, -2500, 4417, -2533, 4458, -2558, 4500, -2550, 4550,
- -2525, 4592, -2508, 4642, -2517, 4683, -2467, 4717, -2425, 4733,
- -2375, 4750, -2342, 4767, -2300, 4775, -2258, 4783, -2217, 4792,
- -2175, 4808, -2133, 4825, -2092, 4842, -2050, 4850, -2008, 4867,
- -1958, 4883, -1908, 4900, -1850, 4925, -1800, 4933, -1742, 4942,
- -1700, 4942, -1675, 4967, -1633, 4975, -1550, 4967, -1592, 5008,
- -1542, 5042, -1492, 5033, -1417, 5017, -1358, 4992, -1300, 4983,
- -1250, 4958, -1200, 4925, -1242, 4883, -1292, 4883, -1333, 4875,
- -1350, 4833, -1358, 4783, -1408, 4792, -1433, 4758, -1475, 4767,
- -1475, 4725, -1525, 4683, -1550, 4642, -1575, 4592, -1592, 4542,
- -1617, 4492, -1617, 4450, -1692, 4425, -1742, 4392, -1800, 4400,
- -1858, 4425, -1900, 4425, -1958, 4450, -2000, 4442, -2050, 4408,
- -2092, 4392, -2133, 4358, -2192, 4325,
-]
-farc153 = [
- -2100, 5517, -2133, 5533, -2133, 5575, -2117, 5583, -2092, 5558,
- -2100, 5517,
-]
-farc154 = [
- -2050, 5733, -2050, 5775, -2017, 5775, -2000, 5750, -2050, 5733,
-]
-farc155 = [
- 1242, 5333, 1225, 5367, 1225, 5408, 1250, 5458, 1258, 5417,
- 1267, 5367, 1242, 5333,
-]
-farc156 = [
- -4883, 6883, -4925, 6917, -4967, 6892, -4950, 6950, -4967, 6983,
- -4942, 7000, -4942, 7042, -4908, 7058, -4917, 7000, -4925, 6967,
- -4900, 6933, -4867, 6900, -4883, 6883,
-]
-farc157 = [
- 1333, 9292, 1258, 9283, 1183, 9267,
-]
-farc158 = [
- 275, 9592, 242, 9650,
-]
-farc159 = [
- 133, 9725, 100, 9758, 58, 9800, 100, 9800, 150, 9750,
- 133, 9725,
-]
-farc160 = [
- -100, 9875, -150, 9883, -175, 9908, -167, 9942, -92, 9900,
- -100, 9875,
-]
-farc161 = [
- 808, 7975, 750, 7975, 708, 7983, 642, 8000, 600, 8025,
- 600, 8067, 617, 8125, 650, 8167, 700, 8183, 758, 8183,
- 800, 8150, 850, 8125, 900, 8092, 950, 8058, 983, 8000,
- 942, 8017, 900, 7992, 850, 7983, 808, 7975,
- ]
-farc162 = [
- 1933, 10867, 1892, 10867, 1850, 10875, 1825, 10925, 1825, 10967,
- 1850, 11017, 1883, 11050, 1933, 11067, 1967, 11100, 2000, 11100,
- 2000, 11050, 2000, 11000, 1992, 10958, 1958, 10908, 1933, 10867,
- ]
-farc163 = [
- 2367, 12017, 2317, 12017, 2258, 12033, 2242, 12067, 2200, 12083,
- 2258, 12100, 2300, 12133, 2350, 12150, 2408, 12167, 2458, 12192,
- 2508, 12192, 2525, 12158, 2500, 12108, 2458, 12075, 2417, 12050,
- 2367, 12017,
-]
-farc164 = [
- 3325, 12950, 3275, 12975, 3275, 13017, 3308, 13025, 3275, 13050,
- 3233, 13050, 3208, 13017, 3167, 13017, 3125, 13017, 3108, 13075,
- 3142, 13133, 3192, 13142, 3242, 13167, 3283, 13192, 3325, 13167,
- 3367, 13158, 3367, 13108, 3392, 13092, 3383, 13042, 3350, 13000,
- 3325, 12950,
-]
-farc165 = [
- 3342, 13225, 3292, 13242, 3275, 13292, 3308, 13308, 3333, 13325,
- 3350, 13375, 3325, 13408, 3358, 13433, 3383, 13467, 3417, 13458,
- 3433, 13408, 3425, 13358, 3392, 13333, 3400, 13283, 3367, 13267,
- 3342, 13225,
-]
-# Japan
-farc166 = [
- 3433, 13092, 3392, 13092, 3400, 13150, 3392, 13200, 3425, 13233,
- 3433, 13292, 3450, 13350, 3458, 13392, 3483, 13450, 3475, 13492,
- 3475, 13550, 3433, 13517, 3392, 13517, 3350, 13542, 3342, 13575,
- 3392, 13617, 3433, 13675, 3467, 13650, 3500, 13675, 3458, 13725,
- 3458, 13808, 3508, 13867, 3458, 13883, 3525, 13908, 3525, 13958,
- 3550, 13983, 3492, 13975, 3517, 14033, 3550, 14042, 3575, 14075,
- 3617, 14058, 3675, 14067, 3700, 14092, 3758, 14100, 3808, 14092,
- 3833, 14108, 3833, 14150, 3875, 14150, 3908, 14183, 3967, 14192,
- 4017, 14175, 4058, 14142, 4100, 14133, 4133, 14142, 4150, 14083,
- 4117, 14075, 4117, 14108, 4092, 14108, 4092, 14067, 4117, 14033,
- 4067, 14000, 4033, 14000, 3992, 14000, 3942, 14000, 3900, 13983,
- 3858, 13950, 3808, 13933, 3783, 13883, 3742, 13858, 3717, 13817,
- 3700, 13758, 3675, 13700, 3708, 13700, 3750, 13717, 3725, 13675,
- 3683, 13667, 3642, 13633, 3608, 13600, 3567, 13600, 3550, 13567,
- 3575, 13525, 3567, 13467, 3558, 13400, 3550, 13325, 3550, 13275,
- 3508, 13233, 3475, 13183, 3450, 13142, 3433, 13092,
- ]
-farc167 = [
- 4258, 13983, 4225, 13975, 4200, 14000, 4142, 14000, 4167, 14050,
- 4183, 14108, 4208, 14067, 4225, 14025, 4250, 14033, 4250, 14067,
- 4233, 14092, 4250, 14133, 4258, 14183, 4225, 14250, 4200, 14325,
- 4233, 14333, 4267, 14367, 4300, 14417, 4292, 14475, 4317, 14533,
- 4342, 14583, 4333, 14525, 4358, 14525, 4375, 14500, 4425, 14533,
- 4392, 14467, 4400, 14417, 4417, 14358, 4450, 14300, 4475, 14267,
- 4517, 14233, 4550, 14192, 4525, 14150, 4475, 14175, 4433, 14167,
- 4400, 14158, 4375, 14125, 4342, 14133, 4317, 14125, 4317, 14075,
- 4325, 14033, 4292, 14042, 4258, 13983,
-]
-farc168 = [
- 2608, 12775, 2642, 12783, 2658, 12817, 2683, 12825,
- ]
-farc169 = [
- 2817, 12933, 2842, 12967,
-]
-farc170 = [
- 4383, 14550, 4408, 14583, 4433, 14617,
-]
-farc171 = [
- 4442, 14692, 4475, 14750, 4508, 14817, 4550, 14883, 4525, 14833,
- 4533, 14792, 4500, 14742, 4442, 14692,
-]
-farc172 = [
- 4567, 14950, 4575, 14983, 4625, 15050, 4608, 15000, 4567, 14950,
- ]
-farc173 = [
- 4683, 15175, 4717, 15217,
-]
-farc174 = [
- 5027, 15517, 5000, 15517, 5020, 15583, 5050, 15608, 5075, 15608,
- 5042, 15567, 5027, 15517,
-]
-farc175 = [
- 5483, 13725, 5458, 13758, 5500, 13808, 5517, 13750, 5483, 13725,
- ]
-farc176 = [
- 5850, 16333, 5892, 16442, 5917, 16425, 5900, 16367, 5850, 16333,
-]
-farc177 = [
- 5333, 14175, 5275, 14183, 5225, 14167, 5175, 14167, 5142, 14200,
- 5100, 14208, 5050, 14200, 5000, 14208, 4950, 14208, 4908, 14200,
- 4875, 14183, 4850, 14200, 4800, 14217, 4758, 14200, 4700, 14200,
- 4658, 14175, 4592, 14200, 4642, 14225, 4667, 14258, 4658, 14300,
- 4625, 14342, 4675, 14342, 4692, 14308, 4725, 14300, 4750, 14267,
- 4783, 14250, 4833, 14258, 4875, 14283, 4908, 14292, 4933, 14325,
- 4933, 14375, 4908, 14433, 4950, 14417, 5000, 14392, 5050, 14367,
- 5100, 14350, 5150, 14333, 5200, 14308, 5250, 14317, 5300, 14317,
- 5350, 14300, 5400, 14292, 5433, 14267, 5425, 14225, 5383, 14250,
- 5358, 14225, 5333, 14175, ]
-
-farc178 = [
- 7153, 18000, 7112, 17867, 7083, 17883, 7100, 18000,
- ]
-farc179 = [
- 7100,-18000, 7090,-17917, 7117,-17742, 7153,-17825, 7153,-18000,
- ]
-farc180 = [
-7350, 14058, 7325, 14158, 7317, 14350, 7350, 14350, 7392, 14225,
-7383, 14100, 7350, 14058,
-]
-farc181 = [
-7425, 14017, 7392, 14033, 7400, 14100, 7425, 14100, 7425, 14017,
-]
-farc182 = [
-7558, 14650, 7508, 14725, 7475, 14925, 7475, 15050, 7517, 15100,
-7533, 14925, 7542, 14733, 7558, 14650,
-]
-farc183 = [
-7525, 13717, 7475, 13808, 7467, 13925, 7483, 14050, 7500, 14200,
-7483, 14283, 7508, 14400, 7542, 14500, 7567, 14500, 7583, 14400,
-7583, 14325, 7617, 14200, 7575, 14100, 7617, 13900, 7592, 13750,
-7525, 13717,
-]
-farc184 = [
-7792, 9933, 7817, 10100, 7817, 10317, 7833, 10500, 7883, 10500,
-7917, 10392, 7942, 10233, 7925, 10125, 7883, 10058, 7833, 9983,
-7792, 9933,
-]
-farc185 = [
-8008, 9117, 7967, 9183, 7950, 9383, 7908, 9467, 7892, 9675,
-7875, 9833, 7883, 9983, 7925, 9950, 7967, 10017, 8000, 9925,
-8017, 9758, 8050, 9700, 8075, 9750, 8100, 9642, 8125, 9558,
-8092, 9317, 8050, 9267, 8008, 9117,
-]
-farc186 = [
-7158, 5167, 7117, 5283, 7083, 5383, 7067, 5533, 7058, 5692,
-7075, 5767, 7108, 5633, 7150, 5575, 7200, 5550, 7250, 5558,
-7292, 5617, 7333, 5700, 7375, 5783, 7417, 5867, 7458, 5983,
-7500, 6075, 7533, 6225, 7567, 6383, 7583, 6550, 7608, 6725,
-7633, 6883, 7683, 6908, 7700, 6775, 7675, 6600, 7642, 6517,
-7625, 6317, 7625, 6117, 7592, 5925, 7558, 5817, 7533, 5750,
-7508, 5575, 7475, 5575, 7417, 5492, 7375, 5383, 7342, 5433,
-7317, 5325, 7267, 5250, 7233, 5275, 7208, 5167, 7158, 5167,
-]
-farc187 = [
-6875, 4875, 6892, 5000, 6925, 5033, 6958, 4917, 6925, 4850,
-6875, 4875,
-]
-farc188 = [
-8012, 5600, 8012, 5775, 8042, 5925, 8033, 6150, 8047, 6233,
-8092, 6233, 8083, 6383, 8100, 6525, 8142, 6458, 8117, 6283,
-8092, 6233, 8078, 5967, 8042, 5925, 8045, 5733, 8012, 5600,
-]
-farc189 = [
-8080, 5425, 8063, 5633, 8080, 5850, 8100, 5767, 8133, 5883,
-8175, 5850, 8142, 5650, 8103, 5650, 8103, 5483, 8080, 5425,
-]
-farc190 = [
-8025, 5317, 8028, 5500, 8050, 5400, 8025, 5317,
-]
-farc191 = [
-8055, 4450, 8042, 4567, 8042, 4700, 8017, 4700, 8005, 4842,
-8012, 5000, 8040, 5000, 8067, 5117, 8078, 5033, 8055, 4800,
-8075, 4800, 8090, 4700, 8055, 4450,
-]
-farc192 = [
-7975, 1100, 7933, 1100, 7870, 1167, 7822, 1317, 7822, 1508,
-7795, 1367, 7750, 1400, 7702, 1517, 7650, 1700, 7700, 1733,
-7750, 1808, 7803, 1892, 7842, 1900, 7863, 2025, 7818, 2067,
-7792, 2167, 7742, 2083, 7725, 2267, 7775, 2483, 7808, 2317,
-7842, 2217, 7883, 2150, 7917, 1900, 7970, 1875, 7933, 2092,
-7917, 2383, 7942, 2567, 7987, 2700, 8017, 2700, 8025, 2483,
-8042, 2300, 8017, 2100, 8050, 2000, 8025, 1800, 7992, 1800,
-8003, 1633, 7967, 1550, 7983, 1383, 7975, 1100,
-]
-farc193 = [
-6208, -742, 6200, -692, 6237, -633, 6230, -725, 6208, -742,
-]
-farc194 = [
-6023, -155, 6042, -125, 6000, -125,
-]
-farc195 = [
-5917, -325, 5893, -275,
-]
-farc196 = [
-5758, -725, 5800, -642, 5850, -617, 5817, -700, 5783, -700,
-5758, -725,
-]
-farc197 = [
-5547, 975, 5505, 1008, 5505, 1070, 5537, 1075, 5558, 1028,
-5547, 975,
-]
-farc198 = [
-5570, 1108, 5520, 1125, 5513, 1183, 5528, 1242, 5547, 1217,
-5570, 1258, 5610, 1242, 5590, 1175, 5570, 1108,
-]
-farc199 = [
-5483, 1100, 5458, 1133, 5467, 1183, 5483, 1208, 5492, 1158,
-5483, 1100,
-]
-farc200 = [
-5750, 1808, 5708, 1825, 5728, 1875, 5770, 1875, 5793, 1917,
-5778, 1842, 5750, 1808,
-]
-farc201 = [
-5833, 2183, 5810, 2217, 5830, 2267, 5850, 2317, 5862, 2233,
-5833, 2183,
-]
-farc202 = [
-5888, 2233, 5872, 2242, 5883, 2300, 5908, 2250, 5888, 2233,
-]
-farc203 = [
-5008, -558, 5000, -508, 5033, -450, 5017, -367, 5058, -350,
-5067, -283, 5050, -208, 5075, -142, 5067, -067, 5067, 8,
-5083, 92, 5125, 142, 5133, 58, 5175, 100, 5200, 158,
-5242, 183, 5275, 158, 5292, 100, 5292, 58, 5267, 025,
-5283, 000, 5308, 033, 5342, 017, 5367, -8, 5400, -025,
-5442, -050, 5458, -117, 5500, -150, 5550, -167, 5583, -200,
-5600, -267, 5600, -333, 5625, -283, 5658, -242, 5700, -208,
-5733, -183, 5767, -192, 5767, -275, 5767, -342, 5758, -417,
-5800, -383, 5833, -300, 5858, -317, 5850, -408, 5850, -500,
-5808, -533, 5775, -575, 5742, -583, 5758, -633, 5742, -667,
-5717, -625, 5717, -558, 5667, -600, 5633, -600, 5650, -542,
-5608, -550, 5575, -617, 5575, -558, 5542, -558, 5583, -508,
-5550, -467, 5492, -508, 5458, -475, 5475, -400, 5492, -325,
-5450, -358, 5417, -317, 5417, -267, 5375, -300, 5333, -300,
-5325, -358, 5333, -450, 5308, -433, 5275, -467, 5275, -408,
-5225, -408, 5208, -458, 5183, -517, 5158, -500, 5167, -433,
-5158, -383, 5133, -333, 5158, -267, 5117, -300, 5117, -350,
-5117, -408, 5075, -450, 5042, -500, 5008, -558,
-]
-farc204 = [
-5217, -1033, 5175, -1008, 5150, -958, 5158, -875, 5175, -800,
-5208, -725, 5217, -633, 5258, -617, 5300, -600, 5350, -608,
-5392, -625, 5425, -558, 5475, -575, 5508, -608, 5517, -675,
-5525, -750, 5508, -825, 5467, -867, 5450, -817, 5425, -850,
-5425, -908, 5425, -975, 5392, -1000, 5375, -950, 5350, -1000,
-5317, -950, 5317, -900, 5267, -950, 5217, -975, 5217, -1033,
-]
-farc205 = [
-4250, 867, 4208, 858, 4175, 867, 4133, 917, 4183, 933,
-4217, 950, 4250, 942, 4300, 942, 4267, 917, 4250, 867,
-]
-farc206 = [
-4092, 817, 4058, 817, 4017, 842, 3967, 842, 3917, 833,
-3883, 875, 3917, 908, 3917, 950, 3958, 967, 4000, 975,
-4042, 975, 4083, 967, 4125, 925, 4092, 875, 4083, 842,
-4092, 817,
-]
-farc207 = [
-3792, 1233, 3750, 1267, 3750, 1300, 3717, 1367, 3708, 1417,
-3675, 1450, 3667, 1517, 3700, 1533, 3733, 1517, 3783, 1533,
-3825, 1567, 3808, 1500, 3800, 1425, 3800, 1367, 3817, 1325,
-3817, 1275, 3792, 1233,
-]
-farc208 = [
-3775, 2108, 3742, 2158, 3700, 2150, 3675, 2167, 3675, 2208,
-3642, 2233, 3675, 2267, 3642, 2308, 3700, 2283, 3742, 2267,
-3733, 2317, 3783, 2283, 3808, 2233, 3825, 2183, 3808, 2133,
-3775, 2108,
-]
-farc209 = [
-3517, 2350, 3517, 2400, 3508, 2450, 3490, 2483, 3493, 2550,
-3497, 2617, 3525, 2625, 3508, 2575, 3533, 2575, 3530, 2517,
-3542, 2475, 3533, 2425, 3550, 2417, 3558, 2358, 3517, 2350,
-]
-farc210 = [
-3500, 3225, 3467, 3242, 3458, 3300, 3470, 3350, 3492, 3367,
-3492, 3408, 3517, 3392, 3558, 3450, 3542, 3392, 3533, 3342,
-3525, 3300, 3508, 3275, 3500, 3225,
-]
-farc211 = [
-3958, 225, 3950, 273, 3927, 308, 3967, 342, 3992, 292,
-3958, 225,
-]
-farc212 = [
-3617, 2767, 3588, 2775, 3608, 2808, 3645, 2825, 3617, 2767,
-]
-farc213 = [
-3922, 2600, 3930, 2625, 3905, 2625,
-]
-farc214 = [
-3850, 2600, 3825, 2600,
-]
-farc215 = [
-3857, -2867, 3840, -2817,
-]
-farc216 = [
-3780, -2583, 3780, -2517,
-]
-farc217 = [
-2833, -1683, 2800, -1658, 2817, -1633, 2858, -1617, 2838, -1650,
-2833, -1683,
-]
-farc218 = [
-2800, -1580, 2775, -1567, 2783, -1533, 2808, -1537, 2817, -1567,
-2800, -1580,
-]
-farc219 = [
-2808, -1425, 2825, -1383, 2883, -1383, 2892, -1350, 2917, -1342,
-2908, -1367, 2883, -1383, 2833, -1425, 2808, -1425,
-]
-farc220 = [
-333, 850, 325, 875, 358, 892, 375, 867, 333, 850,
-]
-
-# Australia
-farc221 = [
--3417, 11517, -3433, 11567, -3483, 11608, -3500, 11667, -3500, 11717,
--3500, 11775, -3500, 11833, -3475, 11858, -3442, 11900, -3442, 11942,
--3400, 11975, -3392, 12008, -3383, 12075, -3383, 12133, -3383, 12192,
--3383, 12258, -3383, 12308, -3383, 12358, -3350, 12400, -3300, 12408,
--3283, 12475, -3267, 12525, -3233, 12583, -3217, 12625, -3225, 12692,
--3217, 12750, -3208, 12800, -3183, 12858, -3167, 12908, -3158, 12967,
--3158, 13033, -3158, 13083, -3158, 13133, -3175, 13183, -3200, 13225,
--3200, 13283, -3217, 13342, -3233, 13392, -3258, 13433, -3300, 13417,
--3325, 13483, -3375, 13500, -3417, 13525, -3458, 13542, -3500, 13567,
--3458, 13592, -3425, 13633, -3392, 13675, -3367, 13725, -3317, 13750,
--3283, 13783, -3358, 13792, -3400, 13758, -3450, 13750, -3483, 13742,
--3500, 13700, -3525, 13692, -3517, 13733, -3517, 13775, -3475, 13792,
--3425, 13808, -3467, 13842, -3500, 13858, -3542, 13842, -3567, 13817,
--3558, 13883, -3592, 13933, -3633, 13967, -3675, 13992, -3700, 13975,
--3733, 13992, -3767, 14025, -3800, 14067, -3808, 14117, -3842, 14142,
--3825, 14175, -3833, 14225, -3842, 14267, -3867, 14308, -3883, 14350,
--3850, 14400, -3825, 14442, -3783, 14483, -3842, 14500, -3825, 14550,
--3867, 14558, -3892, 14600, -3917, 14642, -3867, 14683, -3842, 14725,
--3808, 14783, -3792, 14817, -3783, 14875, -3783, 14942, -3758, 14992,
--3717, 15000, -3675, 15000, -3625, 15017, -3575, 15025, -3525, 15058,
-
-## farc222 = [
--3525, 15058, -3492, 15083, -3433, 15108, -3383, 15133, -3342, 15150,
--3300, 15183, -3275, 15225, -3233, 15250, -3192, 15275, -3150, 15292,
--3100, 15308, -3058, 15308, -3000, 15333, -2950, 15342, -2900, 15350,
--2867, 15367, -2817, 15350, -2758, 15333, -2708, 15317, -2650, 15308,
--2608, 15308, -2550, 15283, -2508, 15258, -2458, 15217, -2408, 15183,
--2392, 15133, -2358, 15100, -2317, 15083, -2267, 15083, -2242, 15042,
--2208, 15000, -2242, 14975, -2192, 14950, -2142, 14933, -2108, 14917,
--2083, 14883, -2042, 14883, -2017, 14833, -1983, 14783, -1942, 14750,
--1933, 14700, -1900, 14642, -1867, 14633, -1833, 14608, -1783, 14617,
--1733, 14608, -1700, 14583, -1658, 14550, -1600, 14550, -1550, 14533,
--1500, 14533, -1467, 14492, -1433, 14458, -1450, 14408, -1433, 14375,
--1375, 14358, -1325, 14358, -1267, 14333, -1217, 14308, -1167, 14292,
--1108, 14283, -1083, 14242, -1125, 14208, -1183, 14208, -1217, 14175,
--1267, 14175, -1300, 14175, -1358, 14167, -1408, 14158, -1458, 14158,
--1508, 14167, -1558, 14158, -1608, 14150, -1658, 14125, -1700, 14100,
--1750, 14100, -1775, 14050, -1783, 14000, -1742, 13942, -1700, 13917,
--1683, 13867, -1658, 13808, -1633, 13775, -1600, 13733, -1600, 13658,
--1550, 13642, -1533, 13600, -1500, 13558, -1458, 13575, -1425, 13600,
--1383, 13600, -1333, 13600, -1333, 13658, -1283, 13667, -1242, 13700,
--1208, 13650, -1258, 13608, -1217, 13583, -1233, 13525, -1217, 13467,
-
-## farc223 = [
--1217, 13467, -1200, 13408, -1192, 13350, -1158, 13300, -1142, 13233,
--1183, 13267, -1233, 13242, -1233, 13175, -1233, 13108, -1275, 13050,
--1317, 13025, -1358, 13042, -1367, 12992, -1408, 12975, -1450, 12933,
--1483, 12983, -1525, 12967, -1492, 12908, -1492, 12867, -1525, 12817,
--1475, 12817, -1442, 12783, -1400, 12742, -1392, 12683, -1425, 12658,
--1433, 12608, -1467, 12592, -1467, 12525, -1508, 12517, -1550, 12467,
--1600, 12458, -1642, 12433, -1617, 12375, -1667, 12358, -1700, 12392,
--1750, 12350, -1708, 12325, -1650, 12300, -1700, 12258, -1742, 12217,
--1783, 12225, -1817, 12233, -1858, 12192, -1908, 12167, -1942, 12133,
--1975, 12092, -1983, 12033, -2000, 11975, -2000, 11917, -2033, 11875,
--2033, 11825, -2067, 11775, -2067, 11725, -2067, 11675, -2083, 11625,
--2108, 11583, -2150, 11550, -2167, 11508, -2192, 11458, -2233, 11433,
--2183, 11408, -2225, 11383, -2267, 11367, -2308, 11383, -2350, 11383,
--2392, 11342, -2442, 11350, -2500, 11367, -2542, 11392, -2583, 11417,
--2642, 11417, -2608, 11375, -2567, 11350, -2658, 11383, -2617, 11333,
--2667, 11350, -2700, 11392, -2767, 11417, -2808, 11417, -2858, 11458,
--2908, 11492, -2950, 11500, -3000, 11500, -3050, 11517, -3100, 11542,
--3142, 11558, -3175, 11583, -3233, 11583, -3292, 11575, -3325, 11583,
--3350, 11558, -3358, 11517, -3417, 11517,
-]
-
-# Islands around Aussies
-farc224 = [
--1183, 13008, -1183, 13067, -1200, 13100, -1158, 13150, -1133, 13133,
--1150, 13075, -1133, 13033, -1183, 13008,
-]
-farc225 = [
--3592, 13658, -3617, 13683, -3617, 13758, -3592, 13808, -3567, 13742,
--3575, 13683, -3592, 13658, ]
-
-farc226 = [
--4067, 14483, -4117, 14483, -4175, 14500, -4217, 14525, -4250, 14533,
--4292, 14550, -4325, 14575, -4350, 14625, -4358, 14683, -4317, 14717,
--4283, 14750, -4308, 14792, -4258, 14800, -4217, 14817, -4200, 14833,
--4150, 14833, -4100, 14833, -4083, 14800, -4100, 14733, -4117, 14675,
--4117, 14617, -4083, 14550, -4067, 14483, ]
-
-# New Zealand, etc....
-farc227 = [
--3933, 17375, -3967, 17425, -3983, 17467, -4000, 17508, -4033, 17525,
--4092, 17508, -4133, 17483, -4158, 17525, -4142, 17583, -4100, 17617,
--4067, 17642, -4025, 17675, -3975, 17700, -3950, 17692, -3925, 17708,
--3908, 17750, -3908, 17792, -3875, 17800, -3858, 17833, -3817, 17833,
--3767, 17850, -3750, 17808, -3775, 17775, -3800, 17725, -3783, 17667,
--3767, 17608, -3725, 17592, -3675, 17583, -3658, 17542, -3725, 17550,
--3700, 17525, -3700, 17492, -3642, 17483, -3608, 17458, -3575, 17458,
--3542, 17433, -3508, 17400, -3500, 17333, -3450, 17283, -3492, 17308,
--3533, 17317, -3567, 17350, -3608, 17383, -3650, 17417, -3692, 17442,
--3700, 17492, -3725, 17467, -3758, 17483, -3800, 17492, -3842, 17467,
--3892, 17458, -3908, 17408, -3933, 17375,
-]
-farc228 = [
--4592, 16650, -4617, 16675, -4625, 16725, -4617, 16758, -4642, 16783,
--4650, 16833, -4667, 16900, -4650, 16967, -4625, 17017, -4592, 17058,
--4550, 17092, -4508, 17108, -4467, 17125, -4433, 17142, -4408, 17200,
--4375, 17242, -4375, 17308, -4350, 17275, -4317, 17283, -4300, 17325,
--4258, 17358, -4217, 17400, -4183, 17433, -4133, 17433, -4125, 17392,
--4092, 17383, -4117, 17350, -4133, 17317, -4092, 17308, -4067, 17258,
--4092, 17217, -4133, 17217, -4167, 17200, -4183, 17150, -4225, 17133,
--4267, 17108, -4300, 17050, -4333, 17000, -4367, 16950, -4400, 16883,
--4408, 16833, -4442, 16792, -4475, 16758, -4508, 16708, -4542, 16683,
--4592, 16650,
-]
-farc229 = [
--4733, 16758, -4700, 16825, -4667, 16800, -4733, 16758,
-]
-
-# Indonesia
-farc230 = [
-567, 9533, 517, 9542, 475, 9567, 433, 9608, 383, 9658,
-375, 9692, 333, 9725, 292, 9767, 242, 9783, 217, 9833,
-183, 9883, 150, 9883, 100, 9908, 033, 9925, 8, 9983,
--025, 10000, -067, 10042, -108, 10050, -167, 10083, -208, 10092,
--258, 10133, -317, 10175, -350, 10225, -383, 10242, -425, 10283,
--475, 10350, -508, 10400, -558, 10442, -575, 10475, -550, 10492,
--550, 10533, -575, 10575, -525, 10583, -467, 10592, -417, 10592,
--350, 10592, -300, 10617, -267, 10592, -233, 10558, -233, 10508,
--192, 10492, -167, 10458, -100, 10442, -100, 10383, -067, 10350,
--025, 10375, 017, 10383, 58, 10342, 58, 10300, 108, 10308,
-117, 10267, 167, 10225, 175, 10175, 225, 10125, 217, 10075,
-267, 10033, 317, 10000, 350, 9950, 375, 9900, 408, 9858,
-450, 9825, 492, 9800, 525, 9758, 533, 9692, 533, 9633,
-567, 9592, 567, 9533,
-]
-farc231 = [
--667, 10550, -675, 10600, -700, 10658, -725, 10650, -733, 10700,
--742, 10758, -767, 10800, -775, 10858, -767, 10900, -767, 10958,
--775, 11000, -800, 11050, -808, 11100, -817, 11150, -817, 11200,
--833, 11250, -817, 11308, -833, 11358, -850, 11400, -858, 11442,
--817, 11442, -767, 11442, -758, 11392, -767, 11342, -750, 11283,
--708, 11275, -683, 11242, -675, 11192, -658, 11133, -633, 11083,
--683, 11050, -683, 11008, -675, 10958, -675, 10908, -667, 10867,
--625, 10842, -617, 10792, -592, 10742, -583, 10708, -600, 10667,
--583, 10608, -633, 10583, -667, 10550,
-]
-farc232 = [
--817, 11442, -833, 11483, -867, 11517, -825, 11567, -800, 11525,
--817, 11442,
-]
-farc233 = [
--892, 11600, -892, 11650, -908, 11717, -900, 11767, -883, 11808,
--875, 11850, -867, 11900, -858, 11950, -875, 12000, -875, 12050,
--883, 12100, -875, 12150, -883, 12200, -867, 12242, -850, 12300,
--833, 12367, -817, 12292, -867, 12242, -842, 12200, -850, 12150,
--833, 12100, -817, 12050, -833, 12000, -858, 11950, -825, 11900,
--825, 11842, -808, 11775, -850, 11800, -842, 11758, -842, 11700,
--825, 11650, -842, 11608, -892, 11600,
-]
-farc234 = [
--842, 12433, -825, 12517, -808, 12450, -842, 12433,
-]
-farc235 = [
--792, 12583, -792, 12642, -750, 12667, -758, 12600, -792, 12583,
-]
-farc236 = [
--942, 11900, -975, 11917, -975, 11967, -992, 12000, -1025, 12042,
--1000, 12092, -958, 12050, -933, 12000, -933, 11950, -942, 11900,
-]
-farc237 = [
--1033, 12350, -1025, 12400, -1008, 12450, -958, 12492, -925, 12542,
--908, 12592, -892, 12642, -867, 12692, -833, 12725, -833, 12675,
--842, 12625, -850, 12567, -867, 12508, -900, 12483, -917, 12433,
--933, 12392, -967, 12367, -1033, 12350,
-]
-farc238 = [
--792, 13117, -758, 13158, -708, 13158, -742, 13125, -792, 13117,
-]
-farc239 = [
--692, 13408, -650, 13450, -592, 13467, -542, 13450, -583, 13425,
--633, 13408, -692, 13408,
-]
-farc240 = [
--192, 10525, -200, 10575, -225, 10600, -267, 10592, -300, 10667,
--250, 10675, -242, 10642, -200, 10625, -150, 10600, -158, 10550,
--192, 10525,
-]
-farc241 = [
--308, 10767, -317, 10808, -267, 10833, -250, 10775, -308, 10767,
-]
-farc242 = [
--700, 11300, -700, 11350, -700, 11400, -730, 11350, -700, 11300,
-]
-farc243 = [
-100, 10892, 042, 10900, 8, 10925, -042, 10925, -075, 10975,
--125, 11008, -175, 11008, -233, 11025, -292, 11033, -300, 11092,
--292, 11142, -275, 11175, -350, 11183, -333, 11233, -333, 11283,
--308, 11325, -342, 11383, -333, 11433, -367, 11467, -408, 11475,
--392, 11517, -367, 11567, -342, 11617, -292, 11633, -225, 11667,
--175, 11633, -133, 11675, -100, 11717, -58, 11742, 000, 11750,
-50, 11767, 83, 11792, 83, 11842, 92, 11900, 125, 11867,
-158, 11825, 200, 11783, 233, 11808, 275, 11775, 325, 11750,
-367, 11783, 425, 11792, 442, 11858, 483, 11825, 500, 11875,
-517, 11925, 542, 11875, 575, 11825, 592, 11775, 642, 11775,
-675, 11725, 700, 11700, 658, 11667, 625, 11617, 583, 11600,
-533, 11542, 492, 11542, 492, 11475, 467, 11425, 408, 11375,
-375, 11333, 333, 11308, 300, 11258, 292, 11200, 283, 11150,
-225, 11133, 158, 11108, 167, 11058, 175, 11000, 200, 10950,
-158, 10908, 100, 10892,
-]
-farc244 = [
--283, 11883, -350, 11900, -350, 11950, -400, 11967, -458, 11958,
--517, 11942, -558, 11950, -558, 11992, -550, 12042, -500, 12033,
--450, 12042, -400, 12042, -350, 12042, -300, 12025, -267, 12067,
--267, 12108, -300, 12108, -342, 12092, -383, 12117, -408, 12167,
--467, 12158, -483, 12200, -458, 12233, -533, 12233, -567, 12267,
--533, 12317, -475, 12317, -433, 12283, -383, 12250, -350, 12208,
--317, 12242, -275, 12217, -242, 12192, -192, 12150, -167, 12208,
--133, 12250, -92, 12292, -92, 12350, -58, 12317, -75, 12258,
--92, 12208, -92, 12158, -133, 12117, -133, 12067, -92, 12058,
--067, 12008, -8, 12008, 42, 12033, 50, 12067, 42, 12100,
-50, 12142, 50, 12200, 50, 12250, 50, 12300, 33, 12350,
-42, 12400, 58, 12458, 108, 12500, 150, 12525, 175, 12500,
-150, 12475, 117, 12442, 92, 12392, 92, 12333, 83, 12292,
-100, 12250, 108, 12200, 117, 12142, 133, 12092, 75, 12067,
-75, 12000, 42, 11992, -8, 11983, -58, 11983, -92, 11950,
--133, 11933, -192, 11933, -242, 11917, -283, 11883,
-]
-farc245 = [
-108, 12733, 67, 12758, 25, 12767, -17, 12758, -58, 12792,
--92, 12842, -42, 12800, 000, 12792, 50, 12800, 50, 12850,
-83, 12825, 108, 12867, 158, 12867, 133, 12808, 175, 12783,
-217, 12800, 192, 12758, 150, 12750, 108, 12733,
-]
-farc246 = [
--325, 12600, -367, 12633, -383, 12683, -358, 12717, -317, 12700,
--308, 12650, -325, 12600,
-]
-farc247 = [
--317, 12792, -342, 12850, -333, 12892, -342, 12942, -358, 13025,
--383, 13075, -342, 13075, -300, 13042, -300, 12992, -275, 12950,
--283, 12892, -283, 12825, -317, 12792,
-]
-farc248 = [
--175, 12450, -175, 12525,
-]
-farc249 = [
--167, 12733, -167, 12817, -133, 12758, -167, 12733,
-]
-farc250 = [
--017, 13033, -042, 13075, -025, 13125, 000, 13075, -017, 13033,
-]
-farc251 = [
--067, 13533, -117, 13583, -108, 13625, -067, 13592, -067, 13533,
-]
-farc252 = [
--133, 13083, -150, 13142, -158, 13183, -200, 13183, -225, 13225,
--225, 13275, -217, 13325, -200, 13383, -250, 13367, -250, 13308,
--275, 13267, -267, 13217, -283, 13192, -292, 13225, -325, 13267,
--358, 13275, -400, 13283, -400, 13325, -350, 13367, -383, 13408,
--408, 13458, -433, 13500, -442, 13558, -458, 13617, -483, 13675,
--500, 13733, -525, 13783, -558, 13817, -617, 13842, -675, 13858,
--725, 13875, -733, 13825, -775, 13800, -833, 13767, -833, 13825,
--808, 13883, -808, 13942, -800, 14000, -833, 14025, -867, 14058,
--900, 14100, -908, 14150, -908, 14200, -925, 14258, -900, 14317,
--875, 14333, -833, 14317, -817, 14358, -792, 14383, -750, 14417,
--750, 14467, -767, 14500, -792, 14558, -800, 14600, -850, 14625,
--892, 14650, -933, 14700, -967, 14742, -1000, 14758, -1008, 14808,
--1017, 14867, -1025, 14925, -1033, 14975, -1067, 15000, -1058, 15058,
--1017, 15075, -1008, 15017, -992, 14975, -958, 15000, -958, 14958,
--942, 14908, -900, 14925, -908, 14858, -858, 14825, -800, 14817,
--775, 14767, -725, 14717, -683, 14700, -675, 14742, -667, 14783,
--617, 14783, -583, 14742, -592, 14683, -558, 14625, -550, 14575,
--492, 14575, -450, 14542, -425, 14500, -392, 14450, -367, 14400,
--342, 14350, -333, 14300, -308, 14242, -292, 14200, -275, 14150,
--258, 14100, -233, 14042, -233, 14000, -217, 13950, -200, 13900,
-]
-farc253 = [
--200, 13900, -167, 13842, -142, 13792, -167, 13725, -208, 13700,
--217, 13650, -258, 13608, -292, 13583, -333, 13558, -333, 13517,
--300, 13475, -250, 13458, -233, 13417, -183, 13400, -133, 13417,
--067, 13392, -067, 13325, -033, 13283, -033, 13217, -067, 13183,
--83, 13125, -133, 13083,
-]
-farc254 = [
-1625, 11983, 1567, 11992, 1525, 12000, 1475, 12008, 1442, 12058,
-1475, 12067, 1450, 12100, 1417, 12067, 1375, 12067, 1358, 12125,
-1392, 12175, 1367, 12217, 1308, 12267, 1350, 12267, 1383, 12258,
-1358, 12308, 1300, 12342, 1283, 12383, 1292, 12417, 1333, 12375,
-1367, 12358, 1375, 12392, 1400, 12333, 1417, 12292, 1417, 12258,
-1392, 12225, 1408, 12183, 1458, 12167, 1525, 12142, 1575, 12158,
-1617, 12200, 1658, 12233, 1708, 12250, 1742, 12217, 1792, 12217,
-1850, 12233, 1825, 12192, 1833, 12150, 1858, 12108, 1850, 12067,
-1800, 12050, 1758, 12033, 1717, 12050, 1658, 12033, 1608, 12033,
-1625, 11983,
-]
-farc255 = [
-842, 11725, 875, 11792, 908, 11817, 942, 11858, 992, 11883,
-1008, 11917, 1050, 11967, 1125, 11950, 1050, 11917, 1000, 11875,
-967, 11842, 925, 11792, 892, 11750, 842, 11725,
-]
-farc256 = [
-1342, 12042, 1300, 12075, 1250, 12092, 1217, 12117, 1250, 12158,
-1300, 12158, 1333, 12125, 1342, 12083, 1342, 12042,
-]
-farc257 = [
-1250, 12433, 1200, 12450, 1175, 12500, 1133, 12483, 1142, 12442,
-1083, 12442, 1075, 12475, 1017, 12475, 1025, 12525, 1067, 12500,
-1108, 12500, 1108, 12567, 1167, 12550, 1208, 12550, 1250, 12525,
-1242, 12475, 1250, 12433,
-]
-farc258 = [
-1050, 12192, 1058, 12250, 1042, 12283, 1000, 12283, 975, 12242,
-933, 12267, 900, 12300, 925, 12333, 975, 12317, 958, 12350,
-992, 12375, 958, 12400, 967, 12450, 1008, 12450, 1017, 12400,
-1058, 12400, 1108, 12400, 1067, 12383, 1042, 12342, 1083, 12350,
-1092, 12308, 1150, 12317, 1150, 12258, 1175, 12250, 1183, 12192,
-1142, 12208, 1092, 12200, 1050, 12192,
-]
-farc259 = [
-717, 12200, 683, 12208, 725, 12225, 767, 12250, 775, 12283,
-733, 12292, 742, 12325, 775, 12358, 758, 12400, 733, 12425,
-700, 12400, 642, 12400, 617, 12433, 592, 12475, 592, 12508,
-558, 12542, 608, 12575, 642, 12558, 675, 12533, 700, 12550,
-733, 12575, 692, 12600, 633, 12617, 683, 12633, 725, 12658,
-767, 12658, 825, 12633, 883, 12633, 933, 12600, 975, 12542,
-908, 12550, 883, 12517, 900, 12483, 850, 12467, 842, 12425,
-808, 12392, 850, 12383, 867, 12350, 850, 12308, 817, 12283,
-800, 12233, 775, 12208, 717, 12200,
-]
-farc260 = [
--550, 14825, -575, 14833, -583, 14883, -617, 14917, -625, 14967,
--625, 15017, -625, 15067, -600, 15117, -558, 15158, -558, 15200,
--500, 15208, -467, 15242, -417, 15225, -417, 15150, -492, 15167,
--492, 15125, -550, 15083, -550, 15042, -550, 15000, -558, 14942,
--558, 14883, -550, 14825,
-]
-farc261 = [
--208, 14667, -208, 14717,
-]
-farc262 = [
--258, 15083, -300, 15142, -342, 15200, -350, 15233, -417, 15267,
--483, 15292, -433, 15317, -392, 15300, -350, 15233, -325, 15200,
--290, 15142, -258, 15083,
-]
-farc263 = [
--542, 15467, -600, 15483, -650, 15517, -683, 15550, -658, 15600,
--617, 15558, -550, 15508, -542, 15467,
-]
-farc264 = [
--658, 15633, -700, 15692, -725, 15733,
-]
-farc265 = [
--800, 15725, -850, 15783,
-]
-farc266 = [
--750, 15850, -775, 15883, -808, 15933, -833, 15967,
-]
-farc267 = [
--833, 16067, -883, 16083, -917, 16108, -967, 16150,
-]
-farc268 = [
--925, 15950, -950, 15942, -983, 15967, -983, 16008, -992, 16050,
--967, 16083, -933, 16025, -925, 15950,
-]
-farc269 = [
--1017, 16125, -1067, 16175, -1075, 16233, -1033, 16200, -1017, 16125,
-]
-farc270 = [
--1475, 16675, -1525, 16683, -1567, 16683, -1550, 16733, -1500, 16717,
--1525, 16700, -1475, 16675,
-]
-farc271 = [
--1592, 16733, -1650, 16750, -1642, 16792, -1592, 16733,
-]
-farc272 = [
--2025, 16425, -2083, 16458, -2125, 16500, -2150, 16542, -2175, 16575,
--2200, 16617, -2233, 16667, -2233, 16717, -2200, 16683, -2167, 16650,
--2150, 16600, -2117, 16567, -2075, 16533, -2050, 16475, -2025, 16425,
-]
-farc273 = [
--4377,-17683, -4390,-17650, -4417,-17658, -4380,-17617, -4377,-17683,
-]
-farc274 = [
--1800, 17733, -1817, 17775, -1817, 17817, -1800, 17867, -1758, 17867,
--1733, 17825, -1733, 17775, -1758, 17742, -1800, 17733,
-]
-farc275 = [
--1658, 17858, -1692, 17875, -1667, 17933, -1667, 17992, -1650, 17967,
--1617, 17983, -1642, 17917, -1658, 17858,
-]
-farc276 = [
--1342,-17292, -1375,-17267, -1375,-17213, -1400,-17192, -1400,-17133,
--1383,-17167, -1375,-17213, -1350,-17220, -1342,-17292,
-]
-farc277 = [
--1747,-14958, -1773,-14950, -1783,-14917, -1753,-14933, -1747,-14958,
-]
-farc278 = [
-2183,-16023, 2198,-16010, 2190,-16010, 2183,-16023,
-]
-farc279 = [
-2203,-15982, 2190,-15962, 2190,-15938, 2222,-15930, 2222,-15958,
-2203,-15982,
-]
-farc280 = [
-2158,-15828, 2130,-15812, 2130,-15767, 2172,-15798, 2158,-15828,
-]
-farc281 = [
-2113,-15722, 2113,-15680,
-]
-farc282 = [
-2095,-15668, 2078,-15647, 2057,-15643, 2062,-15620, 2073,-15598,
-2097,-15628, 2090,-15647, 2095,-15668,
-]
-farc283 = [
-2027,-15588, 1995,-15587, 1977,-15605, 1935,-15588, 1908,-15592,
-1893,-15565, 1913,-15552, 1927,-15530, 1933,-15500, 1952,-15480,
-1968,-15502, 1992,-15513, 2005,-15537, 2015,-15563, 2027,-15588,
-]
-
diff --git a/circle.yml b/circle.yml
new file mode 100644
index 0000000..1fff828
--- /dev/null
+++ b/circle.yml
@@ -0,0 +1,36 @@
+general:
+ #branches:
+ # ignore:
+ # We only want to build pull requests for testing. If something is merged,
+ # then we are prepping for release an there is no need to build it again.
+ # - master
+ artifacts:
+ - tests_html
+ - tests_png
+
+checkout:
+ post:
+ - ./scripts/checkout_merge_commit.sh
+
+#machine:
+machine:
+ xcode:
+ version: 7.2
+ pre:
+ - sudo -H pip install --upgrade virtualenv
+ - ls
+ - pwd
+ - bash cdutil/scripts/circleci_mac_machine_pre.sh
+ #services:
+ # - docker
+
+dependencies:
+ override:
+ - bash ./scripts/circleci_mac_dep.sh
+ # - docker pull cdat/conda:conda-forge-cdms2
+
+
+test:
+ override:
+ - bash ./scripts/circleci_mac.sh
+ # - docker run -it -v `pwd`:/git_repo -a STDOUT -a STDERR -P cdat/conda:conda-forge-cdms2 /git_repo/scripts/circle.sh
diff --git a/run_tests.py b/run_tests.py
new file mode 100755
index 0000000..62f61d1
--- /dev/null
+++ b/run_tests.py
@@ -0,0 +1,270 @@
+#!/usr/bin/env python
+import glob
+import sys
+import os
+import argparse
+import multiprocessing
+import subprocess
+import codecs
+import time
+import webbrowser
+import shlex
+import cdat_info
+
+root = os.getcwd()
+cpus = multiprocessing.cpu_count()
+
+parser = argparse.ArgumentParser(description="Run VCS tests",
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+parser.add_argument("-H", "--html", action="store_true",
+ help="create and show html result page")
+parser.add_argument("-p", "--package", action="store_true",
+ help="package test results")
+parser.add_argument("-D", "--dropbox", action="store_true",
+ help="upload packaged test results to dropbox (access token must be stored in the envirnoment variable DROPBOX_TOKEN)")
+parser.add_argument(
+ "-c",
+ "--coverage",
+ action="store_true",
+ help="run coverage (not implemented)")
+parser.add_argument(
+ "-v",
+ "--verbosity",
+ default=1,
+ choices=[
+ 0,
+ 1,
+ 2],
+ type=int,
+ help="verbosity output level")
+parser.add_argument(
+ "-n",
+ "--cpus",
+ default=cpus,
+ type=int,
+ help="number of cpus to use")
+parser.add_argument(
+ "-f",
+ "--failed-only",
+ action="store_true",
+ default=False,
+ help="runs only tests that failed last time and are in the list you provide")
+parser.add_argument("tests", nargs="*", help="tests to run")
+
+args = parser.parse_args()
+
+
+def abspath(path, name, prefix):
+ import shutil
+ full_path = os.path.abspath(os.path.join(os.getcwd(), "..", path))
+ if not os.path.exists(name):
+ os.makedirs(name)
+ new = os.path.join(nm, prefix + "_" + os.path.basename(full_path))
+ try:
+ shutil.copy(full_path, new)
+ except:
+ pass
+ return new
+
+
+def findDiffFiles(log):
+ i = -1
+ file1 = ""
+ file2 = ""
+ diff = ""
+ N = len(log)
+ while log[i].find("Source file") == -1 and i > -N:
+ i -= 1
+ if i > -N:
+ file1 = log[i - 1].split()[-1]
+ for j in range(i, N):
+ if log[j].find("New best!") > -1:
+ if log[j].find("Comparing") > -1:
+ file2 = log[j].split()[2]
+ else:
+ k = j - 1
+ while log[k].find("Comparing") == -1 and k > -N:
+ k -= 1
+ try:
+ file2 = log[k].split()[2]
+ except:
+ file2 = log[k].split()[1][:-1]+log[j].split()[0]
+ print "+++++++++++++++++++++++++",file2
+ if log[j].find("Saving image diff") > -1:
+ diff = log[j].split()[-1]
+ # break
+ return file1, file2, diff
+
+
+def run_command(command, join_stderr=True):
+ if isinstance(command, basestring):
+ command = shlex.split(command)
+ if args.verbosity > 0:
+ print "Executing %s in %s" % (" ".join(command), os.getcwd())
+ if join_stderr:
+ stderr = subprocess.STDOUT
+ else:
+ stderr = subprocess.PIPE
+ P = subprocess.Popen(
+ command,
+ stdout=subprocess.PIPE,
+ stderr=stderr,
+ bufsize=0,
+ cwd=os.getcwd())
+ out = []
+ while P.poll() is None:
+ read = P.stdout.readline().rstrip()
+ out.append(read)
+ if args.verbosity > 1 and len(read) != 0:
+ print read
+ return P, out
+
+
+def run_nose(test_name):
+ opts = []
+ if args.coverage:
+ opts += ["--with-coverage"]
+ command = ["nosetests", ] + opts + ["-s", test_name]
+ start = time.time()
+ P, out = run_command(command)
+ end = time.time()
+ return {test_name: {"result": P.poll(), "log": out, "times": {
+ "start": start, "end": end}}}
+
+
+sys.path.append(
+ os.path.join(
+ os.path.dirname(
+ os.path.abspath(__file__)),
+ "tests"))
+if len(args.tests) == 0:
+ names = glob.glob("tests/test_*.py")
+else:
+ names = set(args.tests)
+
+if args.failed_only and os.path.exists(os.path.join("tests",".last_failure")):
+ f = open(os.path.join("tests",".last_failure"))
+ failed = set(eval(f.read().strip()))
+ f.close()
+ new_names = []
+ for fnm in failed:
+ if fnm in names:
+ new_names.append(fnm)
+ names = new_names
+
+if args.verbosity > 1:
+ print("Names:", names)
+
+if len(names)==0:
+ print "No tests to run"
+ sys.exit(0)
+
+# Make sure we have sample data
+cdat_info.download_sample_data_files(os.path.join(sys.prefix,"share","cdutil","test_data_files.txt"),cdat_info.get_sampledata_path())
+
+p = multiprocessing.Pool(args.cpus)
+outs = p.map(run_nose, names)
+results = {}
+failed = []
+for d in outs:
+ results.update(d)
+ nm = d.keys()[0]
+ if d[nm]["result"] != 0:
+ failed.append(nm)
+f = open(os.path.join("tests",".last_failure"),"w")
+f.write(repr(failed))
+f.close()
+
+if args.verbosity > 0:
+ print "Ran %i tests, %i failed (%.2f%% success)" %\
+ (len(outs), len(failed), 100. - float(len(failed)) / len(outs) * 100.)
+ if len(failed) > 0:
+ print "Failed tests:"
+ for f in failed:
+ print "\t", f
+if args.html or args.package or args.dropbox:
+ if not os.path.exists("tests_html"):
+ os.makedirs("tests_html")
+ os.chdir("tests_html")
+
+ js = ""
+
+ fi = open("index.html", "w")
+ print>>fi, ""
+ print>>fi, """VCS Test Results %s
+
+
+
+
+ """ % time.asctime()
+ print>>fi, "
VCS Test results: %s
" % time.asctime()
+ print>>fi, "
"
+ print>>fi, "
Test
Result
Start Time
End Time
Time
"
+ print>>fi, "
Test
Result
Start Time
End Time
Time
"
+
+ for t in sorted(results.keys()):
+ result = results[t]
+ nm = t.split("/")[-1][:-3]
+ print>>fi, "