From 5225014fde9f0a8acef2687ab56cafb08960b97a Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 24 Apr 2024 11:22:02 -0600 Subject: [PATCH 1/3] Remove unused INPUT_STR_LENGTH to support FMS update --- model/fv_control.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model/fv_control.F90 b/model/fv_control.F90 index 84d54c0c2..33bc20ac3 100644 --- a/model/fv_control.F90 +++ b/model/fv_control.F90 @@ -89,7 +89,7 @@ module fv_control_mod ! 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 +! input_nml_file, get_unit, WARNING, read_ascii_file ! ! ! mpp_domains_mod @@ -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, & From 19eda88a73564988b444094907c001c7555157a7 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 2 May 2024 16:08:24 -0600 Subject: [PATCH 2/3] Enable internal namelist option --- CMakeLists.txt | 3 +++ model/lin_cloud_microphys.F90 | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f9da2d167..0fe43ec94 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/model/lin_cloud_microphys.F90 b/model/lin_cloud_microphys.F90 index ceb5b663d..b8fd91327 100644 --- a/model/lin_cloud_microphys.F90 +++ b/model/lin_cloud_microphys.F90 @@ -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 From 20fc76a3cec11d3949eb1893c472b297a7f24b45 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 7 May 2024 09:00:02 -0600 Subject: [PATCH 3/3] In model/fv_control.F90 fv_init2, only reset input namelist if it has been changed for the next before --- model/fv_control.F90 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/model/fv_control.F90 b/model/fv_control.F90 index 33bc20ac3..e2bd1b24e 100644 --- a/model/fv_control.F90 +++ b/model/fv_control.F90 @@ -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() @@ -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)