Skip to content

Commit 878bd13

Browse files
committed
maint: updated code-base to deal with 0.7.0
Since v0.5.0 ncdf will depend on 0.7.0 or later. Signed-off-by: Nick Papior <[email protected]>
1 parent ab299d7 commit 878bd13

File tree

10 files changed

+51
-51
lines changed

10 files changed

+51
-51
lines changed

Makefile.project

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ _SMEKA_project = 1
55

66
# Step this version upon new versions
77
PROJECT_MAJOR = 0
8-
PROJECT_MINOR = 4
9-
PROJECT_MICRO = 2
8+
PROJECT_MINOR = 5
9+
PROJECT_MICRO = 0
1010
PROJECT_VERSION = $(PROJECT_MAJOR).$(PROJECT_MINOR).$(PROJECT_MICRO)
1111

1212
# These are constant default

src/Makefile.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ clean-src:
3838
-rm -f $(src_FPP_SOURCES)
3939
-rm -f $(src_OBJECTS)
4040
-rm -f *.mod
41-
-rm -f netcdf_ncdf_funcs.inc netcdf_ncdf_interface.inc
41+
-rm -f netcdf_ncdf_funcs_.inc netcdf_ncdf_interface_.inc
4242

4343
clean: clean-src
4444

src/ncdf.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ for v in ${vars[@]} ; do
7373
done
7474
_psnl "end interface ncdf_$sub"
7575
done
76-
} > netcdf_ncdf_interface.inc
76+
} > netcdf_ncdf_interface_.inc
7777

7878
{
7979
for v in ${vars[@]} ; do
@@ -112,4 +112,4 @@ for v in ${vars[@]} ; do
112112
done
113113
_psnl "#undef VAR_TYPE"
114114
done
115-
} > netcdf_ncdf_funcs.inc
115+
} > netcdf_ncdf_funcs_.inc

src/netcdf_ncdf_pp.F90

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ module netcdf_ncdf
160160
logical, parameter :: NF90_VAR_FILL = .false. ! for false it is float
161161

162162
! Added interface
163-
#include "netcdf_ncdf_interface.inc"
163+
#include "netcdf_ncdf_interface_.inc"
164164

165165
contains
166166

@@ -428,13 +428,13 @@ recursive subroutine ncdf_crt(this,dic)
428428
use variable
429429
use dictionary
430430
type(hNCDF), intent(inout) :: this
431-
type(dict), intent(inout) :: dic
431+
type(dictionary_t), intent(inout) :: dic
432432

433433
! Local dictionary keys and variables
434434
type(hNCDF) :: grp
435-
type(dict) :: d, d_var, dv, atts
436-
type(var) :: v
437-
character(len=DICT_KEY_LENGTH) :: key
435+
type(dictionary_t) :: d, d_var, dv, atts
436+
type(variable_t) :: v
437+
character(len=DICTIONARY_KEY_LENGTH) :: key
438438
character(len=NF90_MAX_NAME) :: name, char
439439
character(len=64), allocatable :: dims(:)
440440
integer, pointer :: chunks(:) => null()
@@ -604,9 +604,9 @@ end subroutine ncdf_crt
604604
! for NetCDF files.
605605
recursive subroutine ncdf_crt_delete(dic)
606606
use dictionary
607-
type(dict), intent(inout) :: dic
608-
type(dict) :: ld, v_dic, att_dic
609-
character(len=DICT_KEY_LENGTH) :: key
607+
type(dictionary_t), intent(inout) :: dic
608+
type(dictionary_t) :: ld, v_dic, att_dic
609+
character(len=DICTIONARY_KEY_LENGTH) :: key
610610

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

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

766766
type(hNCDF) :: this
767767

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

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

