diff --git a/atmos_model.F90 b/atmos_model.F90 index e6eea1b43..2a5091bd6 100644 --- a/atmos_model.F90 +++ b/atmos_model.F90 @@ -96,8 +96,7 @@ module atmos_model_mod DIAG_SIZE use fv_iau_mod, only: iau_external_data_type,getiauforcing,iau_initialize use module_fv3_config, only: output_1st_tstep_rst, first_kdt, nsout, & - restart_endfcst, output_fh, fcst_mpi_comm, & - fcst_ntasks + output_fh, fcst_mpi_comm, fcst_ntasks use module_block_data, only: block_atmos_copy, block_data_copy, & block_data_copy_or_fill, & block_data_combine_fractions @@ -178,6 +177,7 @@ module atmos_model_mod logical :: debug = .false. !logical :: debug = .true. logical :: sync = .false. +logical :: restart_endfcst = .false. real :: avg_max_length=3600. logical :: ignore_rst_cksum = .false. namelist /atmos_model_nml/ blocksize, chksum_debug, dycore_only, debug, sync, ccpp_suite, avg_max_length, & diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index 0dac224ff..d950e39e6 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -911,6 +911,9 @@ module GFS_typedefs real(kind=kind_phys) :: nssl_cccn !< CCN concentration (m-3) real(kind=kind_phys) :: nssl_alphah !< graupel shape parameter real(kind=kind_phys) :: nssl_alphahl !< hail shape parameter + real(kind=kind_phys) :: nssl_alphar ! shape parameter for rain (imurain=1 only) + real(kind=kind_phys) :: nssl_ehw0_in ! constant or max assumed graupel-droplet collection efficiency + real(kind=kind_phys) :: nssl_ehlw0_in! constant or max assumed hail-droplet collection efficiency logical :: nssl_hail_on !< NSSL flag to activate the hail category logical :: nssl_ccn_on !< NSSL flag to activate the CCN category logical :: nssl_invertccn !< NSSL flag to treat CCN as activated (true) or unactivated (false) @@ -3162,6 +3165,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & real(kind=kind_phys) :: nssl_cccn = 0.6e9 !< CCN concentration (m-3) real(kind=kind_phys) :: nssl_alphah = 0.0 !< graupel shape parameter real(kind=kind_phys) :: nssl_alphahl = 1.0 !< hail shape parameter + real(kind=kind_phys) :: nssl_alphar = 0.0 ! shape parameter for rain (imurain=1 only) + real(kind=kind_phys) :: nssl_ehw0_in = 0.9 ! constant or max assumed graupel-droplet collection efficiency + real(kind=kind_phys) :: nssl_ehlw0_in = 0.9 ! constant or max assumed hail-droplet collection efficiency logical :: nssl_hail_on = .false. !< NSSL flag to activate the hail category logical :: nssl_ccn_on = .true. !< NSSL flag to activate the CCN category logical :: nssl_invertccn = .true. !< NSSL flag to treat CCN as activated (true) or unactivated (false) @@ -3587,6 +3593,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & ext_diag_thompson, dt_inner, lgfdlmprad, & sedi_semi, decfl, & nssl_cccn, nssl_alphah, nssl_alphahl, & + nssl_alphar, nssl_ehw0_in, nssl_ehlw0_in, & nssl_invertccn, nssl_hail_on, nssl_ccn_on, & !--- max hourly avg_max_length, & @@ -4161,6 +4168,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%nssl_cccn = nssl_cccn Model%nssl_alphah = nssl_alphah Model%nssl_alphahl = nssl_alphahl + Model%nssl_alphar = nssl_alphar + Model%nssl_ehw0_in = nssl_ehw0_in + Model%nssl_ehlw0_in = nssl_ehlw0_in Model%nssl_hail_on = nssl_hail_on Model%nssl_ccn_on = nssl_ccn_on Model%nssl_invertccn = nssl_invertccn @@ -6019,6 +6029,9 @@ subroutine control_print(Model) print *, ' nssl_cccn - CCCN background CCN conc. : ', Model%nssl_cccn print *, ' nssl_alphah - graupel shape parameter : ', Model%nssl_alphah print *, ' nssl_alphahl - hail shape parameter : ', Model%nssl_alphahl + print *, ' nssl_alphar - rain shape parameter : ', Model%nssl_alphar + print *, ' nssl_ehw0_in - graupel-droplet collection effiency : ', Model%nssl_ehw0_in + print *, ' nssl_ehlw0_in - hail-droplet collection effiency : ', Model%nssl_ehlw0_in print *, ' nssl_hail_on - hail activation flag : ', Model%nssl_hail_on print *, ' lradar - radar refl. flag : ', Model%lradar print *, ' lrefres : ', Model%lrefres diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index edbb1dbaa..f6a426c43 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -3935,33 +3935,54 @@ kind = kind_phys [nssl_alphah] standard_name = nssl_alpha_graupel - long_name = graupel PSD shape parameter in NSSL micro + long_name = graupel particle size distribution(PSD) shape parameter in NSSL microphysics scheme units = none dimensions = () type = real kind = kind_phys [nssl_alphahl] standard_name = nssl_alpha_hail - long_name = hail PSD shape parameter in NSSL micro + long_name = hail particle size distribution(PSD) shape parameter in NSSL microphysics scheme + units = none + dimensions = () + type = real + kind = kind_phys +[nssl_alphar] + standard_name = nssl_alpha_rain + long_name = rain particle size distribution(PSD) shape parameter in NSSL microphysics scheme + units = none + dimensions = () + type = real + kind = kind_phys +[nssl_ehw0_in] + standard_name = nssl_graupel_collection_efficiency + long_name = graupel droplet collection efficiency in NSSL microphysics scheme + units = none + dimensions = () + type = real + kind = kind_phys +[nssl_ehlw0_in] + standard_name = nssl_hail_collection_efficiency + long_name = hail droplet collection efficiency in NSSL microphysics scheme units = none dimensions = () type = real kind = kind_phys [nssl_ccn_on] standard_name = nssl_ccn_on - long_name = CCN activation flag in NSSL micro + long_name = CCN activation flag in NSSL microphysics scheme units = flag dimensions = () type = logical [nssl_hail_on] standard_name = nssl_hail_on - long_name = hail activation flag in NSSL micro + long_name = hail activation flag in NSSL microphysics scheme units = flag dimensions = () type = logical [nssl_invertccn] standard_name = nssl_invertccn - long_name = flag to invert CCN in NSSL micro + long_name = flag to invert CCN in NSSL microphysics scheme units = flag dimensions = () type = logical diff --git a/ccpp/framework b/ccpp/framework index 1b6352fb2..60295ad35 160000 --- a/ccpp/framework +++ b/ccpp/framework @@ -1 +1 @@ -Subproject commit 1b6352fb24f053b738bde72eed0ddf0b60ec7c0f +Subproject commit 60295ad3578ca01b5ca4214b91dd13bb790fbdfe diff --git a/ccpp/physics b/ccpp/physics index 88ec3ca56..1003d151d 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 88ec3ca56075cdc6a7437cfd37334fa702112aa2 +Subproject commit 1003d151dcaf33698c6cbf5bad7e6d8ac4d9566a diff --git a/module_fcst_grid_comp.F90 b/module_fcst_grid_comp.F90 index 0fc3fff42..c8df6acc0 100644 --- a/module_fcst_grid_comp.F90 +++ b/module_fcst_grid_comp.F90 @@ -65,7 +65,7 @@ module module_fcst_grid_comp nbdlphys, iau_offset use module_fv3_config, only: dt_atmos, fcst_mpi_comm, fcst_ntasks, & quilting, calendar, cpl_grid_id, & - cplprint_flag, restart_endfcst + cplprint_flag use get_stochy_pattern_mod, only: write_stoch_restart_atm use module_cplfields, only: nExportFields, exportFields, exportFieldsInfo, & @@ -73,7 +73,6 @@ module module_fcst_grid_comp use module_cplfields, only: realizeConnectedCplFields use atmos_model_mod, only: setup_exportdata - use CCPP_data, only: GFS_control ! !----------------------------------------------------------------------- ! @@ -90,7 +89,7 @@ module module_fcst_grid_comp type(ESMF_GridComp),dimension(:),allocatable :: fcstGridComp integer :: ngrids, mygrid - integer :: intrm_rst, n_atmsteps + integer :: n_atmsteps !----- coupled model data ----- @@ -744,20 +743,7 @@ subroutine fcst_initialize(fcst_comp, importState, exportState, clock, rc) endif endif ! if to write out restart at the end of forecast - restart_endfcst = .false. - if ( ANY(frestart(:) == total_inttime) ) restart_endfcst = .true. -! frestart only contains intermediate restart - do i=1,size(frestart) - if(frestart(i) == total_inttime) then - frestart(i) = 0 - exit - endif - enddo - if (mype == 0) print *,'frestart=',frestart(1:10)/3600, 'restart_endfcst=',restart_endfcst, & - 'total_inttime=',total_inttime -! if there is restart writing during integration - intrm_rst = 0 - if (frestart(1)>0) intrm_rst = 1 + if (mype == 0) print *,'frestart=',frestart(1:10)/3600, 'total_inttime=',total_inttime !------ initialize component models ------ @@ -1255,9 +1241,8 @@ subroutine fcst_run_phase_2(fcst_comp, importState, exportState,clock,rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return !--- intermediate restart - if (intrm_rst>0) then - call get_time(Atmos%Time - Atmos%Time_init, seconds) - if (ANY(frestart(:) == seconds)) then + call get_time(Atmos%Time - Atmos%Time_init, seconds) + if (ANY(frestart(:) == seconds)) then if (mype == 0) write(*,*)'write out restart at n_atmsteps=',n_atmsteps,' seconds=',seconds, & 'integration length=',n_atmsteps*dt_atmos/3600. @@ -1279,7 +1264,6 @@ subroutine fcst_run_phase_2(fcst_comp, importState, exportState,clock,rc) 'Current model time: year, month, day, hour, minute, second' close( unit ) endif - endif endif if (mype == 0) write(*,'(A,I16,A,F16.6)')'PASS: fcstRUN phase 2, n_atmsteps = ', & @@ -1323,24 +1307,6 @@ subroutine fcst_finalize(fcst_comp, importState, exportState,clock,rc) call atmos_model_end (Atmos) -!*** write restart file - if( restart_endfcst ) then - call get_date (Atmos%Time, date(1), date(2), date(3), & - date(4), date(5), date(6)) - call mpp_set_current_pelist() - if (mpp_pe() == mpp_root_pe())then - open( newunit=unit, file='RESTART/coupler.res' ) - write( unit, '(i6,8x,a)' )calendar_type, & - '(Calendar: no_calendar=0, thirty_day_months=1, julian=2, gregorian=3, noleap=4)' - - write( unit, '(6i6,8x,a)' )date_init, & - 'Model start time: year, month, day, hour, minute, second' - write( unit, '(6i6,8x,a)' )date, & - 'Current model time: year, month, day, hour, minute, second' - close( unit ) - endif - endif - call diag_manager_end (Atmos%Time) call fms_end diff --git a/module_fv3_config.F90 b/module_fv3_config.F90 index bb3546772..a62800b34 100644 --- a/module_fv3_config.F90 +++ b/module_fv3_config.F90 @@ -20,7 +20,6 @@ module module_fv3_config integer :: cpl_grid_id logical :: cplprint_flag logical :: quilting, output_1st_tstep_rst - logical :: restart_endfcst ! real,dimension(:),allocatable :: output_fh character(esmf_maxstr),dimension(:),allocatable :: filename_base diff --git a/moving_nest/fv_moving_nest.F90 b/moving_nest/fv_moving_nest.F90 index 009f04b87..6ef5ab384 100644 --- a/moving_nest/fv_moving_nest.F90 +++ b/moving_nest/fv_moving_nest.F90 @@ -72,7 +72,11 @@ module fv_moving_nest_mod use boundary_mod, only: update_coarse_grid, update_coarse_grid_mpp use bounding_box_mod, only: bbox, bbox_get_C2F_index, fill_bbox +#ifdef OVERLOAD_R4 + use constantsR4_mod, only: cp_air, omega, rdgas, grav, rvgas, kappa, pstd_mks, hlv +#else use constants_mod, only: cp_air, omega, rdgas, grav, rvgas, kappa, pstd_mks, hlv +#endif use field_manager_mod, only: MODEL_ATMOS use fv_arrays_mod, only: fv_atmos_type, fv_nest_type, fv_grid_type, R_GRID use fv_arrays_mod, only: allocate_fv_nest_bc_type, deallocate_fv_nest_bc_type diff --git a/moving_nest/fv_moving_nest_main.F90 b/moving_nest/fv_moving_nest_main.F90 index 4f1ce7aeb..34af608c2 100644 --- a/moving_nest/fv_moving_nest_main.F90 +++ b/moving_nest/fv_moving_nest_main.F90 @@ -33,7 +33,11 @@ module fv_moving_nest_main_mod ! FMS modules: !----------------- use block_control_mod, only: block_control_type +#ifdef OVERLOAD_R4 + use constantsR4_mod, only: cp_air, rdgas, grav, rvgas, kappa, pstd_mks +#else use constants_mod, only: cp_air, rdgas, grav, rvgas, kappa, pstd_mks +#endif use time_manager_mod, only: time_type, get_time, get_date, set_time, operator(+), & operator(-), operator(/), time_type_to_real use fms_mod, only: file_exist, open_namelist_file, & diff --git a/moving_nest/fv_moving_nest_physics.F90 b/moving_nest/fv_moving_nest_physics.F90 index 873964fa5..2dc6bce5b 100644 --- a/moving_nest/fv_moving_nest_physics.F90 +++ b/moving_nest/fv_moving_nest_physics.F90 @@ -68,7 +68,11 @@ module fv_moving_nest_physics_mod use GFS_init, only: GFS_grid_populate use boundary_mod, only: update_coarse_grid, update_coarse_grid_mpp +#ifdef OVERLOAD_R4 + use constantsR4_mod, only: cp_air, rdgas, grav, rvgas, kappa, pstd_mks, hlv +#else use constants_mod, only: cp_air, rdgas, grav, rvgas, kappa, pstd_mks, hlv +#endif use field_manager_mod, only: MODEL_ATMOS use fv_arrays_mod, only: fv_atmos_type, fv_nest_type, fv_grid_type, R_GRID use fv_moving_nest_types_mod, only: fv_moving_nest_prog_type, fv_moving_nest_physics_type, mn_surface_grids, fv_moving_nest_type diff --git a/moving_nest/fv_moving_nest_utils.F90 b/moving_nest/fv_moving_nest_utils.F90 index 11485aa88..06136a2b1 100644 --- a/moving_nest/fv_moving_nest_utils.F90 +++ b/moving_nest/fv_moving_nest_utils.F90 @@ -67,7 +67,11 @@ module fv_moving_nest_utils_mod use IPD_typedefs, only: kind_phys => IPD_kind_phys #endif +#ifdef OVERLOAD_R4 + use constantsR4_mod, only: grav +#else use constants_mod, only: grav +#endif use boundary_mod, only: update_coarse_grid, update_coarse_grid_mpp use bounding_box_mod, only: bbox, bbox_get_C2F_index, fill_bbox diff --git a/moving_nest/fv_tracker.F90 b/moving_nest/fv_tracker.F90 index 75c38217b..5cda9083f 100644 --- a/moving_nest/fv_tracker.F90 +++ b/moving_nest/fv_tracker.F90 @@ -26,7 +26,11 @@ module fv_tracker_mod #include +#ifdef OVERLOAD_R4 + use constantsR4_mod, only: pi=>pi_8, rad_to_deg, deg_to_rad, RVGAS, RDGAS +#else use constants_mod, only: pi=>pi_8, rad_to_deg, deg_to_rad, RVGAS, RDGAS +#endif use fms_mod, only: mpp_clock_id, CLOCK_SUBCOMPONENT, clock_flag_default, & mpp_clock_begin, mpp_clock_end use time_manager_mod, only: time_type, get_time, set_time, operator(+), &