diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index eaf8efd1a..913432c0e 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -4233,7 +4233,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & endif ! -- setup aerosol scavenging factors - allocate(Model%fscav(Model%ntchm)) + n = max(Model%ntrac, Model%ntchm) + allocate(Model%fscav(n)) + Model%fscav = -9999.0 if (Model%ntchm > 0) then ! -- initialize to default Model%fscav = 0.6_kind_phys @@ -5702,6 +5704,9 @@ subroutine diag_create (Diag, IM, Model) allocate (Diag%dt3dt (IM,Model%levs,11)) if (Model%qdiag3d) then allocate (Diag%dq3dt (IM,Model%levs,13)) + allocate (Diag%upd_mf (IM,Model%levs)) + allocate (Diag%dwn_mf (IM,Model%levs)) + allocate (Diag%det_mf (IM,Model%levs)) else allocate (Diag%dq3dt (1,1,13)) endif @@ -5999,9 +6004,9 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center) Diag%dt3dt = zero if (Model%qdiag3d) then Diag%dq3dt = zero -! Diag%upd_mf = zero -! Diag%dwn_mf = zero -! Diag%det_mf = zero + Diag%upd_mf = zero + Diag%dwn_mf = zero + Diag%det_mf = zero endif endif diff --git a/ccpp/driver/GFS_diagnostics.F90 b/ccpp/driver/GFS_diagnostics.F90 index 3f9bafde7..f5a2d2105 100644 --- a/ccpp/driver/GFS_diagnostics.F90 +++ b/ccpp/driver/GFS_diagnostics.F90 @@ -2749,7 +2749,6 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop do nb = 1,nblks ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dq3dt(:,:,9) enddo - end if if_qdiag3d idx = idx + 1 ExtDiag(idx)%axes = 3 @@ -2799,6 +2798,44 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dq3dt(:,:,13) enddo + idx = idx + 1 + ExtDiag(idx)%axes = 3 + ExtDiag(idx)%name = 'upd_mf' + ExtDiag(idx)%desc = 'updraft convective mass flux' + ExtDiag(idx)%unit = 'kg m-1 s-3' + ExtDiag(idx)%mod_name = 'gfs_phys' + ExtDiag(idx)%time_avg = .TRUE. + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%upd_mf(:,:) + enddo + + idx = idx + 1 + ExtDiag(idx)%axes = 3 + ExtDiag(idx)%name = 'dwn_mf' + ExtDiag(idx)%desc = 'downdraft convective mass flux' + ExtDiag(idx)%unit = 'kg m-1 s-3' + ExtDiag(idx)%mod_name = 'gfs_phys' + ExtDiag(idx)%time_avg = .TRUE. + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%dwn_mf(:,:) + enddo + + idx = idx + 1 + ExtDiag(idx)%axes = 3 + ExtDiag(idx)%name = 'det_mf' + ExtDiag(idx)%desc = 'detrainment convective mass flux' + ExtDiag(idx)%unit = 'kg m-1 s-3' + ExtDiag(idx)%mod_name = 'gfs_phys' + ExtDiag(idx)%time_avg = .TRUE. + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%det_mf(:,:) + enddo + + end if if_qdiag3d + end if if_ldiag3d !rab diff --git a/ccpp/framework b/ccpp/framework index 612dd1aa9..9a5c9ce5e 160000 --- a/ccpp/framework +++ b/ccpp/framework @@ -1 +1 @@ -Subproject commit 612dd1aa9ed6f8c08b4c280ba1c992dd5357fc59 +Subproject commit 9a5c9ce5e35f311f3d6f25da6e85ad8ae9bbc6a1 diff --git a/ccpp/physics b/ccpp/physics index b127d9bbe..7242a6de9 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit b127d9bbe9ea78a96d4d2f40a674881ccecd2790 +Subproject commit 7242a6de94466d49c9e9150c43b7c0e75a655bb0 diff --git a/ccpp/suites/suite_FV3_GFS_v16_ras.xml b/ccpp/suites/suite_FV3_GFS_v16_ras.xml new file mode 100644 index 000000000..4a7fc2b27 --- /dev/null +++ b/ccpp/suites/suite_FV3_GFS_v16_ras.xml @@ -0,0 +1,94 @@ + + + + + + + fv_sat_adj + + + + + GFS_time_vary_pre + GFS_rrtmg_setup + GFS_rad_time_vary + GFS_phys_time_vary + + + + + GFS_suite_interstitial_rad_reset + GFS_rrtmg_pre + rrtmg_sw_pre + rrtmg_sw + rrtmg_sw_post + rrtmg_lw_pre + rrtmg_lw + rrtmg_lw_post + GFS_rrtmg_post + + + + + GFS_suite_interstitial_phys_reset + GFS_suite_stateout_reset + get_prs_fv3 + GFS_suite_interstitial_1 + GFS_surface_generic_pre + GFS_surface_composites_pre + dcyc2t3 + GFS_surface_composites_inter + GFS_suite_interstitial_2 + + + + sfc_diff + GFS_surface_loop_control_part1 + sfc_nst_pre + sfc_nst + sfc_nst_post + lsm_noah + sfc_sice + GFS_surface_loop_control_part2 + + + + GFS_surface_composites_post + sfc_diag + sfc_diag_post + GFS_surface_generic_post + GFS_PBL_generic_pre + satmedmfvdifq + GFS_PBL_generic_post + GFS_GWD_generic_pre + cires_ugwp + cires_ugwp_post + GFS_GWD_generic_post + rayleigh_damp + GFS_suite_stateout_update + ozphys_2015 + h2ophys + get_phi_fv3 + GFS_suite_interstitial_3 + GFS_DCNV_generic_pre + rascnv + GFS_DCNV_generic_post + GFS_SCNV_generic_pre + samfshalcnv + GFS_SCNV_generic_post + GFS_suite_interstitial_4 + cnvc90 + GFS_MP_generic_pre + gfdl_cloud_microphys + GFS_MP_generic_post + maximum_hourly_diagnostics + + + + + GFS_stochastics + phys_tend + + + + diff --git a/io/inline_post_stub.F90 b/io/inline_post_stub.F90 index 35c400ba0..f33c78d6e 100644 --- a/io/inline_post_stub.F90 +++ b/io/inline_post_stub.F90 @@ -34,23 +34,20 @@ subroutine inline_post_run(wrt_int_state,mypei,mpicomp,lead_write, & integer,intent(in) :: mynfmin integer,intent(in) :: mynfsec ! - print *,'in stub post_run_gfs - not supported on this machine, return' + print *,'in stub inline_post_run - not supported on this machine, return' ! end subroutine inline_post_run ! !----------------------------------------------------------------------- ! - subroutine inline_post_getattr(wrt_int_state, fldbundle) -! - use esmf + subroutine inline_post_getattr(wrt_int_state) ! implicit none ! type(wrt_internal_state),intent(inout) :: wrt_int_state - type(ESMF_FieldBundle), intent(in) :: fldbundle ! ! - print *,'in stub post_getattr_gfs - not supported on this machine, return' + print *,'in stub inline_post_getattr - not supported on this machine, return' ! end subroutine inline_post_getattr diff --git a/io/post_gfs_stub.F90 b/io/post_gfs_stub.F90 deleted file mode 100644 index 3e61e31a1..000000000 --- a/io/post_gfs_stub.F90 +++ /dev/null @@ -1,58 +0,0 @@ -!----------------------------------------------------------------------- -!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -!----------------------------------------------------------------------- -! -module post_gfs - - use module_fv3_io_def, only : wrttasks_per_group,filename_base - use write_internal_state, only : wrt_internal_state - - implicit none - - public post_run_gfs, post_getattr_gfs - - contains - - subroutine post_run_gfs(wrt_int_state,mypei,mpicomp,lead_write, & - mynfhr,mynfmin,mynfsec) -! -! revision history: -! Jul 2019 J. Wang create interface to run inline post for FV3 -! -! -!----------------------------------------------------------------------- -! - implicit none -! -!----------------------------------------------------------------------- -! - type(wrt_internal_state),intent(in) :: wrt_int_state - integer,intent(in) :: mypei - integer,intent(in) :: mpicomp - integer,intent(in) :: lead_write - integer,intent(in) :: mynfhr - integer,intent(in) :: mynfmin - integer,intent(in) :: mynfsec -! - print *,'in stub post_run_gfs - not supported on this machine, return' -! - end subroutine post_run_gfs -! -!----------------------------------------------------------------------- -! - subroutine post_getattr_gfs(wrt_int_state, fldbundle) -! - use esmf -! - implicit none -! - type(wrt_internal_state),intent(inout) :: wrt_int_state - type(ESMF_FieldBundle), intent(in) :: fldbundle -! -! - print *,'in stub post_getattr_gfs - not supported on this machine, return' -! - end subroutine post_getattr_gfs - - - end module post_gfs diff --git a/io/post_regional.F90 b/io/post_regional.F90 index 953461a1f..eecd5c10f 100644 --- a/io/post_regional.F90 +++ b/io/post_regional.F90 @@ -250,8 +250,8 @@ subroutine post_getattr_regional(wrt_int_state) fldbundle = wrt_int_state%wrtFB(nfb) ! set grid spec: - if(mype==0) print*,'in post_getattr_lam,output_grid=',trim(output_grid),'nfb=',nfb - if(mype==0) print*,'in post_getattr_lam, lon1=',lon1,lon2,lat1,lat2,dlon,dlat +! if(mype==0) print*,'in post_getattr_lam,output_grid=',trim(output_grid),'nfb=',nfb +! if(mype==0) print*,'in post_getattr_lam, lon1=',lon1,lon2,lat1,lat2,dlon,dlat gdsdegr = 1000000. if(trim(output_grid) == 'regional_latlon') then @@ -274,8 +274,8 @@ subroutine post_getattr_regional(wrt_int_state) dxval = dlon*gdsdegr dyval = dlat*gdsdegr - if(mype==0) print*,'lonstart,latstart,dyval,dxval', & - lonstart,lonlast,latstart,latlast,dyval,dxval +! if(mype==0) print*,'lonstart,latstart,dyval,dxval', & +! lonstart,lonlast,latstart,latlast,dyval,dxval else if(trim(output_grid) == 'lambert_conformal') then MAPTYPE=1 @@ -347,8 +347,8 @@ subroutine post_getattr_regional(wrt_int_state) dyval = spval endif - if(mype==0) print*,'rotated latlon,lonstart,latstart,cenlon,cenlat,dyval,dxval', & - lonstart_r,lonlast_r,latstart_r,latlast_r,cenlon,cenlat,dyval,dxval +! if(mype==0) print*,'rotated latlon,lonstart,latstart,cenlon,cenlat,dyval,dxval', & +! lonstart_r,lonlast_r,latstart_r,latlast_r,cenlon,cenlat,dyval,dxval endif ! look at the field bundle attributes @@ -557,8 +557,8 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & tsrfc = tprec tmaxmin = tprec td3d = tprec - if(mype==0)print*,'MP_PHYSICS= ',imp_physics,'nbdl=',nbdl, 'tprec=',tprec,'tclod=',tclod, & - 'dtp=',dtp,'tmaxmin=',tmaxmin,'jsta=',jsta,jend,im,jm +! if(mype==0)print*,'MP_PHYSICS= ',imp_physics,'nbdl=',nbdl, 'tprec=',tprec,'tclod=',tclod, & +! 'dtp=',dtp,'tmaxmin=',tmaxmin,'jsta=',jsta,jend,im,jm ! !$omp parallel do default(shared),private(i,j) @@ -803,7 +803,7 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & idat(4) = wrt_int_state%fdate(4) idat(5) = wrt_int_state%fdate(5) ! - if(mype==0) print *,'idat=',idat,'sdat=',sdat,'ihrst=',ihrst +! if(mype==0) print *,'idat=',idat,'sdat=',sdat,'ihrst=',ihrst ! CALL W3DIFDAT(JDATE,IDATE,0,RINC) ! ! if(mype==0)print *,' rinc=',rinc @@ -925,14 +925,14 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & line=__LINE__, file=__FILE__)) return ! bail out - if(mype==0) print *,'in setvar, allocate fcstField,ibdl=',ibdl,'count=',ncount_field,'wrtFBname=',trim(wrtFBName) +! if(mype==0) print *,'in setvar, allocate fcstField,ibdl=',ibdl,'count=',ncount_field,'wrtFBname=',trim(wrtFBName) allocate(fcstField(ncount_field)) call ESMF_FieldBundleGet(wrt_int_state%wrtFB(ibdl), & fieldList=fcstField, itemorderflag=ESMF_ITEMORDER_ADDORDER, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & line=__LINE__, file=__FILE__)) return ! bail out - if(mype==0) print *,'in setvar, read field, ibdl=',ibdl, 'nfield=',ncount_field +! if(mype==0) print *,'in setvar, read field, ibdl=',ibdl, 'nfield=',ncount_field do n=1, ncount_field ! call ESMF_FieldGet(fcstField(n),typekind=typekind, name=fieldname, &