Skip to content

Commit

Permalink
Update input directory name from "input" to "INPUT" (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
dougiesquire authored Aug 5, 2024
1 parent fdb5172 commit efb2167
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions data_stream_xml_generation/generate_xml_datm.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
SubElement(stream_info, "year_last").text = str(year_last)
SubElement(stream_info, "year_align").text = str(year_align)
SubElement(stream_info, "vectors").text = "null"
SubElement(stream_info, "meshfile").text = "./input/JRA55do-ESMFmesh.nc"
SubElement(stream_info, "meshfile").text = "./INPUT/JRA55do-ESMFmesh.nc"
SubElement(stream_info, "lev_dimname").text = "null"

datafiles = SubElement(stream_info, "datafiles")
Expand Down Expand Up @@ -131,7 +131,7 @@
if year_first == year_last:
file_element = SubElement(datafiles, "file")
file_element.text = (
f"./input/RYF.{var_name_parts[0]}.{year+90}_{year + 90 + 1}.nc"
f"./INPUT/RYF.{var_name_parts[0]}.{year+90}_{year + 90 + 1}.nc"
)
else:
file_element = SubElement(datafiles, "file")
Expand All @@ -143,14 +143,14 @@
"CORE_IAF_JRA55do.V_10",
]:
if year != 2019:
file_element.text = f"./input/atmos/3hr/{var_name_parts[0]}/gr/v20190429/{var_name_parts[0]}_input4MIPs_atmosphericState_OMIP_MRI-JRA55-do-1-4-0_gr_{year}01010130-{year}12312230.nc"
file_element.text = f"./INPUT/atmos/3hr/{var_name_parts[0]}/gr/v20190429/{var_name_parts[0]}_input4MIPs_atmosphericState_OMIP_MRI-JRA55-do-1-4-0_gr_{year}01010130-{year}12312230.nc"
else:
file_element.text = f"./input/atmos/3hr/{var_name_parts[0]}/gr/v20190429/{var_name_parts[0]}_input4MIPs_atmosphericState_OMIP_MRI-JRA55-do-1-4-0_gr_{year}01010130-{year}01052230.nc"
file_element.text = f"./INPUT/atmos/3hr/{var_name_parts[0]}/gr/v20190429/{var_name_parts[0]}_input4MIPs_atmosphericState_OMIP_MRI-JRA55-do-1-4-0_gr_{year}01010130-{year}01052230.nc"
else:
if year != 2019:
file_element.text = f"./input/atmos/3hrPt/{var_name_parts[0]}/gr/v20190429/{var_name_parts[0]}_input4MIPs_atmosphericState_OMIP_MRI-JRA55-do-1-4-0_gr_{year}01010000-{year}12312100.nc"
file_element.text = f"./INPUT/atmos/3hrPt/{var_name_parts[0]}/gr/v20190429/{var_name_parts[0]}_input4MIPs_atmosphericState_OMIP_MRI-JRA55-do-1-4-0_gr_{year}01010000-{year}12312100.nc"
else:
file_element.text = f"./input/atmos/3hrPt/{var_name_parts[0]}/gr/v20190429/{var_name_parts[0]}_input4MIPs_atmosphericState_OMIP_MRI-JRA55-do-1-4-0_gr_{year}01010000-{year}01052100.nc"
file_element.text = f"./INPUT/atmos/3hrPt/{var_name_parts[0]}/gr/v20190429/{var_name_parts[0]}_input4MIPs_atmosphericState_OMIP_MRI-JRA55-do-1-4-0_gr_{year}01010000-{year}01052100.nc"


# Convert the XML to a nicely formatted string
Expand Down
12 changes: 6 additions & 6 deletions data_stream_xml_generation/generate_xml_drof.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
SubElement(stream_info, "year_last").text = str(year_last)
SubElement(stream_info, "year_align").text = str(year_align)
SubElement(stream_info, "vectors").text = "null"
SubElement(stream_info, "meshfile").text = "./input/JRA55do-ESMFmesh.nc"
SubElement(stream_info, "meshfile").text = "./INPUT/JRA55do-ESMFmesh.nc"
SubElement(stream_info, "lev_dimname").text = "null"

