Skip to content

Commit 4c33641

Browse files
committed
Add to main
1 parent beb4e29 commit 4c33641

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

regional_mom6/regional_mom6.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2799,7 +2799,7 @@ def regrid_velocity_tracers(
27992799

28002800
# Here, keep in mind that 'var' keeps track of the mom6 variable names we want, and self.tracers[var]
28012801
# will return the name of the variable from the original data
2802-
2802+
output_var_list = []
28032803
allfields = {
28042804
**reprocessed_var_map["tracer_var_names"],
28052805
"u": reprocessed_var_map["u_var_name"],
@@ -2815,6 +2815,7 @@ def regrid_velocity_tracers(
28152815
v = f"{var}_{self.segment_name}"
28162816
## Rename each variable in dataset
28172817
segment_out = segment_out.rename({allfields[var]: v})
2818+
output_var_list.append(v)
28182819

28192820
# Try Pint Conversion
28202821
if var in main_field_target_units:
@@ -2896,6 +2897,13 @@ def regrid_velocity_tracers(
28962897
unlimited_dims="time",
28972898
)
28982899

2900+
validate_obc_file(
2901+
segment_out,
2902+
output_var_list,
2903+
encoding_dict,
2904+
surface_var=f"eta_{self.segment_name}",
2905+
)
2906+
28992907
return segment_out, encoding_dict
29002908

29012909
def regrid_tides(

regional_mom6/validate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
MOM6 requires NetCDF files to be in a very specific format to pass validation, including fill value and missing value attributes. This module is designed to accept input files and warn users of potential issues with their files
3-
If you can, leave proof in the form of the exact lines of Fortran code where this is required!
3+
If you can, leave proof in the form of the exact lines of Fortran code where the validation step is required!
44
55
"""
66

0 commit comments

Comments
 (0)