@@ -30,6 +30,8 @@ def buildnml(case, caseroot, compname):
3030 srcroot = case .get_value ("SRCROOT" )
3131 din_loc_root = case .get_value ("DIN_LOC_ROOT" )
3232 glc_grid = case .get_value ("GLC_GRID" )
33+ glc_pio_typename = case .get_value ("GLC_PIO_TYPENAME" )
34+ glc_pio_netcdf_format = case .get_value ("GLC_PIO_NETCDF_FORMAT" )
3335 #ninst_glc = case.get_value("NINST_GLC")
3436 ninst_glc = 1 # Change if you want multiple instances... though this isn't coded yet.
3537 ninst_glc_real = case .get_value ("NINST_GLC" )
@@ -47,6 +49,12 @@ def buildnml(case, caseroot, compname):
4749 stream_name = 'streams.landice'
4850 albany_input_name = 'albany_input.yaml'
4951
52+ # Use 'pnetcdf,cdf5' when GLC_PIO_NETCDF_FORMAT requests 64-bit data, else use the standard type
53+ if glc_pio_typename .lower () == 'pnetcdf' and glc_pio_netcdf_format .lower () == '64bit_data' :
54+ io_type_str = 'pnetcdf,cdf5'
55+ else :
56+ io_type_str = glc_pio_typename
57+
5058 maliconf_dir = os .path .join (casebuild , "maliconf" )
5159
5260 if not os .path .isdir (maliconf_dir ): os .mkdir (maliconf_dir )
@@ -240,11 +248,13 @@ def buildnml(case, caseroot, compname):
240248 lines .append ('' )
241249 lines .append (' <immutable_stream name="basicmesh"' )
242250 lines .append (' type="none"' )
251+ lines .append (' io_type="{}"' .format (io_type_str ))
243252 lines .append (' filename_template="not-to-be-used.nc"' )
244253 lines .append (' />' )
245254 lines .append ('' )
246255 lines .append (' <immutable_stream name="input"' )
247256 lines .append (' type="input"' )
257+ lines .append (' io_type="{}"' .format (io_type_str ))
248258 lines .append (' filename_template="{}"' .format (input_file ))
249259 lines .append (' input_interval="initial_only"/>' )
250260 lines .append ('' )
@@ -260,6 +270,7 @@ def buildnml(case, caseroot, compname):
260270 lines .append (' -->' )
261271 lines .append (' <immutable_stream name="restart"' )
262272 lines .append (' type="input;output"' )
273+ lines .append (' io_type="{}"' .format (io_type_str ))
263274 lines .append (' filename_template="{}.mali.rst.$Y-$M-$D_$S.nc"' .format (casename ))
264275 lines .append (' filename_interval="output_interval"' )
265276 lines .append (' clobber_mode="truncate"' )
@@ -291,6 +302,7 @@ def buildnml(case, caseroot, compname):
291302 lines .append ('' )
292303 lines .append (' <stream name="output"' )
293304 lines .append (' type="output"' )
305+ lines .append (' io_type="{}"' .format (io_type_str ))
294306 lines .append (' filename_template="{}.mali.hist.$Y-$M-$D_$S.nc"' .format (casename ))
295307 lines .append (' filename_interval="0001-00-00_00:00:00"' )
296308 lines .append (' clobber_mode="truncate"' )
@@ -325,6 +337,7 @@ def buildnml(case, caseroot, compname):
325337 lines .append ('' )
326338 lines .append ('<stream name="globalStatsOutput"' )
327339 lines .append (' type="output"' )
340+ lines .append (' io_type="{}"' .format (io_type_str ))
328341 lines .append (' filename_template="{}.mali.hist.am.globalStats.$Y-$M-$D_$S.nc"' .format (casename ))
329342 lines .append (' filename_interval="5000-00-00_00:00:00"' )
330343 lines .append (' reference_time ="0001-01-01_00:00:00"' )
@@ -370,6 +383,7 @@ def buildnml(case, caseroot, compname):
370383 # in MALI data mode, read an input stream with ice thickness monthly
371384 lines .append (' <stream name="data-mode-input"' )
372385 lines .append (' type="input"' )
386+ lines .append (' io_type="{}"' .format (io_type_str ))
373387 lines .append (f' filename_template="{ datamode_file } "' )
374388 lines .append (' reference_time="2000-01-01_00:00:00"' )
375389 lines .append (' input_interval="0000-01-00_00:00:00">' )
0 commit comments