diff --git a/fv3_cap.F90 b/fv3_cap.F90 index 713460fe3..7540b6efe 100644 --- a/fv3_cap.F90 +++ b/fv3_cap.F90 @@ -1,16 +1,20 @@ -!--------------- FV3 ATM solo model ---------------- -! -!*** The FV3 atmosphere grid component nuopc cap -! -! Author: Jun Wang@noaa.gov -! -! revision history -! 11 Oct 2016: J. Wang Initial code -! 18 Apr 2017: J. Wang set up fcst grid component and write grid components -! 24 Jul 2017: J. Wang initialization and time stepping changes for coupling -! 02 Nov 2017: J. Wang Use Gerhard's transferable RouteHandle -! - +!> @file +!> @brief The FV3 atmosphere grid component nuopc cap. +!> @author Jun Wang @date 01/2017 + +!> @brief The FV3 atmosphere grid component nuopc cap. +!> +!> FV3 ATM solo model +!> +!> ## Module History +!> Date | Author | Modification +!> -----|--------|------------- +!> 11 Oct 2016 | J. Wang | Initial code +!> 18 Apr 2017 | J. Wang | set up fcst grid component and write grid components +!> 24 Jul 2017 | J. Wang | initialization and time stepping changes for coupling +!> 02 Nov 2017 | J. Wang | Use Gerhard's transferable RouteHandle +!> +!> @author Jun Wang @date 01/2017 module fv3atm_cap_mod use ESMF @@ -56,30 +60,61 @@ module fv3atm_cap_mod ! !----------------------------------------------------------------------- ! - + !> ??? type(ESMF_GridComp) :: fcstComp + + !> ??? type(ESMF_State) :: fcstState + + !> ??? type(ESMF_FieldBundle), allocatable :: fcstFB(:) + + !> ??? integer,dimension(:), allocatable :: fcstPetList + + !> ??? integer, save :: FBCount + !> ??? type(ESMF_GridComp), allocatable :: wrtComp(:) + + !> ??? type(ESMF_State), allocatable :: wrtState(:) + + !> ??? type(ESMF_FieldBundle), allocatable :: wrtFB(:,:) + !> ??? type(ESMF_RouteHandle), allocatable :: routehandle(:,:) + + !> ??? type(ESMF_RouteHandle), allocatable :: gridRedistRH(:,:) + + !> ??? type(ESMF_Grid), allocatable :: srcGrid(:,:), dstGrid(:,:) + + !> ??? logical, allocatable :: is_moving_FB(:) + !> ??? logical :: profile_memory = .true. + + !> ??? logical :: write_runtimelog = .false. + + !> ??? logical :: lprint = .false. + !> ??? integer :: mype = -1 + + !> ??? integer :: dbug = 0 + + !> ??? integer :: frestart(999) = -1 + !> ??? real(kind=8) :: timere, timep2re !----------------------------------------------------------------------- @@ -89,6 +124,12 @@ module fv3atm_cap_mod !------------------- Solo fv3atm code starts here ---------------------- !----------------------------------------------------------------------- + !> ??? + !> + !> @param gcomp ??? + !> @param rc Return code. + !> + !> @author subroutine SetServices(gcomp, rc) type(ESMF_GridComp) :: gcomp @@ -169,6 +210,12 @@ end subroutine SetServices !----------------------------------------------------------------------------- + !> ??? + !> + !> @param gcomp ??? + !> @param rc Return code. + !> + !> @author subroutine InitializeAdvertise(gcomp, rc) type(ESMF_GridComp) :: gcomp @@ -972,6 +1019,12 @@ end subroutine InitializeAdvertise !----------------------------------------------------------------------------- + !> ??? + !> + !> @param gcomp ??? + !> @param rc Return code. + !> + !> @author subroutine InitializeRealize(gcomp, rc) type(ESMF_GridComp) :: gcomp integer, intent(out) :: rc @@ -1009,6 +1062,12 @@ end subroutine InitializeRealize !----------------------------------------------------------------------------- + !> ??? + !> + !> @param gcomp ??? + !> @param rc Return code. + !> + !> @author subroutine ModelAdvance(gcomp, rc) type(ESMF_GridComp) :: gcomp @@ -1038,6 +1097,12 @@ end subroutine ModelAdvance !----------------------------------------------------------------------------- + !> ??? + !> + !> @param gcomp ??? + !> @param rc Return code. + !> + !> @author subroutine ModelAdvance_phase1(gcomp, rc) type(ESMF_GridComp) :: gcomp integer, intent(out) :: rc @@ -1092,6 +1157,12 @@ end subroutine ModelAdvance_phase1 !----------------------------------------------------------------------------- + !> ??? + !> + !> @param gcomp ??? + !> @param rc Return code. + !> + !> @author subroutine ModelAdvance_phase2(gcomp, rc) type(ESMF_GridComp) :: gcomp integer, intent(out) :: rc @@ -1229,6 +1300,12 @@ end subroutine ModelAdvance_phase2 !----------------------------------------------------------------------------- + !> ??? + !> + !> @param gcomp ??? + !> @param rc Return code. + !> + !> @author subroutine ModelSetRunClock(gcomp, rc) type(ESMF_GridComp) :: gcomp @@ -1263,6 +1340,12 @@ end subroutine ModelSetRunClock !----------------------------------------------------------------------------- + !> ??? + !> + !> @param gcomp ??? + !> @param rc Return code. + !> + !> @author subroutine fv3_checkimport(gcomp, rc) !*** Check the import state fields @@ -1352,6 +1435,12 @@ end subroutine fv3_checkimport !----------------------------------------------------------------------------- + !> ??? + !> + !> @param gcomp ??? + !> @param rc Return code. + !> + !> @author subroutine TimestampExport_phase1(gcomp, rc) ! input arguments @@ -1382,6 +1471,12 @@ end subroutine TimestampExport_phase1 !----------------------------------------------------------------------------- + !> ??? + !> + !> @param gcomp ??? + !> @param rc Return code. + !> + !> @author subroutine ModelFinalize(gcomp, rc) ! input arguments diff --git a/moving_nest/bounding_box.F90 b/moving_nest/bounding_box.F90 index b2eab8b78..00ff88e26 100644 --- a/moving_nest/bounding_box.F90 +++ b/moving_nest/bounding_box.F90 @@ -1,3 +1,7 @@ +!> @file +!> @brief Provides subroutines for grid bounding boxes for moving nest. +!> @author W. Ramstrom (William.Ramstrom@noaa.gov), AOML/HRD @date 07/28/2021 + !*********************************************************************** !* GNU General Public License * !* This file is a part of fvGFS. * @@ -18,14 +22,9 @@ !* or see: http://www.gnu.org/licenses/gpl.html * !*********************************************************************** -!*********************************************************************** -!> @file -!! @brief Provides subroutines for grid bounding boxes for moving nest -!! @author W. Ramstrom, AOML/HRD 07/28/2021 -!! @email William.Ramstrom@noaa.gov -!=======================================================================! - - +!> @brief Provides subroutines for grid bounding boxes for moving nest. +!> +!> @author W. Ramstrom, AOML/HRD @date 07/28/2021 module bounding_box_mod use mpp_domains_mod, only : mpp_get_C2F_index, nest_domain_type use mpp_mod, only : mpp_pe @@ -37,12 +36,16 @@ module bounding_box_mod use IPD_typedefs, only : kind_phys => IPD_kind_phys #endif - ! Simple aggregation of the start and end indices of a 2D grid - ! Makes argument lists clearer to read + !> Simple aggregation of the start and end indices of a 2D grid. + !> Makes argument lists clearer to read. type bbox - integer :: is, ie, js, je + integer :: is !< ??? + integer :: ie !< ??? + integer :: js !< ??? + integer :: je !< ??? end type bbox + !> ??? interface fill_bbox module procedure fill_bbox_r4_2d module procedure fill_bbox_r4_3d @@ -54,6 +57,12 @@ module bounding_box_mod contains + !> ??? + !> + !> @param[out] out_bbox ??? + !> @param[out] in_grid ??? + !> + !> @author W. Ramstrom, AOML/HRD @date 07/28/2021 subroutine fill_bbox_r4_2d(out_bbox, in_grid) type(bbox), intent(out) :: out_bbox real*4, allocatable, intent(in) :: in_grid(:,:) @@ -64,7 +73,12 @@ subroutine fill_bbox_r4_2d(out_bbox, in_grid) out_bbox%je = ubound(in_grid, 2) end subroutine fill_bbox_r4_2d - + !> ??? + !> + !> @param[out] out_bbox ??? + !> @param[out] in_grid ??? + !> + !> @author W. Ramstrom, AOML/HRD @date 07/28/2021 subroutine fill_bbox_r4_3d(out_bbox, in_grid) type(bbox), intent(out) :: out_bbox real*4, allocatable, intent(in) :: in_grid(:,:,:) @@ -75,6 +89,12 @@ subroutine fill_bbox_r4_3d(out_bbox, in_grid) out_bbox%je = ubound(in_grid, 2) end subroutine fill_bbox_r4_3d + !> ??? + !> + !> @param[out] out_bbox ??? + !> @param[out] in_grid ??? + !> + !> @author W. Ramstrom, AOML/HRD @date 07/28/2021 subroutine fill_bbox_r4_4d(out_bbox, in_grid) type(bbox), intent(out) :: out_bbox real*4, allocatable, intent(in) :: in_grid(:,:,:,:) @@ -85,7 +105,12 @@ subroutine fill_bbox_r4_4d(out_bbox, in_grid) out_bbox%je = ubound(in_grid, 2) end subroutine fill_bbox_r4_4d - + !> ??? + !> + !> @param[out] out_bbox ??? + !> @param[out] in_grid ??? + !> + !> @author W. Ramstrom, AOML/HRD @date 07/28/2021 subroutine fill_bbox_r8_2d(out_bbox, in_grid) type(bbox), intent(out) :: out_bbox real*8, allocatable, intent(in) :: in_grid(:,:) @@ -96,6 +121,12 @@ subroutine fill_bbox_r8_2d(out_bbox, in_grid) out_bbox%je = ubound(in_grid, 2) end subroutine fill_bbox_r8_2d + !> ??? + !> + !> @param[out] out_bbox ??? + !> @param[out] in_grid ??? + !> + !> @author W. Ramstrom, AOML/HRD @date 07/28/2021 subroutine fill_bbox_r8_3d(out_bbox, in_grid) type(bbox), intent(out) :: out_bbox real*8, allocatable, intent(in) :: in_grid(:,:,:) @@ -106,7 +137,12 @@ subroutine fill_bbox_r8_3d(out_bbox, in_grid) out_bbox%je = ubound(in_grid, 2) end subroutine fill_bbox_r8_3d - + !> ??? + !> + !> @param[out] out_bbox ??? + !> @param[out] in_grid ??? + !> + !> @author W. Ramstrom, AOML/HRD @date 07/28/2021 subroutine fill_bbox_r8_4d(out_bbox, in_grid) type(bbox), intent(out) :: out_bbox real*8, allocatable, intent(in) :: in_grid(:,:,:,:) @@ -117,9 +153,17 @@ subroutine fill_bbox_r8_4d(out_bbox, in_grid) out_bbox%je = ubound(in_grid, 2) end subroutine fill_bbox_r8_4d - - !>@brief This subroutine returns the nest grid indices that correspond to the input nest domain, direction, and position - !>@details Simplifies the call signature with the bbox type rather than 4 separate integers + !> This subroutine returns the nest grid indices that correspond to + !> the input nest domain, direction, and position @details Simplifies + !> the call signature with the bbox type rather than 4 separate + !> integers. + !> @param[out] nest_domain ??? + !> @param[out] bbox_fine ??? + !> @param[out] bbox_coarse ??? + !> @param[out] direction ??? + !> @param[out] position ??? + !> + !> @author W. Ramstrom, AOML/HRD @date 07/28/2021 subroutine bbox_get_C2F_index(nest_domain, bbox_fine, bbox_coarse, direction, position) implicit none type(nest_domain_type), intent(in) :: nest_domain @@ -133,4 +177,4 @@ subroutine bbox_get_C2F_index(nest_domain, bbox_fine, bbox_coarse, direction, p end subroutine bbox_get_C2F_index -end module bounding_box_mod +end module bounding_box_mod \ No newline at end of file diff --git a/moving_nest/fv_moving_nest.F90 b/moving_nest/fv_moving_nest.F90 index 6ef5ab384..fd0341e2a 100644 --- a/moving_nest/fv_moving_nest.F90 +++ b/moving_nest/fv_moving_nest.F90 @@ -1,3 +1,8 @@ +!> @file +!> @brief Provides Moving Nest functionality in FV3 dynamic core. +!> @author W. Ramstrom, AOML/HRD @date 01/15/2021 +!> @email William.Ramstrom@noaa.gov + !*********************************************************************** !* GNU General Public License * !* This file is a part of fvGFS. * @@ -18,38 +23,29 @@ !* or see: http://www.gnu.org/licenses/gpl.html * !*********************************************************************** -!*********************************************************************** -!> @file -!! @brief Provides Moving Nest functionality in FV3 dynamic core -!! @author W. Ramstrom, AOML/HRD 01/15/2021 -!! @email William.Ramstrom@noaa.gov -!=======================================================================! - - -!=======================================================================! -! -! Notes -! -!------------------------------------------------------------------------ -! Moving Nest Subroutine Naming Convention -!----------------------------------------------------------------------- -! -! mn_meta_* subroutines perform moving nest operations for FV3 metadata. -! These routines will run only once per nest move. -! -! mn_var_* subroutines perform moving nest operations for an individual FV3 variable. -! These routines will run many times per nest move. -! -! mn_prog_* subroutines perform moving nest operations for the list of prognostic fields. -! These routines will run only once per nest move. -! -! mn_phys_* subroutines perform moving nest operations for the list of physics fields. -! These routines will run only once per nest move. -! -! =======================================================================! - +!> ??? #define REMAP 1 +!> @brief Provides Moving Nest functionality in FV3 dynamic core. +!> +!> ## Moving Nest Subroutine Naming Convention +!> +!> - mn_meta_* subroutines perform moving nest operations for FV3 +!> metadata. These routines will run only once per nest move. +!> +!> - mn_var_* subroutines perform moving nest operations for an +!> individual FV3 variable. These routines will run many times per +!> nest move. +!> +!> - mn_prog_* subroutines perform moving nest operations for the list +!> of prognostic fields. These routines will run only once per nest +!> move. +!> +!> - mn_phys_* subroutines perform moving nest operations for the list +!> of physics fields. These routines will run only once per nest +!> move. +!> +!> @author W. Ramstrom, AOML/HRD @date 01/15/2021 module fv_moving_nest_mod use block_control_mod, only : block_control_type @@ -96,24 +92,24 @@ module fv_moving_nest_mod implicit none #ifdef NO_QUAD_PRECISION - ! 64-bit precision (kind=8) + !> 64-bit precision (kind=8) integer, parameter:: f_p = selected_real_kind(15) #else - ! Higher precision (kind=16) for grid geometrical factors: + !> Higher precision (kind=16) for grid geometrical factors: integer, parameter:: f_p = selected_real_kind(20) #endif #ifdef OVERLOAD_R4 - real, parameter:: real_snan=x'FFBFFFFF' + real, parameter:: real_snan=x'FFBFFFFF' !< ??? #else - real, parameter:: real_snan=x'FFF7FFFFFFFFFFFF' + real, parameter:: real_snan=x'FFF7FFFFFFFFFFFF' !< ??? #endif - logical :: debug_log = .false. + logical :: debug_log = .false. !< ??? #include - !! Step 2 + !> Step 2 interface mn_var_fill_intern_nest_halos module procedure mn_var_fill_intern_nest_halos_r4_2d module procedure mn_var_fill_intern_nest_halos_r4_3d @@ -127,7 +123,7 @@ module fv_moving_nest_mod end interface mn_var_fill_intern_nest_halos - !! Step 6 + !> Step 6 interface mn_var_shift_data module procedure mn_var_shift_data_r4_2d module procedure mn_var_shift_data_r4_3d @@ -138,12 +134,13 @@ module fv_moving_nest_mod module procedure mn_var_shift_data_r8_4d end interface mn_var_shift_data - !! Step 8 + !> Step 8 interface mn_var_dump_to_netcdf module procedure mn_var_dump_2d_to_netcdf module procedure mn_var_dump_3d_to_netcdf end interface mn_var_dump_to_netcdf + !> ??? interface mn_static_read_hires module procedure mn_static_read_hires_r4 module procedure mn_static_read_hires_r8 @@ -157,8 +154,19 @@ module fv_moving_nest_mod !! on the Atm structure !!===================================================================================== - !>@brief The subroutine 'mn_prog_fill_temp_variables' fills the temporary variable for delz - !>@details The delz variable does not have haloes so we need a temporary variable to move it. + !> The subroutine 'mn_prog_fill_temp_variables' fills the temporary + !> variable for delz. + !> + !> The delz variable does not have haloes so we need a temporary + !> variable to move it. + !> + !> @param[in] Atm Array of atmospheric data. + !> @param[in] n This level. + !> @param[in] child_grid_num Nest level. + !> @param[in] is_fine_pe Is this the nest PE? + !> @param[in] npz Number of vertical levels. + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_prog_fill_temp_variables(Atm, n, child_grid_num, is_fine_pe, npz) type(fv_atmos_type), allocatable, target, intent(in) :: Atm(:) !< Array of atmospheric data integer, intent(in) :: n, child_grid_num !< This level and nest level @@ -190,8 +198,19 @@ subroutine mn_prog_fill_temp_variables(Atm, n, child_grid_num, is_fine_pe, npz) end subroutine mn_prog_fill_temp_variables - !>@brief The subroutine 'mn_prog_apply_temp_variables' fills the Atm%delz value from the temporary variable after nest move - !>@details The delz variable does not have haloes so we need a temporary variable to move it. + !> The subroutine 'mn_prog_apply_temp_variables' fills the Atm%delz + !> value from the temporary variable after nest move. + !> + !> The delz variable does not have haloes so we need a temporary + !> variable to move it. + !> + !> @param[inout] Atm Array of atmospheric data. + !> @param[in] n This level. + !> @param[in] child_grid_num Nest level. + !> @param[in] is_fine_pe Is this the nest PE? + !> @param[in] npz Number of vertical levels. + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_prog_apply_temp_variables(Atm, n, child_grid_num, is_fine_pe, npz) type(fv_atmos_type), allocatable, target, intent(inout) :: Atm(:) !< Array of atmospheric data integer, intent(in) :: n, child_grid_num !< This level and nest level @@ -221,8 +240,20 @@ end subroutine mn_prog_apply_temp_variables !! Parent and nest PEs need to execute these subroutines !!===================================================================================== - !>@brief The subroutine 'mn_prog_fill_nest_halos_from_parent' fills the nest edge halos from the parent - !>@details Parent and nest PEs must run this subroutine. It transfers data and interpolates onto fine nest. + !> The subroutine 'mn_prog_fill_nest_halos_from_parent' fills the + !> nest edge halos from the parent. + !> + !> Parent and nest PEs must run this subroutine. It transfers data + !> and interpolates onto fine nest. + !> + !> @param[inout] Atm Array of atmospheric data. + !> @param[in] n This level. + !> @param[in] child_grid_num Nest level. + !> @param[in] is_fine_pe Is this the nest PE? + !> @param[inout] nest_domain Domain structure for nest. + !> @param[in] nz Number of vertical levels. + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_prog_fill_nest_halos_from_parent(Atm, n, child_grid_num, is_fine_pe, nest_domain, nz) type(fv_atmos_type), allocatable, target, intent(inout) :: Atm(:) !< Array of atmospheric data integer, intent(in) :: n, child_grid_num !< This level and nest level @@ -291,8 +322,27 @@ end subroutine mn_prog_fill_nest_halos_from_parent !! -- Similar to med_nest_configure() from HWRF !!============================================================================ - !>@brief The subroutine 'mn_meta_move_nest' resets the metadata for the nest - !>@details Parent and nest PEs run this subroutine. + !> The subroutine 'mn_meta_move_nest' resets the metadata for the nest. + !> + !> Parent and nest PEs run this subroutine. + !> + !> @param[in] delta_i_c Coarse grid delta i for nest move. + !> @param[in] delta_j_c Coarse grid delta j for nest move. + !> @param[in] pelist List of involved PEs. + !> @param[in] extra_halo Extra halo points (not fully implemented). + !> @param[inout] nest_domain Nest domain structure. + !> @param[inout] domain_fine Fine domain structures. + !> @param[inout] domain_coarse Coarse domain structures. + !> @param[inout] istart_coarse Start i of coarse grid. + !> @param[inout] iend_coarse End i of coarse grid. + !> @param[inout] jstart_coarse Start j of course grid. + !> @param[inout] jend_coarse End j of coarse grid. + !> @param[in] istart_fine Start i of fine grid. + !> @param[in] iend_fine End i of coarse grid. + !> @param[in] jstart_fine Start j of coarse grid. + !> @param[in] jend_fine End j of coarse grid. + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_meta_move_nest(delta_i_c, delta_j_c, pelist, is_fine_pe, extra_halo, nest_domain, domain_fine, domain_coarse, & istart_coarse, iend_coarse, jstart_coarse, jend_coarse, istart_fine, iend_fine, jstart_fine, jend_fine) @@ -350,8 +400,16 @@ end subroutine mn_meta_move_nest !! Step 4 -- Updates the internal nest tile halos !================================================================================ - !>@brief The subroutine 'mn_prog_fill_intern_nest_halos' fill internal nest halos for prognostic variables - !>@details Only nest PEs call this subroutine. + !> The subroutine 'mn_prog_fill_intern_nest_halos' fill internal + !> nest halos for prognostic variables. + !> + !> Only nest PEs call this subroutine. + !> + !> @param[inout] Atm Single instance of atmospheric data. + !> @param[inout] domain_fine Domain structure for nest. + !> @param[in] is_fine_pe Is this a nest PE? + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_prog_fill_intern_nest_halos(Atm, domain_fine, is_fine_pe) type(fv_atmos_type), target, intent(inout) :: Atm !< Single instance of atmospheric data type(domain2d), intent(inout) :: domain_fine !< Domain structure for nest @@ -393,8 +451,15 @@ end subroutine mn_prog_fill_intern_nest_halos ! !================================================================================ - !>@brief The subroutine 'mn_var_fill_intern_nest_halos_r4_2d' fills internal nest halos - !>@details This version of the subroutine is for 2D arrays of single precision reals. + !> The subroutine 'mn_var_fill_intern_nest_halos_r4_2d' fills internal nest halos. + !> + !> This version of the subroutine is for 2D arrays of single precision reals. + !> + !> @param[inout] data_var Model variable data. + !> @param[inout] domain_fine Nest domain structure. + !> @param[in] is_fine_pe Is this the nest PE? + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_var_fill_intern_nest_halos_r4_2d(data_var, domain_fine, is_fine_pe) real*4, allocatable, intent(inout) :: data_var(:,:) !< Model variable data type(domain2d), intent(inout) :: domain_fine !< Nest domain structure @@ -413,8 +478,15 @@ subroutine mn_var_fill_intern_nest_halos_r4_2d(data_var, domain_fine, is_fine_pe end subroutine mn_var_fill_intern_nest_halos_r4_2d - !>@brief The subroutine 'mn_var_fill_intern_nest_halos_r8_2d' fills internal nest halos - !>@details This version of the subroutine is for 2D arrays of double precision reals. + !> The subroutine 'mn_var_fill_intern_nest_halos_r8_2d' fills internal nest halos. + !> + !> This version of the subroutine is for 2D arrays of double precision reals. + !> + !> @param[inout] data_var Model variable data. + !> @param[inout] domain_fine Nest domain structure. + !> @param[in] is_fine_pe Is this the nest PE? + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_var_fill_intern_nest_halos_r8_2d(data_var, domain_fine, is_fine_pe) real*8, allocatable, intent(inout) :: data_var(:,:) !< Double precision model variable type(domain2d), intent(inout) :: domain_fine !< Nest domain structure @@ -426,8 +498,14 @@ subroutine mn_var_fill_intern_nest_halos_r8_2d(data_var, domain_fine, is_fine_pe end subroutine mn_var_fill_intern_nest_halos_r8_2d - !>@brief The subroutine 'mn_var_fill_intern_nest_halos_r4_3d' fills internal nest halos - !>@details This version of the subroutine is for 3D arrays of single precision reals. + !> The subroutine 'mn_var_fill_intern_nest_halos_r4_3d' fills internal nest halos. + !> This version of the subroutine is for 3D arrays of single precision reals. + !> + !> @param[inout] data_var Model variable data. + !> @param[inout] domain_fine Nest domain structure. + !> @param[in] is_fine_pe Is this the nest PE? + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_var_fill_intern_nest_halos_r4_3d(data_var, domain_fine, is_fine_pe) real*4, allocatable, intent(inout) :: data_var(:,:,:) !< Single precision model variable type(domain2d), intent(inout) :: domain_fine !< Nest domain structure @@ -441,6 +519,12 @@ end subroutine mn_var_fill_intern_nest_halos_r4_3d !>@brief The subroutine 'mn_var_fill_intern_nest_halos_r8_3d' fills internal nest halos !>@details This version of the subroutine is for 3D arrays of double precision reals. + !> + !> @param[inout] data_var Model variable data. + !> @param[inout] domain_fine Nest domain structure. + !> @param[in] is_fine_pe Is this the nest PE? + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_var_fill_intern_nest_halos_r8_3d(data_var, domain_fine, is_fine_pe) real*8, allocatable, intent(inout) :: data_var(:,:,:) !< Double precision model variable type(domain2d), intent(inout) :: domain_fine !< Nest domain structure @@ -452,8 +536,18 @@ subroutine mn_var_fill_intern_nest_halos_r8_3d(data_var, domain_fine, is_fine_pe end subroutine mn_var_fill_intern_nest_halos_r8_3d - !>@brief The subroutine 'mn_var_fill_intern_nest_halos_wind' fills internal nest halos for u and v wind - !>@details This version of the subroutine is for 3D arrays of single precision reals for each wind component + !> The subroutine 'mn_var_fill_intern_nest_halos_wind' fills + !> internal nest halos for u and v wind. + !> + !> This version of the subroutine is for 3D arrays of single + !> precision reals for each wind component. + !> + !> @param[inout] u_var Staggered u wind. + !> @param[inout] v_var Staggered v wind. + !> @param[inout] domain_fine Nest domain structure. + !> @param[in] is_fine_pe Is this the nest PE? + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_var_fill_intern_nest_halos_wind(u_var, v_var, domain_fine, is_fine_pe) real, allocatable, intent(inout) :: u_var(:,:,:) !< Staggered u wind real, allocatable, intent(inout) :: v_var(:,:,:) !< Staggered v wind @@ -467,8 +561,17 @@ subroutine mn_var_fill_intern_nest_halos_wind(u_var, v_var, domain_fine, is_fine end subroutine mn_var_fill_intern_nest_halos_wind - !>@brief The subroutine 'mn_var_fill_intern_nest_halos_r4_4d' fills internal nest halos - !>@details This version of the subroutine is for 4D arrays of single precision reals. + !> The subroutine 'mn_var_fill_intern_nest_halos_r4_4d' fills + !> internal nest halos. + !> + !> This version of the subroutine is for 4D arrays of single + !> precision reals. + !> + !> @param[inout] data_var Single prevision variable. + !> @param[inout] domain_fine Nest domain structure. + !> @param[in] is_fine_pe Is this the nest PE? + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_var_fill_intern_nest_halos_r4_4d(data_var, domain_fine, is_fine_pe) real*4, allocatable, intent(inout) :: data_var(:,:,:,:) !< Single prevision variable type(domain2d), intent(inout) :: domain_fine !< Nest domain structure @@ -480,8 +583,16 @@ subroutine mn_var_fill_intern_nest_halos_r4_4d(data_var, domain_fine, is_fine_pe end subroutine mn_var_fill_intern_nest_halos_r4_4d - !>@brief The subroutine 'mn_var_fill_intern_nest_halos_r8_4d' fills internal nest halos - !>@details This version of the subroutine is for 4D arrays of double precision reals. + !> The subroutine 'mn_var_fill_intern_nest_halos_r8_4d' fills + !> internal nest halos. + !> + !> This version of the subroutine is for 4D arrays of double precision reals. + !> + !> @param[inout] data_var Single prevision variable. + !> @param[inout] domain_fine Nest domain structure. + !> @param[in] is_fine_pe Is this the nest PE? + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_var_fill_intern_nest_halos_r8_4d(data_var, domain_fine, is_fine_pe) real*8, allocatable, intent(inout) :: data_var(:,:,:,:) !< Double precision variable type(domain2d), intent(inout) :: domain_fine !< Nest domain structure @@ -493,7 +604,17 @@ subroutine mn_var_fill_intern_nest_halos_r8_4d(data_var, domain_fine, is_fine_pe end subroutine mn_var_fill_intern_nest_halos_r8_4d - !>@brief Find the parent point that corresponds to the is,js point of the nest, and returns that nest point also + !> Find the parent point that corresponds to the is,js point of the + !> nest, and returns that nest point also. + !> + !> @param[in] Atm data array + !> @param[in] n Grid numbers. + !> @param[out] nest_x ??? + !> @param[out] nest_y ??? + !> @param[out] parent_x ??? + !> @param[out] parent_y ??? + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine calc_nest_alignment(Atm, n, nest_x, nest_y, parent_x, parent_y) type(fv_atmos_type), allocatable, intent(in) :: Atm(:) !< Atm data array integer, intent(in) :: n !< Grid numbers @@ -522,7 +643,17 @@ subroutine calc_nest_alignment(Atm, n, nest_x, nest_y, parent_x, parent_y) end subroutine calc_nest_alignment - + !> ??? + !> + !> @param[in] nest_geo ??? + !> @param[in] parent_geo ??? + !> @param[in] nest_x ??? + !> @param[in] nest_y ??? + !> @param[in] parent_x ??? + !> @param[in] parent_y ??? + !> @param[out] found ??? + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine check_nest_alignment(nest_geo, parent_geo, nest_x, nest_y, parent_x, parent_y, found) type(grid_geometry), intent(in) :: nest_geo !< Tile geometry type(grid_geometry), intent(in) :: parent_geo !< Parent grid at high-resolution geometry @@ -554,8 +685,31 @@ end subroutine check_nest_alignment !! update parent_geo, tile_geo*, p_grid*, n_grid* !!============================================================================ - !>@brief The subroutine 'mn_latlon_load_parent' loads parent latlon data from netCDF - !>@details Updates parent_geo, tile_geo*, p_grid*, n_grid* + !> The subroutine 'mn_latlon_load_parent' loads parent latlon data from netCDF. + !> + !> Updates parent_geo, tile_geo*, p_grid*, n_grid*, + !> + !> @param[in] surface_dir Directory for static files + !> @param[in] Atm Atm data array + !> @param[in] n Grid numbers + !> @param[in] parent_tile Grid numbers + !> @param[in] delta_i_c Nest motion in delta i + !> @param[in] delta_j_c Nest motion in delta j + !> @param[in] pelist PE list for fms2_io + !> @param[in] child_grid_num Grid numbers + !> @param[inout] parent_geo Tile geometries + !> @param[inout] tile_geo Tile geometries + !> @param[inout] tile_geo_u Tile geometries + !> @param[inout] tile_geo_v Tile geometries + !> @param[in] fp_super_tile_geo Parent grid at high-resolution geometry + !> @param[inout] p_grid A-stagger lat/lon grids + !> @param[out] n_grid A-stagger lat/lon grids + !> @param[inout] p_grid_u u-wind staggered lat/lon grids + !> @param[out] n_grid_u u-wind staggered lat/lon grids + !> @param[inout] p_grid_v v-wind staggered lat/lon grids + !> @param[out] n_grid_v v-wind staggered lat/lon grids + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_latlon_load_parent(surface_dir, Atm, n, parent_tile, delta_i_c, delta_j_c, pelist, child_grid_num, parent_geo, tile_geo, tile_geo_u, tile_geo_v, fp_super_tile_geo, p_grid, n_grid, p_grid_u, n_grid_u, p_grid_v, n_grid_v) character(len=*), intent(in) :: surface_dir !< Directory for static files type(fv_atmos_type), allocatable, intent(in) :: Atm(:) !< Atm data array @@ -749,8 +903,19 @@ subroutine mn_latlon_load_parent(surface_dir, Atm, n, parent_tile, delta_i_c, de end subroutine mn_latlon_load_parent - !>@brief The subroutine 'mn_static_filename' generates the full pathname for a static file for each run - !>@details Constructs the full pathname for a variable and refinement level and tests whether it exists + !> The subroutine 'mn_static_filename' generates the full pathname + !> for a static file for each run. + !> + !> Constructs the full pathname for a variable and refinement level + !> and tests whether it exists + !> + !> @param[in] surface_dir Directory. + !> @param[in] tile_num Variable name. + !> @param[in] tag Tile number. + !> @param[in] refine Nest refinement. + !> @param[out] grid_filename Output pathname to netCDF file. + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_static_filename(surface_dir, tile_num, tag, refine, grid_filename) character(len=*), intent(in) :: surface_dir !< Directory character(len=*), intent(in) :: tag !< Variable name @@ -785,7 +950,18 @@ subroutine mn_static_filename(surface_dir, tile_num, tag, refine, grid_filename) end subroutine mn_static_filename - !>@brief The subroutine 'mn_latlon_read_hires_parent' reads in static data from a netCDF file + !> The subroutine 'mn_latlon_read_hires_parent' reads in static data + !> from a netCDF file. + !> + !> @param[in] npx Number of points in x. + !> @param[in] npy Number of points in y. + !> @param[in] refine Number of points in refinement. + !> @param[in] pelist PE list for fms2_io. + !> @param[inout] fp_super_tile_geo Geometry of supergrid for parent tile at high resolution. + !> @param[in] surface_dir Surface directory to read netCDF file from. + !> @param[in] parent_tile Parent tile number. + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_latlon_read_hires_parent(npx, npy, refine, pelist, fp_super_tile_geo, surface_dir, parent_tile) integer, intent(in) :: npx, npy, refine !< Number of points in x,y, and refinement integer, allocatable, intent(in) :: pelist(:) !< PE list for fms2_io @@ -805,8 +981,24 @@ subroutine mn_latlon_read_hires_parent(npx, npy, refine, pelist, fp_super_tile_g end subroutine mn_latlon_read_hires_parent - !>@brief The subroutine 'mn_orog_read_hires_parent' loads parent orography data from netCDF - !>@details Gathers a number of terrain-related variables from the netCDF file + !> The subroutine 'mn_orog_read_hires_parent' loads parent orography + !> data from netCDF. + !> + !> Gathers a number of terrain-related variables from the netCDF file. + !> + !> @param[in] npx Number of points in x. + !> @param[in] npy Number of points in y. + !> @param[in] refine Number of points in refinement. + !> @param[in] pelist PE list for fms2_io. + !> @param[in] surface_dir Surface directory to read netCDF file from. + !> @param[in] filtered_terrain Whether to use filtered terrain. + !> @param[out] orog_grid Output orography grid. + !> @param[out] orog_std_grid Output orography standard deviation grid. + !> @param[out] ls_mask_grid Output land sea mask grid. + !> @param[out] land_frac_grid Output land fraction grid. + !> @param[in] parent_tile Parent tile number. + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_orog_read_hires_parent(npx, npy, refine, pelist, surface_dir, filtered_terrain, orog_grid, orog_std_grid, ls_mask_grid, land_frac_grid, parent_tile) integer, intent(in) :: npx, npy, refine !< Number of points in x,y, and refinement integer, allocatable, intent(in) :: pelist(:) !< PE list for fms2_io @@ -857,8 +1049,23 @@ subroutine mn_orog_read_hires_parent(npx, npy, refine, pelist, surface_dir, filt end subroutine mn_orog_read_hires_parent - !>@brief The subroutine 'mn_static_read_hires_r4' loads high resolution data from netCDF - !>@details Gathers a single variable from the netCDF file + !> The subroutine 'mn_static_read_hires_r4' loads high resolution + !> data from netCDF. + !> + !> Gathers a single variable from the netCDF file + !> + !> @param[in] npx Number of points in x. + !> @param[in] npy Number of points in y. + !> @param[in] refine Number of points in refinement. + !> @param[in] pelist PE list for fms2_io. + !> @param[in] surface_dir Surface directory to read netCDF file from. + !> @param[in] file_prefix File tag. + !> @param[in] var_name Variable name in netCDF file. + !> @param[out] data_grid Output data grid. + !> @param[in] parent_tile Parent tile number. + !> @param[in] time Optional month number for time-varying parameters. + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_static_read_hires_r4(npx, npy, refine, pelist, surface_dir, file_prefix, var_name, data_grid, parent_tile, time) integer, intent(in) :: npx, npy, refine !< Number of x,y points and nest refinement integer, allocatable, intent(in) :: pelist(:) !< PE list for fms2_io @@ -894,8 +1101,22 @@ subroutine mn_static_read_hires_r4(npx, npy, refine, pelist, surface_dir, file_p end subroutine mn_static_read_hires_r4 - !>@brief The subroutine 'mn_static_read_hires_r8' loads high resolution data from netCDF - !>@details Gathers a single variable from the netCDF file + !> The subroutine 'mn_static_read_hires_r8' loads high resolution + !> data from netCDF. + !> + !> Gathers a single variable from the netCDF file. + !> + !> @param[in] npx Number of points in x. + !> @param[in] npy Number of points in y. + !> @param[in] refine Number of points in refinement. + !> @param[in] pelist PE list for fms2_io. + !> @param[in] surface_dir Surface directory to read netCDF file from. + !> @param[in] file_prefix File tag. + !> @param[in] var_name Variable name in netCDF file. + !> @param[out] data_grid Output data grid. + !> @param[in] parent_tile Parent tile number. + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_static_read_hires_r8(npx, npy, refine, pelist, surface_dir, file_prefix, var_name, data_grid, parent_tile) integer, intent(in) :: npx, npy, refine !< Number of x,y points and nest refinement integer, allocatable, intent(in) :: pelist(:) !< PE list for fms2_io @@ -934,7 +1155,26 @@ end subroutine mn_static_read_hires_r8 !! Step 5.2 -- Recalculate nest halo weights !!============================================================================ - !>@brief The subroutine 'mn_meta_recalc' recalculates nest halo weights + !> The subroutine 'mn_meta_recalc' recalculates nest halo weights. + !> + !> @param[in] delta_i_c Nest motion in delta i + !> @param[in] delta_j_c Nest motion in delta j + !> @param[in] x_refine Nest refinement + !> @param[in] y_refine Nest refinement + !> @param[inout] tile_geo tile geometries + !> @param[inout] parent_geo tile geometries + !> @param[in] fp_super_tile_geo tile geometries + !> @param[in] is_fine_pe Is this a nest PE? + !> @param[in] nest_domain Nest domain structure + !> @param[in] position Stagger + !> @param[inout] p_grid Parent lat/lon grid + !> @param[inout] n_grid Nest lat/lon grid + !> @param[inout] wt Interpolation weights + !> @param[in] istart_coarse Initial nest offsets + !> @param[in] jstart_coarse Initial nest offsets + !> @param[in] ind ??? + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_meta_recalc( delta_i_c, delta_j_c, x_refine, y_refine, tile_geo, parent_geo, fp_super_tile_geo, & is_fine_pe, nest_domain, position, p_grid, n_grid, wt, istart_coarse, jstart_coarse, ind) integer, intent(in) :: delta_i_c, delta_j_c !< Nest motion in delta i,j @@ -1009,8 +1249,16 @@ end subroutine mn_meta_recalc !! Step 5.3 -- Adjust index by delta_i_c, delta_j_c !!============================================================================ - !>@brief The subroutine 'mn_shift_index' adjusts the index array for a nest move - !>@details Fast routine to increment indices by the delta in i,j direction + !> The subroutine 'mn_shift_index' adjusts the index array for a + !> nest move. + !> + !> Fast routine to increment indices by the delta in i,j direction. + !> + !> @param[in] delta_i_c Coarse grid delta i for nest move. + !> @param[in] delta_j_c Coarse grid delta j for nest move. + !> @param[inout] ind ??? + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_shift_index(delta_i_c, delta_j_c, ind) integer, intent(in) :: delta_i_c, delta_j_c !< Nest move deltas in i,j integer, allocatable, intent(inout) :: ind(:,:,:) !< Nest to parent index @@ -1040,8 +1288,26 @@ end subroutine mn_shift_index !! -- similar to med_nest_move in HWRF !!============================================================================ - !>@brief The subroutine 'mn_prog_shift_data' shifts the data on each nest PE - !>@details Iterates through the prognostic variables + !> The subroutine 'mn_prog_shift_data' shifts the data on each nest + !> PE. + !> + !> Iterates through the prognostic variables. + !> + !> @param[inout] Atm Atm data array. + !> @param[in] n Grid numbers. + !> @param[in] child_grid_num Grid numbers. + !> @param[in] wt_h Interpolation weights. + !> @param[in] wt_u Interpolation weights. + !> @param[in] wt_v Interpolation weights. + !> @param[in] delta_i_c Delta i. + !> @param[in] delta_j_c Delta j. + !> @param[in] x_refine Nest refinement. + !> @param[in] y_refine Nest refinement. + !> @param[in] is_fine_pe Is this is a nest PE? + !> @param[inout] nest_domain Nest domain structure. + !> @param[in] nz Number of vertical levels. + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_prog_shift_data(Atm, n, child_grid_num, wt_h, wt_u, wt_v, & delta_i_c, delta_j_c, x_refine, y_refine, & is_fine_pe, nest_domain, nz) @@ -1113,8 +1379,24 @@ end subroutine mn_prog_shift_data !! Step 6 - per variable !!============================================================================ - !>@brief The subroutine 'mn_prog_shift_data_r4_2d' shifts the data for a variable on each nest PE - !>@details For single variable + !> The subroutine 'mn_prog_shift_data_r4_2d' shifts the data for a + !> variable on each nest PE. + !> + !> For single variable. + !> + !> @param[inout] data_var Data variable. + !> @param[in] interp_type Interpolation stagger type. + !> @param[in] wt Interpolation weight array. + !> @param[in] ind Fine to coarse index array. + !> @param[in] delta_i_c Delta i. + !> @param[in] delta_j_c Delta j. + !> @param[in] x_refine Nest refinement. + !> @param[in] y_refine Nest refinement. + !> @param[in] is_fine_pe Is this is a nest PE? + !> @param[inout] nest_domain Nest domain structure. + !> @param[in] position Grid offset + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_var_shift_data_r4_2d(data_var, interp_type, wt, ind, delta_i_c, delta_j_c, x_refine, y_refine, is_fine_pe, nest_domain, position) real*4, allocatable, intent(inout) :: data_var(:,:) !< Data variable integer, intent(in) :: interp_type !< Interpolation stagger type @@ -1183,8 +1465,24 @@ subroutine mn_var_shift_data_r4_2d(data_var, interp_type, wt, ind, delta_i_c, de end subroutine mn_var_shift_data_r4_2d - !>@brief The subroutine 'mn_prog_shift_data_r8_2d' shifts the data for a variable on each nest PE - !>@details For one double precision 2D variable + !> The subroutine 'mn_prog_shift_data_r8_2d' shifts the data for a + !> variable on each nest PE. + !> + !> For one double precision 2D variable. + !> + !> @param[inout] data_var Data variable. + !> @param[in] interp_type Interpolation stagger type. + !> @param[in] wt Interpolation weight array. + !> @param[in] ind Fine to coarse index array. + !> @param[in] delta_i_c Delta i. + !> @param[in] delta_j_c Delta j. + !> @param[in] x_refine Nest refinement. + !> @param[in] y_refine Nest refinement. + !> @param[in] is_fine_pe Is this is a nest PE? + !> @param[inout] nest_domain Nest domain structure. + !> @param[in] position Grid offset + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_var_shift_data_r8_2d(data_var, interp_type, wt, ind, delta_i_c, delta_j_c, x_refine, y_refine, is_fine_pe, nest_domain, position) real*8, allocatable, intent(inout) :: data_var(:,:) !< Data variable @@ -1252,8 +1550,24 @@ subroutine mn_var_shift_data_r8_2d(data_var, interp_type, wt, ind, delta_i_c, de end subroutine mn_var_shift_data_r8_2d - !>@brief The subroutine 'mn_prog_shift_data_r4_3d' shifts the data for a variable on each nest PE - !>@details For one single precision 3D variable + !> The subroutine 'mn_prog_shift_data_r4_3d' shifts the data for a + !> variable on each nest PE. + !> + !> For one single precision 3D variable. + !> + !> @param[inout] data_var Data variable. + !> @param[in] interp_type Interpolation stagger type. + !> @param[in] wt Interpolation weight array. + !> @param[in] ind Fine to coarse index array. + !> @param[in] delta_i_c Delta i. + !> @param[in] delta_j_c Delta j. + !> @param[in] x_refine Nest refinement. + !> @param[in] y_refine Nest refinement. + !> @param[in] is_fine_pe Is this is a nest PE? + !> @param[inout] nest_domain Nest domain structure. + !> @param[in] position Grid offset + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_var_shift_data_r4_3d(data_var, interp_type, wt, ind, delta_i_c, delta_j_c, x_refine, y_refine, is_fine_pe, nest_domain, position, nz) real*4, allocatable, intent(inout) :: data_var(:,:,:) !< Data variable @@ -1324,8 +1638,25 @@ subroutine mn_var_shift_data_r4_3d(data_var, interp_type, wt, ind, delta_i_c, de end subroutine mn_var_shift_data_r4_3d - !>@brief The subroutine 'mn_prog_shift_data_r8_3d' shifts the data for a variable on each nest PE - !>@details For one double precision 3D variable + !> The subroutine 'mn_prog_shift_data_r8_3d' shifts the data for a + !> variable on each nest PE. + !> + !> For one double precision 3D variable. + !> + !> @param[inout] data_var Data variable. + !> @param[in] interp_type Interpolation stagger type. + !> @param[in] wt Interpolation weight array. + !> @param[in] ind Fine to coarse index array. + !> @param[in] delta_i_c Delta i. + !> @param[in] delta_j_c Delta j. + !> @param[in] x_refine Nest refinement. + !> @param[in] y_refine Nest refinement. + !> @param[in] is_fine_pe Is this is a nest PE? + !> @param[inout] nest_domain Nest domain structure. + !> @param[in] position Grid offset. + !> @param[in] nz Number vertical levels. + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_var_shift_data_r8_3d(data_var, interp_type, wt, ind, delta_i_c, delta_j_c, x_refine, y_refine, is_fine_pe, nest_domain, position, nz) real*8, allocatable, intent(inout) :: data_var(:,:,:) !< Data variable @@ -1394,8 +1725,25 @@ subroutine mn_var_shift_data_r8_3d(data_var, interp_type, wt, ind, delta_i_c, de end subroutine mn_var_shift_data_r8_3d - !>@brief The subroutine 'mn_prog_shift_data_r4_4d' shifts the data for a variable on each nest PE - !>@details For one single precision 4D variable + !> The subroutine 'mn_prog_shift_data_r4_4d' shifts the data for a + !> variable on each nest PE. + !> + !> For one single precision 4D variable. + !> + !> @param[inout] data_var Data variable. + !> @param[in] interp_type Interpolation stagger type. + !> @param[in] wt Interpolation weight array. + !> @param[in] ind Fine to coarse index array. + !> @param[in] delta_i_c Delta i. + !> @param[in] delta_j_c Delta j. + !> @param[in] x_refine Nest refinement. + !> @param[in] y_refine Nest refinement. + !> @param[in] is_fine_pe Is this is a nest PE? + !> @param[inout] nest_domain Nest domain structure. + !> @param[in] position Grid offset. + !> @param[in] nz Number vertical levels. + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_var_shift_data_r4_4d(data_var, interp_type, wt, ind, delta_i_c, delta_j_c, x_refine, y_refine, is_fine_pe, nest_domain, position, nz) real*4, allocatable, intent(inout) :: data_var(:,:,:,:) !< Data variable integer, intent(in) :: interp_type !< Interpolation stagger type @@ -1467,8 +1815,25 @@ subroutine mn_var_shift_data_r4_4d(data_var, interp_type, wt, ind, delta_i_c, de end subroutine mn_var_shift_data_r4_4d - !>@brief The subroutine 'mn_prog_shift_data_r8_4d' shifts the data for a variable on each nest PE - !>@details For one double precision 4D variable + !> The subroutine 'mn_prog_shift_data_r8_4d' shifts the data for a + !> variable on each nest PE. + !> + !> For one double precision 4D variable. + !> + !> @param[inout] data_var Data variable. + !> @param[in] interp_type Interpolation stagger type. + !> @param[in] wt Interpolation weight array. + !> @param[in] ind Fine to coarse index array. + !> @param[in] delta_i_c Delta i. + !> @param[in] delta_j_c Delta j. + !> @param[in] x_refine Nest refinement. + !> @param[in] y_refine Nest refinement. + !> @param[in] is_fine_pe Is this is a nest PE? + !> @param[inout] nest_domain Nest domain structure. + !> @param[in] position Grid offset. + !> @param[in] nz Number vertical levels. + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_var_shift_data_r8_4d(data_var, interp_type, wt, ind, delta_i_c, delta_j_c, x_refine, y_refine, is_fine_pe, nest_domain, position, nz) real*8, allocatable, intent(inout) :: data_var(:,:,:,:) !< Data variable integer, intent(in) :: interp_type !< Interpolation stagger type @@ -1545,8 +1910,26 @@ end subroutine mn_var_shift_data_r8_4d ! init_grid() also updates the wt arrays !================================================================================ - !>@brief The subroutine 'mn_meta_reset_gridstruct' resets navigation data and reallocates needed data in the gridstruct after nest move - !>@details This routine is computationally demanding and is a target for later optimization. + !> The subroutine 'mn_meta_reset_gridstruct' resets navigation data + !> and reallocates needed data in the gridstruct after nest move. + !> + !> This routine is computationally demanding and is a target for later optimization. + !> + !> @param[inout] Atm Array of atmospheric data. + !> @param[in] n This level. + !> @param[in] child_grid_num Nest level. + !> @param[in] nest_domain Nest domain structure. + !> @param[in] fp_super_tile_geo tile geometries + !> @param[in] x_refine Nest refinement. + !> @param[in] y_refine Nest refinement. + !> @param[in] is_fine_pe Is this is a nest PE? + !> @param[in] wt_h Interpolation weights. + !> @param[in] wt_u Interpolation weights. + !> @param[in] wt_v Interpolation weights. + !> @param[in] a_step Which timestep. + !> @param[in] dt_atmos Timestep duration in seconds. + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_meta_reset_gridstruct(Atm, n, child_grid_num, nest_domain, fp_super_tile_geo, x_refine, y_refine, is_fine_pe, wt_h, wt_u, wt_v, a_step, dt_atmos) type(fv_atmos_type), allocatable, target, intent(inout) :: Atm(:) !< Atm data array integer, intent(in) :: n, child_grid_num !< This level and nest level @@ -1795,8 +2178,16 @@ end subroutine mn_meta_reset_gridstruct ! Copied and adapted from fv_control.F90::setup_update_regions(); where it is an internal subroutine ! Modifications only to pass necessary variables as arguments - !>@brief The subroutine 'mn_setup_update_regions' performs some of the tasks of fv_control.F90::setup_update_regions() for nest motion - !>@details This routine only updates indices, so is computationally efficient + !> The subroutine 'mn_setup_update_regions' performs some of the + !> tasks of fv_control.F90::setup_update_regions() for nest motion. + !> + !> This routine only updates indices, so is computationally efficient. + !> + !> @param[inout] Atm Array of atmospheric data. + !> @param[in] this_grid Parent or child grid number + !> @param[in] nest_domain Nest domain structure. + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_setup_update_regions(Atm, this_grid, nest_domain) type(fv_atmos_type), allocatable, intent(INOUT) :: Atm(:) !< Array of atmospheric data integer, intent(IN) :: this_grid !< Parent or child grid number @@ -1949,8 +2340,15 @@ end subroutine mn_setup_update_regions ! !================================================================================================== - !>@brief The subroutine 'reallocate_BC_buffers' reallocates boundary condition buffers - some need to change size after a nest move. - !>@details Thought they would be reallocated in boundary.F90 nested_grid_BC_recv() when needed, but seem not to. + !> The subroutine 'reallocate_BC_buffers' reallocates boundary + !> condition buffers - some need to change size after a nest move. + !> + !> Thought they would be reallocated in boundary.F90 + !> nested_grid_BC_recv() when needed, but seem not to. + !> + !> @param[inout] Atm Single instance of atmospheric data. + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine reallocate_BC_buffers(Atm) type(fv_atmos_type), intent(inout) :: Atm !< Single instance of atmospheric data @@ -2029,8 +2427,20 @@ end subroutine reallocate_BC_buffers !! Step 8 -- Moving Nest Output to NetCDF !!============================================================================ - !>@brief The subroutine 'mn_prog_dump_to_netcdf' dumps selected prognostic variables to netCDF file. - !>@details Can be modified to output more of the prognostic variables if wanted. Certain 3D variables were commented out for performance. + !> The subroutine 'mn_prog_dump_to_netcdf' dumps selected prognostic + !> variables to netCDF file. + !> + !> Can be modified to output more of the prognostic variables if + !> wanted. Certain 3D variables were commented out for performance. + !> + !> @param[in] Atm Single instance of atmospheric data. + !> @param[in] file_prefix Filename prefix. + !> @param[in] is_fine_pe Is this is a nest PE? + !> @param[in] domain_coarse Domain structure. + !> @param[in] domain_fine Domain structure. + !> @param[in] nz Number of vertical levels. + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_prog_dump_to_netcdf(Atm, time_val, file_prefix, is_fine_pe, domain_coarse, domain_fine, nz) type(fv_atmos_type), intent(in) :: Atm !< Single instance of atmospheric data integer, intent(in) :: time_val !< Timestep number @@ -2091,7 +2501,21 @@ end subroutine mn_prog_dump_to_netcdf !! Step 8 -- Moving Nest Output Individual Variables - !>@brief The subroutine 'mn_var_dump_3d_to_netcdf' dumps a 3D single precision variable to netCDF file. + !> The subroutine 'mn_var_dump_3d_to_netcdf' dumps a 3D single + !> precision variable to netCDF file. + !> + !> @param[in] data_var Single precision model variable. + !> @param[in] is_fine_pe Is this is a nest PE? + !> @param[in] domain_coarse Domain structure. + !> @param[in] domain_fine Domain structure. + !> @param[in] position Stagger. + !> @param[in] nz Number of vertical levels. + !> @param[in] time_step Timestep. + !> @param[in] this_tile Tile number. + !> @param[in] file_prefix Filename prefix. + !> @param[in] var_name NetCDF variable name. + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_var_dump_3d_to_netcdf( data_var, is_fine_pe, domain_coarse, domain_fine, position, nz, time_step, this_tile, file_prefix, var_name) real, intent(in) :: data_var(:,:,:) !< Single precision model variable logical, intent(in) :: is_fine_pe !< Is nest PE? @@ -2133,7 +2557,20 @@ subroutine mn_var_dump_3d_to_netcdf( data_var, is_fine_pe, domain_coarse, domain end subroutine mn_var_dump_3d_to_netcdf - !>@brief The subroutine 'mn_var_dump_2d_to_netcdf' dumps a 3D single precision variable to netCDF file. + !> The subroutine 'mn_var_dump_2d_to_netcdf' dumps a 3D single + !> precision variable to netCDF file. + !> + !> @param[in] data_var Data variable. + !> @param[in] is_fine_pe Is this is a nest PE? + !> @param[in] domain_coarse Domain structure. + !> @param[in] domain_fine Domain structure. + !> @param[in] position Stagger. + !> @param[in] time_step Timestep. + !> @param[in] this_tile Tile number. + !> @param[in] file_prefix Filename prefix. + !> @param[in] var_name NetCDF variable name. + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine mn_var_dump_2d_to_netcdf( data_var, is_fine_pe, domain_coarse, domain_fine, position, time_step, this_tile, file_prefix, var_name) implicit none real, intent(in) :: data_var(:,:) !< Data variable @@ -2190,7 +2627,12 @@ end subroutine mn_var_dump_2d_to_netcdf !! Should help stabilize the fields before dynamics runs !!========================================================================================= - !>@brief The subroutine 'recalc_aux_pressures' updates auxiliary pressures after a nest move. + !> The subroutine 'recalc_aux_pressures' updates auxiliary pressures + !> after a nest move. + !> + !> @param[inout] Atm Single Atm structure. + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine recalc_aux_pressures(Atm) type(fv_atmos_type), intent(inout) :: Atm !< Single Atm structure @@ -2221,7 +2663,18 @@ end subroutine recalc_aux_pressures ! !================================================================================================== - !>@brief The subroutine 'init_ijk_mem' was copied from dyn_core.F90 to avoid circular dependencies + !> The subroutine 'init_ijk_mem' was copied from dyn_core.F90 to + !> avoid circular dependencies. + !> + !> @param[in] i1 ??? + !> @param[in] i2 ??? + !> @param[in] j1 ??? + !> @param[in] j1 ??? + !> @param[in] km ??? + !> @param[inout] array ??? + !> @param[in] var ??? + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine init_ijk_mem(i1, i2, j1, j2, km, array, var) integer, intent(in):: i1, i2, j1, j2, km real, intent(inout):: array(i1:i2,j1:j2,km) @@ -2239,7 +2692,13 @@ subroutine init_ijk_mem(i1, i2, j1, j2, km, array, var) end subroutine init_ijk_mem - !>@brief The function 'almost_equal' tests whether real values are within a tolerance of one another. + !> The function 'almost_equal' tests whether real values are within + !> a tolerance of one another. + !> + !> @param[in] a ??? + !> @param[in] b ??? + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 function almost_equal(a, b) logical :: almost_equal real, intent(in):: a,b @@ -2255,7 +2714,21 @@ end function almost_equal - !>@brief The subroutine 'move_nest_geo' shifts tile_geo values using the data from fp_super_tile_geo + !> The subroutine 'move_nest_geo' shifts tile_geo values using the + !> data from fp_super_tile_geo. + !> + !> @param[in] Atm Data array. + !> @param[in] n Grid numbers. + !> @param[inout] tile_geo A-grid tile geometry. + !> @param[inout] tile_geo_u u-wind tile geometry. + !> @param[inout] tile_geo_v v-wind tile geometry. + !> @param[in] fp_super_tile_geo Parent grid at high-resolution geometry + !> @param[in] delta_i_c Coarse grid delta i for nest move. + !> @param[in] delta_j_c Coarse grid delta j for nest move. + !> @param[in] x_refine Nest refinement + !> @param[in] y_refine Nest refinement + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine move_nest_geo(Atm, n, tile_geo, tile_geo_u, tile_geo_v, fp_super_tile_geo, delta_i_c, delta_j_c, x_refine, y_refine) implicit none type(fv_atmos_type), allocatable, intent(in) :: Atm(:) !< Atm data array @@ -2354,7 +2827,16 @@ subroutine move_nest_geo(Atm, n, tile_geo, tile_geo_u, tile_geo_v, fp_super_tile end subroutine move_nest_geo - !>@brief The subroutine 'assign_n_p_grids' sets values for parent and nest grid arrays from the grid_geometry structures. + !> The subroutine 'assign_n_p_grids' sets values for parent and nest + !> grid arrays from the grid_geometry structures. + !> + !> @param[in] parent_geo Parent geometry. + !> @param[in] tile_geo Nest geometry. + !> @param[inout] p_grid Parent grid. + !> @param[inout] n_grid Nest grid. + !> @param[in] position Grid offset. + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine assign_n_p_grids(parent_geo, tile_geo, p_grid, n_grid, position) type(grid_geometry), intent(in) :: parent_geo, tile_geo !< Parent geometry, nest geometry real(kind=R_GRID), allocatable, intent(inout) :: p_grid(:,:,:) !< Parent grid @@ -2420,7 +2902,15 @@ subroutine assign_n_p_grids(parent_geo, tile_geo, p_grid, n_grid, position) end subroutine assign_n_p_grids - !>@brief The subroutine 'assign_p_grids' sets values for parent grid arrays from the grid_geometry structures. This is static through the model run. + !> The subroutine 'assign_p_grids' sets values for parent grid + !> arrays from the grid_geometry structures. This is static through + !> the model run. + !> + !> @param[in] parent_geo Parent geometry. + !> @param[inout] p_grid Parent grid. + !> @param[in] position Grid offset. + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine assign_p_grids(parent_geo, p_grid, position) type(grid_geometry), intent(in) :: parent_geo !< Parent geometry real(kind=R_GRID), allocatable, intent(inout) :: p_grid(:,:,:) !< Parent grid @@ -2549,7 +3039,14 @@ end subroutine assign_p_grids - !>@brief The subroutine 'assign_n_grids' sets values for nest grid arrays from the grid_geometry structures. + !> The subroutine 'assign_n_grids' sets values for nest grid arrays + !> from the grid_geometry structures. + !> + !> @param[in] tile_geo Nest geometry. + !> @param[inout] n_grid Nest grid. + !> @param[in] position Grid offset. + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine assign_n_grids(tile_geo, n_grid, position) type(grid_geometry), intent(in) :: tile_geo !< Parent geometry, nest geometry real(kind=R_GRID), allocatable, intent(inout) :: n_grid(:,:,:) !< Nest grid @@ -2590,7 +3087,19 @@ subroutine assign_n_grids(tile_geo, n_grid, position) end subroutine assign_n_grids - + !> ??? + !> + !> @param[in] p_grid ??? + !> @param[in] ic ??? + !> @param[in] jc ??? + !> @param[in] n_grid1 ??? + !> @param[in] n_grid2 ??? + !> @param[in] istag ??? + !> @param[in] jstag ??? + !> @param[out] is_inside ??? + !> @param[in] verbose ??? + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine calc_inside(p_grid, ic, jc, n_grid1, n_grid2, istag, jstag, is_inside, verbose) real(kind=R_GRID), allocatable, intent(in) :: p_grid(:,:,:) real(kind=R_GRID), intent(in) :: n_grid1, n_grid2 @@ -2626,8 +3135,24 @@ subroutine calc_inside(p_grid, ic, jc, n_grid1, n_grid2, istag, jstag, is_inside end subroutine calc_inside - !>@brief The subroutine 'calc_nest_halo_weights' calculates the interpolation weights - !>@details Computationally demanding; target for optimization after nest moves + !> The subroutine 'calc_nest_halo_weights' calculates the interpolation weights. + !> + !> Computationally demanding; target for optimization after nest moves. + !> + !> @param[in] bbox_fine Bounding box of parent. + !> @param[in] bbox_coarse Bounding box of nest. + !> @param[in] p_grid Latlon rids of parent in radians. + !> @param[in] n_grid Latlon rids of nest in radians. + !> @param[in] wt Interpolation weight array. + !> @param[inout] istart_coarse Start i of coarse grid. + !> @param[inout] jstart_coarse Start j of coarse grid. + !> @param[in] x_refine Nest refinement. + !> @param[in] y_refine Nest refinement. + !> @param[in] istag Stagger. + !> @param[in] jstag Stagger. + !> @param[in] ind ??? + !> + !> @author W. Ramstrom, AOML/HRD @date 01/15/2021 subroutine calc_nest_halo_weights(bbox_fine, bbox_coarse, p_grid, n_grid, wt, istart_coarse, jstart_coarse, x_refine, y_refine, istag, jstag, ind) implicit none @@ -2743,4 +3268,3 @@ subroutine calc_nest_halo_weights(bbox_fine, bbox_coarse, p_grid, n_grid, wt, is end subroutine calc_nest_halo_weights end module fv_moving_nest_mod - diff --git a/moving_nest/fv_moving_nest_main.F90 b/moving_nest/fv_moving_nest_main.F90 index 34af608c2..f6cad5450 100644 --- a/moving_nest/fv_moving_nest_main.F90 +++ b/moving_nest/fv_moving_nest_main.F90 @@ -1,3 +1,7 @@ +!> @file +!> @brief Provides top-level interface for moving nest functionality. +!> @author W. Ramstrom, AOML/HRD (William.Ramstrom@noaa.gov) @date 05/27/2021 + !*********************************************************************** !* GNU General Public License * !* This file is a part of fvGFS. * @@ -25,6 +29,10 @@ !! @email William.Ramstrom@noaa.gov ! =======================================================================! +!> @brief Provides top-level interface for moving nest functionality. +!> +!> @author W. Ramstrom, AOML/HRD (William.Ramstrom@noaa.gov) @date 05/27/2021 + module fv_moving_nest_main_mod #include @@ -167,9 +175,20 @@ module fv_moving_nest_main_mod contains - !>@brief The subroutine 'update_moving_nest' decides whether the nest should be moved, and if so, performs the move. - !>@details This subroutine evaluates the automatic storm tracker (or prescribed motion configuration), then decides - !! if the nest should be moved. If it should be moved, it calls fv_moving_nest_exec() to perform the nest move. + !> The subroutine 'update_moving_nest' decides whether the nest + !> should be moved, and if so, performs the move. + !> + !> This subroutine evaluates the automatic storm tracker (or + !> prescribed motion configuration), then decides if the nest should + !> be moved. If it should be moved, it calls fv_moving_nest_exec() + !> to perform the nest move. + !> + !> @param[in] Atm_block Physics block layout. + !> @param[in] IPD_control Physics metadata. + !> @param[inout] IPD_data Physics variable data. + !> @param[in] time_step Current timestep. + !> + !> @author W. Ramstrom, AOML/HRD (William.Ramstrom@noaa.gov) @date 05/27/2021 subroutine update_moving_nest(Atm_block, IPD_control, IPD_data, time_step) type(block_control_type), intent(in) :: Atm_block !< Physics block layout type(IPD_control_type), intent(in) :: IPD_control !< Physics metadata @@ -214,7 +233,9 @@ subroutine update_moving_nest(Atm_block, IPD_control, IPD_data, time_step) end subroutine update_moving_nest - + !> ??? + !> + !> @author W. Ramstrom, AOML/HRD (William.Ramstrom@noaa.gov) @date 05/27/2021 subroutine moving_nest_end() integer :: n @@ -234,21 +255,36 @@ subroutine moving_nest_end() end subroutine moving_nest_end - ! This subroutine sits in this file to have access to Atm structure + !> This subroutine sits in this file to have access to Atm structure. + !> + !> @author W. Ramstrom, AOML/HRD (William.Ramstrom@noaa.gov) @date 05/27/2021 subroutine nest_tracker_init() call fv_tracker_init(size(Atm)) if (mygrid .eq. 2) call allocate_tracker(mygrid, Atm(mygrid)%bd%isc, Atm(mygrid)%bd%iec, Atm(mygrid)%bd%jsc, Atm(mygrid)%bd%jec) end subroutine nest_tracker_init + !> ??? + !> + !> @author W. Ramstrom, AOML/HRD (William.Ramstrom@noaa.gov) @date 05/27/2021 subroutine nest_tracker_end() call deallocate_tracker(ngrids) end subroutine nest_tracker_end - !>@brief The subroutine 'dump_moving_nest' outputs native grid format data to netCDF files - !>@details This subroutine exports model variables using FMS IO to netCDF files if tsvar_out is set to .True. + !> The subroutine 'dump_moving_nest' outputs native grid format data + !> to netCDF files. + !> + !> This subroutine exports model variables using FMS IO to netCDF + !> files if tsvar_out is set to .True. + !> + !> @param[in] Atm_block Physics block layout. + !> @param[in] IPD_control Physics metadata. + !> @param[in] IPD_data Physics variable data. + !> @param[in] time_step Current timestep. + !> + !> @author W. Ramstrom, AOML/HRD (William.Ramstrom@noaa.gov) @date 05/27/2021 subroutine dump_moving_nest(Atm_block, IPD_control, IPD_data, time_step) type(block_control_type), intent(in) :: Atm_block !< Physics block layout type(IPD_control_type), intent(in) :: IPD_control !< Physics metadata @@ -278,9 +314,16 @@ subroutine dump_moving_nest(Atm_block, IPD_control, IPD_data, time_step) end subroutine dump_moving_nest - !>@brief The subroutine 'fv_moving_nest_init_clocks' intializes performance profiling timers of sections of the moving nest code. - !>@details Starts timers for subcomponents of moving nest code to determine performance. mpp routines group them into separate - !! sections for parent and nest PEs. + !> The subroutine fv_moving_nest_init_clocks() intializes + !> performance profiling timers of sections of the moving nest code. + !> + !> Starts timers for subcomponents of moving nest code to determine + !> performance. mpp routines group them into separate sections for + !> parent and nest PEs. + !> + !> @param[in] use_timers ??? + !> + !> @author W. Ramstrom, AOML/HRD (William.Ramstrom@noaa.gov) @date 05/27/2021 subroutine fv_moving_nest_init_clocks(use_timers) logical, intent(in) :: use_timers @@ -311,8 +354,22 @@ subroutine fv_moving_nest_init_clocks(use_timers) id_movnestTot = mpp_clock_id ('Moving Nest Total', flags = clock_flag_default, grain=CLOCK_SUBCOMPONENT ) end subroutine fv_moving_nest_init_clocks - !>@brief The subroutine 'eval_move_nest' determines whether the nest should be moved and in which direction. - !>@details This subroutine can execute prescribed motion or automated storm tracking based on namelist options. + !> The subroutine 'eval_move_nest' determines whether the nest + !> should be moved and in which direction. + !> + !> This subroutine can execute prescribed motion or automated storm + !> tracking based on namelist options. + !> + !> @param[inout] Atm Input atmospheric data. + !> @param[in] a_step Timestep. + !> @param[in] parent_grid_num Grid numbers of parent. + !> @param[in] child_grid_num Grid numbers of child. + !> @param[out] do_move Logical for whether to move nest. + !> @param[out] delta_i_c Can be -1, 0, or +1. + !> @param[out] delta_j_c Can be -1, 0, or +1. + !> @param[in] dt_atmos only needed for the simple version of this subroutine. + !> + !> @author W. Ramstrom, AOML/HRD (William.Ramstrom@noaa.gov) @date 05/27/2021 subroutine eval_move_nest(Atm, a_step, parent_grid_num, child_grid_num, do_move, delta_i_c, delta_j_c, dt_atmos) type(fv_atmos_type), intent(inout) :: Atm(:) !< Input atmospheric data integer, intent(in) :: a_step !< Timestep @@ -480,9 +537,25 @@ subroutine eval_move_nest(Atm, a_step, parent_grid_num, child_grid_num, do_move, end subroutine eval_move_nest - !>@brief The subroutine 'fv_moving_nest_exec' performs the nest move - most work occurs on nest PEs but some on parent PEs. - !>@details This subroutine shifts the prognostic and physics/surface variables. - !! It also updates metadata and interpolation weights. + !> The subroutine 'fv_moving_nest_exec' performs the nest move - + !> most work occurs on nest PEs but some on parent PEs. + !> + !> This subroutine shifts the prognostic and physics/surface + !> variables. It also updates metadata and interpolation weights. + !> + !> @param[inout] Atm Atmospheric variables. + !> @param[in] Atm_block Physics block. + !> @param[in] IPD_control Physics metadata. + !> @param[inout] IPD_data Physics variable data. + !> @param[in] delta_i_c Nest motion increment. + !> @param[in] delta_j_c Nest motion increment. + !> @param[in] n Nest index. + !> @param[in] nest_num Nest index. + !> @param[in] parent_grid_num Grid numbers of parent. + !> @param[in] child_grid_num Grid numbers of child. + !> @param[in] dt_atmos Timestep in seconds. + !> + !> @author W. Ramstrom, AOML/HRD (William.Ramstrom@noaa.gov) @date 05/27/2021 subroutine fv_moving_nest_exec(Atm, Atm_block, IPD_control, IPD_data, delta_i_c, delta_j_c, n, nest_num, parent_grid_num, child_grid_num, dt_atmos) implicit none type(fv_atmos_type), allocatable, target, intent(inout) :: Atm(:) !< Atmospheric variables @@ -1148,7 +1221,15 @@ subroutine fv_moving_nest_exec(Atm, Atm_block, IPD_control, IPD_data, delta_i_c, end subroutine fv_moving_nest_exec - !>@brief The subroutine 'mn_replace_low_values' replaces low values with a default value. + + !> The subroutine 'mn_replace_low_values' replaces low values with a + !> default value. + !> + !> @param[inout] data_grid 2D grid of data. + !> @param[in] low_value Low value to check for; e.g. negative or fill value. + !> @param[in] new_value Value to replace low value with. + !> + !> @author W. Ramstrom, AOML/HRD (William.Ramstrom@noaa.gov) @date 05/27/2021 subroutine mn_replace_low_values(data_grid, low_value, new_value) real, _ALLOCATABLE, intent(inout) :: data_grid(:,:) !< 2D grid of data real, intent(in) :: low_value !< Low value to check for; e.g. negative or fill value