Skip to content

Commit

Permalink
Merge branch 'main' of github.com:ISSMteam/ISSM
Browse files Browse the repository at this point in the history
  • Loading branch information
AdhikariJPL committed Oct 2, 2024
2 parents 52f6f6b + 2adee40 commit c8ac2a6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/c/cores/sealevelchange_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ IssmDouble SealevelloadsOceanAverage(GrdLoads* loads, Vector<IssmDouble>* ocean
IssmDouble subsealevelloadsaverage;

loads->vsealevelloads->Sum(&sealevelloadsaverage);
   loads->vsubsealevelloads->Sum(&subsealevelloadsaverage);
loads->vsubsealevelloads->Sum(&subsealevelloadsaverage);

return (sealevelloadsaverage+subsealevelloadsaverage)/totaloceanarea;
} /*}}}*/
Expand Down
6 changes: 3 additions & 3 deletions src/m/classes/dsl.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ def extrude(self, md): #{{{
# }}}

def initialize(self, md): #{{{
if np.isnan(self.global_average_thermosteric_sea_level):
if np.all(np.isnan(self.global_average_thermosteric_sea_level)):
self.global_average_thermosteric_sea_level = np.array([0, 0]).reshape(-1, 1)
print(' no dsl.global_average_thermosteric_sea_level specified: transient values set to zero')

if np.isnan(self.sea_surface_height_above_geoid):
if np.all(np.isnan(self.sea_surface_height_above_geoid)):
self.sea_surface_height_above_geoid = np.append(np.zeros((md.mesh.numberofvertices, 1)), 0).reshape(-1, 1)
print(' no dsl.sea_surface_height_above_geoid specified: transient values set to zero')

if np.isnan(self.sea_water_pressure_at_sea_floor):
if np.all(np.isnan(self.sea_water_pressure_at_sea_floor)):
self.sea_water_pressure_at_sea_floor = np.append(np.zeros((md.mesh.numberofvertices, 1)), 0).reshape(-1, 1)
print(' no dsl.sea_water_pressure_at_sea_floor specified: transient values set to zero')
# }}}
7 changes: 4 additions & 3 deletions test/NightlyRun/test362.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
md = triangle(model(), '../Exp/Square.exp', 50000.)
md.mesh.x = md.mesh.x / 100
md.mesh.y = md.mesh.y / 100
md.miscellaneous.name = 'testChannels'

# Miscellaneous
md = setmask(md, '', '') # Everywhere grounded
Expand All @@ -23,7 +22,7 @@

# Some constants
md.constants.g = 9.8
md.materials.rho_ice = 910
md.materials.rho_ice = 910.

# Geometry
md.geometry.surface = -0.02 * md.mesh.x + 320
Expand All @@ -35,7 +34,7 @@
md.initialization.vx = 1.0e-6 * md.constants.yts * np.ones((md.mesh.numberofvertices))
md.initialization.vy = np.zeros((md.mesh.numberofvertices))
md.initialization.temperature = (273. - 20.) * np.ones((md.mesh.numberofvertices))
md.initialization.watercolumn = 0.03 * np.ones((md.mesh.numberofvertices))
md.initialization.watercolumn = 0.2 * np.ones((md.mesh.numberofvertices))
md.initialization.hydraulic_potential = md.materials.rho_ice * md.constants.g * md.geometry.thickness

#cMaterials
Expand All @@ -56,6 +55,8 @@
md.inversion.iscontrol = 0
md.transient = transient.deactivateall(md.transient)
md.transient.ishydrology = 1
md.transient.isstressbalance = 1
md.transient.ismasstransport = 1

# Set numerical conditions
md.timestepping.time_step = 0.1 / 365
Expand Down

0 comments on commit c8ac2a6

Please sign in to comment.