Skip to content

Commit

Permalink
maint: updated code-base to deal with 0.7.0
Browse files Browse the repository at this point in the history
Since v0.5.0 ncdf will depend on 0.7.0 or later.

Signed-off-by: Nick Papior <[email protected]>
  • Loading branch information
zerothi committed Jan 30, 2019
1 parent ab299d7 commit 878bd13
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 51 deletions.
4 changes: 2 additions & 2 deletions Makefile.project
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ _SMEKA_project = 1

# Step this version upon new versions
PROJECT_MAJOR = 0
PROJECT_MINOR = 4
PROJECT_MICRO = 2
PROJECT_MINOR = 5
PROJECT_MICRO = 0
PROJECT_VERSION = $(PROJECT_MAJOR).$(PROJECT_MINOR).$(PROJECT_MICRO)

# These are constant default
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ clean-src:
-rm -f $(src_FPP_SOURCES)
-rm -f $(src_OBJECTS)
-rm -f *.mod
-rm -f netcdf_ncdf_funcs.inc netcdf_ncdf_interface.inc
-rm -f netcdf_ncdf_funcs_.inc netcdf_ncdf_interface_.inc

clean: clean-src

Expand Down
4 changes: 2 additions & 2 deletions src/ncdf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ for v in ${vars[@]} ; do
done
_psnl "end interface ncdf_$sub"
done
} > netcdf_ncdf_interface.inc
} > netcdf_ncdf_interface_.inc

{
for v in ${vars[@]} ; do
Expand Down Expand Up @@ -112,4 +112,4 @@ for v in ${vars[@]} ; do
done
_psnl "#undef VAR_TYPE"
done
} > netcdf_ncdf_funcs.inc
} > netcdf_ncdf_funcs_.inc
78 changes: 39 additions & 39 deletions src/netcdf_ncdf_pp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ module netcdf_ncdf
logical, parameter :: NF90_VAR_FILL = .false. ! for false it is float

! Added interface
#include "netcdf_ncdf_interface.inc"
#include "netcdf_ncdf_interface_.inc"

contains

Expand Down Expand Up @@ -428,13 +428,13 @@ recursive subroutine ncdf_crt(this,dic)
use variable
use dictionary
type(hNCDF), intent(inout) :: this
type(dict), intent(inout) :: dic
type(dictionary_t), intent(inout) :: dic

! Local dictionary keys and variables
type(hNCDF) :: grp
type(dict) :: d, d_var, dv, atts
type(var) :: v
character(len=DICT_KEY_LENGTH) :: key
type(dictionary_t) :: d, d_var, dv, atts
type(variable_t) :: v
character(len=DICTIONARY_KEY_LENGTH) :: key
character(len=NF90_MAX_NAME) :: name, char
character(len=64), allocatable :: dims(:)
integer, pointer :: chunks(:) => null()
Expand Down Expand Up @@ -604,9 +604,9 @@ end subroutine ncdf_crt
! for NetCDF files.
recursive subroutine ncdf_crt_delete(dic)
use dictionary
type(dict), intent(inout) :: dic
type(dict) :: ld, v_dic, att_dic
character(len=DICT_KEY_LENGTH) :: key
type(dictionary_t), intent(inout) :: dic
type(dictionary_t) :: ld, v_dic, att_dic
character(len=DICTIONARY_KEY_LENGTH) :: key

