From ce597074eb5bdf1d7eae1ae46e3cd561b32832ca Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Fri, 31 May 2024 15:54:30 -0500 Subject: [PATCH] adding a getter to the core to return the grid warehouse --- src/core.F90 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/core.F90 b/src/core.F90 index 09af4a0a..ca208f7d 100644 --- a/src/core.F90 +++ b/src/core.F90 @@ -41,6 +41,8 @@ module tuvx_core procedure :: run ! Returns a grid from the warehouse procedure :: get_grid + ! Returns the grid warehouse + procedure :: get_grid_warehouse ! Returns a profile from the warehouse procedure :: get_profile ! Returns an updater for use TUV-x data @@ -306,6 +308,23 @@ function get_grid( this, grid_name, units ) result( grid ) end function get_grid +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + function get_grid_warehouse( this ) result( grid_warehouse ) + ! Returns a copy of a grid from the warehouse + + use musica_assert, only : assert_msg + use tuvx_grid, only : grid_t + + class(core_t), intent(in) :: this + class(grid_warehouse_t), pointer :: grid_warehouse + + call assert_msg( 423051914, associated( this%grid_warehouse_ ), & + "Grids not available" ) + grid_warehouse => this%grid_warehouse_ + + end function get_grid_warehouse + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! function get_profile( this, profile_name, units ) result( profile )