Changeset 27347 for issm/trunk/src/m/classes/fourierlove.py
- Timestamp:
- 10/27/22 11:39:37 (2 years ago)
- Location:
- issm/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
- Property svn:mergeinfo changed
/issm/trunk-jpl merged: 27233-27234,27236-27238,27240-27243,27246-27247,27250-27254,27256,27260-27264,27271-27272,27274,27276-27316,27318-27343
- Property svn:mergeinfo changed
-
issm/trunk/src
-
issm/trunk/src/m/classes/fourierlove.py
r27035 r27347 1 1 import numpy as np 2 2 3 from checkfield import checkfield 3 4 from fielddisplay import fielddisplay 4 from checkfield import checkfield5 5 from WriteData import WriteData 6 6 … … 43 43 # - Correct display to match MATLAB 44 44 # 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]')) 47 46 s += '{}\n'.format(fielddisplay(self, 'frequencies', 'frequencies sampled (convention defaults to 0 for the elastic case) [Hz]')) 48 47 s += '{}\n'.format(fielddisplay(self, 'sh_nmax', 'maximum spherical harmonic degree (default: 256, .35 deg, or 40 km at equator)')) … … 64 63 s += '{}\n'.format(fielddisplay(self, 'forcing_type', 'integer indicating the nature and depth of the forcing for the Love number calculation (default: 11):')) 65 64 s += '{}\n'.format(' 1: Inner core boundary -- Volumic Potential') 66 s += '{}\n'.format(' 2: Inner core boundary -- 67 s += '{}\n'.format(' 3: Inner core boundary -- 68 s += '{}\n'.format(' 4: Inner core boundary -- 69 s += '{}\n'.format(' 5: Core mantle boundary -- 70 s += '{}\n'.format(' 6: Core mantle boundary -- 71 s += '{}\n'.format(' 7: Core mantle boundary -- 72 s += '{}\n'.format(' 8: Core mantle boundary -- 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 ') 77 76 s += '{}\n'.format(fielddisplay(self, 'inner_core_boundary', 'interface index in materials.radius locating forcing. Only used for forcing_type 1--4 (default: 1)')) 78 77 s += '{}\n'.format(fielddisplay(self, 'core_mantle_boundary', 'interface index in materials.radius locating forcing. Only used for forcing_type 5--8 (default: 2)')) … … 87 86 self.sh_nmax = 256 # .35 degree, 40 km at the equator 88 87 self.sh_nmin = 1 89 # Work on matlabscript for computing g0 for given Earth's structure88 # Work on Python script for computing g0 for given Earth's structure 90 89 self.g0 = 9.81 # m/s^2 91 90 self.r0 = 6371 * 1e3 # m … … 129 128 130 129 md = checkfield(md, 'fieldname', 'love.istemporal', 'values', [0, 1]) 130 131 131 if md.love.istemporal: 132 132 md = checkfield(md, 'fieldname', 'love.n_temporal_iterations', 'NaN', 1, 'Inf', 1, 'numel', 1, '>', 0) 133 133 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): 135 135 raise RuntimeError('Degree 1 not supported for forcing type {}. Use sh_min >= 2 for this kind of calculation.'.format(md.love.forcing_type)) 136 136
Note:
See TracChangeset
for help on using the changeset viewer.