<p><b>duda</b> 2009-08-10 18:00:58 -0600 (Mon, 10 Aug 2009)</p><p>Add the option to use 64-bit file offsets in grid.nc and output.nc files<br>
through a compile-time flag -DOFFSET64BIT (currently added as a comment<br>
in the default Makefile).<br>
<br>
M Makefile<br>
M module_io_input.F<br>
M module_io_output.F<br>
</p><hr noshade><pre><font color="gray">Modified: trunk/swmodel/Makefile
===================================================================
--- trunk/swmodel/Makefile        2009-08-10 22:52:19 UTC (rev 20)
+++ trunk/swmodel/Makefile        2009-08-11 00:00:58 UTC (rev 21)
@@ -23,7 +23,7 @@
#LDFLAGS = -O3
-CPPFLAGS = -DRKIND=8 $(MODEL_FORMULATION) -D_MPI -DUNDERSCORE
+CPPFLAGS = -DRKIND=8 $(MODEL_FORMULATION) -D_MPI -DUNDERSCORE # -DOFFSET64BIT
INCLUDES = -I$(NETCDF)/include
LIBS = -L$(NETCDF)/lib -lnetcdf
Modified: trunk/swmodel/module_io_input.F
===================================================================
--- trunk/swmodel/module_io_input.F        2009-08-10 22:52:19 UTC (rev 20)
+++ trunk/swmodel/module_io_input.F        2009-08-11 00:00:58 UTC (rev 21)
@@ -1167,7 +1167,11 @@
integer :: nferr
+#ifdef OFFSET64BIT
+ nferr = nf_open(trim(input_obj % filename), ior(NF_SHARE,NF_64BIT_OFFSET), input_obj % rd_ncid)
+#else
nferr = nf_open(trim(input_obj % filename), NF_SHARE, input_obj % rd_ncid)
+#endif
!
! Get IDs for variable dimensions
Modified: trunk/swmodel/module_io_output.F
===================================================================
--- trunk/swmodel/module_io_output.F        2009-08-10 22:52:19 UTC (rev 20)
+++ trunk/swmodel/module_io_output.F        2009-08-11 00:00:58 UTC (rev 21)
@@ -831,7 +831,11 @@
output_obj % wrLocalnTracers = nTracers
if (dminfo % my_proc_id == 0) then
+#ifdef OFFSET64BIT
+ nferr = nf_create('output.nc', ior(NF_CLOBBER,NF_64BIT_OFFSET), output_obj % wr_ncid)
+#else
nferr = nf_create('output.nc', NF_CLOBBER, output_obj % wr_ncid)
+#endif
!
! Define dimensions
</font>
</pre>