diff --git a/moving_nest/fv_moving_nest_utils.F90 b/moving_nest/fv_moving_nest_utils.F90 index 06136a2b1..a38bfae82 100644 --- a/moving_nest/fv_moving_nest_utils.F90 +++ b/moving_nest/fv_moving_nest_utils.F90 @@ -1,3 +1,7 @@ +!> @file +!> @brief Provides subroutines to enable moving nest functionality in FV3 dynamic core. +!> @author W. Ramstrom (William.Ramstrom@noaa.gov), AOML/HRD @date 01/15/2021 + !*********************************************************************** !* GNU General Public License * !* This file is a part of fvGFS. * @@ -18,12 +22,6 @@ !* or see: http://www.gnu.org/licenses/gpl.html * !*********************************************************************** -!*********************************************************************** -!> @file -!! @brief Provides subroutines to enable moving nest functionality in FV3 dynamic core. -!! @author W. Ramstrom, AOML/HRD 01/15/2021 -!! @email William.Ramstrom@noaa.gov -! =======================================================================! module fv_moving_nest_utils_mod @@ -86,6 +84,7 @@ module fv_moving_nest_utils_mod implicit none + !> ??? #ifdef NO_QUAD_PRECISION ! 64-bit precision (kind=8) integer, parameter:: f_p = selected_real_kind(15) @@ -94,10 +93,10 @@ module fv_moving_nest_utils_mod integer, parameter:: f_p = selected_real_kind(20) #endif - integer, parameter :: UWIND = 1 - integer, parameter :: VWIND = 2 + integer, parameter :: UWIND = 1 !< ??? + integer, parameter :: VWIND = 2 !< ??? - logical :: debug_log = .false. + logical :: debug_log = .false. !< ??? #include @@ -177,7 +176,14 @@ module fv_moving_nest_utils_mod ! S (i-1,j+1) + ! S (i-1,j-1) ) - + !> ??? + !> + !> @param[in] data_var ??? + !> @param[in] i ??? + !> @param[in] j ??? + !> @param[out] val ??? + !> + !> @author subroutine smooth_5_point(data_var, i, j, val) real, allocatable, intent(in) :: data_var(:,:) integer :: i,j @@ -193,7 +199,14 @@ subroutine smooth_5_point(data_var, i, j, val) end subroutine smooth_5_point - + !> ??? + !> + !> @param[in] data_var ??? + !> @param[in] i ??? + !> @param[in] j ??? + !> @param[out] val ??? + !> + !> @author subroutine smooth_9_point(data_var, i, j, val) real, allocatable, intent(in) :: data_var(:,:) integer :: i,j @@ -213,6 +226,18 @@ end subroutine smooth_9_point ! blend_size is 5 for static nests. We may increase it for moving nests. ! This is only called for fine PEs. ! Blends a few points into the nest. Calls zs filtering if enabled in namelist. + + !> ??? + !> + !> @param[inout] Atm ??? + !> @param[in] parent_orog_grid Coarse grid orography + !> @param[in] nest_orog_grid Orography for the full panel of the parent, at high-resolution + !> @param[in] refine ??? + !> @param[in] halo_size ??? + !> @param[in] blend_size ??? + !> @param[in] a_step ??? + !> + !> @author subroutine set_blended_terrain(Atm, parent_orog_grid, nest_orog_grid, refine, halo_size, blend_size, a_step) type(fv_atmos_type), intent(inout), target :: Atm real, allocatable, intent(in) :: parent_orog_grid(:,:) ! Coarse grid orography @@ -295,6 +320,16 @@ subroutine set_blended_terrain(Atm, parent_orog_grid, nest_orog_grid, refine, ha end subroutine set_blended_terrain + !> ??? + !> + !> @param[inout] Atm ??? + !> @param[in] fp_orog Orography for the full panel of the parent, at high-resolution + !> @param[in] refine ??? + !> @param[in] num_points ??? + !> @param[in] halo_size ??? + !> @param[in] blend_size ??? + !> + !> @author subroutine set_smooth_nest_terrain(Atm, fp_orog, refine, num_points, halo_size, blend_size) type(fv_atmos_type), intent(inout) :: Atm real, allocatable, intent(in) :: fp_orog(:,:) ! orography for the full panel of the parent, at high-resolution @@ -360,12 +395,22 @@ subroutine set_smooth_nest_terrain(Atm, fp_orog, refine, num_points, halo_size, end subroutine set_smooth_nest_terrain - !================================================================================================== - ! ! Fill Nest Halos from Parent - ! - !================================================================================================== + !> ??? + !> + !> @param[in] var_name ??? + !> @param[inout] data_var ??? + !> @param[in] interp_type ??? + !> @param[in] wt ??? + !> @param[in] ind ??? + !> @param[in] x_refine ??? + !> @param[in] y_refine ??? + !> @param[in] is_fine_pe ??? + !> @param[inout] nest_domain ??? + !> @param[in] position ??? + !> + !> @author subroutine fill_nest_halos_from_parent_r4_2d(var_name, data_var, interp_type, wt, ind, x_refine, y_refine, is_fine_pe, nest_domain, position) character(len=*), intent(in) :: var_name real*4, allocatable, intent(inout) :: data_var(:,:) @@ -423,7 +468,20 @@ subroutine fill_nest_halos_from_parent_r4_2d(var_name, data_var, interp_type, wt end subroutine fill_nest_halos_from_parent_r4_2d - + !> ??? + !> + !> @param[in] var_name ??? + !> @param[inout] data_var ??? + !> @param[in] interp_type ??? + !> @param[in] wt ??? + !> @param[in] ind ??? + !> @param[in] x_refine ??? + !> @param[in] y_refine ??? + !> @param[in] is_fine_pe ??? + !> @param[inout] nest_domain ??? + !> @param[in] position ??? + !> + !> @author subroutine fill_nest_halos_from_parent_r8_2d(var_name, data_var, interp_type, wt, ind, x_refine, y_refine, is_fine_pe, nest_domain, position) character(len=*), intent(in) :: var_name real*8, allocatable, intent(inout) :: data_var(:,:) @@ -482,7 +540,23 @@ subroutine fill_nest_halos_from_parent_r8_2d(var_name, data_var, interp_type, wt end subroutine fill_nest_halos_from_parent_r8_2d - + !> ??? + !> + !> @param[in] var_name ??? + !> @param[inout] data_var ??? + !> @param[in] interp_type ??? + !> @param[in] wt ??? + !> @param[in] ind ??? + !> @param[in] x_refine ??? + !> @param[in] y_refine ??? + !> @param[in] is_fine_pe ??? + !> @param[inout] nest_domain ??? + !> @param[in] position ??? + !> @param[in] mask_var ??? + !> @param[in] mask_val ??? + !> @param[in] default_val ??? + !> + !> @author subroutine fill_nest_halos_from_parent_masked(var_name, data_var, interp_type, wt, ind, x_refine, y_refine, is_fine_pe, nest_domain, position, mask_var, mask_val, default_val) character(len=*), intent(in) :: var_name real*8, allocatable, intent(inout) :: data_var(:,:) @@ -543,7 +617,21 @@ subroutine fill_nest_halos_from_parent_masked(var_name, data_var, interp_type, w end subroutine fill_nest_halos_from_parent_masked - + !> ??? + !> + !> @param[in] var_name ??? + !> @param[inout] data_var ??? + !> @param[in] interp_type ??? + !> @param[in] wt ??? + !> @param[in] ind ??? + !> @param[in] x_refine ??? + !> @param[in] y_refine ??? + !> @param[in] is_fine_pe ??? + !> @param[inout] nest_domain ??? + !> @param[in] position ??? + !> @param[in] nz ??? + !> + !> @author subroutine fill_nest_halos_from_parent_r4_3d(var_name, data_var, interp_type, wt, ind, x_refine, y_refine, is_fine_pe, nest_domain, position, nz) character(len=*), intent(in) :: var_name real*4, allocatable, intent(inout) :: data_var(:,:,:) @@ -601,7 +689,21 @@ subroutine fill_nest_halos_from_parent_r4_3d(var_name, data_var, interp_type, wt end subroutine fill_nest_halos_from_parent_r4_3d - + !> ??? + !> + !> @param[in] var_name ??? + !> @param[inout] data_var ??? + !> @param[in] interp_type ??? + !> @param[in] wt ??? + !> @param[in] ind ??? + !> @param[in] x_refine ??? + !> @param[in] y_refine ??? + !> @param[in] is_fine_pe ??? + !> @param[inout] nest_domain ??? + !> @param[in] position ??? + !> @param[in] nz ??? + !> + !> @author subroutine fill_nest_halos_from_parent_r8_3d(var_name, data_var, interp_type, wt, ind, x_refine, y_refine, is_fine_pe, nest_domain, position, nz) character(len=*), intent(in) :: var_name real*8, allocatable, intent(inout) :: data_var(:,:,:) @@ -659,7 +761,21 @@ subroutine fill_nest_halos_from_parent_r8_3d(var_name, data_var, interp_type, wt end subroutine fill_nest_halos_from_parent_r8_3d - + !> ??? + !> + !> @param[in] var_name ??? + !> @param[inout] data_var ??? + !> @param[in] interp_type ??? + !> @param[in] wt ??? + !> @param[in] ind ??? + !> @param[in] x_refine ??? + !> @param[in] y_refine ??? + !> @param[in] is_fine_pe ??? + !> @param[inout] nest_domain ??? + !> @param[in] position ??? + !> @param[in] nz ??? + !> + !> @author subroutine fill_nest_halos_from_parent_r4_4d(var_name, data_var, interp_type, wt, ind, x_refine, y_refine, is_fine_pe, nest_domain, position, nz) character(len=*), intent(in) :: var_name real*4, allocatable, intent(inout) :: data_var(:,:,:,:) @@ -724,7 +840,21 @@ subroutine fill_nest_halos_from_parent_r4_4d(var_name, data_var, interp_type, wt end subroutine fill_nest_halos_from_parent_r4_4d - + !> ??? + !> + !> @param[in] var_name ??? + !> @param[inout] data_var ??? + !> @param[in] interp_type ??? + !> @param[in] wt ??? + !> @param[in] ind ??? + !> @param[in] x_refine ??? + !> @param[in] y_refine ??? + !> @param[in] is_fine_pe ??? + !> @param[inout] nest_domain ??? + !> @param[in] position ??? + !> @param[in] nz ??? + !> + !> @author subroutine fill_nest_halos_from_parent_r8_4d(var_name, data_var, interp_type, wt, ind, x_refine, y_refine, is_fine_pe, nest_domain, position, nz) character(len=*), intent(in) :: var_name real*8, allocatable, intent(inout) :: data_var(:,:,:,:) @@ -764,7 +894,7 @@ subroutine fill_nest_halos_from_parent_r8_4d(var_name, data_var, interp_type, wt ! Coarse parent PEs send data from data_var ! Fine halo PEs receive data into one or more of the halo buffers !==================================================== - + call mpp_update_nest_fine(data_var, nest_domain, wbuffer, sbuffer, ebuffer, nbuffer, nest_level, position=position) if (is_fine_pe) then @@ -790,12 +920,18 @@ subroutine fill_nest_halos_from_parent_r8_4d(var_name, data_var, interp_type, wt end subroutine fill_nest_halos_from_parent_r8_4d - !================================================================================================== - ! ! Allocate halo buffers - ! - !================================================================================================== + !> ??? + !> + !> @param[out] buffer ??? + !> @param[out] bbox_fine ??? + !> @param[out] bbox_coarse ??? + !> @param[in] nest_domain ??? + !> @param[in] direction ??? + !> @param[in] position ??? + !> + !> @author subroutine alloc_halo_buffer_r8_2d(buffer, bbox_fine, bbox_coarse, nest_domain, direction, position) real*8, dimension(:,:), allocatable, intent(out) :: buffer type(bbox), intent(out) :: bbox_fine, bbox_coarse @@ -815,7 +951,16 @@ subroutine alloc_halo_buffer_r8_2d(buffer, bbox_fine, bbox_coarse, nest_domain, end subroutine alloc_halo_buffer_r8_2d - + !> ??? + !> + !> @param[out] buffer ??? + !> @param[out] bbox_fine ??? + !> @param[out] bbox_coarse ??? + !> @param[in] nest_domain ??? + !> @param[in] direction ??? + !> @param[in] position ??? + !> + !> @author subroutine alloc_halo_buffer_r4_2d(buffer, bbox_fine, bbox_coarse, nest_domain, direction, position) real*4, dimension(:,:), allocatable, intent(out) :: buffer type(bbox), intent(out) :: bbox_fine, bbox_coarse @@ -835,7 +980,17 @@ subroutine alloc_halo_buffer_r4_2d(buffer, bbox_fine, bbox_coarse, nest_domain, end subroutine alloc_halo_buffer_r4_2d - + !> ??? + !> + !> @param[out] buffer ??? + !> @param[out] bbox_fine ??? + !> @param[out] bbox_coarse ??? + !> @param[in] nest_domain ??? + !> @param[in] direction ??? + !> @param[in] position ??? + !> @param[in] nz ??? + !> + !> @author subroutine alloc_halo_buffer_r4_3d(buffer, bbox_fine, bbox_coarse, nest_domain, direction, position, nz) real*4, dimension(:,:,:), allocatable, intent(out) :: buffer type(bbox), intent(out) :: bbox_fine, bbox_coarse @@ -856,7 +1011,17 @@ subroutine alloc_halo_buffer_r4_3d(buffer, bbox_fine, bbox_coarse, nest_domain, end subroutine alloc_halo_buffer_r4_3d - + !> ??? + !> + !> @param[out] buffer ??? + !> @param[out] bbox_fine ??? + !> @param[out] bbox_coarse ??? + !> @param[in] nest_domain ??? + !> @param[in] direction ??? + !> @param[in] position ??? + !> @param[in] nz ??? + !> + !> @author subroutine alloc_halo_buffer_r8_3d(buffer, bbox_fine, bbox_coarse, nest_domain, direction, position, nz) real*8, dimension(:,:,:), allocatable, intent(out) :: buffer type(bbox), intent(out) :: bbox_fine, bbox_coarse @@ -876,7 +1041,18 @@ subroutine alloc_halo_buffer_r8_3d(buffer, bbox_fine, bbox_coarse, nest_domain, end subroutine alloc_halo_buffer_r8_3d - + !> ??? + !> + !> @param[out] buffer ??? + !> @param[out] bbox_fine ??? + !> @param[out] bbox_coarse ??? + !> @param[in] nest_domain ??? + !> @param[in] direction ??? + !> @param[in] position ??? + !> @param[in] nz ??? + !> @param[in] n4d ??? + !> + !> @author subroutine alloc_halo_buffer_r4_4d(buffer, bbox_fine, bbox_coarse, nest_domain, direction, position, nz, n4d) real*4, dimension(:,:,:,:), allocatable, intent(out) :: buffer type(bbox), intent(out) :: bbox_fine, bbox_coarse @@ -896,7 +1072,18 @@ subroutine alloc_halo_buffer_r4_4d(buffer, bbox_fine, bbox_coarse, nest_domain, end subroutine alloc_halo_buffer_r4_4d - + !> ??? + !> + !> @param[out] buffer ??? + !> @param[out] bbox_fine ??? + !> @param[out] bbox_coarse ??? + !> @param[in] nest_domain ??? + !> @param[in] direction ??? + !> @param[in] position ??? + !> @param[in] nz ??? + !> @param[in] n4d ??? + !> + !> @author subroutine alloc_halo_buffer_r8_4d(buffer, bbox_fine, bbox_coarse, nest_domain, direction, position, nz, n4d) real*8, dimension(:,:,:,:), allocatable, intent(out) :: buffer type(bbox), intent(out) :: bbox_fine, bbox_coarse @@ -916,17 +1103,27 @@ subroutine alloc_halo_buffer_r8_4d(buffer, bbox_fine, bbox_coarse, nest_domain, end subroutine alloc_halo_buffer_r8_4d - - !================================================================================================== - ! ! Load static data from netCDF files - ! - !================================================================================================== ! Load the full panel nest latlons from netCDF file ! character(*), parameter :: nc_filename = '/scratch2/NAGAPE/aoml-hafs1/William.Ramstrom/static_grids/C384_grid.tile6.nc' ! Read in the lat/lon in degrees, convert to radians + !> ??? + !> + !> @param[in] nc_filename ??? + !> @param[in] nxp ??? + !> @param[in] nyp ??? + !> @param[in] nzp ??? + !> @param[in] refine ??? + !> @param[in] pelist ??? + !> @param[inout] fp_tile_geo ??? + !> @param[out] fp_istart_fine ??? + !> @param[out]] fp_iend_fine ??? + !> @param[out] fp_jstart_fine ??? + !> @param[out] fp_jend_fine ??? + !> + !> @author subroutine load_nest_latlons_from_nc(nc_filename, nxp, nyp, refine, pelist, & fp_tile_geo, fp_istart_fine, fp_iend_fine, fp_jstart_fine, fp_jend_fine) implicit none @@ -1029,6 +1226,17 @@ subroutine load_nest_latlons_from_nc(nc_filename, nxp, nyp, refine, pelist, & end subroutine load_nest_latlons_from_nc #ifdef OVERLOAD_R8 + !> ??? + !> + !> @param[in] nc_filename ??? + !> @param[in] var_name ??? + !> @param[in] x_size ??? + !> @param[in] y_size ??? + !> @param[inout] data_array ??? + !> @param[in] pes ??? + !> @param[in] time ??? + !> + !> @author subroutine alloc_read_data_r4_2d(nc_filename, var_name, x_size, y_size, data_array, pes, time) character(len=*), intent(in) :: nc_filename, var_name integer, intent(in) :: x_size, y_size @@ -1069,6 +1277,17 @@ subroutine alloc_read_data_r4_2d(nc_filename, var_name, x_size, y_size, data_arr end subroutine alloc_read_data_r4_2d #endif + !> ??? + !> + !> @param[in] nc_filename ??? + !> @param[in] var_name ??? + !> @param[in] x_size ??? + !> @param[in] y_size ??? + !> @param[inout] data_array ??? + !> @param[in] pes ??? + !> @param[in] time ??? + !> + !> @author subroutine alloc_read_data_r8_2d(nc_filename, var_name, x_size, y_size, data_array, pes, time) character(len=*), intent(in) :: nc_filename, var_name integer, intent(in) :: x_size, y_size @@ -1108,13 +1327,24 @@ subroutine alloc_read_data_r8_2d(nc_filename, var_name, x_size, y_size, data_arr end subroutine alloc_read_data_r8_2d - - !================================================================================================== - ! ! NetCDF Function Section - ! - !================================================================================================== + !> ??? + !> + !> @param[in] flag ??? + !> @param[in] istart ??? + !> @param[in] iend ??? + !> @param[in] jstart ??? + !> @param[in] jend ??? + !> @param[in] k ??? + !> @param[in] grid ??? + !> @param[in] file_str ??? + !> @param[in] var_name ??? + !> @param[in] time_step ??? + !> @param[in] dom ??? + !> @param[in] pos ??? + !> + !> @author subroutine output_grid_to_nc_3d(flag, istart, iend, jstart, jend, k, grid, file_str, var_name, time_step, dom, pos) implicit none @@ -1193,7 +1423,22 @@ subroutine output_grid_to_nc_3d(flag, istart, iend, jstart, jend, k, grid, file_ end subroutine output_grid_to_nc_3d - + !> ??? + !> + !> @param[in] flag ??? + !> @param[in] istart ??? + !> @param[in] iend ??? + !> @param[in] jstart ??? + !> @param[in] jend ??? + !> @param[in] k ??? + !> @param[in] grid ??? + !> @param[in] file_str ??? + !> @param[in] var_name ??? + !> @param[in] time_step ??? + !> @param[in] dom ??? + !> @param[in] pos ??? + !> + !> @author subroutine output_grid_to_nc_2d(flag, istart, iend, jstart, jend, grid, file_str, var_name, time_step, dom, pos) implicit none @@ -1248,14 +1493,19 @@ subroutine output_grid_to_nc_2d(flag, istart, iend, jstart, jend, grid, file_str end subroutine output_grid_to_nc_2d - - - !================================================================================================== - ! ! Fill Section - ! - !================================================================================================== + !> ??? + !> + !> @param[inout] in_grid ??? + !> @param[in] stagger_type ??? + !> @param[in] fp_super_tile_geo ??? + !> @param[in] ioffset ??? + !> @param[in] joffset ??? + !> @param[in] x_refine ??? + !> @param[in] y_refine ??? + !> + !> @author subroutine fill_grid_from_supergrid_r4_3d(in_grid, stagger_type, fp_super_tile_geo, ioffset, joffset, x_refine, y_refine) implicit none real*4, allocatable, intent(inout) :: in_grid(:,:,:) @@ -1321,7 +1571,17 @@ subroutine fill_grid_from_supergrid_r4_3d(in_grid, stagger_type, fp_super_tile_g end subroutine fill_grid_from_supergrid_r4_3d - + !> ??? + !> + !> @param[inout] in_grid ??? + !> @param[in] stagger_type ??? + !> @param[in] fp_super_tile_geo ??? + !> @param[in] ioffset ??? + !> @param[in] joffset ??? + !> @param[in] x_refine ??? + !> @param[in] y_refine ??? + !> + !> @author subroutine fill_grid_from_supergrid_r8_3d(in_grid, stagger_type, fp_super_tile_geo, ioffset, joffset, x_refine, y_refine) implicit none real*8, allocatable, intent(inout) :: in_grid(:,:,:) @@ -1387,7 +1647,17 @@ subroutine fill_grid_from_supergrid_r8_3d(in_grid, stagger_type, fp_super_tile_g end subroutine fill_grid_from_supergrid_r8_3d - + !> ??? + !> + !> @param[inout] in_grid ??? + !> @param[in] stagger_type ??? + !> @param[in] fp_super_tile_geo ??? + !> @param[in] ioffset ??? + !> @param[in] joffset ??? + !> @param[in] x_refine ??? + !> @param[in] y_refine ??? + !> + !> @author subroutine fill_grid_from_supergrid_r8_4d(in_grid, stagger_type, fp_super_tile_geo, ioffset, joffset, x_refine, y_refine) implicit none real*8, allocatable, intent(inout) :: in_grid(:,:,:,:) @@ -1453,10 +1723,22 @@ subroutine fill_grid_from_supergrid_r8_4d(in_grid, stagger_type, fp_super_tile_g end subroutine fill_grid_from_supergrid_r8_4d - - !>@brief This subroutine fills the nest halo data from the coarse grid data by downscaling. - !>@details Applicable to any interpolation type - + !> This subroutine fills the nest halo data from the coarse grid data by downscaling. + !> + !> Applicable to any interpolation type + !> + !> @param[in] interp_type ??? + !> @param[inout] x ??? + !> @param[in] buffer ??? + !> @param[in] bbox_fine ??? + !> @param[in] bbox_coarse ??? + !> @param[in] dir ??? + !> @param[in] x_refine ??? + !> @param[in] y_refine ??? + !> @param[in] wt ??? + !> @param[in] ind ??? + !> + !> @author subroutine fill_nest_from_buffer_r4_2d(interp_type, x, buffer, bbox_fine, bbox_coarse, dir, x_refine, y_refine, wt, ind) implicit none @@ -1487,10 +1769,22 @@ subroutine fill_nest_from_buffer_r4_2d(interp_type, x, buffer, bbox_fine, bbox_c end subroutine fill_nest_from_buffer_r4_2d - - !>@brief This subroutine fills the nest halo data from the coarse grid data by downscaling. - !>@details Applicable to any interpolation type - + !> This subroutine fills the nest halo data from the coarse grid data by downscaling. + !> + !> Applicable to any interpolation type + !> + !> @param[in] interp_type ??? + !> @param[inout] x ??? + !> @param[in] buffer ??? + !> @param[in] bbox_fine ??? + !> @param[in] bbox_coarse ??? + !> @param[in] dir ??? + !> @param[in] x_refine ??? + !> @param[in] y_refine ??? + !> @param[in] wt ??? + !> @param[in] ind ??? + !> + !> @author subroutine fill_nest_from_buffer_r8_2d(interp_type, x, buffer, bbox_fine, bbox_coarse, dir, x_refine, y_refine, wt, ind) implicit none @@ -1521,7 +1815,23 @@ subroutine fill_nest_from_buffer_r8_2d(interp_type, x, buffer, bbox_fine, bbox_c end subroutine fill_nest_from_buffer_r8_2d - + !> ??? + !> + !> @param[in] interp_type ??? + !> @param[inout] x ??? + !> @param[in] buffer ??? + !> @param[in] bbox_fine ??? + !> @param[in] bbox_coarse ??? + !> @param[in] dir ??? + !> @param[in] x_refine ??? + !> @param[in] y_refine ??? + !> @param[in] wt ??? + !> @param[in] ind ??? + !> @param[in] mask_var ??? + !> @param[in] mask_val ??? + !> @param[in] default_val ??? + !> + !> @author subroutine fill_nest_from_buffer_masked(interp_type, x, buffer, bbox_fine, bbox_coarse, dir, x_refine, y_refine, wt, ind, mask_var, mask_val, default_val) implicit none @@ -1557,8 +1867,21 @@ subroutine fill_nest_from_buffer_masked(interp_type, x, buffer, bbox_fine, bbox_ end subroutine fill_nest_from_buffer_masked - - + !> ??? + !> + !> @param[in] interp_type ??? + !> @param[inout] x ??? + !> @param[in] buffer ??? + !> @param[in] bbox_fine ??? + !> @param[in] bbox_coarse ??? + !> @param[in] nz ??? + !> @param[in] dir ??? + !> @param[in] x_refine ??? + !> @param[in] y_refine ??? + !> @param[in] wt ??? + !> @param[in] ind ??? + !> + !> @author subroutine fill_nest_from_buffer_r4_3d(interp_type, x, buffer, bbox_fine, bbox_coarse, nz, dir, x_refine, y_refine, wt, ind) implicit none @@ -1590,7 +1913,21 @@ subroutine fill_nest_from_buffer_r4_3d(interp_type, x, buffer, bbox_fine, bbox_c end subroutine fill_nest_from_buffer_r4_3d - + !> ??? + !> + !> @param[in] interp_type ??? + !> @param[inout] x ??? + !> @param[in] buffer ??? + !> @param[in] bbox_fine ??? + !> @param[in] bbox_coarse ??? + !> @param[in] nz ??? + !> @param[in] dir ??? + !> @param[in] x_refine ??? + !> @param[in] y_refine ??? + !> @param[in] wt ??? + !> @param[in] ind ??? + !> + !> @author subroutine fill_nest_from_buffer_r8_3d(interp_type, x, buffer, bbox_fine, bbox_coarse, nz, dir, x_refine, y_refine, wt, ind) implicit none @@ -1622,10 +1959,23 @@ subroutine fill_nest_from_buffer_r8_3d(interp_type, x, buffer, bbox_fine, bbox_c end subroutine fill_nest_from_buffer_r8_3d - - !>@brief This subroutine fills the nest halo data from the coarse grid data by downscaling. - !>@details Applicable to any interpolation type - + !> This subroutine fills the nest halo data from the coarse grid data by downscaling. + !> + !> Applicable to any interpolation type + !> + !> @param[in] interp_type ??? + !> @param[inout] x ??? + !> @param[in] buffer ??? + !> @param[in] bbox_fine ??? + !> @param[in] bbox_coarse ??? + !> @param[in] nz ??? + !> @param[in] dir ??? + !> @param[in] x_refine ??? + !> @param[in] y_refine ??? + !> @param[in] wt ??? + !> @param[in] ind ??? + !> + !> @author subroutine fill_nest_from_buffer_r4_4d(interp_type, x, buffer, bbox_fine, bbox_coarse, nz, dir, x_refine, y_refine, wt, ind) implicit none @@ -1657,7 +2007,23 @@ subroutine fill_nest_from_buffer_r4_4d(interp_type, x, buffer, bbox_fine, bbox_c end subroutine fill_nest_from_buffer_r4_4d - + !> This subroutine fills the nest halo data from the coarse grid data by downscaling. + !> + !> Applicable to any interpolation type + !> + !> @param[in] interp_type ??? + !> @param[inout] x ??? + !> @param[in] buffer ??? + !> @param[in] bbox_fine ??? + !> @param[in] bbox_coarse ??? + !> @param[in] nz ??? + !> @param[in] dir ??? + !> @param[in] x_refine ??? + !> @param[in] y_refine ??? + !> @param[in] wt ??? + !> @param[in] ind ??? + !> + !> @author subroutine fill_nest_from_buffer_r8_4d(interp_type, x, buffer, bbox_fine, bbox_coarse, nz, dir, x_refine, y_refine, wt, ind) implicit none @@ -1689,10 +2055,22 @@ subroutine fill_nest_from_buffer_r8_4d(interp_type, x, buffer, bbox_fine, bbox_c end subroutine fill_nest_from_buffer_r8_4d - - !>@brief This subroutine fills the nest halo data from the coarse grid data by downscaling. It can accommodate all grid staggers, using the stagger variable. [The routine needs to be renamed since "_from_cell_center" has become incorrect.) - !>@details Applicable to any interpolation type - + !> This subroutine fills the nest halo data from the coarse grid data by downscaling. It can accommodate all grid staggers, using the stagger variable. + !> + !> Applicable to any interpolation type + !> + !> @param[in] stagger ??? + !> @param[inout] x ??? + !> @param[in] buffer ??? + !> @param[in] bbox_fine ??? + !> @param[in] bbox_coarse ??? + !> @param[in] dir ??? + !> @param[in] x_refine ??? + !> @param[in] y_refine ??? + !> @param[in] wt ??? + !> @param[in] ind ??? + !> + !> @author subroutine fill_nest_from_buffer_cell_center_r4_2d(stagger, x, buffer, bbox_fine, bbox_coarse, dir, x_refine, y_refine, wt, ind) implicit none character ( len = 1 ), intent(in) :: stagger @@ -1743,7 +2121,20 @@ subroutine fill_nest_from_buffer_cell_center_r4_2d(stagger, x, buffer, bbox_fine end subroutine fill_nest_from_buffer_cell_center_r4_2d - + !> ??? + !> + !> @param[in] stagger ??? + !> @param[inout] x ??? + !> @param[in] buffer ??? + !> @param[in] bbox_fine ??? + !> @param[in] bbox_coarse ??? + !> @param[in] dir ??? + !> @param[in] x_refine ??? + !> @param[in] y_refine ??? + !> @param[in] wt ??? + !> @param[in] ind ??? + !> + !> @author subroutine fill_nest_from_buffer_cell_center_r8_2d(stagger, x, buffer, bbox_fine, bbox_coarse, dir, x_refine, y_refine, wt, ind) implicit none character ( len = 1 ), intent(in) :: stagger @@ -1794,7 +2185,23 @@ subroutine fill_nest_from_buffer_cell_center_r8_2d(stagger, x, buffer, bbox_fine end subroutine fill_nest_from_buffer_cell_center_r8_2d - + !> ??? + !> + !> @param[in] stagger ??? + !> @param[inout] x ??? + !> @param[in] buffer ??? + !> @param[in] bbox_fine ??? + !> @param[in] bbox_coarse ??? + !> @param[in] dir ??? + !> @param[in] x_refine ??? + !> @param[in] y_refine ??? + !> @param[in] wt ??? + !> @param[in] ind ??? + !> @param[in] mask_var ??? + !> @param[in] mask_val ??? + !> @param[in] default_val ??? + !> + !> @author subroutine fill_nest_from_buffer_cell_center_masked(stagger, x, buffer, bbox_fine, bbox_coarse, dir, x_refine, y_refine, wt, ind, mask_var, mask_val, default_val) implicit none character ( len = 1 ), intent(in) :: stagger @@ -1864,7 +2271,21 @@ subroutine fill_nest_from_buffer_cell_center_masked(stagger, x, buffer, bbox_fin end subroutine fill_nest_from_buffer_cell_center_masked - + !> ??? + !> + !> @param[in] stagger ??? + !> @param[inout] x ??? + !> @param[in] buffer ??? + !> @param[in] bbox_fine ??? + !> @param[in] bbox_coarse ??? + !> @param[in] nz ??? + !> @param[in] dir ??? + !> @param[in] x_refine ??? + !> @param[in] y_refine ??? + !> @param[in] wt ??? + !> @param[in] ind ??? + !> + !> @author subroutine fill_nest_from_buffer_cell_center_r4_3d(stagger, x, buffer, bbox_fine, bbox_coarse, nz, dir, x_refine, y_refine, wt, ind) implicit none character ( len = 1 ), intent(in) :: stagger @@ -1917,6 +2338,21 @@ subroutine fill_nest_from_buffer_cell_center_r4_3d(stagger, x, buffer, bbox_fine end subroutine fill_nest_from_buffer_cell_center_r4_3d + !> ??? + !> + !> @param[in] stagger ??? + !> @param[inout] x ??? + !> @param[in] buffer ??? + !> @param[in] bbox_fine ??? + !> @param[in] bbox_coarse ??? + !> @param[in] nz ??? + !> @param[in] dir ??? + !> @param[in] x_refine ??? + !> @param[in] y_refine ??? + !> @param[in] wt ??? + !> @param[in] ind ??? + !> + !> @author subroutine fill_nest_from_buffer_cell_center_r8_3d(stagger, x, buffer, bbox_fine, bbox_coarse, nz, dir, x_refine, y_refine, wt, ind) implicit none character ( len = 1 ), intent(in) :: stagger @@ -1968,7 +2404,21 @@ subroutine fill_nest_from_buffer_cell_center_r8_3d(stagger, x, buffer, bbox_fine end subroutine fill_nest_from_buffer_cell_center_r8_3d - + !> ??? + !> + !> @param[in] stagger ??? + !> @param[inout] x ??? + !> @param[in] buffer ??? + !> @param[in] bbox_fine ??? + !> @param[in] bbox_coarse ??? + !> @param[in] nz ??? + !> @param[in] dir ??? + !> @param[in] x_refine ??? + !> @param[in] y_refine ??? + !> @param[in] wt ??? + !> @param[in] ind ??? + !> + !> @author subroutine fill_nest_from_buffer_cell_center_r4_4d(stagger, x, buffer, bbox_fine, bbox_coarse, nz, dir, x_refine, y_refine, wt, ind) implicit none character ( len = 1 ), intent(in) :: stagger @@ -2018,7 +2468,21 @@ subroutine fill_nest_from_buffer_cell_center_r4_4d(stagger, x, buffer, bbox_fine end subroutine fill_nest_from_buffer_cell_center_r4_4d - + !> ??? + !> + !> @param[in] stagger ??? + !> @param[inout] x ??? + !> @param[in] buffer ??? + !> @param[in] bbox_fine ??? + !> @param[in] bbox_coarse ??? + !> @param[in] nz ??? + !> @param[in] dir ??? + !> @param[in] x_refine ??? + !> @param[in] y_refine ??? + !> @param[in] wt ??? + !> @param[in] ind ??? + !> + !> @author subroutine fill_nest_from_buffer_cell_center_r8_4d(stagger, x, buffer, bbox_fine, bbox_coarse, nz, dir, x_refine, y_refine, wt, ind) implicit none character ( len = 1 ), intent(in) :: stagger @@ -2068,7 +2532,17 @@ subroutine fill_nest_from_buffer_cell_center_r8_4d(stagger, x, buffer, bbox_fine end subroutine fill_nest_from_buffer_cell_center_r8_4d - + !> ??? + !> + !> @param[inout] x ??? + !> @param[in] buffer ??? + !> @param[in] bbox_fine ??? + !> @param[in] bbox_coarse ??? + !> @param[in] nz ??? + !> @param[in] dir ??? + !> @param[in] wt ??? + !> + !> @author subroutine fill_nest_from_buffer_nearest_neighbor(x, buffer, bbox_fine, bbox_coarse, nz, dir, wt) implicit none @@ -2131,7 +2605,12 @@ subroutine fill_nest_from_buffer_nearest_neighbor(x, buffer, bbox_fine, bbox_coa end subroutine fill_nest_from_buffer_nearest_neighbor - + !> ??? + !> + !> @param[inout] atm_wt ??? + !> @param[in] new_wt ??? + !> + !> @author subroutine fill_weight_grid(atm_wt, new_wt) real, allocatable, intent(inout) :: atm_wt(:,:,:) real, allocatable, intent(in) :: new_wt(:,:,:) diff --git a/moving_nest/fv_tracker.F90 b/moving_nest/fv_tracker.F90 index 5cda9083f..1732fb57c 100644 --- a/moving_nest/fv_tracker.F90 +++ b/moving_nest/fv_tracker.F90 @@ -1,3 +1,9 @@ +!> @file +!> @brief The module 'fv_tracker' contains the internal GFDL/NCEP vortex tracker +!> adapted from HWRF internal vortex tracker, mainly based on the GFDL vortex +!> tracker. +!> @author W. Ramstrom (William.Ramstrom@noaa.gov), AOML/HRD + !*********************************************************************** !* GNU General Public License * !* This file is a part of fvGFS. * @@ -18,10 +24,6 @@ !* or see: http://www.gnu.org/licenses/gpl.html * !*********************************************************************** -!>@brief The module 'fv_tracker' contains the internal GFDL/NCEP vortex tracker -!adapted from HWRF internal vortex tracker, mainly based on the GFDL vortex -!tracker. - module fv_tracker_mod #include @@ -60,24 +62,26 @@ module fv_tracker_mod public :: check_is_moving_nest, execute_tracker public :: Tracker - integer, parameter :: maxtp=11 ! number of tracker parameters + integer, parameter :: maxtp=11 !< number of tracker parameters - real, parameter :: invE=0.36787944117 ! 1/e - real, parameter :: searchrad_6=250.0 ! km - ignore data more than this far from domain center - real, parameter :: searchrad_7=200.0 ! km - ignore data more than this far from domain center - real, parameter :: uverrmax=225.0 ! For use in get_uv_guess - real, parameter :: ecircum=40030.2 ! Earth's circumference (km) using erad=6371.e3 - real, parameter :: rads_vmag=120.0 ! max search radius for wind minimum - real, parameter :: err_reg_init=300.0 ! max err at initial time (km) - real, parameter :: err_reg_max=225.0 ! max err at other times (km) + real, parameter :: invE=0.36787944117 !< 1/e + real, parameter :: searchrad_6=250.0 !< km - ignore data more than this far from domain center + real, parameter :: searchrad_7=200.0 !< km - ignore data more than this far from domain center + real, parameter :: uverrmax=225.0 !< For use in get_uv_guess + real, parameter :: ecircum=40030.2 !< Earth's circumference (km) using erad=6371.e3 + real, parameter :: rads_vmag=120.0 !< max search radius for wind minimum + real, parameter :: err_reg_init=300.0 !< max err at initial time (km) + real, parameter :: err_reg_max=225.0 !< max err at other times (km) - real, parameter :: errpmax=485.0 ! max stddev of track parameters - real, parameter :: errpgro=1.25 ! stddev multiplier + real, parameter :: errpmax=485.0 !< max stddev of track parameters + real, parameter :: errpgro=1.25 !< stddev multiplier - real, parameter :: max_wind_search_radius=searchrad_7 ! max radius for vmax search - real, parameter :: min_mlsp_search_radius=searchrad_7 ! max radius for pmin search + real, parameter :: max_wind_search_radius=searchrad_7 !< max radius for vmax search + real, parameter :: min_mlsp_search_radius=searchrad_7 !< max radius for pmin search - real, parameter :: km2nmi=0.539957, kn2mps=0.514444, mps2kn=1./kn2mps + real, parameter :: km2nmi=0.539957 !< ??? + real, parameter :: kn2mps=0.514444 !< ??? + real, parameter :: mps2kn=1./kn2mps !< ??? type fv_tracker_type @@ -128,12 +132,22 @@ module fv_tracker_mod logical :: tracker_gave_up = .false. !< True = inline tracker gave up on tracking the storm end type fv_tracker_type + !> ??? type(fv_tracker_type), _ALLOCATABLE, target :: Tracker(:) + + !> ??? integer :: n = 2 ! TODO allow to vary for multiple nests + + !> ??? integer :: id_fv_tracker contains + !> ??? + !> + !> @param[in] length ??? + !> + !> @author subroutine fv_tracker_init(length) ! Initialize tracker variables in the Atm structure. implicit none @@ -173,6 +187,15 @@ subroutine fv_tracker_init(length) end subroutine fv_tracker_init + !> ??? + !> + !> @param[in] i ??? + !> @param[in] is ??? + !> @param[in] ie ??? + !> @param[in] js ??? + !> @param[in] je ??? + !> + !> @author subroutine allocate_tracker(i, is, ie, js, je) integer, intent(in) :: i, is, ie, js, je ! Allocate internal vortex tracker arrays @@ -199,6 +222,11 @@ subroutine allocate_tracker(i, is, ie, js, je) allocate ( Tracker(i)%tracker_fixes(is:ie,js:je) ) end subroutine allocate_tracker + !> ??? + !> + !> @param[in] nn ??? + !> + !> @author subroutine deallocate_tracker(nn) integer, intent(in) :: nn @@ -228,6 +256,15 @@ subroutine deallocate_tracker(nn) end subroutine deallocate_tracker + !> ??? + !> + !> @param[inout] Atm ??? + !> @param[in] mygrid ??? + !> @param[in] ngrids ??? + !> @param[out] is_moving_nest ??? + !> @param[out] moving_nest_parent ??? + !> + !> @author subroutine check_is_moving_nest(Atm, mygrid, ngrids, is_moving_nest, moving_nest_parent) type(fv_atmos_type), intent(inout) :: Atm(:) integer, intent(in) :: mygrid, ngrids @@ -252,7 +289,14 @@ subroutine check_is_moving_nest(Atm, mygrid, ngrids, is_moving_nest, moving_nest end subroutine check_is_moving_nest - + !> ??? + !> + !> @param[inout] Atm ??? + !> @param[in] mygrid ??? + !> @param[in] Time ??? + !> @param[in] Time_step ??? + !> + !> @author subroutine execute_tracker(Atm, mygrid, Time, Time_step) implicit none type(fv_atmos_type), intent(inout) :: Atm(:) @@ -292,6 +336,13 @@ subroutine execute_tracker(Atm, mygrid, Time, Time_step) end subroutine execute_tracker + !> ??? + !> + !> @param[inout] Atm ??? + !> @param[in] n ??? + !> @param[in] Time ??? + !> + !> @author subroutine fv_tracker_center(Atm, n, Time) ! Top-level entry to the internal GFDL/NCEP vortex tracker. Finds the center of ! the storm in the specified Atm and updates the Atm variables. @@ -320,6 +371,13 @@ subroutine fv_tracker_center(Atm, n, Time) end subroutine fv_tracker_center + !> ??? + !> + !> @param[inout] Atm ??? + !> @param[in] zvir ??? + !> @param[in] Time ??? + !> + !> @author subroutine fv_diag_tracker(Atm, zvir, Time) type(fv_atmos_type), intent(inout) :: Atm(:) @@ -437,6 +495,31 @@ subroutine fv_diag_tracker(Atm, zvir, Time) end subroutine fv_diag_tracker + !> ??? + !> + !> @param[inout] Atm ??? + !> @param[inout] tracker ??? + !> @param[in] Time ??? + !> @param[in] ids ??? + !> @param[in] ide ??? + !> @param[in] jds ??? + !> @param[in] jde ??? + !> @param[in] kds ??? + !> @param[in] kde ??? + !> @param[in] ims ??? + !> @param[in] ime ??? + !> @param[in] jms ??? + !> @param[in] jme ??? + !> @param[in] kms ??? + !> @param[in] kme ??? + !> @param[in] ips ??? + !> @param[in] ipe ??? + !> @param[in] jps ??? + !> @param[in] jpe ??? + !> @param[in] kps ??? + !> @param[in] kpe ??? + !> + !> @author subroutine ntc_impl(Atm,tracker,Time, & ids,ide,jds,jde,kds,kde, & ims,ime,jms,jme,kms,kme, & @@ -731,6 +814,29 @@ subroutine ntc_impl(Atm,tracker,Time, & end subroutine ntc_impl + !> ??? + !> + !> @param[in] Atm ??? + !> @param[out] ids ??? + !> @param[out] ide ??? + !> @param[out] jds ??? + !> @param[out] jde ??? + !> @param[out] kds ??? + !> @param[out] kde ??? + !> @param[out] ims ??? + !> @param[out] ime ??? + !> @param[out] jms ??? + !> @param[out] jme ??? + !> @param[out] kms ??? + !> @param[out] kme ??? + !> @param[out] ips ??? + !> @param[out] ipe ??? + !> @param[out] jps ??? + !> @param[out] jpe ??? + !> @param[out] kps ??? + !> @param[out] kpe ??? + !> + !> @author subroutine get_ijk_from_domain(Atm, & ids, ide, jds, jde, kds, kde, & ims, ime, jms, jme, kms, kme, & @@ -757,6 +863,36 @@ subroutine get_ijk_from_domain(Atm, & kpe = Atm%npz end subroutine get_ijk_from_domain + !> ??? + !> + !> @param[inout] Atm ??? + !> @param[out] iloc ??? + !> @param[out] jloc ??? + !> @param[out] ierr ??? + !> @param[in] lon ??? + !> @param[in] lat ??? + !> @param[in] ids ??? + !> @param[in] ide ??? + !> @param[in] jds ??? + !> @param[in] jde ??? + !> @param[in] kds ??? + !> @param[in] kde ??? + !> @param[in] ims ??? + !> @param[in] ime ??? + !> @param[in] jms ??? + !> @param[in] jme ??? + !> @param[in] kms ??? + !> @param[in] kme ??? + !> @param[in] ips ??? + !> @param[in] ipe ??? + !> @param[in] jps ??? + !> @param[in] jpe ??? + !> @param[in] kps ??? + !> @param[in] kpe ??? + !> @param[out] lonnear ??? + !> @param[out] latnear ??? + !> + !> @author subroutine get_nearest_lonlat(Atm,iloc,jloc,ierr,lon,lat, & ids,ide, jds,jde, kds,kde, & ims,ime, jms,jme, kms,kme, & @@ -807,6 +943,30 @@ subroutine get_nearest_lonlat(Atm,iloc,jloc,ierr,lon,lat, & if(present(lonnear)) lonnear=lonmin end subroutine get_nearest_lonlat + !> ??? + !> + !> @param[inout] Atm ??? + !> @param[in] Time ??? + !> @param[in] ids ??? + !> @param[in] ide ??? + !> @param[in] jds ??? + !> @param[in] jde ??? + !> @param[in] kds ??? + !> @param[in] kde ??? + !> @param[in] ims ??? + !> @param[in] ime ??? + !> @param[in] jms ??? + !> @param[in] jme ??? + !> @param[in] kms ??? + !> @param[in] kme ??? + !> @param[in] its ??? + !> @param[in] ite ??? + !> @param[in] jts ??? + !> @param[in] jte ??? + !> @param[in] kts ??? + !> @param[in] kte ??? + !> + !> @author subroutine output_partial_atcfunix(Atm,Time, & ids,ide,jds,jde,kds,kde, & ims,ime,jms,jme,kms,kme, & @@ -843,6 +1003,36 @@ subroutine output_partial_atcfunix(Atm,Time, & end if end subroutine output_partial_atcfunix + !> ??? + !> + !> @param[inout] Atm ??? + !> @param[out] min_mslp ??? + !> @param[out] max_wind ??? + !> @param[out] rmw ??? + !> @param[in] max_wind_search_radius ??? + !> @param[in] min_mlsp_search_radius ??? + !> @param[in] clon ??? + !> @param[in] clat ??? + !> @param[in] ids ??? + !> @param[in] ide ??? + !> @param[in] jds ??? + !> @param[in] jde ??? + !> @param[in] kds ??? + !> @param[in] kde ??? + !> @param[in] ims ??? + !> @param[in] ime ??? + !> @param[in] jms ??? + !> @param[in] jme ??? + !> @param[in] kms ??? + !> @param[in] kme ??? + !> @param[in] its ??? + !> @param[in] ite ??? + !> @param[in] jts ??? + !> @param[in] jte ??? + !> @param[in] kts ??? + !> @param[in] kte ??? + !> + !> @author subroutine get_wind_pres_intensity(Atm, & min_mslp,max_wind,rmw, & max_wind_search_radius, min_mlsp_search_radius, clon,clat, & @@ -935,6 +1125,43 @@ subroutine get_wind_pres_intensity(Atm, & end subroutine get_wind_pres_intensity + !> ??? + !> + !> @param[inout] Atm ??? + !> @param[in] icen ??? + !> @param[in] jcen ??? + !> @param[inout] calcparm ??? + !> @param[in] loncen ??? + !> @param[in] latcen ??? + !> @param[in] iguess ??? + !> @param[in] jguess ??? + !> @param[in] longuess ??? + !> @param[in] latguess ??? + !> @param[inout] ifinal ??? + !> @param[inout] jfinal ??? + !> @param[inout] lonfinal ??? + !> @param[inout] latfinal ??? + !> @param[in] north_hemi ??? + !> @param[in] ids ??? + !> @param[in] ide ??? + !> @param[in] jds ??? + !> @param[in] jde ??? + !> @param[in] kds ??? + !> @param[in] kde ??? + !> @param[in] ims ??? + !> @param[in] ime ??? + !> @param[in] jms ??? + !> @param[in] jme ??? + !> @param[in] kms ??? + !> @param[in] kme ??? + !> @param[in] ips ??? + !> @param[in] ipe ??? + !> @param[in] jps ??? + !> @param[in] jpe ??? + !> @param[in] kps ??? + !> @param[in] kpe ??? + !> + !> @author subroutine fixcenter(Atm,icen,jcen,calcparm,loncen,latcen, & iguess,jguess,longuess,latguess, & ifinal,jfinal,lonfinal,latfinal, & @@ -1234,6 +1461,40 @@ subroutine fixcenter(Atm,icen,jcen,calcparm,loncen,latcen, & end subroutine fixcenter + !> ??? + !> + !> @param[inout] Atm ??? + !> @param[in] icen ??? + !> @param[in] jcen ??? + !> @param[in] loncen ??? + !> @param[in] latcen ??? + !> @param[in] calcparm ??? + !> @param[in] iguess ??? + !> @param[in] jguess ??? + !> @param[in] longuess ??? + !> @param[in] latguess ??? + !> @param[inout] iout ??? + !> @param[inout] jout ??? + !> @param[in] ids ??? + !> @param[in] ide ??? + !> @param[in] jds ??? + !> @param[in] jde ??? + !> @param[in] kds ??? + !> @param[in] kde ??? + !> @param[in] ims ??? + !> @param[in] ime ??? + !> @param[in] jms ??? + !> @param[in] jme ??? + !> @param[in] kms ??? + !> @param[in] kme ??? + !> @param[in] its ??? + !> @param[in] ite ??? + !> @param[in] jts ??? + !> @param[in] jte ??? + !> @param[in] kts ??? + !> @param[in] kte ??? + !> + !> @author subroutine get_uv_guess(Atm,icen,jcen,loncen,latcen,calcparm, & iguess,jguess,longuess,latguess,iout,jout, & ids,ide,jds,jde,kds,kde, & @@ -1308,6 +1569,40 @@ subroutine get_uv_guess(Atm,icen,jcen,loncen,latcen,calcparm, & jout=nint(real(jsum)/real(ict)) end subroutine get_uv_guess + !> ??? + !> + !> @param[inout] Atm ??? + !> @param[in] orig ??? + !> @param[inout] iout ??? + !> @param[inout] jout ??? + !> @param[inout] rout ??? + !> @param[inout] calcparm ??? + !> @param[inout] lonout ??? + !> @param[inout] latout ??? + !> @param[in] dxdymean ??? + !> @param[in] cparm ??? + !> @param[in] ids ??? + !> @param[in] ide ??? + !> @param[in] jds ??? + !> @param[in] jde ??? + !> @param[in] kds ??? + !> @param[in] kde ??? + !> @param[in] ims ??? + !> @param[in] ime ??? + !> @param[in] jms ??? + !> @param[in] jme ??? + !> @param[in] kms ??? + !> @param[in] kme ??? + !> @param[in] ips ??? + !> @param[in] ipe ??? + !> @param[in] jps ??? + !> @param[in] jpe ??? + !> @param[in] kps ??? + !> @param[in] kpe ??? + !> @param[in] iuvguess ??? + !> @param[in] juvguess ??? + !> + !> @author subroutine get_uv_center(Atm,orig, & iout,jout,rout,calcparm,lonout,latout, & dxdymean,cparm, & @@ -1384,6 +1679,42 @@ subroutine get_uv_center(Atm,orig, & endif resultif end subroutine get_uv_center + !> ??? + !> + !> @param[inout] Atm ??? + !> @param[in] orig ??? + !> @param[in] srsq ??? + !> @param[inout] iout ??? + !> @param[inout] jout ??? + !> @param[inout] rout ??? + !> @param[inout] calcparm ??? + !> @param[inout] lonout ??? + !> @param[inout] latout ??? + !> @param[in] dxdymean ??? + !> @param[in] cparm ??? + !> @param[in] ids ??? + !> @param[in] ide ??? + !> @param[in] jds ??? + !> @param[in] jde ??? + !> @param[in] kds ??? + !> @param[in] kde ??? + !> @param[in] ims ??? + !> @param[in] ime ??? + !> @param[in] jms ??? + !> @param[in] jme ??? + !> @param[in] kms ??? + !> @param[in] kme ??? + !> @param[in] ips ??? + !> @param[in] ipe ??? + !> @param[in] jps ??? + !> @param[in] jpe ??? + !> @param[in] kps ??? + !> @param[in] kpe ??? + !> @param[in] iuvguess ??? + !> @param[in] juvguess ??? + !> @param[in] north_hemi ??? + !> + !> @author subroutine find_center(Atm,orig,srsq, & iout,jout,rout,calcparm,lonout,latout, & dxdymean,cparm, & @@ -1541,6 +1872,29 @@ subroutine find_center(Atm,orig,srsq, & endif resultif end subroutine find_center + !> ??? + !> + !> @param[inout] Atm ??? + !> @param[in] ids ??? + !> @param[in] ide ??? + !> @param[in] jds ??? + !> @param[in] jde ??? + !> @param[in] kds ??? + !> @param[in] kde ??? + !> @param[in] ims ??? + !> @param[in] ime ??? + !> @param[in] jms ??? + !> @param[in] jme ??? + !> @param[in] kms ??? + !> @param[in] kme ??? + !> @param[in] its ??? + !> @param[in] ite ??? + !> @param[in] jts ??? + !> @param[in] jte ??? + !> @param[in] kts ??? + !> @param[in] kte ??? + !> + !> @author subroutine get_distsq(Atm, & ids,ide,jds,jde,kds,kde, & ims,ime,jms,jme,kms,kme, & @@ -1585,6 +1939,29 @@ subroutine get_distsq(Atm, & end subroutine get_distsq + !> ??? + !> + !> @param[inout] Atm ??? + !> @param[in] ids ??? + !> @param[in] ide ??? + !> @param[in] jds ??? + !> @param[in] jde ??? + !> @param[in] kds ??? + !> @param[in] kde ??? + !> @param[in] ims ??? + !> @param[in] ime ??? + !> @param[in] jms ??? + !> @param[in] jme ??? + !> @param[in] kms ??? + !> @param[in] kme ??? + !> @param[in] its ??? + !> @param[in] ite ??? + !> @param[in] jts ??? + !> @param[in] jte ??? + !> @param[in] kts ??? + !> @param[in] kte ??? + !> + !> @author subroutine get_tracker_distsq(Atm, & ids,ide,jds,jde,kds,kde, & ims,ime,jms,jme,kms,kme, & @@ -1671,6 +2048,16 @@ subroutine get_tracker_distsq(Atm, & call mpp_error(NOTE, message) end subroutine get_tracker_distsq + !> ??? + !> + !> @param[in] rlonb ??? + !> @param[in] rlatb ??? + !> @param[in] rlonc ??? + !> @param[in] rlatc ??? + !> @param[out] xdist ??? + !> @param[inout] degrees ??? + !> + !> @author subroutine calcdist(rlonb,rlatb,rlonc,rlatc,xdist,degrees) ! Copied from gettrk_main.f ! @@ -1744,6 +2131,34 @@ subroutine calcdist(rlonb,rlatb,rlonc,rlatc,xdist,degrees) return end subroutine calcdist + !> ??? + !> + !> @param[inout] Atm ??? + !> @param[in] iguess ??? + !> @param[in] jguess ??? + !> @param[in] longuess ??? + !> @param[in] latguess ??? + !> @param[in] ierr ??? + !> @param[in] ids ??? + !> @param[in] ide ??? + !> @param[in] jds ??? + !> @param[in] jde ??? + !> @param[in] kds ??? + !> @param[in] kde ??? + !> @param[in] ims ??? + !> @param[in] ime ??? + !> @param[in] jms ??? + !> @param[in] jme ??? + !> @param[in] kms ??? + !> @param[in] kme ??? + !> @param[in] ips ??? + !> @param[in] ipe ??? + !> @param[in] jps ??? + !> @param[in] jpe ??? + !> @param[in] kps ??? + !> @param[in] kpe ??? + !> + !> @author subroutine get_lonlat(Atm,iguess,jguess,longuess,latguess,ierr, & ids,ide, jds,jde, kds,kde, & ims,ime, jms,jme, kms,kme, & @@ -1785,6 +2200,12 @@ subroutine get_lonlat(Atm,iguess,jguess,longuess,latguess,ierr, & endif end subroutine get_lonlat + !> ??? + !> + !> @param[inout] xlon1 ??? + !> @param[inout] ylat1 ??? + !> + !> @author subroutine clean_lon_lat(xlon1,ylat1) real, intent(inout) :: xlon1,ylat1 ! This modifies a (lat,lon) pair so that the longitude fits @@ -1802,9 +2223,15 @@ subroutine clean_lon_lat(xlon1,ylat1) endif end subroutine clean_lon_lat - !---------------------------------------------------------------------------------- ! These two simple routines return an N, S, E or W for the ! hemisphere of a latitude or longitude. + + !> Return an N or S for the hemisphere of a latitude. + !> + !> @param[in] lat ??? + !> @return ??? + !> + !> @author character(1) function get_lat_ns(lat) ! This could be written simply as merge('N','S',lat>=0) if F95 allowed implicit none @@ -1815,6 +2242,13 @@ character(1) function get_lat_ns(lat) get_lat_ns='S' endif end function get_lat_ns + + !> Return an E or W for the hemisphere of a longitude. + !> + !> @param[in] lon ??? + !> @return ??? + !> + !> @author character(1) function get_lon_ew(lon) ! This could be written simply as merge('E','W',lon>=0) if F95 allowed implicit none @@ -1826,6 +2260,11 @@ character(1) function get_lon_ew(lon) endif end function get_lon_ew + !> ??? + !> + !> @param[inout] Atm ??? + !> + !> @author subroutine fv_tracker_post_move(Atm) ! This updates the tracker i/j fix location and square of the ! distance to the tracker center after a nest move. @@ -1859,6 +2298,14 @@ subroutine fv_tracker_post_move(Atm) end subroutine fv_tracker_post_move #ifdef DEBUG + !> ??? + !> + !> @param[in] cparm ??? + !> @param[in] v ??? + !> @param[in] i ??? + !> @param[in] j ??? + !> + !> @author subroutine check_validity(cparm, v, i, j) ! [KA] Checks value of a tracking parameter for validity character*(*), intent(in) :: cparm