Skip to content

Commit

Permalink
Regional inlinepost (#229)
Browse files Browse the repository at this point in the history
* fix rotated latlon grid and comment out print lines
* add inline post timer
* change composite reflectivity name
* fix cwm, refl_10cm, dy, wtmp, openmp sst field in post
* add tke in post_regional.F90
* fix fcstgrid with quilting and initialize hbot
* fix hbot in post_gfs.F90
* add suite_FV3_GFS_v15_thompson_mynn_lam3km.xml for lam parallel
  • Loading branch information
junwang-noaa authored Mar 11, 2021
1 parent ddb56fe commit 1c6d8fe
Show file tree
Hide file tree
Showing 8 changed files with 3,338 additions and 154 deletions.
83 changes: 83 additions & 0 deletions ccpp/suites/suite_FV3_GFS_v15_thompson_mynn_lam3km.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?>

<suite name="FV3_GFS_v15_thompson_mynn_lam3km" version="1">
<!-- <init></init> -->
<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>sgscloud_radpre</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>sgscloud_radpost</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>mynnedmf_wrapper</scheme>
<scheme>GFS_GWD_generic_pre</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_suite_interstitial_4</scheme>
<scheme>cnvc90</scheme>
<scheme>GFS_MP_generic_pre</scheme>
<scheme>mp_thompson_pre</scheme>
<scheme>mp_thompson</scheme>
<scheme>mp_thompson_post</scheme>
<scheme>GFS_MP_generic_post</scheme>
<scheme>maximum_hourly_diagnostics</scheme>
</subcycle>
</group>
<group name="stochastics">
<subcycle loop="1">
<scheme>GFS_stochastics</scheme>
</subcycle>
</group>
<!-- <finalize></finalize> -->
</suite>
4 changes: 2 additions & 2 deletions io/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
list(APPEND _io_defs_private use_WRTCOMP)

if(INLINE_POST)
set(POST_SRC post_gfs.F90 post_nems_routines.F90)
set(POST_SRC inline_post.F90 post_nems_routines.F90 post_gfs.F90 post_regional.F90)
else()
set(POST_SRC post_gfs_stub.F90)
set(POST_SRC inline_post_stub.F90)
list(APPEND _io_defs_private NO_INLINE_POST)
endif()

Expand Down
78 changes: 78 additions & 0 deletions io/inline_post.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
!-----------------------------------------------------------------------
!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
!-----------------------------------------------------------------------
!
module inline_post

use module_fv3_io_def, only : wrttasks_per_group,filename_base, &
output_grid
use write_internal_state, only : wrt_internal_state
use post_gfs, only : post_getattr_gfs, post_run_gfs
use post_regional, only : post_getattr_regional, post_run_regional

implicit none

public inline_post_run, inline_post_getattr

contains

subroutine inline_post_run(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
!
if(mypei == 0) print *,'inline_post_run, output_grid=',trim(output_grid)
if(trim(output_grid) == 'gaussian_grid' &
.or. trim(output_grid) == 'global_latlon') then
call post_run_gfs(wrt_int_state, mypei, mpicomp, lead_write, &
mynfhr, mynfmin,mynfsec)
else if( trim(output_grid) == 'regional_latlon' &
.or. trim(output_grid) == 'rotated_latlon' &
.or. trim(output_grid) == 'lambert_conformal') then
if(mypei == 0) print *,'inline_post_run, call post_run_regional'
call post_run_regional(wrt_int_state, mypei, mpicomp, lead_write, &
mynfhr, mynfmin,mynfsec)
endif

!
end subroutine inline_post_run
!
!-----------------------------------------------------------------------
!
subroutine inline_post_getattr(wrt_int_state)
!
use esmf
!
implicit none
!
type(wrt_internal_state),intent(inout) :: wrt_int_state
!
if(trim(output_grid) == 'gaussian_grid' &
.or. trim(output_grid) == 'global_latlon') then
call post_getattr_gfs(wrt_int_state)
else if( trim(output_grid) == 'regional_latlon' &
.or. trim(output_grid) == 'rotated_latlon' &
.or. trim(output_grid) == 'lambert_conformal') then
call post_getattr_regional(wrt_int_state)
endif
!
end subroutine inline_post_getattr


end module inline_post
58 changes: 58 additions & 0 deletions io/inline_post_stub.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
!-----------------------------------------------------------------------
!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
!-----------------------------------------------------------------------
!
module inline_post

use module_fv3_io_def, only : wrttasks_per_group,filename_base
use write_internal_state, only : wrt_internal_state

implicit none

public inline_post_run, inline_post_getattr

contains

subroutine inline_post_run(wrt_int_state,mypei,mpicomp,lead_write, &
mynfhr,mynfmin,mynfsec)
!
! revision history:
! Oct 2020 J. Wang create interface to run inline post
!
!
!-----------------------------------------------------------------------
!
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 inline_post_run
!
!-----------------------------------------------------------------------
!
subroutine inline_post_getattr(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 inline_post_getattr


end module inline_post
Loading

0 comments on commit 1c6d8fe

Please sign in to comment.