Ignore:
Timestamp:
10/27/22 11:39:37 (2 years ago)
Author:
Mathieu Morlighem
Message:

merged trunk-jpl and trunk for revision 27344

Location:
issm/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk

  • issm/trunk/src

  • issm/trunk/src/m/classes/fourierlove.py

    r27035 r27347  
    11import numpy as np
    22
     3from checkfield import checkfield
    34from fielddisplay import fielddisplay
    4 from checkfield import checkfield
    55from WriteData import WriteData
    66
     
    4343        # - Correct display to match MATLAB
    4444        #
    45         s = '   Fourier Love class:\n'
    46         s += '{}\n'.format(fielddisplay(self, 'nfreq', 'number of frequencies sampled (default: 1, elastic) [Hz]'))
     45        s = '{}\n'.format(fielddisplay(self, 'nfreq', 'number of frequencies sampled (default: 1, elastic) [Hz]'))
    4746        s += '{}\n'.format(fielddisplay(self, 'frequencies', 'frequencies sampled (convention defaults to 0 for the elastic case) [Hz]'))
    4847        s += '{}\n'.format(fielddisplay(self, 'sh_nmax', 'maximum spherical harmonic degree (default: 256, .35 deg, or 40 km at equator)'))
     
    6463        s += '{}\n'.format(fielddisplay(self, 'forcing_type', 'integer indicating the nature and depth of the forcing for the Love number calculation (default: 11):'))
    6564        s += '{}\n'.format('                                                     1:  Inner core boundary -- Volumic Potential')
    66         s += '{}\n'.format('                                                     2:  Inner core boundary --  Pressure')
    67         s += '{}\n'.format('                                                     3:  Inner core boundary --  Loading')
    68         s += '{}\n'.format('                                                     4:  Inner core boundary --  Tangential traction')
    69         s += '{}\n'.format('                                                     5:  Core mantle boundary --  Volumic Potential')
    70         s += '{}\n'.format('                                                     6:  Core mantle boundary --  Pressure')
    71         s += '{}\n'.format('                                                     7:  Core mantle boundary --  Loading')
    72         s += '{}\n'.format('                                                     8:  Core mantle boundary --  Tangential traction')
    73         s += '{}\n'.format('                                                     9:  Surface-- Volumic Potential')
    74         s += '{}\n'.format('                                                     10: Surface-- Pressure')
    75         s += '{}\n'.format('                                                     11: Surface-- Loading')
    76         s += '{}\n'.format('                                                     12: Surface-- Tangential traction ')
     65        s += '{}\n'.format('                                                     2:  Inner core boundary -- Pressure')
     66        s += '{}\n'.format('                                                     3:  Inner core boundary -- Loading')
     67        s += '{}\n'.format('                                                     4:  Inner core boundary -- Tangential traction')
     68        s += '{}\n'.format('                                                     5:  Core mantle boundary -- Volumic Potential')
     69        s += '{}\n'.format('                                                     6:  Core mantle boundary -- Pressure')
     70        s += '{}\n'.format('                                                     7:  Core mantle boundary -- Loading')
     71        s += '{}\n'.format('                                                     8:  Core mantle boundary -- Tangential traction')
     72        s += '{}\n'.format('                                                     9:  Surface -- Volumic Potential')
     73        s += '{}\n'.format('                                                     10: Surface -- Pressure')
     74        s += '{}\n'.format('                                                     11: Surface -- Loading')
     75        s += '{}\n'.format('                                                     12: Surface -- Tangential traction ')
    7776        s += '{}\n'.format(fielddisplay(self, 'inner_core_boundary', 'interface index in materials.radius locating forcing. Only used for forcing_type 1--4 (default: 1)'))
    7877        s += '{}\n'.format(fielddisplay(self, 'core_mantle_boundary', 'interface index in materials.radius locating forcing. Only used for forcing_type 5--8 (default: 2)'))
     
    8786        self.sh_nmax = 256 # .35 degree, 40 km at the equator
    8887        self.sh_nmin = 1
    89         # Work on matlab script for computing g0 for given Earth's structure
     88        # Work on Python script for computing g0 for given Earth's structure
    9089        self.g0 = 9.81 # m/s^2
    9190        self.r0 = 6371 * 1e3 # m
     
    129128
    130129        md = checkfield(md, 'fieldname', 'love.istemporal', 'values', [0, 1])
     130
    131131        if md.love.istemporal:
    132132            md = checkfield(md, 'fieldname', 'love.n_temporal_iterations', 'NaN', 1, 'Inf', 1, 'numel', 1, '>', 0)
    133133            md = checkfield(md, 'fieldname', 'love.time', 'NaN', 1, 'Inf', 1, 'numel', md.love.nfreq / 2 / md.love.n_temporal_iterations)
    134         if md.love.sh_nmin <= 1 and (md.love.forcing_type == 9 or md.love.forcing_type == 5 or md.love.forcing_type == 1):
     134        if md.love.sh_nmin <= 1 and (md.love.forcing_type == 1 or md.love.forcing_type == 5 or md.love.forcing_type == 9):
    135135            raise RuntimeError('Degree 1 not supported for forcing type {}. Use sh_min >= 2 for this kind of calculation.'.format(md.love.forcing_type))
    136136
Note: See TracChangeset for help on using the changeset viewer.