From baca8de63466e89b77f6cf550650e87adcaeefa0 Mon Sep 17 00:00:00 2001 From: Dusan Jovic <48258889+DusanJovic-NOAA@users.noreply.github.com> Date: Thu, 5 Nov 2020 11:58:08 -0500 Subject: [PATCH 1/2] Necessary changes for HWRF physics (Ferrier-Aligo MP in dycore) This PR contains two changes, one for avoiding crashes when the dycore debug option is turned on (in model/fv_dynamics.F90), and one for running microphysics with fewer tracers than in the input data set (in tools/external_ic.F90). This is required for Ferrier-Aligo microphysics. --- model/fv_dynamics.F90 | 12 ++++++------ tools/external_ic.F90 | 6 ++++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/model/fv_dynamics.F90 b/model/fv_dynamics.F90 index 16c0e5753..1b706681b 100644 --- a/model/fv_dynamics.F90 +++ b/model/fv_dynamics.F90 @@ -774,12 +774,12 @@ subroutine fv_dynamics(npx, npy, npz, nq_tot, ng, bdt, consv_te, fill, if ( flagstruct%fv_debug ) then if (is_master()) write(*,'(A, I3, A1, I3)') 'finished k_split ', n_map, '/', k_split call prt_mxm('T_dyn_a3', pt, is, ie, js, je, ng, npz, 1., gridstruct%area_64, domain) - call prt_mxm('SPHUM_dyn', q(isd,jsd,1,sphum ), is, ie, js, je, ng, npz, 1.,gridstruct%area_64, domain) - call prt_mxm('liq_wat_dyn', q(isd,jsd,1,liq_wat), is, ie, js, je, ng, npz, 1.,gridstruct%area_64, domain) - call prt_mxm('rainwat_dyn', q(isd,jsd,1,rainwat), is, ie, js, je, ng, npz, 1.,gridstruct%area_64, domain) - call prt_mxm('ice_wat_dyn', q(isd,jsd,1,ice_wat), is, ie, js, je, ng, npz, 1.,gridstruct%area_64, domain) - call prt_mxm('snowwat_dyn', q(isd,jsd,1,snowwat), is, ie, js, je, ng, npz, 1.,gridstruct%area_64, domain) - call prt_mxm('graupel_dyn', q(isd,jsd,1,graupel), is, ie, js, je, ng, npz, 1.,gridstruct%area_64, domain) + if (sphum > 0) call prt_mxm('SPHUM_dyn', q(isd,jsd,1,sphum ), is, ie, js, je, ng, npz, 1.,gridstruct%area_64, domain) + if (liq_wat > 0) call prt_mxm('liq_wat_dyn', q(isd,jsd,1,liq_wat), is, ie, js, je, ng, npz, 1.,gridstruct%area_64, domain) + if (rainwat > 0) call prt_mxm('rainwat_dyn', q(isd,jsd,1,rainwat), is, ie, js, je, ng, npz, 1.,gridstruct%area_64, domain) + if (ice_wat > 0) call prt_mxm('ice_wat_dyn', q(isd,jsd,1,ice_wat), is, ie, js, je, ng, npz, 1.,gridstruct%area_64, domain) + if (snowwat > 0) call prt_mxm('snowwat_dyn', q(isd,jsd,1,snowwat), is, ie, js, je, ng, npz, 1.,gridstruct%area_64, domain) + if (graupel > 0) call prt_mxm('graupel_dyn', q(isd,jsd,1,graupel), is, ie, js, je, ng, npz, 1.,gridstruct%area_64, domain) endif #ifdef AVEC_TIMERS call avec_timer_stop(6) diff --git a/tools/external_ic.F90 b/tools/external_ic.F90 index 432703501..44f76c22e 100644 --- a/tools/external_ic.F90 +++ b/tools/external_ic.F90 @@ -570,8 +570,10 @@ subroutine get_nggps_ic (Atm, fv_domain, dt_atmos ) !--- read in the number of tracers in the NCEP NGGPS ICs call read_data ('INPUT/'//trim(fn_gfs_ctl), 'ntrac', ntrac, no_domain=.TRUE.) - if (ntrac > ntracers) call mpp_error(FATAL,'==> External_ic::get_nggps_ic: more NGGPS tracers & - &than defined in field_table '//trim(fn_gfs_ctl)//' for NGGPS IC') + ! DH* 20200922 - this breaks Ferrier-Aligo MP runs + !if (ntrac > ntracers) call mpp_error(FATAL,'==> External_ic::get_nggps_ic: more NGGPS tracers & + ! &than defined in field_table '//trim(fn_gfs_ctl)//' for NGGPS IC') + ! *DH 20200922 ! call get_data_source(source,Atm%flagstruct%regional) From c3ab9a906ed6bfe5c4b3123632cea538882f8bc1 Mon Sep 17 00:00:00 2001 From: Jun Wang Date: Fri, 13 Nov 2020 08:30:59 -0600 Subject: [PATCH 2/2] remove duplicate read_data in fms_mod in external_ic.F90 --- tools/external_ic.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/external_ic.F90 b/tools/external_ic.F90 index 44f76c22e..ed2e7b37e 100644 --- a/tools/external_ic.F90 +++ b/tools/external_ic.F90 @@ -148,7 +148,7 @@ module external_ic_mod use external_sst_mod, only: i_sst, j_sst, sst_ncep use fms_mod, only: file_exist, read_data, field_exist, write_version_number use fms_mod, only: open_namelist_file, check_nml_error, close_file - use fms_mod, only: get_mosaic_tile_file, read_data, error_mesg + use fms_mod, only: get_mosaic_tile_file, error_mesg use fms_io_mod, only: get_tile_string, field_size, free_restart_type use fms_io_mod, only: restart_file_type, register_restart_field use fms_io_mod, only: save_restart, restore_state, set_filename_appendix, get_global_att_value