Skip to content

Commit

Permalink
Merge pull request #100 from climbfuji/feature/update_fvdycore_for_fm…
Browse files Browse the repository at this point in the history
…s_no_hardcoded_input_nml_path_for_geos_branch
  • Loading branch information
mathomp4 authored May 8, 2024
2 parents 4bac7bb + 20fc76a commit 0dd21f5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ ecbuild_info("Building FV dynamics dual hydrostatic/non-hydrostatic")
ecbuild_info("This sets MOIST_CAPPA and USE_COND preprocessor variables")
target_compile_definitions (${this} PRIVATE MOIST_CAPPA USE_COND)

ecbuild_info("This sets the INTERNAL_FILE_NML preprocessor variable")
target_compile_definitions (${this} PRIVATE INTERNAL_FILE_NML)

esma_add_subdirectories(
model/mapz-driver
model/tp-core-driver)
12 changes: 7 additions & 5 deletions model/fv_control.F90
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ module fv_control_mod
! <td>mpp_send, mpp_sync, mpp_transmit, mpp_set_current_pelist, mpp_declare_pelist,
! mpp_root_pe, mpp_recv, mpp_sync_self, mpp_broadcast, read_input_nml,
! FATAL, mpp_error, mpp_pe, stdlog, mpp_npes, mpp_get_current_pelist,
! input_nml_file, get_unit, WARNING, read_ascii_file, INPUT_STR_LENGTH</td>
! input_nml_file, get_unit, WARNING, read_ascii_file</td>
! </tr>
! <tr>
! <td>mpp_domains_mod</td>
Expand Down Expand Up @@ -121,7 +121,7 @@ module fv_control_mod
use mpp_mod, only: FATAL, mpp_error, mpp_pe, stdlog, &
mpp_npes, mpp_get_current_pelist, &
input_nml_file, get_unit, WARNING, &
read_ascii_file, INPUT_STR_LENGTH
read_ascii_file
use mpp_domains_mod, only: mpp_get_data_domain, mpp_get_compute_domain
use tracer_manager_mod, only: tm_get_number_tracers => get_number_tracers, &
tm_get_tracer_index => get_tracer_index, &
Expand Down Expand Up @@ -729,8 +729,10 @@ subroutine run_setup(Atm, dt_atmos, grids_on_this_pe, p_split)
read (input_nml_file,test_case_nml,iostat=ios)
ierr = check_nml_error(ios,'test_case_nml')

! Reset input_file_nml to default behavior
call read_input_nml
! Reset input_file_nml to default behavior if necessary
if (n > 1) then
call read_input_nml
endif
#else
if (size(Atm) == 1) then
f_unit = open_namelist_file()
Expand All @@ -750,7 +752,7 @@ subroutine run_setup(Atm, dt_atmos, grids_on_this_pe, p_split)
read (f_unit,test_case_nml,iostat=ios)
ierr = check_nml_error(ios,'test_case_nml')
call close_file(f_unit)
#endif
#endif
write(unit, nml=fv_core_nml)
write(unit, nml=test_case_nml)

Expand Down
2 changes: 1 addition & 1 deletion model/lin_cloud_microphys.F90
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

module gfdl_lin_cloud_microphys_mod

use mpp_mod, only: mpp_pe, mpp_root_pe
use mpp_mod, only: mpp_pe, mpp_root_pe, input_nml_file
! use mpp_mod, only: stdlog, mpp_pe, mpp_root_pe, mpp_clock_id, &
! mpp_clock_begin, mpp_clock_end, clock_routine, &
! input_nml_file
Expand Down

0 comments on commit 0dd21f5

Please sign in to comment.