Skip to content

Commit 8ba438b

Browse files
Remove explicit setting of netCDF chunksizes when opening files and use the default size instead.
1 parent 94aa3e7 commit 8ba438b

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

src/gen_topo.f90

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,14 +215,12 @@ subroutine gen_topo(topo_file, out_file, grid_file, istripolar, offset)
215215
call handle_error(nf90_def_var(ncid_topo, 'depth_med', nf90_float, dids_topo, depth_med_id))
216216
call handle_error(nf90_def_var(ncid_topo, 'depth_all_med', nf90_float, dids_topo, depth_all_med_id))
217217
call handle_error(nf90_def_var(ncid_topo, 'sea_area_fraction', nf90_float, dids_topo, frac_id))
218-
call handle_error(nf90_def_var(ncid_topo, 'geolon_t', nf90_float, dids, geolon_id, chunksizes=[nxt/10, nyt/10], &
219-
deflate_level=1, shuffle=.true.))
218+
call handle_error(nf90_def_var(ncid_topo, 'geolon_t', nf90_float, dids, geolon_id, deflate_level=1, shuffle=.true.))
220219
call handle_error(nf90_put_att(ncid_topo, geolon_id, 'long_name', 'tracer longitude'))
221220
call handle_error(nf90_put_att(ncid_topo, geolon_id, 'units', 'degrees_E'))
222221
call handle_error(nf90_put_var(ncid_topo, geolon_id, x_t))
223222

224-
call handle_error(nf90_def_var(ncid_topo, 'geolat_t', nf90_float, dids, geolat_id, chunksizes=[nxt/10, nyt/10], &
225-
deflate_level=1, shuffle=.true.))
223+
call handle_error(nf90_def_var(ncid_topo, 'geolat_t', nf90_float, dids, geolat_id, deflate_level=1, shuffle=.true.))
226224
call handle_error(nf90_put_att(ncid_topo, geolat_id, 'long_name', 'tracer latitude'))
227225
call handle_error(nf90_put_att(ncid_topo, geolat_id, 'units', 'degrees_N'))
228226
call handle_error(nf90_put_var(ncid_topo, geolat_id, y_t))

src/topography.f90

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,7 @@ subroutine topography_write(this, filename)
163163
call handle_error(nf90_def_dim(ncid, 'ny', this%nyt, dids(2)))
164164

165165
! Write depth
166-
call handle_error(nf90_def_var(ncid, 'depth', nf90_float, dids, depth_id, chunksizes=[this%nxt/10, this%nyt/10], &
167-
deflate_level=1, shuffle=.true.))
166+
call handle_error(nf90_def_var(ncid, 'depth', nf90_float, dids, depth_id, deflate_level=1, shuffle=.true.))
168167
call handle_error(nf90_def_var_fill(ncid, depth_id, 0, MISSING_VALUE))
169168
call handle_error(nf90_put_att(ncid, depth_id, 'long_name', 'depth'))
170169
call handle_error(nf90_put_att(ncid, depth_id, 'units', 'm'))
@@ -181,8 +180,7 @@ subroutine topography_write(this, filename)
181180
call handle_error(nf90_put_var(ncid, depth_id, this%depth))
182181

183182
! Write frac
184-
call handle_error(nf90_def_var(ncid, 'sea_area_fraction', nf90_float, dids, frac_id, chunksizes=[this%nxt/10, this%nyt/10], &
185-
deflate_level=1, shuffle=.true.))
183+
call handle_error(nf90_def_var(ncid, 'sea_area_fraction', nf90_float, dids, frac_id, deflate_level=1, shuffle=.true.))
186184
call handle_error(nf90_def_var_fill(ncid, frac_id, 0, MISSING_VALUE))
187185
call handle_error(nf90_put_var(ncid, frac_id, this%frac))
188186

@@ -207,14 +205,12 @@ subroutine topography_write_coordinates(this, ncid, dids)
207205
integer(int32) :: geolon_id, geolat_id ! NetCDF ids
208206

209207
! Write coordinates
210-
call handle_error(nf90_def_var(ncid, 'geolon_t', nf90_float, dids, geolon_id, chunksizes=[this%nxt/10, this%nyt/10], &
211-
deflate_level=1, shuffle=.true.))
208+
call handle_error(nf90_def_var(ncid, 'geolon_t', nf90_float, dids, geolon_id, deflate_level=1, shuffle=.true.))
212209
call handle_error(nf90_put_att(ncid, geolon_id, 'long_name', 'tracer longitude'))
213210
call handle_error(nf90_put_att(ncid, geolon_id, 'units', 'degrees_E'))
214211
call handle_error(nf90_put_var(ncid, geolon_id, this%geolon_t))
215212

216-
call handle_error(nf90_def_var(ncid, 'geolat_t', nf90_float, dids, geolat_id, chunksizes=[this%nxt/10, this%nyt/10], &
217-
deflate_level=1, shuffle=.true.))
213+
call handle_error(nf90_def_var(ncid, 'geolat_t', nf90_float, dids, geolat_id, deflate_level=1, shuffle=.true.))
218214
call handle_error(nf90_put_att(ncid, geolat_id, 'long_name', 'tracer latitude'))
219215
call handle_error(nf90_put_att(ncid, geolat_id, 'units', 'degrees_N'))
220216
call handle_error(nf90_put_var(ncid, geolat_id, this%geolat_t))
@@ -460,8 +456,7 @@ subroutine topography_deseas(this)
460456
call handle_error(nf90_create(trim('sea_num.nc'), ior(nf90_netcdf4, nf90_clobber), ncid))
461457
call handle_error(nf90_def_dim(ncid, 'nx', this%nxt, dids(1)))
462458
call handle_error(nf90_def_dim(ncid, 'ny', this%nyt, dids(2)))
463-
call handle_error(nf90_def_var(ncid, 'sea_num', nf90_short, dids, sea_id, chunksizes=[this%nxt/10, this%nyt/10], &
464-
deflate_level=1, shuffle=.true.))
459+
call handle_error(nf90_def_var(ncid, 'sea_num', nf90_short, dids, sea_id, deflate_level=1, shuffle=.true.))
465460
call handle_error(nf90_enddef(ncid))
466461
call handle_error(nf90_put_var(ncid, sea_id, sea))
467462
call handle_error(nf90_close(ncid))
@@ -747,8 +742,7 @@ subroutine topography_mask(this, filename)
747742
call this%write_coordinates(ncid, dids)
748743

749744
! Write mask
750-
call handle_error(nf90_def_var(ncid, 'mask', nf90_float, dids, mask_id, chunksizes=[this%nxt/10, this%nyt/10], &
751-
deflate_level=1, shuffle=.true.))
745+
call handle_error(nf90_def_var(ncid, 'mask', nf90_float, dids, mask_id, deflate_level=1, shuffle=.true.))
752746
call handle_error(nf90_put_var(ncid, mask_id, mask))
753747

754748
call handle_error(nf90_put_att(ncid, nf90_global, 'history', date_time()//": "//get_mycommand()))

0 commit comments

Comments
 (0)