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
14 changes: 14 additions & 0 deletions components/mpas-albany-landice/cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ def buildnml(case, caseroot, compname):
srcroot = case.get_value("SRCROOT")
din_loc_root = case.get_value("DIN_LOC_ROOT")
glc_grid = case.get_value("GLC_GRID")
glc_pio_typename = case.get_value("GLC_PIO_TYPENAME")
glc_pio_netcdf_format = case.get_value("GLC_PIO_NETCDF_FORMAT")
#ninst_glc = case.get_value("NINST_GLC")
ninst_glc = 1 # Change if you want multiple instances... though this isn't coded yet.
ninst_glc_real = case.get_value("NINST_GLC")
Expand All @@ -46,6 +48,12 @@ def buildnml(case, caseroot, compname):
stream_name = 'streams.landice'
albany_input_name = 'albany_input.yaml'

# Use 'pnetcdf,cdf5' when GLC_PIO_NETCDF_FORMAT requests 64-bit data, else use the standard type
if glc_pio_typename.lower() == 'pnetcdf' and glc_pio_netcdf_format.lower() == '64bit_data':
io_type_str = 'pnetcdf,cdf5'
else:
io_type_str = glc_pio_typename

maliconf_dir = os.path.join(casebuild, "maliconf")

if not os.path.isdir(maliconf_dir): os.mkdir(maliconf_dir)
Expand Down Expand Up @@ -203,11 +211,13 @@ def buildnml(case, caseroot, compname):
lines.append('')
lines.append(' <immutable_stream name="basicmesh"')
lines.append(' type="none"')
lines.append(' io_type="{}"'.format(io_type_str))
lines.append(' filename_template="not-to-be-used.nc"')
lines.append(' />')
lines.append('')
lines.append(' <immutable_stream name="input"')
lines.append(' type="input"')
lines.append(' io_type="{}"'.format(io_type_str))
lines.append(' filename_template="{}"'.format(input_file))
lines.append(' input_interval="initial_only"/>')
lines.append('')
Expand All @@ -223,6 +233,7 @@ def buildnml(case, caseroot, compname):
lines.append(' -->')
lines.append(' <immutable_stream name="restart"')
lines.append(' type="input;output"')
lines.append(' io_type="{}"'.format(io_type_str))
lines.append(' filename_template="{}.mali.rst.$Y-$M-$D_$S.nc"'.format(casename))
lines.append(' filename_interval="output_interval"')
lines.append(' clobber_mode="truncate"')
Expand All @@ -236,6 +247,7 @@ def buildnml(case, caseroot, compname):
lines.append('')
lines.append(' <stream name="output"')
lines.append(' type="output"')
lines.append(' io_type="{}"'.format(io_type_str))
lines.append(' filename_template="{}.mali.hist.$Y-$M-$D_$S.nc"'.format(casename))
lines.append(' filename_interval="0001-00-00_00:00:00"')
lines.append(' clobber_mode="truncate"')
Expand Down Expand Up @@ -298,6 +310,7 @@ def buildnml(case, caseroot, compname):
lines.append('')
lines.append('<stream name="globalStatsOutput"')
lines.append(' type="output"')
lines.append(' io_type="{}"'.format(io_type_str))
lines.append(' filename_template="{}.mali.hist.am.$Y-$M-$D_$S.nc"'.format(casename))
lines.append(' filename_interval="0001-00-00_00:00:00"')
lines.append(' clobber_mode="truncate"')
Expand All @@ -320,6 +333,7 @@ def buildnml(case, caseroot, compname):
# in MALI data mode, read an input stream with ice thickness monthly
lines.append(' <stream name="data-mode-input"')
lines.append(' type="input"')
lines.append(' io_type="{}"'.format(io_type_str))
lines.append(f' filename_template="{datamode_file}"')
lines.append(' reference_time="2000-01-01_00:00:00"')
lines.append(' input_interval="0000-01-00_00:00:00">')
Expand Down
4 changes: 4 additions & 0 deletions components/mpas-albany-landice/driver/glc_comp_mct.F
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,10 @@ end subroutine xml_stream_get_attributes
mesh_iotype = MPAS_IO_NETCDF
else if (trim(iotype) == 'netcdf4') then
mesh_iotype = MPAS_IO_NETCDF4
else if (trim(iotype) == 'adios') then
mesh_iotype = MPAS_IO_ADIOS
else if (trim(iotype) == 'adiosc') then
mesh_iotype = MPAS_IO_ADIOSC
else
mesh_iotype = MPAS_IO_PNETCDF
end if
Expand Down
4 changes: 4 additions & 0 deletions components/mpas-framework/src/driver/mpas_subdriver.F
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,10 @@ end subroutine xml_stream_get_attributes
mesh_iotype = MPAS_IO_NETCDF
else if (trim(iotype) == 'netcdf4') then
mesh_iotype = MPAS_IO_NETCDF4
else if (trim(iotype) == 'adios') then
mesh_iotype = MPAS_IO_ADIOS
else if (trim(iotype) == 'adiosc') then
mesh_iotype = MPAS_IO_ADIOSC
else
mesh_iotype = MPAS_IO_PNETCDF
end if
Expand Down
Loading