Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to RAS in CCPP, update submodule pointer for ccpp-framework (CI tests) #252

Merged
merged 11 commits into from
Mar 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
39 changes: 38 additions & 1 deletion ccpp/driver/GFS_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
94 changes: 94 additions & 0 deletions ccpp/suites/suite_FV3_GFS_v16_ras.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<?xml version="1.0" encoding="UTF-8"?>

<suite name="FV3_GFS_v16_ras" version="1">
<!-- <init></init> -->
<group name="fast_physics">
<subcycle loop="1">
<scheme>fv_sat_adj</scheme>
</subcycle>
</group>
<group name="time_vary">
<subcycle loop="1">
<scheme>GFS_time_vary_pre</scheme>
<scheme>GFS_rrtmg_setup</scheme>
<scheme>GFS_rad_time_vary</scheme>
<scheme>GFS_phys_time_vary</scheme>
</subcycle>
</group>
<group name="radiation">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_rad_reset</scheme>
<scheme>GFS_rrtmg_pre</scheme>
<scheme>rrtmg_sw_pre</scheme>
<scheme>rrtmg_sw</scheme>
<scheme>rrtmg_sw_post</scheme>
<scheme>rrtmg_lw_pre</scheme>
<scheme>rrtmg_lw</scheme>
<scheme>rrtmg_lw_post</scheme>
<scheme>GFS_rrtmg_post</scheme>
</subcycle>
</group>
<group name="physics">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_phys_reset</scheme>
<scheme>GFS_suite_stateout_reset</scheme>
<scheme>get_prs_fv3</scheme>
<scheme>GFS_suite_interstitial_1</scheme>
<scheme>GFS_surface_generic_pre</scheme>
<scheme>GFS_surface_composites_pre</scheme>
<scheme>dcyc2t3</scheme>
<scheme>GFS_surface_composites_inter</scheme>
<scheme>GFS_suite_interstitial_2</scheme>
</subcycle>
<!-- Surface iteration loop -->
<subcycle loop="2">
<scheme>sfc_diff</scheme>
<scheme>GFS_surface_loop_control_part1</scheme>
<scheme>sfc_nst_pre</scheme>
<scheme>sfc_nst</scheme>
<scheme>sfc_nst_post</scheme>
<scheme>lsm_noah</scheme>
<scheme>sfc_sice</scheme>
<scheme>GFS_surface_loop_control_part2</scheme>
</subcycle>
<!-- End of surface iteration loop -->
<subcycle loop="1">
<scheme>GFS_surface_composites_post</scheme>
<scheme>sfc_diag</scheme>
<scheme>sfc_diag_post</scheme>
<scheme>GFS_surface_generic_post</scheme>
<scheme>GFS_PBL_generic_pre</scheme>
<scheme>satmedmfvdifq</scheme>
<scheme>GFS_PBL_generic_post</scheme>
<scheme>GFS_GWD_generic_pre</scheme>
<scheme>cires_ugwp</scheme>
<scheme>cires_ugwp_post</scheme>
<scheme>GFS_GWD_generic_post</scheme>
<scheme>rayleigh_damp</scheme>
<scheme>GFS_suite_stateout_update</scheme>
<scheme>ozphys_2015</scheme>
<scheme>h2ophys</scheme>
<scheme>get_phi_fv3</scheme>
<scheme>GFS_suite_interstitial_3</scheme>
<scheme>GFS_DCNV_generic_pre</scheme>
<scheme>rascnv</scheme>
<scheme>GFS_DCNV_generic_post</scheme>
<scheme>GFS_SCNV_generic_pre</scheme>
<scheme>samfshalcnv</scheme>
<scheme>GFS_SCNV_generic_post</scheme>
<scheme>GFS_suite_interstitial_4</scheme>
<scheme>cnvc90</scheme>
<scheme>GFS_MP_generic_pre</scheme>
<scheme>gfdl_cloud_microphys</scheme>
<scheme>GFS_MP_generic_post</scheme>
<scheme>maximum_hourly_diagnostics</scheme>
</subcycle>
</group>
<group name="stochastics">
<subcycle loop="1">
<scheme>GFS_stochastics</scheme>
<scheme>phys_tend</scheme>
</subcycle>
</group>
<!-- <finalize></finalize> -->
</suite>
9 changes: 3 additions & 6 deletions io/inline_post_stub.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
58 changes: 0 additions & 58 deletions io/post_gfs_stub.F90

This file was deleted.

22 changes: 11 additions & 11 deletions io/post_regional.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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, &
Expand Down