Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce GEOM_FILE runtime parameter to set ocean_geometry file name. #278

Merged
merged 1 commit into from
May 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/core/MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2117,6 +2117,7 @@ subroutine initialize_MOM(Time, Time_init, param_file, dirs, CS, &
type(ocean_internal_state) :: MOM_internal_state
type(MOM_domain_type), pointer :: MOM_dom_unmasked => null() ! Unmasked MOM domain instance
! (To be used for writing out ocean geometry)
character(len=240) :: geom_file ! Name of the ocean geometry file

CS%Time => Time

Expand Down Expand Up @@ -2464,6 +2465,9 @@ subroutine initialize_MOM(Time, Time_init, param_file, dirs, CS, &
"vertical grid files. Other values are invalid.", default=1)
if (write_geom<0 .or. write_geom>2) call MOM_error(FATAL,"MOM: "//&
"WRITE_GEOM must be equal to 0, 1 or 2.")
call get_param(param_file, "MOM", "GEOM_FILE", geom_file, &
"The file into which to write the ocean geometry.", &
default="ocean_geometry")
call get_param(param_file, "MOM", "USE_DBCLIENT", CS%use_dbclient, &
"If true, initialize a client to a remote database that can "//&
"be used for online analysis and machine-learning inference.",&
Expand Down Expand Up @@ -2853,11 +2857,11 @@ subroutine initialize_MOM(Time, Time_init, param_file, dirs, CS, &
call create_dyn_horgrid(dG_unmasked_in, HI_in_unmasked, bathymetry_at_vel=bathy_at_vel)
call clone_MOM_domain(MOM_dom_unmasked, dG_unmasked_in%Domain)
call MOM_initialize_fixed(dG_unmasked_in, US, OBC_in, param_file, .false., dirs%output_directory)
call write_ocean_geometry_file(dG_unmasked_in, param_file, dirs%output_directory, US=US)
call write_ocean_geometry_file(dG_unmasked_in, param_file, dirs%output_directory, US=US, geom_file=geom_file)
call deallocate_MOM_domain(MOM_dom_unmasked)
call destroy_dyn_horgrid(dG_unmasked_in)
else
call write_ocean_geometry_file(dG_in, param_file, dirs%output_directory, US=US)
call write_ocean_geometry_file(dG_in, param_file, dirs%output_directory, US=US, geom_file=geom_file)
endif
endif
call destroy_dyn_horgrid(dG_in)
Expand Down
Loading