Skip to content

Commit

Permalink
adding a getter to the core to return the grid warehouse (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
K20shores authored Jun 7, 2024
1 parent 23690d5 commit adf0e55
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/core.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 )
Expand Down

0 comments on commit adf0e55

Please sign in to comment.