Skip to content

Commit 858bfb6

Browse files
Archive additional metadata and other information (NOAA-GFDL#121)
* Archive additional metadata and other information to a metadata.out directory * Fix spelling of script/scripts * Fix copying of unmasked ocean_static * Override names of truncation files so they can be found by FRE * Remove extra.results now that it's not needed
1 parent de21cfe commit 858bfb6

File tree

3 files changed

+61
-38
lines changed

3 files changed

+61
-38
lines changed

xmls/NEP10/CEFI_NEP_cobalt.xml

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ frecheck -v -r restart -p ncrc6.intel23 -t repro -x CEFI_NEP_cobalt.xml CEFI_NE
107107
<xi:include href="../xml_include/xml_building_blocks/platforms.xml" xpointer="xpointer(//freInclude/platform[@name='ncrc5.intel23'])"/>
108108
<xi:include href="../xml_include/xml_building_blocks/platforms.xml" xpointer="xpointer(//freInclude/platform[@name='gfdl.ncrc5-intel23'])"/>
109109
<xi:include href="../xml_include/xml_building_blocks/platforms.xml" xpointer="xpointer(//freInclude/platform[@name='ncrc6.intel23'])"/>
110-
<xi:include href="../xml_include/xml_building_blocks/platforms.xml" xpointer="xpointer(//freInclude/platform[@name='gfdl.ncrc6-intel23'])"/>
110+
<xi:include href="../xml_include/xml_building_blocks/platforms.xml" xpointer="xpointer(//freInclude/platform[@name='gfdl.ncrc6-intel23'])"/>
111111
</setup>
112112

113113
<!--= COMPILE =-->
@@ -600,10 +600,12 @@ cat > $work/INPUT/MOM_override << MOM_OVERRIDE_EOF
600600
#override PHA_MLD_USE_DELTA_RHO = True
601601
#override PHA_MLD_HREF = 10.0
602602
#override PHA_MLD_DRHO = 0.03
603-
#override HREF_FOR_MLD = 5.0
603+
#override HREF_FOR_MLD = 5.0
604604
#override DIAG_MLD_DENSITY_DIFF = 0.03
605605
#override VISC_REM_BUG = True
606606
#override GENERIC_TRACER_IC_FILE = "NEP_COBALT_spinup_2003.nc"
607+
#override U_TRUNC_FILE = "U.velocity_truncations"
608+
#override V_TRUNC_FILE = "V.velocity_truncations"
607609
MOM_OVERRIDE_EOF
608610
609611
truncate -s 0 $work/INPUT/COBALT_override
@@ -681,28 +683,33 @@ COBALT_INPUT_EOF
681683
<run days="2">
682684
<resources jobWallclock="01:00:00">
683685
<ice layout = "32,80" io_layout = "1,1" mask_table="mask_table.524.32x80"/>
684-
<ocn ranks="2036" threads="1" layout = "32,80" io_layout = "1,1" mask_table="mask_table.524.32x80"/>
685-
</resources>
686+
<ocn ranks="2036" threads="1" layout = "32,80" io_layout = "1,1" mask_table="mask_table.524.32x80"/>
687+
</resources>
686688
</run>
687689
</regression>
688690
</runtime>
689691

690692
<postProcess>
691693
<csh><![CDATA[
692694
cd $work
693-
#Make a directory to trick FRE to pick up and archive in ascii
694-
mkdir extra.results
695-
mv *velocity_truncations MOM_parameter_doc* SIS_parameter_doc* COBALT_parameter_doc* seaice.stats* ocean.stats* extra.results/
696-
cp diag_table INPUT/*_input INPUT/*_override INPUT/*.xml extra.results/.
697-
cp $scriptName extra.results/runscript.csh
698-
#When the ocean uses a mask_table the ocean_static.nc file produced by the model run has holes in coordinates (geolon,geolat)
699-
#This causes problems for ferret and python tools for analysis.
700-
#Copy a non-masked version of ocean_static.nc to be saved as a history file to be used by the analysis scipts .
695+
# Archive an assortment of model input files and model metadata
696+
mkdir metadata.out
697+
mv MOM_parameter_doc* SIS_parameter_doc* COBALT_parameter_doc* metadata.out/
698+
cp diag_table input.nml metadata.out/
699+
cp INPUT/*_input INPUT/*_override metadata.out/
700+
# Save the Git commit hash for each source code submodule
701+
git -C $root/$(LIBS_ROOT)/src/mom6 submodule status --recursive > metadata.out/git_submodule_status
702+
# Archive a copy of the xml used to run the model and the run script (fre sets these)
703+
cp $rtsxml metadata.out/
704+
cp $scriptName metadata.out/runscript.csh
705+
# When the ocean uses a mask_table the ocean_static.nc file produced by the model run has holes in coordinates (geolon,geolat)
706+
# This causes problems for ferret and python tools for analysis.
707+
# Copy a non-masked version of ocean_static.nc to be saved as a history file to be used by the analysis scripts.
701708
cp $work/INPUT/ocean_static_no_mask_table.nc $work/ocean_static.nc
702709
]]></csh>
703710
<xi:include xpointer="xpointer(//freInclude[@name='MOM6_postprocess']/postProcess/node())"/>
704711
<xi:include xpointer="xpointer(//freInclude[@name='COBALT_postprocess']/postProcess/node())"/>
705-
<xi:include xpointer="xpointer(//freInclude[@name='COBALT_z_postprocess']/postProcess/node())"/>
712+
<xi:include xpointer="xpointer(//freInclude[@name='COBALT_z_postprocess']/postProcess/node())"/>
706713
</postProcess>
707714

708715
</experiment>
@@ -798,7 +805,7 @@ ln -sf nep_10km_glorys_obcs_${fyear}.nc obcs.nc
798805
ln -sf glorys_monthly_NEP_sponge_${fyear}_clim.nc nep_10k_glorys_mnClim.nc
799806
800807
if ( $(target) == 'debug' ) then
801-
echo "we are testing in debug mode. Need to re-create grid masks!"
808+
echo "we are testing in debug mode. Need to re-create grid masks!"
802809
cd $work/INPUT
803810
rm -rf $work/INPUT/ocean_mask.nc
804811
rm -rf $work/INPUT/ocean_mosaic.nc
@@ -809,7 +816,7 @@ make_solo_mosaic --num_tiles 1 --dir . --mosaic_name ocean_mosaic --tile_file oc
809816
make_quick_mosaic --input_mosaic ocean_mosaic.nc --mosaic_name grid_spec --ocean_topog ocean_topog.nc
810817
ln -fs $work/INPUT/ocean_topog.nc $work/INPUT/topog.nc
811818
endif
812-
819+
813820
]]>
814821
</csh>
815822
</input>

xmls/NWA12/CEFI_NWA12_cobalt.xml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ DT_OBC_SEG_UPDATE_OBGC = 1800
586586
#override CHL_FROM_FILE = False
587587
#override DO_GEOTHERMAL = True
588588
#override GENERIC_TRACER_IC_FILE = "NWA12_COBALT_2023_10_spinup_2003.nc"
589-
#override EPBL_ANSWER_DATE = 20231231
589+
#override EPBL_ANSWER_DATE = 20231231
590590
#override MLD_ITERATION_GUESS = False
591591
#override REMAP_AUXILIARY_VARS = True
592592
#override DIABATIC_FIRST = False
@@ -595,8 +595,10 @@ DT_OBC_SEG_UPDATE_OBGC = 1800
595595
#override PHA_MLD_USE_DELTA_RHO = True
596596
#override PHA_MLD_HREF = 10.0
597597
#override PHA_MLD_DRHO = 0.03
598-
#override HREF_FOR_MLD = 10.0
599-
#override DIAG_MLD_DENSITY_DIFF = 0.03
598+
#override HREF_FOR_MLD = 10.0
599+
#override DIAG_MLD_DENSITY_DIFF = 0.03
600+
#override U_TRUNC_FILE = "U.velocity_truncations"
601+
#override V_TRUNC_FILE = "V.velocity_truncations"
600602
MOM_OVERRIDE_EOF
601603
602604
truncate -s 0 $work/INPUT/COBALT_override
@@ -692,14 +694,20 @@ COBALT_INPUT_EOF
692694
<postProcess>
693695
<csh><![CDATA[
694696
cd $work
695-
#Make a directory to trick FRE to pick up and archive in ascii
696-
mkdir extra.results
697-
mv MOM_parameter_doc* SIS_parameter_doc* COBALT_parameter_doc* seaice.stats* ocean.stats* extra.results/
698-
cp diag_table extra.results/.
699-
#When the ocean uses a mask_table the ocean_static.nc file produced by the model run has holes in coordinates (geolon,geolat)
700-
#This causes problems for ferret and python tools for analysis.
701-
#Copy a non-masked version of ocean_static.nc to be saved as a history file to be used by the analysis scipts .
702-
cp $work/INPUT/ocean_static_no_mask_table.nc $work/
697+
# Archive an assortment of model input files and model metadata
698+
mkdir metadata.out
699+
mv MOM_parameter_doc* SIS_parameter_doc* COBALT_parameter_doc* metadata.out/
700+
cp diag_table input.nml metadata.out/
701+
cp INPUT/*_input INPUT/*_override metadata.out/
702+
# Save the Git commit hash for each source code submodule
703+
git -C $root/$(LIBS_ROOT)/src/mom6 submodule status --recursive > metadata.out/git_submodule_status
704+
# Archive a copy of the xml used to run the model and the run script (fre sets these)
705+
cp $rtsxml metadata.out/
706+
cp $scriptName metadata.out/runscript.csh
707+
# When the ocean uses a mask_table the ocean_static.nc file produced by the model run has holes in coordinates (geolon,geolat)
708+
# This causes problems for ferret and python tools for analysis.
709+
# Copy a non-masked version of ocean_static.nc to be saved as a history file to be used by the analysis scripts.
710+
cp $work/INPUT/ocean_static_no_mask_table.nc $work/ocean_static.nc
703711
]]></csh>
704712
<xi:include xpointer="xpointer(//freInclude[@name='MOM6_postprocess']/postProcess/node())"/>
705713
<xi:include xpointer="xpointer(//freInclude[@name='COBALT_postprocess']/postProcess/node())"/>

xmls/NWA12/CEFI_NWA12_cobalt_fms2_yaml.xml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ frecheck -r layout -p ncrc6.intel23 -x CEFI_NWA12_cobalt_fms2_yaml.xml CEFI_NWA1
105105
<xi:include href="../xml_include/xml_building_blocks/platforms.xml" xpointer="xpointer(//freInclude/platform[@name='ncrc5.intel23'])"/>
106106
<xi:include href="../xml_include/xml_building_blocks/platforms.xml" xpointer="xpointer(//freInclude/platform[@name='gfdl.ncrc5-intel23'])"/>
107107
<xi:include href="../xml_include/xml_building_blocks/platforms.xml" xpointer="xpointer(//freInclude/platform[@name='ncrc6.intel23'])"/>
108-
<xi:include href="../xml_include/xml_building_blocks/platforms.xml" xpointer="xpointer(//freInclude/platform[@name='gfdl.ncrc6-intel23'])"/>
108+
<xi:include href="../xml_include/xml_building_blocks/platforms.xml" xpointer="xpointer(//freInclude/platform[@name='gfdl.ncrc6-intel23'])"/>
109109
</setup>
110110

111111
<!--= COMPILE =-->
@@ -586,7 +586,7 @@ DT_OBC_SEG_UPDATE_OBGC = 1800
586586
#override CHL_FROM_FILE = False
587587
#override DO_GEOTHERMAL = True
588588
#override GENERIC_TRACER_IC_FILE = "NWA12_COBALT_2023_10_spinup_2003.nc"
589-
#override EPBL_ANSWER_DATE = 20231231
589+
#override EPBL_ANSWER_DATE = 20231231
590590
#override MLD_ITERATION_GUESS = False
591591
#override REMAP_AUXILIARY_VARS = True
592592
#override DIABATIC_FIRST = False
@@ -595,8 +595,10 @@ DT_OBC_SEG_UPDATE_OBGC = 1800
595595
#override PHA_MLD_USE_DELTA_RHO = True
596596
#override PHA_MLD_HREF = 10.0
597597
#override PHA_MLD_DRHO = 0.03
598-
#override HREF_FOR_MLD = 10.0
598+
#override HREF_FOR_MLD = 10.0
599599
#override DIAG_MLD_DENSITY_DIFF = 0.03
600+
#override U_TRUNC_FILE = "U.velocity_truncations"
601+
#override V_TRUNC_FILE = "V.velocity_truncations"
600602
MOM_OVERRIDE_EOF
601603
602604
truncate -s 0 $work/INPUT/COBALT_override
@@ -617,7 +619,7 @@ z_burial = 20.0
617619
z_denit = 20.0
618620
COBALT_INPUT_EOF
619621
620-
#hack to test yaml diag_table, convert the diag_table to yaml format
622+
#hack to test yaml diag_table, convert the diag_table to yaml format
621623
diag-table-to-yaml -f $work/diag_table -o $work/diag_table.yaml
622624
]]>
623625
</csh>
@@ -695,14 +697,20 @@ diag-table-to-yaml -f $work/diag_table -o $work/diag_table.yaml
695697
<postProcess>
696698
<csh><![CDATA[
697699
cd $work
698-
#Make a directory to trick FRE to pick up and archive in ascii
699-
mkdir extra.results
700-
mv MOM_parameter_doc* SIS_parameter_doc* COBALT_parameter_doc* seaice.stats* ocean.stats* extra.results/
701-
cp diag_table extra.results/.
702-
#When the ocean uses a mask_table the ocean_static.nc file produced by the model run has holes in coordinates (geolon,geolat)
703-
#This causes problems for ferret and python tools for analysis.
704-
#Copy a non-masked version of ocean_static.nc to be saved as a history file to be used by the analysis scipts .
705-
cp $work/INPUT/ocean_static_no_mask_table.nc $work/
700+
# Archive an assortment of model input files and model metadata
701+
mkdir metadata.out
702+
mv MOM_parameter_doc* SIS_parameter_doc* COBALT_parameter_doc* metadata.out/
703+
cp diag_table input.nml metadata.out/
704+
cp INPUT/*_input INPUT/*_override metadata.out/
705+
# Save the Git commit hash for each source code submodule
706+
git -C $root/$(LIBS_ROOT)/src/mom6 submodule status --recursive > metadata.out/git_submodule_status
707+
# Archive a copy of the xml used to run the model and the run script (fre sets these)
708+
cp $rtsxml metadata.out/
709+
cp $scriptName metadata.out/runscript.csh
710+
# When the ocean uses a mask_table the ocean_static.nc file produced by the model run has holes in coordinates (geolon,geolat)
711+
# This causes problems for ferret and python tools for analysis.
712+
# Copy a non-masked version of ocean_static.nc to be saved as a history file to be used by the analysis scripts.
713+
cp $work/INPUT/ocean_static_no_mask_table.nc $work/ocean_static.nc
706714
]]></csh>
707715
<xi:include xpointer="xpointer(//freInclude[@name='MOM6_postprocess']/postProcess/node())"/>
708716
<xi:include xpointer="xpointer(//freInclude[@name='COBALT_postprocess']/postProcess/node())"/>

0 commit comments

Comments
 (0)