! Delete all entries
ld = .first. dic
Expand Down Expand Up @@ -693,7 +693,7 @@ subroutine ncdf_inq_ncdf(this,dims,vars,atts,format,grps,exist, &
integer, optional, intent(out) :: dims, vars, atts, format, grps
logical, optional, intent(out) :: exist
! possibly obtain all attributes, dimensions
type(dict), optional, intent(inout) :: dict_dim, dict_att
type(dictionary_t), optional, intent(inout) :: dict_dim, dict_att

integer :: ldims, lvars, latts, lformat, lgrps, val, i
integer, allocatable :: grp_id(:)
Expand Down Expand Up @@ -761,7 +761,7 @@ subroutine ncdf_inq_name(name,dims,vars,atts,format,grps,exist, &
integer, optional, intent(out) :: dims, vars, atts, format, grps
logical, optional, intent(out) :: exist
! possibly obtain all attributes, dimensions
type(dict), optional, intent(inout) :: dict_dim, dict_att
type(dictionary_t), optional, intent(inout) :: dict_dim, dict_att

type(hNCDF) :: this

Expand Down Expand Up @@ -791,7 +791,7 @@ subroutine ncdf_inq_grp(this,group,exist,dims,vars,atts,format,grps, &
logical, optional, intent(out) :: exist
integer, optional, intent(out) :: dims, vars, atts, format, grps
! possibly obtain all attributes, dimensions
type(dict), optional, intent(inout) :: dict_dim, dict_att
type(dictionary_t), optional, intent(inout) :: dict_dim, dict_att

integer :: ldims, lvars, latts, lformat, lgrps, val, i
integer, allocatable :: grp_id(:)
Expand Down Expand Up @@ -842,19 +842,19 @@ subroutine ncdf_assert(this,assert,dims,vars, &
use dictionary
type(hNCDF), intent(inout) :: this
logical, intent(out) :: assert
type(dict), intent(in), optional :: dims, vars
type(dict), intent(in), optional :: has_dims, has_vars
type(dictionary_t), intent(in), optional :: dims, vars
type(dictionary_t), intent(in), optional :: has_dims, has_vars
real(sp), intent(in), optional :: s_EPS
real(dp), intent(in), optional :: d_EPS
! We currently do not check attributes.
! This is a little more tricky as strings, chars, etc... :(
! It just needs to be done...

! We can currently only check integers :(
character(len=DICT_KEY_LENGTH) :: key
character(len=VAR_TYPE_LENGTH) :: t
type(dict) :: dic ! local loop dictionary...
type(var) :: ivar
character(len=DICTIONARY_KEY_LENGTH) :: key
character(len=VARIABLE_TYPE_LENGTH) :: t
type(dictionary_t) :: dic ! local loop dictionary...
type(variable_t) :: ivar
logical :: success
integer, pointer :: i1(:), i2(:,:)
integer, allocatable :: i1a(:), i2a(:,:)
Expand Down Expand Up @@ -1135,7 +1135,7 @@ subroutine ncdf_def_var_generic(this,name,type,dims,id,atts, &
integer, intent(in) :: type
character(len=*), intent(in) :: dims(:)
integer, intent(out) :: id
type(dict), optional :: atts
type(dictionary_t), optional :: atts
integer, intent(in), optional :: compress_lvl
logical, intent(in), optional :: shuffle
integer, intent(in), optional :: access, chunks(:)
Expand Down Expand Up @@ -1202,7 +1202,7 @@ subroutine ncdf_def_var_integer(this, name, type, dims, &
character(len=*), intent(in) :: name
integer, intent(in) :: type
character(len=*), intent(in) :: dims(:)
type(dict), optional :: atts
type(dictionary_t), optional :: atts
integer, intent(in), optional :: compress_lvl
logical, intent(in), optional :: shuffle, fill
integer, intent(in), optional :: access, chunks(:)
Expand Down Expand Up @@ -1243,7 +1243,7 @@ subroutine ncdf_def_var_logical(this, name, type, dims, &
character(len=*), intent(in) :: name
logical, intent(in) :: type
character(len=*), intent(in) :: dims(:)
type(dict), optional :: atts
type(dictionary_t), optional :: atts
integer, intent(in), optional :: compress_lvl
logical, intent(in), optional :: shuffle, fill
integer, intent(in), optional :: access, chunks(:)
Expand Down Expand Up @@ -1329,7 +1329,7 @@ subroutine ncdf_inq_var_def(this,name,exist,id,size,atts)
logical, optional, intent(out) :: exist
integer, optional, intent(out) :: id
integer, optional, intent(out) :: size(:)
type(dict), optional, intent(inout) :: atts
type(dictionary_t), optional, intent(inout) :: atts
integer :: iret ! We need to retain any error message...
integer :: lid, nids, i
integer :: ldids(10) ! In case the user only wishes to read a sub-part of the size
Expand Down Expand Up @@ -1458,8 +1458,8 @@ subroutine put_gatt(this,name,att,atts)
use variable
type(hNCDF), intent(inout) :: this
character(len=*), optional, intent(in) :: name
type(var), optional, intent(inout) :: att
type(dict), optional, intent(inout) :: atts
type(variable_t), optional, intent(inout) :: att
type(dictionary_t), optional, intent(inout) :: atts

if ( .not. ncdf_participate(this) ) return

Expand All @@ -1479,8 +1479,8 @@ subroutine get_gatt(this,name,att,atts)
use variable
type(hNCDF), intent(inout) :: this
character(len=*), optional, intent(in) :: name
type(var), optional, intent(inout) :: att
type(dict), optional, intent(inout) :: atts
type(variable_t), optional, intent(inout) :: att
type(dictionary_t), optional, intent(inout) :: atts

if ( .not. ncdf_participate(this) ) return

Expand All @@ -1497,12 +1497,12 @@ end subroutine get_gatt

subroutine put_att(this,var,name,att,atts)
use dictionary
use variable, vvar => var
use variable
type(hNCDF), intent(inout) :: this
character(len=*), intent(in) :: var
character(len=*), optional, intent(in) :: name
type(vvar), optional, intent(inout) :: att
type(dict), optional, intent(inout) :: atts
type(variable_t), optional, intent(inout) :: att
type(dictionary_t), optional, intent(inout) :: atts
integer :: ID

if ( .not. ncdf_participate(this) ) return
Expand All @@ -1522,12 +1522,12 @@ end subroutine put_att

subroutine get_att(this,var,name,att,atts)
use dictionary
use variable, vvar => var
use variable
type(hNCDF), intent(inout) :: this
character(len=*), intent(in) :: var
character(len=*), optional, intent(in) :: name
type(vvar), optional, intent(inout) :: att
type(dict), optional, intent(inout) :: atts
type(variable_t), optional, intent(inout) :: att
type(dictionary_t), optional, intent(inout) :: atts
integer :: ID

if ( .not. ncdf_participate(this) ) return
Expand All @@ -1550,9 +1550,9 @@ subroutine put_atts_id(this,id,atts)
use variable
type(hNCDF), intent(inout) :: this
integer, intent(in) :: ID
type(dict), intent(inout) :: atts
type(dict) :: att
type(var) :: at_var
type(dictionary_t), intent(inout) :: atts
type(dictionary_t) :: att
type(variable_t) :: at_var
character(len=NF90_MAX_NAME) :: key

if ( len(atts) == 0 ) return
Expand Down Expand Up @@ -1590,7 +1590,7 @@ subroutine put_att_id(this,id,name,att)
type(hNCDF), intent(inout) :: this
integer, intent(in) :: ID
character(len=*), intent(in) :: name
type(var), intent(inout) :: att
type(variable_t), intent(inout) :: att
integer :: iret

character(len=NF90_MAX_NAME) :: tmp
Expand Down Expand Up @@ -1643,10 +1643,10 @@ subroutine get_atts_id(this,id,atts)
use variable
type(hNCDF), intent(inout) :: this
integer, intent(in) :: ID
type(dict), intent(inout) :: atts
type(dictionary_t), intent(inout) :: atts
integer :: i, nAtts
character(len=NF90_MAX_NAME) :: name
type(var) :: att
type(variable_t) :: att

if ( id == NF90_GLOBAL ) then
call ncdf_err(nf90_inquire(this%id, nAttributes=nAtts), &
Expand Down Expand Up @@ -1678,7 +1678,7 @@ subroutine get_att_id(this,ID,name,att)
type(hNCDF), intent(inout) :: this
integer, intent(in) :: ID
character(len=*), intent(in) :: name
type(var), intent(inout) :: att
type(variable_t), intent(inout) :: att
integer :: xtype, att_len
character(len=512) :: att_char
real(sp), allocatable :: a_sp(:)
Expand Down Expand Up @@ -1804,7 +1804,7 @@ subroutine ncdf_fill(this,fill,old_fill)
end subroutine ncdf_fill

! Use the ncdf.sh script to generate the needed code...
#include "netcdf_ncdf_funcs.inc"
#include "netcdf_ncdf_funcs_.inc"

subroutine ncdf_enddef(this)
type(hNCDF), intent(inout) :: this
Expand Down
2 changes: 1 addition & 1 deletion src/netcdf_ncdf_var_inc.inc
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ subroutine ROUTINE2(inq_var,VAR)(this, name,fill_val,exist,id,size,atts,fill)
integer, intent(out), optional :: id
#endif
integer, intent(out), optional :: size(:)
type(dict), intent(inout), optional :: atts
type(dictionary_t), intent(inout), optional :: atts
integer, intent(out), optional :: fill
integer :: lid, lfill
integer :: tmp_lr
Expand Down
2 changes: 1 addition & 1 deletion test/tst_ncdf_3.F90
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ program tst_ncdf_3
type(hNCDF) :: ncdf
integer :: Node, Nodes, i
character(len=1) :: ci
type(dict) :: dic
type(dictionary_t) :: dic
logical :: assert
integer :: ilist1(1,10), ilist2(2,10)

Expand Down
2 changes: 1 addition & 1 deletion test/tst_ncdf_4.F90
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ program tst_ncdf_4

type(hNCDF) :: ncdf, grp1, grp2
integer :: Node, Nodes, i, comp_lvl
type(dict) :: dic
type(dictionary_t) :: dic
logical :: assert

call tst_mpi_init(Node,Nodes)
Expand Down
4 changes: 2 additions & 2 deletions test/tst_ncdf_att.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ program tst_ncdf

type(hNCDF) :: ncdf
integer :: Node, Nodes, i
type(dict) :: dic, ld
type(dictionary_t) :: dic, ld
character(len=255) :: a1, a2
integer, pointer :: i0, i1(:)
real(dp), pointer :: d1(:)
type(var) :: v
type(variable_t) :: v

call tst_mpi_init(Node,Nodes)

Expand Down
2 changes: 1 addition & 1 deletion test/tst_ncdf_crt.F90
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ program tst_ncdf

integer :: Node, Nodes
type(hNCDF) :: ncdf
type(dict) :: dic, lv, atts
type(dictionary_t) :: dic, lv, atts

call tst_mpi_init(Node,Nodes)

Expand Down

0 comments on commit 878bd13

Please sign in to comment.