Skip to content

Commit 954ab45

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

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

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)