datafiles = SubElement(stream_info, "datafiles")
Expand All @@ -91,19 +91,19 @@
for year in range(year_first, year_last + 1):
if year_first == year_last:
file_element = SubElement(datafiles, "file")
file_element.text = f"./input/RYF.{var_prefix}.{year+90}_{year + 90 + 1}.nc"
file_element.text = f"./INPUT/RYF.{var_prefix}.{year+90}_{year + 90 + 1}.nc"
else:
file_element = SubElement(datafiles, "file")
if var_prefix == "friver":
if year != 2019:
file_element.text = f"./input/land/day/{var_prefix}/gr/v20190429/friver_input4MIPs_atmosphericState_OMIP_MRI-JRA55-do-1-4-0_gr_{year}0101-{year}1231.nc"
file_element.text = f"./INPUT/land/day/{var_prefix}/gr/v20190429/friver_input4MIPs_atmosphericState_OMIP_MRI-JRA55-do-1-4-0_gr_{year}0101-{year}1231.nc"
else:
file_element.text = f"./input/land/day/{var_prefix}/gr/v20190429/friver_input4MIPs_atmosphericState_OMIP_MRI-JRA55-do-1-4-0_gr_{year}0101-{year}0105.nc"
file_element.text = f"./INPUT/land/day/{var_prefix}/gr/v20190429/friver_input4MIPs_atmosphericState_OMIP_MRI-JRA55-do-1-4-0_gr_{year}0101-{year}0105.nc"
else:
if year != 2019:
file_element.text = f"./input/landIce/day/{var_prefix}/gr/v20190429/licalvf_input4MIPs_atmosphericState_OMIP_MRI-JRA55-do-1-4-0_gr_{year}0101-{year}1231.nc"
file_element.text = f"./INPUT/landIce/day/{var_prefix}/gr/v20190429/licalvf_input4MIPs_atmosphericState_OMIP_MRI-JRA55-do-1-4-0_gr_{year}0101-{year}1231.nc"
else:
file_element.text = f"./input/landIce/day/{var_prefix}/gr/v20190429/licalvf_input4MIPs_atmosphericState_OMIP_MRI-JRA55-do-1-4-0_gr_{year}0101-{year}0105.nc"
file_element.text = f"./INPUT/landIce/day/{var_prefix}/gr/v20190429/licalvf_input4MIPs_atmosphericState_OMIP_MRI-JRA55-do-1-4-0_gr_{year}0101-{year}0105.nc"

# Convert the XML to a nicely formatted string
xml_str = minidom.parseString(tostring(root)).toprettyxml(indent=" ")
Expand Down
6 changes: 3 additions & 3 deletions payu_config/archive_scripts/archive_cice_restarts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# SPDX-License-Identifier: Apache-2.0
# clean up cice_restarts.sh

if [ -f archive/output*/input/iced.1900-01-01-10800.nc ]
if [ -f archive/output*/INPUT/iced.1900-01-01-10800.nc ]
then
rm archive/output*/input/iced.1900-01-01-10800.nc
rm archive/output*/INPUT/iced.1900-01-01-10800.nc
return 0
fi

Expand All @@ -17,4 +17,4 @@ ic_restart=$(ls -dv $latest_o/access-om3.cice.r.* | head -1)
if [ -f $latest_o/access-om3.cice.r.* ]
then
rm $latest_o/access-om3.cice.r.*
fi
fi
6 changes: 3 additions & 3 deletions payu_config/setup_scripts/setup_cice_restarts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
if ! [ -f work/access-om3.cice.r.* ]
then
# no restart files yet, use initial conditions
IC=$(readlink work/input/iced.1900-01-01-10800.nc)
rm work/input/iced.1900-01-01-10800.nc
cp $IC work/input/iced.1900-01-01-10800.nc
IC=$(readlink work/INPUT/iced.1900-01-01-10800.nc)
rm work/INPUT/iced.1900-01-01-10800.nc
cp $IC work/INPUT/iced.1900-01-01-10800.nc
else
# change restart symlink to hardlink
RESTART=$(echo work/access-om3.cice.r.*)
Expand Down

0 comments on commit efb2167

Please sign in to comment.