Skip to content

Commit

Permalink
Changes required for addition of oops::Variable. Targeted merge: 11…
Browse files Browse the repository at this point in the history
…/06/24 (#210)

Changes to fix segfaults
  • Loading branch information
mo-joshuacolclough authored Jun 10, 2024
1 parent bae4d46 commit db2f670
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions src/opsinputs/opsinputs_obsdatavector_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

module opsinputs_obsdatavector_mod

use oops_variables_mod, only: oops_variables
use obs_variables_mod, only: obs_variables
use string_f_c_mod, only: f_c_string
use, intrinsic :: iso_c_binding, only: c_char, c_int, c_float, c_ptr, c_size_t

Expand Down Expand Up @@ -38,13 +38,13 @@ end function opsinputs_obsdatavector_int_nlocs

!> Return an object wrapping the list of names of variables held in this ObsDataVector<int> object.

type(oops_variables) function opsinputs_obsdatavector_int_varnames(c_vec)
type(obs_variables) function opsinputs_obsdatavector_int_varnames(c_vec)
!use, intrinsic :: iso_c_binding, only: c_ptr
!use oops_variables_mod
!use obs_variables_mod
implicit none
type(c_ptr), value, intent(in) :: c_vec

opsinputs_obsdatavector_int_varnames = oops_variables(c_opsinputs_obsdatavector_int_varnames(c_vec))
opsinputs_obsdatavector_int_varnames = obs_variables(c_opsinputs_obsdatavector_int_varnames(c_vec))
end function opsinputs_obsdatavector_int_varnames

!> Return true if this ObsDataVector<int> object contains a given variable.
Expand Down Expand Up @@ -93,14 +93,14 @@ end function opsinputs_obsdatavector_float_nlocs

!> Return an object wrapping the list of names of variables held in this ObsDataVector<int> object.

type(oops_variables) function opsinputs_obsdatavector_float_varnames(c_vec)
type(obs_variables) function opsinputs_obsdatavector_float_varnames(c_vec)
!use, intrinsic :: iso_c_binding
use oops_variables_mod
use obs_variables_mod
implicit none
type(c_ptr), value, intent(in) :: c_vec

opsinputs_obsdatavector_float_varnames = &
oops_variables(c_opsinputs_obsdatavector_float_varnames(c_vec))
obs_variables(c_opsinputs_obsdatavector_float_varnames(c_vec))
end function opsinputs_obsdatavector_float_varnames

!> Return true if this ObsDataVector<float> object contains a given variable.
Expand Down
4 changes: 2 additions & 2 deletions src/opsinputs/opsinputs_utils_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
module opsinputs_utils_mod

use, intrinsic :: iso_c_binding, only: c_int32_t
use oops_variables_mod, only: oops_variables
use obs_variables_mod, only: obs_variables
use ufo_vars_mod, only: MAXVARLEN
use opsinputs_obsdatavector_mod, only: &
opsinputs_obsdatavector_int_varnames, &
Expand Down Expand Up @@ -62,7 +62,7 @@ subroutine opsinputs_utils_fillreportflags( &
integer(kind=integer64), intent(out) :: ReportFlags(:)

! Local declarations:
type(oops_variables) :: ObsVariables
type(obs_variables) :: ObsVariables
character(max_varname_length) :: VarName
integer :: NumObsVariables
integer :: iVar, iOpsObs, iJediObsInRecord, iJediObs
Expand Down
2 changes: 1 addition & 1 deletion src/opsinputs/opsinputs_varobswriter_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,7 @@ subroutine opsinputs_varobswriter_findchannelspassingqc( &

! Local declarations:
integer :: NumChannels
type(oops_variables) :: Variables
type(obs_variables) :: Variables
character(max_varname_length) :: VariableName
integer :: NumVariables, NumMultichannelVariables
integer :: iMultichannelVariable, iChannel, iVariable, iObs
Expand Down

0 comments on commit db2f670

Please sign in to comment.