Index: issm/trunk/src/m/classes/lovenumbers.py
===================================================================
--- issm/trunk/src/m/classes/lovenumbers.py	(revision 26744)
+++ issm/trunk/src/m/classes/lovenumbers.py	(revision 27035)
@@ -19,8 +19,8 @@
 
     def __init__(self, *args):  #{{{
-        # Regular love numbers
-        self.h = []   # Provided by PREM model
-        self.k = []   # idem
-        self.l = []   # idem
+        # Loading love numbers
+        self.h = [] # Provided by PREM model
+        self.k = [] # idem
+        self.l = [] # idem
 
         # Tidal love numbers for computing rotational feedback
@@ -28,5 +28,9 @@
         self.tk = []
         self.tl = []
-        self.tk2secular = 0  # deg 2 secular number
+        self.tk2secular = 0 # deg 2 secular number
+        self.pmtf_colinear = []
+        self.pmtf_ortho = []
+        pmtf_colinear   = []
+        pmtf_ortho      = []
 
         # Time/frequency for visco-elastic love numbers
@@ -49,6 +53,10 @@
         s += '{}\n'.format(fielddisplay(self, 'tl', 'tidal load Love number (deg 2)'))
         s += '{}\n'.format(fielddisplay(self, 'tk2secular', 'secular fluid Love number'))
+        s += '{}\n'.format(fielddisplay(self, 'pmtf_colinear', 'Colinear component of the Polar Motion Transfer Function (e.g. x-motion due to x-component perturbation of the inertia tensor)'))
+        s += '{}\n'.format(fielddisplay(self, 'pmtf_ortho', 'Orthogonal component of the Polar Motion Transfer Function (couples x and y components, only used for Chandler Wobble)'))
         s += '{}\n'.format(fielddisplay(self, 'istime', 'time (default: 1) or frequency love numbers (0)'))
         s += '{}\n'.format(fielddisplay(self, 'timefreq', 'time/frequency vector (yr or 1/yr)'))
+        s += '{}\n'.format(fielddisplay(self, 'pmtf_colinear', 'Colinear component of the Polar Motion Transfer Function (e.g. x-motion due to x-component perturbation of the inertia tensor)'))
+        s += '{}\n'.format(fielddisplay(self, 'pmtf_ortho', 'Orthogonal component of the Polar Motion Transfer Function (couples x and y components, only used for Chandler Wobble)'))
         return s
     #}}}
@@ -65,5 +73,15 @@
         # Secular fluid love number
         self.tk2secular = 0.942
+        self.pmtf_colinear=0.0
+        self.pmtf_ortho=0.0
+        if maxdeg>=2:
+            self.pmtf_colinear= (1.0+self.k[3-1,:])/(1.0-self.tk[3-1,:]/self.tk2secular) #valid only for elastic regime, not viscous. Also neglects chandler wobble
+            self.pmtf_ortho= 0.0
 
+        self.pmtf_colinear = np.array([0.0]).reshape(-1, 1)
+        self.pmtf_ortho = np.array([0.0]).reshape(-1, 1)
+        if maxdeg >= 2:
+            self.pmtf_colinear = ((1.0 + self.k[2, :]) / (1.0 - self.tk[2, :] / self.tk2secular)).reshape(-1, 1) # Valid only for elastic regime, not viscous. Also neglects chandler wobble.
+            self.pmtf_ortho = np.array([0.0]).reshape(-1, 1)
         # Time
         self.istime = 1 # Temporal love numbers by default
@@ -83,4 +101,6 @@
         md = checkfield(md, 'fieldname', 'solidearth.lovenumbers.tl', 'NaN', 1, 'Inf', 1)
         md = checkfield(md, 'fieldname', 'solidearth.lovenumbers.tk2secular', 'NaN', 1, 'Inf', 1)
+        md = checkfield(md, 'fieldname', 'solidearth.lovenumbers.pmtf_colinear', 'NaN', 1, 'Inf', 1)
+        md = checkfield(md, 'fieldname', 'solidearth.lovenumbers.pmtf_ortho', 'NaN', 1, 'Inf', 1)
         md = checkfield(md, 'fieldname', 'solidearth.lovenumbers.timefreq', 'NaN', 1, 'Inf', 1)
         md = checkfield(md, 'fieldname', 'solidearth.lovenumbers.istime', 'NaN', 1, 'Inf', 1, 'values', [0, 1])
@@ -91,7 +111,9 @@
 
         ntf = len(self.timefreq)
-        if (np.shape(self.h)[1] != ntf or np.shape(self.k)[1] != ntf or np.shape(self.l)[1] != ntf or np.shape(self.th)[1] != ntf or np.shape(self.tk)[1] != ntf or np.shape(self.tl)[1] != ntf):
+        if (np.shape(self.h)[1] != ntf or np.shape(self.k)[1] != ntf or np.shape(self.l)[1] != ntf or np.shape(self.th)[1] != ntf or np.shape(self.tk)[1] != ntf or np.shape(self.tl)[1] != ntf or np.shape(self.pmtf_colinear)[1] != ntf or np.shape(self.pmtf_ortho)[1] != ntf):
             raise ValueError('lovenumbers error message: love numbers should have as many time/frequency steps as the time/frequency vector')
 
+        if self.istime and self.timefreq[0] != 0:
+            raise ValueError('temporal love numbers must start with elastic response, i.e. timefreq[0] = 0')
         return md
     #}}}
@@ -109,5 +131,9 @@
         WriteData(fid, prefix, 'object', self, 'fieldname', 'tk', 'name', 'md.solidearth.lovenumbers.tk', 'format', 'DoubleMat', 'mattype', 1)
         WriteData(fid, prefix, 'object', self, 'fieldname', 'tl', 'name', 'md.solidearth.lovenumbers.tl', 'format', 'DoubleMat', 'mattype', 1)
+        WriteData(fid, prefix, 'object', self, 'fieldname', 'pmtf_colinear', 'name', 'md.solidearth.lovenumbers.pmtf_colinear', 'format', 'DoubleMat', 'mattype', 1)
+        WriteData(fid, prefix, 'object', self, 'fieldname', 'pmtf_ortho', 'name', 'md.solidearth.lovenumbers.pmtf_ortho', 'format', 'DoubleMat', 'mattype', 1)
         WriteData(fid, prefix, 'object', self, 'data', self.tk2secular, 'fieldname', 'lovenumbers.tk2secular', 'format', 'Double')
+        WriteData(fid, prefix, 'object', self, 'fieldname', 'pmtf_colinear','name','md.solidearth.lovenumbers.pmtf_colinear','format','DoubleMat','mattype',1);
+        WriteData(fid, prefix, 'object', self, 'fieldname', 'pmtf_ortho','name','md.solidearth.lovenumbers.pmtf_ortho','format','DoubleMat','mattype',1);
 
         if (self.istime):
@@ -118,5 +144,5 @@
         WriteData(fid, prefix, 'object', self, 'fieldname', 'timefreq', 'name', 'md.solidearth.lovenumbers.timefreq', 'format', 'DoubleMat', 'mattype', 1, 'scale', scale);
     #}}}
-
+ 
     def extrude(self, md):  #{{{
         return
