Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dm get fns #885

Merged
merged 10 commits into from
Feb 7, 2022
Prev Previous commit
Next Next commit
Removes the multi-dimensional type extentions that will no be used
  • Loading branch information
thomas-robinson committed Jan 5, 2022
commit 0790d64cb5753036ba37624d48556bbfb755d85e
2 changes: 1 addition & 1 deletion diag_manager/diag_manager.F90
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ MODULE diag_manager_mod
USE diag_table_mod, ONLY: parse_diag_table
USE diag_output_mod, ONLY: get_diag_global_att, set_diag_global_att
USE diag_grid_mod, ONLY: diag_grid_init, diag_grid_end
USE fms_diag_object_mod, ONLY: fmsDiagObject_type, diag_object_placeholder
USE fms_diag_object_mod, ONLY: fmsDiagObject_type
use fms_diag_object_container_mod, ONLY: FmsDiagObjectContainer_t

#ifdef use_yaml
Expand Down
47 changes: 12 additions & 35 deletions diag_manager/fms_diag_object.F90
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ module fms_diag_object_mod
real(kind=R4_KIND), allocatable,dimension(:) :: r4data_RANGE !< The range of r4 data
real(kind=R8_KIND), allocatable,dimension(:) :: r8data_RANGE !< The range of r8 data
type (diag_axis_type), allocatable, dimension(:) :: axis !< The axis object
!> \brief Extends the variable object to work with multiple types of data
class(*), allocatable :: vardata0
class(*), allocatable, dimension(:) :: vardata1
class(*), allocatable, dimension(:,:) :: vardata2
class(*), allocatable, dimension(:,:,:) :: vardata3
class(*), allocatable, dimension(:,:,:,:) :: vardata4
class(*), allocatable, dimension(:,:,:,:,:) :: vardata5



contains
! procedure :: send_data => fms_send_data !!TODO
Expand All @@ -89,43 +98,17 @@ module fms_diag_object_mod
procedure :: get_varname => diag_obj_get_varname

end type fmsDiagObject_type
!> \brief Extends the variable object to work with multiple types of data
type, extends(fmsDiagObject_type) :: fmsDiagObject_type_scalar
class(*), allocatable :: vardata
end type fmsDiagObject_type_scalar
type, extends(fmsDiagObject_type) :: fmsDiagObject_type_1d
class(*), allocatable, dimension(:) :: vardata
end type fmsDiagObject_type_1d
type, extends(fmsDiagObject_type) :: fmsDiagObject_type_2d
class(*), allocatable, dimension(:,:) :: vardata
end type fmsDiagObject_type_2d
type, extends(fmsDiagObject_type) :: fmsDiagObject_type_3d
class(*), allocatable, dimension(:,:,:) :: vardata
end type fmsDiagObject_type_3d
type, extends(fmsDiagObject_type) :: fmsDiagObject_type_4d
class(*), allocatable, dimension(:,:,:,:) :: vardata
end type fmsDiagObject_type_4d
type, extends(fmsDiagObject_type) :: fmsDiagObject_type_5d
class(*), allocatable, dimension(:,:,:,:,:) :: vardata
end type fmsDiagObject_type_5d
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! variables !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
type(fmsDiagObject_type) :: null_ob
type(fmsDiagObject_type_scalar) :: null_sc
type(fmsDiagObject_type_1d) :: null_1d
type(fmsDiagObject_type_2d) :: null_2d
type(fmsDiagObject_type_3d) :: null_3d
type(fmsDiagObject_type_4d) :: null_4d
type(fmsDiagObject_type_5d) :: null_5d

integer,private :: MAX_LEN_VARNAME
integer,private :: MAX_LEN_META

type(fmsDiagObject_type_3d) :: diag_object_placeholder (10)
!type(fmsDiagObject_type) :: diag_object_placeholder (10)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
public :: fmsDiagObject_type, fmsDiagObject_type_scalar, fmsDiagObject_type_1d
public :: fmsDiagObject_type_2d, fmsDiagObject_type_3d, fmsDiagObject_type_4d, fmsDiagObject_type_5d
public :: fmsDiagObject_type
public :: null_ob
public :: copy_diag_obj, fms_diag_get_id
public :: null_sc, null_1d, null_2d, null_3d, null_4d, null_5d
public :: fms_diag_object_init
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Expand All @@ -140,12 +123,6 @@ subroutine fms_diag_object_init (mlv,mlm)
MAX_LEN_META = mlm
!> Initialize the null_d variables
null_ob%diag_id = DIAG_NULL
null_sc%diag_id = DIAG_NULL
null_1d%diag_id = DIAG_NULL
null_2d%diag_id = DIAG_NULL
null_3d%diag_id = DIAG_NULL
null_4d%diag_id = DIAG_NULL
null_5d%diag_id = DIAG_NULL
end subroutine fms_diag_object_init
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!> \Description Sets the diag_id to the not registered value.
Expand Down