853853
! We can currently only check integers :(
854-
character(len=DICT_KEY_LENGTH) :: key
855-
character(len=VAR_TYPE_LENGTH) :: t
856-
type(dict) :: dic ! local loop dictionary...
857-
type(var) :: ivar
854+
character(len=DICTIONARY_KEY_LENGTH) :: key
855+
character(len=VARIABLE_TYPE_LENGTH) :: t
856+
type(dictionary_t) :: dic ! local loop dictionary...
857+
type(variable_t) :: ivar
858858
logical :: success
859859
integer, pointer :: i1(:), i2(:,:)
860860
integer, allocatable :: i1a(:), i2a(:,:)
@@ -1135,7 +1135,7 @@ subroutine ncdf_def_var_generic(this,name,type,dims,id,atts, &
11351135
integer, intent(in) :: type
11361136
character(len=*), intent(in) :: dims(:)
11371137
integer, intent(out) :: id
1138-
type(dict), optional :: atts
1138+
type(dictionary_t), optional :: atts
11391139
integer, intent(in), optional :: compress_lvl
11401140
logical, intent(in), optional :: shuffle
11411141
integer, intent(in), optional :: access, chunks(:)
@@ -1202,7 +1202,7 @@ subroutine ncdf_def_var_integer(this, name, type, dims, &
12021202
character(len=*), intent(in) :: name
12031203
integer, intent(in) :: type
12041204
character(len=*), intent(in) :: dims(:)
1205-
type(dict), optional :: atts
1205+
type(dictionary_t), optional :: atts
12061206
integer, intent(in), optional :: compress_lvl
12071207
logical, intent(in), optional :: shuffle, fill
12081208
integer, intent(in), optional :: access, chunks(:)
@@ -1243,7 +1243,7 @@ subroutine ncdf_def_var_logical(this, name, type, dims, &
12431243
character(len=*), intent(in) :: name
12441244
logical, intent(in) :: type
12451245
character(len=*), intent(in) :: dims(:)
1246-
type(dict), optional :: atts
1246+
type(dictionary_t), optional :: atts
12471247
integer, intent(in), optional :: compress_lvl
12481248
logical, intent(in), optional :: shuffle, fill
12491249
integer, intent(in), optional :: access, chunks(:)
@@ -1329,7 +1329,7 @@ subroutine ncdf_inq_var_def(this,name,exist,id,size,atts)
13291329
logical, optional, intent(out) :: exist
13301330
integer, optional, intent(out) :: id
13311331
integer, optional, intent(out) :: size(:)
1332-
type(dict), optional, intent(inout) :: atts
1332+
type(dictionary_t), optional, intent(inout) :: atts
13331333
integer :: iret ! We need to retain any error message...
13341334
integer :: lid, nids, i
13351335
integer :: ldids(10) ! In case the user only wishes to read a sub-part of the size
@@ -1458,8 +1458,8 @@ subroutine put_gatt(this,name,att,atts)
14581458
use variable
14591459
type(hNCDF), intent(inout) :: this
14601460
character(len=*), optional, intent(in) :: name
1461-
type(var), optional, intent(inout) :: att
1462-
type(dict), optional, intent(inout) :: atts
1461+
type(variable_t), optional, intent(inout) :: att
1462+
type(dictionary_t), optional, intent(inout) :: atts
14631463

14641464
if ( .not. ncdf_participate(this) ) return
14651465

@@ -1479,8 +1479,8 @@ subroutine get_gatt(this,name,att,atts)
14791479
use variable
14801480
type(hNCDF), intent(inout) :: this
14811481
character(len=*), optional, intent(in) :: name
1482-
type(var), optional, intent(inout) :: att
1483-
type(dict), optional, intent(inout) :: atts
1482+
type(variable_t), optional, intent(inout) :: att
1483+
type(dictionary_t), optional, intent(inout) :: atts
14841484

14851485
if ( .not. ncdf_participate(this) ) return
14861486

@@ -1497,12 +1497,12 @@ end subroutine get_gatt
14971497

14981498
subroutine put_att(this,var,name,att,atts)
14991499
use dictionary
1500-
use variable, vvar => var
1500+
use variable
15011501
type(hNCDF), intent(inout) :: this
15021502
character(len=*), intent(in) :: var
15031503
character(len=*), optional, intent(in) :: name
1504-
type(vvar), optional, intent(inout) :: att
1505-
type(dict), optional, intent(inout) :: atts
1504+
type(variable_t), optional, intent(inout) :: att
1505+
type(dictionary_t), optional, intent(inout) :: atts
15061506
integer :: ID
15071507

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

15231523
subroutine get_att(this,var,name,att,atts)
15241524
use dictionary
1525-
use variable, vvar => var
1525+
use variable
15261526
type(hNCDF), intent(inout) :: this
15271527
character(len=*), intent(in) :: var
15281528
character(len=*), optional, intent(in) :: name
1529-
type(vvar), optional, intent(inout) :: att
1530-
type(dict), optional, intent(inout) :: atts
1529+
type(variable_t), optional, intent(inout) :: att
1530+
type(dictionary_t), optional, intent(inout) :: atts
15311531
integer :: ID
15321532

15331533
if ( .not. ncdf_participate(this) ) return
@@ -1550,9 +1550,9 @@ subroutine put_atts_id(this,id,atts)
15501550
use variable
15511551
type(hNCDF), intent(inout) :: this
15521552
integer, intent(in) :: ID
1553-
type(dict), intent(inout) :: atts
1554-
type(dict) :: att
1555-
type(var) :: at_var
1553+
type(dictionary_t), intent(inout) :: atts
1554+
type(dictionary_t) :: att
1555+
type(variable_t) :: at_var
15561556
character(len=NF90_MAX_NAME) :: key
15571557

15581558
if ( len(atts) == 0 ) return
@@ -1590,7 +1590,7 @@ subroutine put_att_id(this,id,name,att)
15901590
type(hNCDF), intent(inout) :: this
15911591
integer, intent(in) :: ID
15921592
character(len=*), intent(in) :: name
1593-
type(var), intent(inout) :: att
1593+
type(variable_t), intent(inout) :: att
15941594
integer :: iret
15951595

15961596
character(len=NF90_MAX_NAME) :: tmp
@@ -1643,10 +1643,10 @@ subroutine get_atts_id(this,id,atts)
16431643
use variable
16441644
type(hNCDF), intent(inout) :: this
16451645
integer, intent(in) :: ID
1646-
type(dict), intent(inout) :: atts
1646+
type(dictionary_t), intent(inout) :: atts
16471647
integer :: i, nAtts
16481648
character(len=NF90_MAX_NAME) :: name
1649-
type(var) :: att
1649+
type(variable_t) :: att
16501650

16511651
if ( id == NF90_GLOBAL ) then
16521652
call ncdf_err(nf90_inquire(this%id, nAttributes=nAtts), &
@@ -1678,7 +1678,7 @@ subroutine get_att_id(this,ID,name,att)
16781678
type(hNCDF), intent(inout) :: this
16791679
integer, intent(in) :: ID
16801680
character(len=*), intent(in) :: name
1681-
type(var), intent(inout) :: att
1681+
type(variable_t), intent(inout) :: att
16821682
integer :: xtype, att_len
16831683
character(len=512) :: att_char
16841684
real(sp), allocatable :: a_sp(:)
@@ -1804,7 +1804,7 @@ subroutine ncdf_fill(this,fill,old_fill)
18041804
end subroutine ncdf_fill
18051805

18061806
! Use the ncdf.sh script to generate the needed code...
1807-
#include "netcdf_ncdf_funcs.inc"
1807+
#include "netcdf_ncdf_funcs_.inc"
18081808

18091809
subroutine ncdf_enddef(this)
18101810
type(hNCDF), intent(inout) :: this

src/netcdf_ncdf_var_inc.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ subroutine ROUTINE2(inq_var,VAR)(this, name,fill_val,exist,id,size,atts,fill)
129129
integer, intent(out), optional :: id
130130
#endif
131131
integer, intent(out), optional :: size(:)
132-
type(dict), intent(inout), optional :: atts
132+
type(dictionary_t), intent(inout), optional :: atts
133133
integer, intent(out), optional :: fill
134134
integer :: lid, lfill
135135
integer :: tmp_lr

test/tst_ncdf_3.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ program tst_ncdf_3
1414
type(hNCDF) :: ncdf
1515
integer :: Node, Nodes, i
1616
character(len=1) :: ci
17-
type(dict) :: dic
17+
type(dictionary_t) :: dic
1818
logical :: assert
1919
integer :: ilist1(1,10), ilist2(2,10)
2020

test/tst_ncdf_4.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ program tst_ncdf_4
1313

1414
type(hNCDF) :: ncdf, grp1, grp2
1515
integer :: Node, Nodes, i, comp_lvl
16-
type(dict) :: dic
16+
type(dictionary_t) :: dic
1717
logical :: assert
1818

1919
call tst_mpi_init(Node,Nodes)

test/tst_ncdf_att.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ program tst_ncdf
99

1010
type(hNCDF) :: ncdf
1111
integer :: Node, Nodes, i
12-
type(dict) :: dic, ld
12+
type(dictionary_t) :: dic, ld
1313
character(len=255) :: a1, a2
1414
integer, pointer :: i0, i1(:)
1515
real(dp), pointer :: d1(:)
16-
type(var) :: v
16+
type(variable_t) :: v
1717

1818
call tst_mpi_init(Node,Nodes)
1919

test/tst_ncdf_crt.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ program tst_ncdf
1111

1212
integer :: Node, Nodes
1313
type(hNCDF) :: ncdf
14-
type(dict) :: dic, lv, atts
14+
type(dictionary_t) :: dic, lv, atts
1515

1616
call tst_mpi_init(Node,Nodes)
1717

0 commit comments

Comments
 (0)