Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions compass/landice/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -1648,13 +1648,17 @@ def interp_gridded2mali(self, source_file, mali_scrip, parallel_executable,

# Generate remapping weights
logger.info('generating gridded dataset -> MPAS weights')
args = [parallel_executable, '-n', nProcs, 'ESMF_RegridWeightGen',
'--source', masked_source_scrip,
'--destination', mali_scrip,
'--weight', weights_filename,
'--method', 'conserve',
"--netcdf4",
"--dst_regional", "--src_regional", '--ignore_unmapped']
args = parallel_executable.split() + [
'-n', nProcs,
'ESMF_RegridWeightGen',
'--source', masked_source_scrip,
'--destination', mali_scrip,
'--weight', weights_filename,
'--method', 'conserve',
"--netcdf4",
"--dst_regional",
"--src_regional",
'--ignore_unmapped']
check_call(args, logger=logger)

# Perform actual interpolation using the weights
Expand Down
2 changes: 1 addition & 1 deletion compass/landice/tests/antarctica/mesh_gen/mesh_gen.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ data_path = /global/cfs/cdirs/fanssie/standard_datasets/AIS_datasets

# filename of the BedMachine thickness and bedTopography dataset
# (default value is for Perlmutter)
bedmachine_filename = BedMachineAntarctica_2020-07-15_v02_edits_floodFill_extrap_fillVostok.nc
bedmachine_filename = NSIDC-0756_BedMachineAntarctica_19700101-20191001_V04.1_edits_floodFill_extrap.nc

# filename of the MEASURES ice velocity dataset
# (default value is for Perlmutter)
Expand Down
70 changes: 70 additions & 0 deletions compass/landice/tests/antarctica/mesh_gen/mesh_gen_bmv2.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# config options for antarctica test cases
[mesh]

# number of levels in the mesh
levels = 5

# Bounds of Antarctic mesh
x_min = -3333500.
x_max = 3330500.
y_min = -3333500.
y_max = 3330500.

# distance from ice margin to cull (km).
# Set to a value <= 0 if you do not want
# to cull based on distance from margin.
cull_distance = 50.0

# mesh density parameters
# minimum cell spacing (meters)
min_spac = 4.e3
# maximum cell spacing (meters)
max_spac = 2.e4
# log10 of max speed (m/yr) for cell spacing
high_log_speed = 2.5
# log10 of min speed (m/yr) for cell spacing
low_log_speed = 0.5
# distance to ice edge or grounding line at which cell spacing = max_spac (meters)
high_dist = 2.e5
# distance to ice edge or grounding line within which cell spacing = min_spac (meters)
low_dist = 4.e4

# These will not be applied unless use_bed = True.
# They are taken from the humboldt.mesh_gen test case
# and have not been evaluated for Antarctica.
# distance at which bed topography has no effect
high_dist_bed = 1.e5
# distance within which bed topography has maximum effect
low_dist_bed = 7.5e4
# Bed elev beneath which cell spacing is minimized
low_bed = 50.0
# Bed elev above which cell spacing is maximized
high_bed = 100.0

# mesh density functions
use_speed = True
use_dist_to_grounding_line = True
use_dist_to_edge = False
use_bed = False

[antarctica]
# Whether to interpolate data (controls run_optional_interpolation)
interpolate_data = True
# path to directory containing BedMachine and Measures datasets
# (default value is for Perlmutter)
data_path = /global/cfs/cdirs/fanssie/standard_datasets/AIS_datasets

# filename of the BedMachine thickness and bedTopography dataset
# (default value is for Perlmutter)
bedmachine_filename = BedMachineAntarctica_2020-07-15_v02_edits_floodFill_extrap_fillVostok.nc

# filename of the MEASURES ice velocity dataset
# (default value is for Perlmutter)
measures_filename = antarctica_ice_velocity_450m_v2_edits_extrap.nc

# projection of the source datasets, according to the dictionary keys
# create_scrip_file_from_planar_rectangular_grid from MPAS_Tools
src_proj = ais-bedmap2

# number of processors to use for ESMF_RegridWeightGen
nProcs = 128
2 changes: 1 addition & 1 deletion docs/users_guide/landice/test_groups/antarctica.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ the mesh generation options are adjusted through the config file.

# filename of the BedMachine thickness and bedTopography dataset
# (default value is for Perlmutter)
bedmachine_filename = BedMachineAntarctica_2020-07-15_v02_edits_floodFill_extrap_fillVostok.nc
bedmachine_filename = NSIDC-0756_BedMachineAntarctica_19700101-20191001_V04.1_edits_floodFill_extrap.nc

# filename of the MEASURES ice velocity dataset
# (default value is for Perlmutter)
Expand Down
Loading