Initialize temporally evolving fields, either as initial conditions or by reading them from a restart (or saves) file.
117 type(ocean_grid_type),
intent(inout) :: G
118 type(verticalGrid_type),
intent(in) :: GV
119 type(unit_scale_type),
intent(in) :: US
120 real,
dimension(SZIB_(G),SZJ_(G),SZK_(G)), &
123 real,
dimension(SZI_(G),SZJB_(G),SZK_(G)), &
126 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)), &
128 type(thermo_var_ptrs),
intent(inout) :: tv
130 type(time_type),
intent(inout) :: Time
131 type(param_file_type),
intent(in) :: PF
133 type(directories),
intent(in) :: dirs
135 type(MOM_restart_CS),
pointer :: restart_CS
137 type(ALE_CS),
pointer :: ALE_CSp
138 type(tracer_registry_type),
pointer :: tracer_Reg
139 type(sponge_CS),
pointer :: sponge_CSp
140 type(ALE_sponge_CS),
pointer :: ALE_sponge_CSp
141 type(ocean_OBC_type),
pointer :: OBC
142 type(time_type),
optional,
intent(in) :: Time_in
145 character(len=200) :: filename
146 character(len=200) :: filename2
147 character(len=200) :: inputdir
148 character(len=200) :: config
154 logical :: from_Z_file, useALE
156 integer :: write_geom
157 logical :: use_temperature, use_sponge, use_OBC
159 logical :: depress_sfc
161 logical :: trim_ic_for_p_surf
163 logical :: regrid_accelerate
164 integer :: regrid_iterations
170 type(EOS_type),
pointer :: eos => null()
173 logical :: debug_layers = .false.
174 character(len=80) :: mesg
176 #include "version_variable.h" 177 integer :: i, j, k, is, ie, js, je, Isq, Ieq, Jsq, Jeq, nz
178 integer :: isd, ied, jsd, jed, IsdB, IedB, JsdB, JedB
180 is = g%isc ; ie = g%iec ; js = g%jsc ; je = g%jec ; nz = g%ke
181 isq = g%IscB ; ieq = g%IecB ; jsq = g%JscB ; jeq = g%JecB
182 isd = g%isd ; ied = g%ied ; jsd = g%jsd ; jed = g%jed
183 isdb = g%IsdB ; iedb = g%IedB ; jsdb = g%JsdB ; jedb = g%JedB
185 call calltree_enter(
"MOM_initialize_state(), MOM_state_initialization.F90")
186 call log_version(pf, mdl, version,
"")
187 call get_param(pf, mdl,
"DEBUG", debug, default=.false.)
188 call get_param(pf, mdl,
"DEBUG_OBC", debug_obc, default=.false.)
190 new_sim = determine_is_new_run(dirs%input_filename, dirs%restart_input_dir, &
192 just_read = .not.new_sim
194 call get_param(pf, mdl,
"INPUTDIR", inputdir, &
195 "The directory in which input files are found.", default=
".")
196 inputdir = slasher(inputdir)
198 use_temperature =
associated(tv%T)
199 useale =
associated(ale_csp)
200 use_eos =
associated(tv%eqn_of_state)
201 use_obc =
associated(obc)
202 if (use_eos) eos => tv%eqn_of_state
210 call mom_mesg(
"Run initialized internally.", 3)
212 if (
present(time_in)) time = time_in
227 call get_param(pf, mdl,
"INIT_LAYERS_FROM_Z_FILE", from_z_file, &
228 "If true, initialize the layer thicknesses, temperatures, "//&
229 "and salinities from a Z-space file on a latitude-longitude "//&
230 "grid.", default=.false., do_not_log=just_read)
232 if (from_z_file)
then 234 if (.NOT.use_temperature)
call mom_error(fatal,
"MOM_initialize_state : "//&
235 "use_temperature must be true if INIT_LAYERS_FROM_Z_FILE is true")
237 call mom_temp_salt_initialize_from_z(h, tv, g, gv, us, pf, just_read_params=just_read)
241 call get_param(pf, mdl,
"THICKNESS_CONFIG", config, &
242 "A string that determines how the initial layer "//&
243 "thicknesses are specified for a new run: \n"//&
244 " \t file - read interface heights from the file specified \n"//&
245 " \t thickness_file - read thicknesses from the file specified \n"//&
246 " \t\t by (THICKNESS_FILE).\n"//&
247 " \t coord - determined by ALE coordinate.\n"//&
248 " \t uniform - uniform thickness layers evenly distributed \n"//&
249 " \t\t between the surface and MAXIMUM_DEPTH. \n"//&
250 " \t list - read a list of positive interface depths. \n"//&
251 " \t DOME - use a slope and channel configuration for the \n"//&
252 " \t\t DOME sill-overflow test case. \n"//&
253 " \t ISOMIP - use a configuration for the \n"//&
254 " \t\t ISOMIP test case. \n"//&
255 " \t benchmark - use the benchmark test case thicknesses. \n"//&
256 " \t Neverworld - use the Neverworld test case thicknesses. \n"//&
257 " \t search - search a density profile for the interface \n"//&
258 " \t\t densities. This is not yet implemented. \n"//&
259 " \t circle_obcs - the circle_obcs test case is used. \n"//&
260 " \t DOME2D - 2D version of DOME initialization. \n"//&
261 " \t adjustment2d - 2D lock exchange thickness ICs. \n"//&
262 " \t sloshing - sloshing gravity thickness ICs. \n"//&
263 " \t seamount - no motion test with seamount ICs. \n"//&
264 " \t dumbbell - sloshing channel ICs. \n"//&
265 " \t soliton - Equatorial Rossby soliton. \n"//&
266 " \t rossby_front - a mixed layer front in thermal wind balance.\n"//&
267 " \t USER - call a user modified routine.", &
268 default=
"uniform", do_not_log=just_read)
269 select case (trim(config))
271 call initialize_thickness_from_file(h, g, gv, us, pf, .false., just_read_params=just_read)
272 case (
"thickness_file")
273 call initialize_thickness_from_file(h, g, gv, us, pf, .true., just_read_params=just_read)
275 if (new_sim .and. useale)
then 276 call ale_initthicknesstocoord( ale_csp, g, gv, h )
277 elseif (new_sim)
then 278 call mom_error(fatal,
"MOM_initialize_state: USE_REGRIDDING must be True "//&
279 "for THICKNESS_CONFIG of 'coord'")
281 case (
"uniform");
call initialize_thickness_uniform(h, g, gv, pf, &
282 just_read_params=just_read)
283 case (
"list");
call initialize_thickness_list(h, g, gv, us, pf, &
284 just_read_params=just_read)
285 case (
"DOME");
call dome_initialize_thickness(h, g, gv, pf, &
286 just_read_params=just_read)
287 case (
"ISOMIP");
call isomip_initialize_thickness(h, g, gv, us, pf, tv, &
288 just_read_params=just_read)
289 case (
"benchmark");
call benchmark_initialize_thickness(h, g, gv, us, pf, &
290 tv%eqn_of_state, tv%P_Ref, just_read_params=just_read)
291 case (
"Neverwoorld",
"Neverland");
call neverworld_initialize_thickness(h, g, gv, us, pf, &
292 tv%eqn_of_state, tv%P_Ref)
293 case (
"search");
call initialize_thickness_search
294 case (
"circle_obcs");
call circle_obcs_initialize_thickness(h, g, gv, pf, &
295 just_read_params=just_read)
296 case (
"lock_exchange");
call lock_exchange_initialize_thickness(h, g, gv, us, &
297 pf, just_read_params=just_read)
298 case (
"external_gwave");
call external_gwave_initialize_thickness(h, g, gv, us, &
299 pf, just_read_params=just_read)
300 case (
"DOME2D");
call dome2d_initialize_thickness(h, g, gv, us, pf, &
301 just_read_params=just_read)
302 case (
"adjustment2d");
call adjustment_initialize_thickness(h, g, gv, us, &
303 pf, just_read_params=just_read)
304 case (
"sloshing");
call sloshing_initialize_thickness(h, g, gv, us, pf, &
305 just_read_params=just_read)
306 case (
"seamount");
call seamount_initialize_thickness(h, g, gv, us, pf, &
307 just_read_params=just_read)
308 case (
"dumbbell");
call dumbbell_initialize_thickness(h, g, gv, us, pf, &
309 just_read_params=just_read)
310 case (
"soliton");
call soliton_initialize_thickness(h, g, gv, us)
311 case (
"phillips");
call phillips_initialize_thickness(h, g, gv, us, pf, &
312 just_read_params=just_read)
313 case (
"rossby_front");
call rossby_front_initialize_thickness(h, g, gv, us, &
314 pf, just_read_params=just_read)
315 case (
"USER");
call user_initialize_thickness(h, g, gv, pf, &
316 just_read_params=just_read)
317 case default ;
call mom_error(fatal,
"MOM_initialize_state: "//&
318 "Unrecognized layer thickness configuration "//trim(config))
322 if ( use_temperature )
then 323 call get_param(pf, mdl,
"TS_CONFIG", config, &
324 "A string that determines how the initial tempertures "//&
325 "and salinities are specified for a new run: \n"//&
326 " \t file - read velocities from the file specified \n"//&
327 " \t\t by (TS_FILE). \n"//&
328 " \t fit - find the temperatures that are consistent with \n"//&
329 " \t\t the layer densities and salinity S_REF. \n"//&
330 " \t TS_profile - use temperature and salinity profiles \n"//&
331 " \t\t (read from TS_FILE) to set layer densities. \n"//&
332 " \t benchmark - use the benchmark test case T & S. \n"//&
333 " \t linear - linear in logical layer space. \n"//&
334 " \t DOME2D - 2D DOME initialization. \n"//&
335 " \t ISOMIP - ISOMIP initialization. \n"//&
336 " \t adjustment2d - 2d lock exchange T/S ICs. \n"//&
337 " \t sloshing - sloshing mode T/S ICs. \n"//&
338 " \t seamount - no motion test with seamount ICs. \n"//&
339 " \t dumbbell - sloshing channel ICs. \n"//&
340 " \t rossby_front - a mixed layer front in thermal wind balance.\n"//&
341 " \t SCM_CVMix_tests - used in the SCM CVMix tests.\n"//&
342 " \t USER - call a user modified routine.", &
343 fail_if_missing=new_sim, do_not_log=just_read)
345 select case (trim(config))
346 case (
"fit");
call initialize_temp_salt_fit(tv%T, tv%S, g, gv, us, pf, &
347 eos, tv%P_Ref, just_read_params=just_read)
348 case (
"file");
call initialize_temp_salt_from_file(tv%T, tv%S, g, &
349 pf, just_read_params=just_read)
350 case (
"benchmark");
call benchmark_init_temperature_salinity(tv%T, tv%S, &
351 g, gv, us, pf, eos, tv%P_Ref, just_read_params=just_read)
352 case (
"TS_profile") ;
call initialize_temp_salt_from_profile(tv%T, tv%S, &
353 g, pf, just_read_params=just_read)
354 case (
"linear");
call initialize_temp_salt_linear(tv%T, tv%S, g, pf, &
355 just_read_params=just_read)
356 case (
"DOME2D");
call dome2d_initialize_temperature_salinity ( tv%T, &
357 tv%S, h, g, gv, pf, eos, just_read_params=just_read)
358 case (
"ISOMIP");
call isomip_initialize_temperature_salinity ( tv%T, &
359 tv%S, h, g, gv, us, pf, eos, just_read_params=just_read)
360 case (
"adjustment2d");
call adjustment_initialize_temperature_salinity ( tv%T, &
361 tv%S, h, g, gv, pf, eos, just_read_params=just_read)
362 case (
"baroclinic_zone");
call baroclinic_zone_init_temperature_salinity( tv%T, &
363 tv%S, h, g, gv, us, pf, just_read_params=just_read)
364 case (
"sloshing");
call sloshing_initialize_temperature_salinity(tv%T, &
365 tv%S, h, g, gv, pf, eos, just_read_params=just_read)
366 case (
"seamount");
call seamount_initialize_temperature_salinity(tv%T, &
367 tv%S, h, g, gv, pf, eos, just_read_params=just_read)
368 case (
"dumbbell");
call dumbbell_initialize_temperature_salinity(tv%T, &
369 tv%S, h, g, gv, pf, eos, just_read_params=just_read)
370 case (
"rossby_front");
call rossby_front_initialize_temperature_salinity ( tv%T, &
371 tv%S, h, g, gv, pf, eos, just_read_params=just_read)
372 case (
"SCM_CVMix_tests");
call scm_cvmix_tests_ts_init(tv%T, tv%S, h, &
373 g, gv, us, pf, just_read_params=just_read)
374 case (
"dense");
call dense_water_initialize_ts(g, gv, pf, eos, tv%T, tv%S, &
375 h, just_read_params=just_read)
376 case (
"USER");
call user_init_temperature_salinity(tv%T, tv%S, g, pf, eos, &
377 just_read_params=just_read)
378 case default ;
call mom_error(fatal,
"MOM_initialize_state: "//&
379 "Unrecognized Temp & salt configuration "//trim(config))
383 if (use_temperature .and. use_obc) &
384 call fill_temp_salt_segments(g, obc, tv)
387 if (new_sim)
call pass_var(h, g%Domain)
390 call get_param(pf, mdl,
"VELOCITY_CONFIG", config, &
391 "A string that determines how the initial velocities "//&
392 "are specified for a new run: \n"//&
393 " \t file - read velocities from the file specified \n"//&
394 " \t\t by (VELOCITY_FILE). \n"//&
395 " \t zero - the fluid is initially at rest. \n"//&
396 " \t uniform - the flow is uniform (determined by\n"//&
397 " \t\t parameters INITIAL_U_CONST and INITIAL_V_CONST).\n"//&
398 " \t rossby_front - a mixed layer front in thermal wind balance.\n"//&
399 " \t soliton - Equatorial Rossby soliton.\n"//&
400 " \t USER - call a user modified routine.", default=
"zero", &
401 do_not_log=just_read)
402 select case (trim(config))
403 case (
"file");
call initialize_velocity_from_file(u, v, g, us, pf, &
404 just_read_params=just_read)
405 case (
"zero");
call initialize_velocity_zero(u, v, g, pf, &
406 just_read_params=just_read)
407 case (
"uniform");
call initialize_velocity_uniform(u, v, g, us, pf, &
408 just_read_params=just_read)
409 case (
"circular");
call initialize_velocity_circular(u, v, g, us, pf, &
410 just_read_params=just_read)
411 case (
"phillips");
call phillips_initialize_velocity(u, v, g, gv, us, pf, &
412 just_read_params=just_read)
413 case (
"rossby_front");
call rossby_front_initialize_velocity(u, v, h, &
414 g, gv, us, pf, just_read_params=just_read)
415 case (
"soliton");
call soliton_initialize_velocity(u, v, h, g, us)
416 case (
"USER");
call user_initialize_velocity(u, v, g, us, pf, &
417 just_read_params=just_read)
418 case default ;
call mom_error(fatal,
"MOM_initialize_state: "//&
419 "Unrecognized velocity configuration "//trim(config))
422 if (new_sim)
call pass_vector(u, v, g%Domain)
423 if (debug .and. new_sim)
then 424 call uvchksum(
"MOM_initialize_state [uv]", u, v, g%HI, haloshift=1, scale=us%m_s_to_L_T)
429 call get_param(pf, mdl,
"CONVERT_THICKNESS_UNITS", convert, &
430 "If true, convert the thickness initial conditions from "//&
431 "units of m to kg m-2 or vice versa, depending on whether "//&
432 "BOUSSINESQ is defined. This does not apply if a restart "//&
433 "file is read.", default=.not.gv%Boussinesq, do_not_log=just_read)
435 if (new_sim .and. convert .and. .not.gv%Boussinesq) &
437 call convert_thickness(h, g, gv, us, tv)
440 call get_param(pf, mdl,
"DEPRESS_INITIAL_SURFACE", depress_sfc, &
441 "If true, depress the initial surface to avoid huge "//&
442 "tsunamis when a large surface pressure is applied.", &
443 default=.false., do_not_log=just_read)
444 call get_param(pf, mdl,
"TRIM_IC_FOR_P_SURF", trim_ic_for_p_surf, &
445 "If true, cuts way the top of the column for initial conditions "//&
446 "at the depth where the hydrostatic pressure matches the imposed "//&
447 "surface pressure which is read from file.", default=.false., &
448 do_not_log=just_read)
449 if (depress_sfc .and. trim_ic_for_p_surf)
call mom_error(fatal,
"MOM_initialize_state: "//&
450 "DEPRESS_INITIAL_SURFACE and TRIM_IC_FOR_P_SURF are exclusive and cannot both be True")
451 if (new_sim .and. debug .and. (depress_sfc .or. trim_ic_for_p_surf)) &
452 call hchksum(h,
"Pre-depress: h ", g%HI, haloshift=1, scale=gv%H_to_m)
453 if (depress_sfc)
call depress_surface(h, g, gv, us, pf, tv, just_read_params=just_read)
454 if (trim_ic_for_p_surf)
call trim_for_ice(pf, g, gv, us, ale_csp, tv, h, just_read_params=just_read)
459 call get_param(pf, mdl,
"REGRID_ACCELERATE_INIT", regrid_accelerate, &
460 "If true, runs REGRID_ACCELERATE_ITERATIONS iterations of the regridding "//&
461 "algorithm to push the initial grid to be consistent with the initial "//&
462 "condition. Useful only for state-based and iterative coordinates.", &
463 default=.false., do_not_log=just_read)
464 if (regrid_accelerate)
then 465 call get_param(pf, mdl,
"REGRID_ACCELERATE_ITERATIONS", regrid_iterations, &
466 "The number of regridding iterations to perform to generate "//&
467 "an initial grid that is consistent with the initial conditions.", &
468 default=1, do_not_log=just_read)
470 call get_param(pf, mdl,
"DT", dt,
"Timestep", fail_if_missing=.true., scale=us%s_to_T)
472 if (new_sim .and. debug) &
473 call hchksum(h,
"Pre-ALE_regrid: h ", g%HI, haloshift=1, scale=gv%H_to_m)
474 call ale_regrid_accelerated(ale_csp, g, gv, h, tv, regrid_iterations, u, v, obc, tracer_reg, &
475 dt=dt, initial=.true.)
481 if (.not.new_sim)
then 484 call restore_state(dirs%input_filename, dirs%restart_input_dir, time, &
486 if (
present(time_in)) time = time_in
487 if ((gv%m_to_H_restart /= 0.0) .and. (gv%m_to_H_restart /= gv%m_to_H))
then 488 h_rescale = gv%m_to_H / gv%m_to_H_restart
489 do k=1,nz ;
do j=js,je ;
do i=is,ie ; h(i,j,k) = h_rescale * h(i,j,k) ;
enddo ;
enddo ;
enddo 491 if ( (us%s_to_T_restart * us%m_to_L_restart /= 0.0) .and. &
492 ((us%m_to_L * us%s_to_T_restart) /= (us%m_to_L_restart * us%s_to_T)) )
then 493 vel_rescale = (us%m_to_L * us%s_to_T_restart) / (us%m_to_L_restart * us%s_to_T)
494 do k=1,nz ;
do j=jsd,jed ;
do i=isdb,iedb ; u(i,j,k) = vel_rescale * u(i,j,k) ;
enddo ;
enddo ;
enddo 495 do k=1,nz ;
do j=jsdb,jedb ;
do i=isd,ied ; v(i,j,k) = vel_rescale * v(i,j,k) ;
enddo ;
enddo ;
enddo 499 if ( use_temperature )
then 500 call pass_var(tv%T, g%Domain, complete=.false.)
501 call pass_var(tv%S, g%Domain, complete=.false.)
503 call pass_var(h, g%Domain)
506 call hchksum(h,
"MOM_initialize_state: h ", g%HI, haloshift=1, scale=gv%H_to_m)
507 if ( use_temperature )
call hchksum(tv%T,
"MOM_initialize_state: T ", g%HI, haloshift=1)
508 if ( use_temperature )
call hchksum(tv%S,
"MOM_initialize_state: S ", g%HI, haloshift=1)
509 if ( use_temperature .and. debug_layers)
then ;
do k=1,nz
510 write(mesg,
'("MOM_IS: T[",I2,"]")') k
511 call hchksum(tv%T(:,:,k), mesg, g%HI, haloshift=1)
512 write(mesg,
'("MOM_IS: S[",I2,"]")') k
513 call hchksum(tv%S(:,:,k), mesg, g%HI, haloshift=1)
517 call get_param(pf, mdl,
"SPONGE", use_sponge, &
518 "If true, sponges may be applied anywhere in the domain. "//&
519 "The exact location and properties of those sponges are "//&
520 "specified via SPONGE_CONFIG.", default=.false.)
521 if ( use_sponge )
then 522 call get_param(pf, mdl,
"SPONGE_CONFIG", config, &
523 "A string that sets how the sponges are configured: \n"//&
524 " \t file - read sponge properties from the file \n"//&
525 " \t\t specified by (SPONGE_FILE).\n"//&
526 " \t ISOMIP - apply ale sponge in the ISOMIP case \n"//&
527 " \t RGC - apply sponge in the rotating_gravity_current case \n"//&
528 " \t DOME - use a slope and channel configuration for the \n"//&
529 " \t\t DOME sill-overflow test case. \n"//&
530 " \t BFB - Sponge at the southern boundary of the domain\n"//&
531 " \t\t for buoyancy-forced basin case.\n"//&
532 " \t USER - call a user modified routine.", default=
"file")
533 select case (trim(config))
534 case (
"DOME");
call dome_initialize_sponges(g, gv, us, tv, pf, sponge_csp)
535 case (
"DOME2D");
call dome2d_initialize_sponges(g, gv, us, tv, pf, useale, &
536 sponge_csp, ale_sponge_csp)
537 case (
"ISOMIP");
call isomip_initialize_sponges(g, gv, us, tv, pf, useale, &
538 sponge_csp, ale_sponge_csp)
539 case(
"RGC");
call rgc_initialize_sponges(g, gv, us, tv, u, v, pf, useale, &
540 sponge_csp, ale_sponge_csp)
541 case (
"USER");
call user_initialize_sponges(g, gv, use_temperature, tv, pf, sponge_csp, h)
542 case (
"BFB");
call bfb_initialize_sponges_southonly(g, gv, us, use_temperature, tv, pf, &
544 case (
"DUMBBELL");
call dumbbell_initialize_sponges(g, gv, us, tv, pf, useale, &
545 sponge_csp, ale_sponge_csp)
546 case (
"phillips");
call phillips_initialize_sponges(g, gv, us, tv, pf, sponge_csp, h)
547 case (
"dense");
call dense_water_initialize_sponges(g, gv, us, tv, pf, useale, &
548 sponge_csp, ale_sponge_csp)
549 case (
"file");
call initialize_sponges_file(g, gv, us, use_temperature, tv, pf, &
550 sponge_csp, ale_sponge_csp, time)
551 case default ;
call mom_error(fatal,
"MOM_initialize_state: "//&
552 "Unrecognized sponge configuration "//trim(config))
557 call open_boundary_init(g, gv, us, pf, obc, restart_cs)
560 if (
associated(obc))
then 561 call initialize_segment_data(g, obc, pf)
564 if (.not. obc%needs_IO_for_data) &
565 call update_obc_segment_data(g, gv, us, obc, tv, h, time)
567 call get_param(pf, mdl,
"OBC_USER_CONFIG", config, &
568 "A string that sets how the user code is invoked to set open boundary data: \n"//&
569 " DOME - specified inflow on northern boundary\n"//&
570 " dyed_channel - supercritical with dye on the inflow boundary\n"//&
571 " dyed_obcs - circle_obcs with dyes on the open boundaries\n"//&
572 " Kelvin - barotropic Kelvin wave forcing on the western boundary\n"//&
573 " shelfwave - Flather with shelf wave forcing on western boundary\n"//&
574 " supercritical - now only needed here for the allocations\n"//&
575 " tidal_bay - Flather with tidal forcing on eastern boundary\n"//&
576 " USER - user specified", default=
"none")
577 if (trim(config) ==
"DOME")
then 578 call dome_set_obc_data(obc, tv, g, gv, us, pf, tracer_reg)
579 elseif (trim(config) ==
"dyed_channel")
then 580 call dyed_channel_set_obc_tracer_data(obc, g, gv, pf, tracer_reg)
581 obc%update_OBC = .true.
582 elseif (trim(config) ==
"dyed_obcs")
then 583 call dyed_obcs_set_obc_data(obc, g, gv, pf, tracer_reg)
584 elseif (trim(config) ==
"Kelvin")
then 585 obc%update_OBC = .true.
586 elseif (trim(config) ==
"shelfwave")
then 587 obc%update_OBC = .true.
588 elseif (lowercase(trim(config)) ==
"supercritical")
then 589 call supercritical_set_obc_data(obc, g, pf)
590 elseif (trim(config) ==
"tidal_bay")
then 591 obc%update_OBC = .true.
592 elseif (trim(config) ==
"USER")
then 593 call user_set_obc_data(obc, tv, g, pf, tracer_reg)
594 elseif (.not. trim(config) ==
"none")
then 595 call mom_error(fatal,
"The open boundary conditions specified by "//&
596 "OBC_USER_CONFIG = "//trim(config)//
" have not been fully implemented.")
598 if (open_boundary_query(obc, apply_open_obc=.true.))
then 599 call set_tracer_data(obc, tv, h, g, pf, tracer_reg)
606 if (debug.and.
associated(obc))
then 607 call hchksum(g%mask2dT,
'MOM_initialize_state: mask2dT ', g%HI)
608 call uvchksum(
'MOM_initialize_state: mask2dC[uv]', g%mask2dCu, &
610 call qchksum(g%mask2dBu,
'MOM_initialize_state: mask2dBu ', g%HI)
613 if (debug_obc)
call open_boundary_test_extern_h(g, gv, obc, h)
614 call calltree_leave(
'MOM_initialize_state()')