@@ -77,31 +77,33 @@ def run(self):
7777
7878 section = config ['drying_slope' ]
7979 coriolis_parameter = section .getfloat ('coriolis_parameter' )
80+ background_temperature = section .getfloat ('background_temperature' )
81+ vert_levels = config .getint ('vertical_grid' , 'vert_levels' )
8082
8183 if self .baroclinic :
8284 section = config ['drying_slope_baroclinic' ]
8385 right_salinity = section .getfloat ('right_salinity' )
8486 left_salinity = section .getfloat ('left_salinity' )
8587 manning_coefficient = section .getfloat ('manning_coefficient' )
88+ thin_film_thickness = section .getfloat ('min_column_thickness' ) / \
89+ vert_levels + 1.e-8
8690 else :
8791 section = config ['drying_slope_barotropic' ]
8892 plug_width_frac = section .getfloat ('plug_width_frac' )
8993 plug_temperature = section .getfloat ('plug_temperature' )
90- background_temperature = section .getfloat ('background_temperature' )
9194 background_salinity = section .getfloat ('background_salinity' )
95+ thin_film_thickness = section .getfloat ('thin_film_thickness' ) + \
96+ 1.e-8
9297
9398 # config options used in both configurations but which have different
9499 # values in each
95- thin_film_thickness = section .getfloat ('thin_film_thickness' ) + 1.e-8
96100 drying_length = section .getfloat ('ly_analysis' ) * 1e3
97101 lx = section .getfloat ('lx' )
98102 ly = section .getfloat ('ly' )
99103 right_bottom_depth = section .getfloat ('right_bottom_depth' )
100104 left_bottom_depth = section .getfloat ('left_bottom_depth' )
101105 right_tidal_height = section .getfloat ('right_tidal_height' )
102106
103- vert_levels = config .getint ('vertical_grid' , 'vert_levels' )
104-
105107 domain_length = ly * 1e3
106108 # Check config options
107109 if domain_length < drying_length :
@@ -145,10 +147,13 @@ def run(self):
145147
146148 init_vertical_coord (config , ds )
147149
148- plug_width = domain_length * plug_width_frac
149- y_plug_boundary = y_min + plug_width
150- temperature = xr .where (y_cell < y_plug_boundary ,
151- plug_temperature , background_temperature )
150+ if self .baroclinic :
151+ temperature = background_temperature * xr .ones_like (y_cell )
152+ else :
153+ plug_width = domain_length * plug_width_frac
154+ y_plug_boundary = y_min + plug_width
155+ temperature = xr .where (y_cell < y_plug_boundary ,
156+ plug_temperature , background_temperature )
152157 temperature , _ = xr .broadcast (temperature , ds .refBottomDepth )
153158 ds ['temperature' ] = temperature .expand_dims (dim = 'Time' , axis = 0 )
154159 if self .baroclinic :
0 commit comments