[Dart-dev] [4103] DART/trunk: Added the netCDF 'large file support' (LFS) for assim_model_nml.

nancy at ucar.edu nancy at ucar.edu
Mon Oct 12 16:17:04 MDT 2009


An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/dart-dev/attachments/20091012/d1fa7f17/attachment-0001.html 
-------------- next part --------------
Modified: DART/trunk/assim_model/assim_model_mod.f90
===================================================================
--- DART/trunk/assim_model/assim_model_mod.f90	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/assim_model/assim_model_mod.f90	2009-10-12 22:17:04 UTC (rev 4103)
@@ -102,8 +102,10 @@
 !                                     but not as portable.
 
 logical  :: write_binary_restart_files = .true.
+logical  :: netCDF_large_file_support  = .false.
 
-namelist /assim_model_nml/ write_binary_restart_files
+namelist /assim_model_nml/ write_binary_restart_files, &
+                           netCDF_large_file_support
 !-------------------------------------------------------------
 
 contains
@@ -213,7 +215,7 @@
 integer, OPTIONAL,intent(in) :: lagID
 type(netcdf_file_type)       :: ncFileID
 
-integer :: i, metadata_length, nlines, linelen
+integer :: i, metadata_length, nlines, linelen, createmode
 
 integer ::   MemberDimID,   MemberVarID     ! for each "copy" or ensemble member
 integer ::     TimeDimID,     TimeVarID
@@ -232,9 +234,15 @@
 
 metadata_length = LEN(meta_data_per_copy(1))
 
+if ( netCDF_large_file_support ) then
+   createmode = NF90_64BIT_OFFSET
+else
+   createmode = NF90_SHARE
+endif
+
 ! Create the file
 ncFileID%fname = trim(adjustl(FileName))//".nc"
-call nc_check(nf90_create(path = trim(ncFileID%fname), cmode = nf90_share, ncid = ncFileID%ncid), &
+call nc_check(nf90_create(path = trim(ncFileID%fname), cmode = createmode, ncid = ncFileID%ncid), &
               'init_diag_output', 'create '//trim(ncFileID%fname))
 
 write(msgstring,*)trim(ncFileID%fname), ' is ncFileID ',ncFileID%ncid

Modified: DART/trunk/assim_model/assim_model_mod.html
===================================================================
--- DART/trunk/assim_model/assim_model_mod.html	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/assim_model/assim_model_mod.html	2009-10-12 22:17:04 UTC (rev 4103)
@@ -667,7 +667,6 @@
  <BR>
 
  <!--================================================================-->
-
  <!--============= DESCRIPTION OF A FUNCTION ========================-->
 <A NAME="yyyroutine22"></A>
  <P></P><HR><P></P>
@@ -1239,11 +1238,12 @@
 <BR><HR><BR>
 <H2>NAMELIST</H2>
 <P>We adhere to the F90 standard of starting a namelist with an ampersand 
-'&' and terminating with a slash '/'.
+'&#38;' and terminating with a slash '/'.
 </P>
 <div class=namelist><pre>
-<em class=call>namelist / assim_model_nml / </em> &
-    write_binary_restart_files
+<em class=call>namelist / assim_model_nml / </em> &#38;
+    write_binary_restart_files,
+    netCDF_large_file_support
 </pre></div>
 
 <H3 class=indent1>Discussion</H3>
@@ -1253,12 +1253,24 @@
 
 <TABLE border=0 cellpadding=3 width=100%>
 <TR><TH align=left>Contents    </TH>
-    <TH align=left>Type        </TH>
+    <TH align=left>&nbsp;&nbsp;&nbsp;Type</TH>
     <TH align=left>Description </TH></TR>
-<TR><!--contents--><TD valign=top>write_binary_restart_files</TD>
-    <!--  type  --><TD>logical                         </TD>
+<TR><!--contents--><TD valign=top><em class="code">write_binary_restart_files</em></TD>
+    <!--  type  --><TD valign=top>&nbsp;&nbsp;&nbsp;logical&nbsp;&nbsp;&nbsp;</TD>
     <!--descript--><TD> Are output state restart files ascii (false) or 
-                        unformatted (true)? Default is true.
+                        unformatted (true)? Default is .true.</TD></TR>
+<TR><!--contents--><TD valign=top><em class="code">netCDF_large_file_support</em></TD>
+    <!--  type  --><TD valign=top>&nbsp;&nbsp;&nbsp;logical</TD>
+    <!--descript--><TD> Use the netCDF LFS format that enables individual records
+        (i.e. all the information that has the same 'unlimited' record value) 
+        to exceed 2GB?  The only downside to using this flag is compatibility 
+        with some netCDF software. Some (but not all) software is not built 
+        with 'LFS' support.  Note it is, and has been, possible to create netCDF 
+        <strong>files</strong> larger than 2GB with a value of 
+        <em>.false</em> - which is compatible with the historical netCDF format. 
+        It is only necessary to use a value of <em>.true.</em> if the state vector 
+        is very large and you are outputting a large number of ensembles. 
+        Default is .false.</TD></TR>
 </TABLE>
 
 <!--==================================================================-->
@@ -1326,7 +1338,7 @@
 </TR>
 <TR><!-- routine --><TD VALIGN=top>aoutput_diagnostics</TD>
     <!-- message --><TD VALIGN=top>model time (d,s) (#,#) is index # in ncFileID # </TD>
-    <!-- comment --><TD VALIGN=top>Time index for file listed is < 0 </TD>
+    <!-- comment --><TD VALIGN=top>Time index for file listed is #&60; 0 </TD>
 </TR>
 <TR><!-- routine --><TD VALIGN=top>ainput_diagnostics</TD>
     <!-- message --><TD VALIGN=top>expected "copy", got _____'</TD>
@@ -1375,7 +1387,7 @@
     <!-- comment --><TD VALIGN=top>Returned from one of the NetCDF calls in this subroutine.
       Consult the NetCDF manual. </TD>
 </TR>
-</TR> -->
+</TR>
 </TABLE>
 </div>
 

Modified: DART/trunk/assim_model/assim_model_mod.nml
===================================================================
--- DART/trunk/assim_model/assim_model_mod.nml	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/assim_model/assim_model_mod.nml	2009-10-12 22:17:04 UTC (rev 4103)
@@ -1,3 +1,5 @@
 &assim_model_nml
-   write_binary_restart_files = .true.  /
+   write_binary_restart_files = .true.,
+   netCDF_large_file_support  = .false.
+  /
 

Modified: DART/trunk/models/9var/work/input.nml
===================================================================
--- DART/trunk/models/9var/work/input.nml	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/models/9var/work/input.nml	2009-10-12 22:17:04 UTC (rev 4103)
@@ -95,7 +95,9 @@
    assimilate_these_obs_types = 'RAW_STATE_VARIABLE'  /
 
 &assim_model_nml
-   write_binary_restart_files = .false.  /
+   write_binary_restart_files = .false.,
+   netCDF_large_file_support  = .false.
+  /
 
 &model_nml
    g                 = 8.0,

Modified: DART/trunk/models/MITgcm_annulus/work/input.nml
===================================================================
--- DART/trunk/models/MITgcm_annulus/work/input.nml	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/models/MITgcm_annulus/work/input.nml	2009-10-12 22:17:04 UTC (rev 4103)
@@ -92,7 +92,9 @@
    evaluate_these_obs_types   = 'RADIOSONDE_SURFACE_PRESSURE'  /
 
 &assim_model_nml
-   write_binary_restart_files = .true.  /
+   write_binary_restart_files = .true.,
+   netCDF_large_file_support  = .false.
+  /
 
 &model_nml
    model_size = 539400,

Modified: DART/trunk/models/MITgcm_ocean/work/input.nml
===================================================================
--- DART/trunk/models/MITgcm_ocean/work/input.nml	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/models/MITgcm_ocean/work/input.nml	2009-10-12 22:17:04 UTC (rev 4103)
@@ -133,7 +133,9 @@
    input_files              = '../../../obs_def/obs_def_ocean_mod.f90'  /
 
 &assim_model_nml
-   write_binary_restart_files = .true.  /
+   write_binary_restart_files = .true.,
+   netCDF_large_file_support  = .false.
+  /
 
 # model specific namelist info
 

Modified: DART/trunk/models/PBL_1d/work/input.nml
===================================================================
--- DART/trunk/models/PBL_1d/work/input.nml	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/models/PBL_1d/work/input.nml	2009-10-12 22:17:04 UTC (rev 4103)
@@ -103,7 +103,9 @@
                                 'METAR_SURFACE_PRESSURE'  /
 
 &assim_model_nml
-   write_binary_restart_files = .false.  /
+   write_binary_restart_files = .false.,
+   netCDF_large_file_support  = .false.
+  /
 
 &model_nml
    num_est_params   = 0,

Modified: DART/trunk/models/am2/work/input.nml
===================================================================
--- DART/trunk/models/am2/work/input.nml	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/models/am2/work/input.nml	2009-10-12 22:17:04 UTC (rev 4103)
@@ -90,7 +90,9 @@
    write_binary_obs_sequence = .false.  /
 
 &assim_model_nml
-   write_binary_restart_files = .true. /
+   write_binary_restart_files = .true.,
+   netCDF_large_file_support  = .false.
+  /
 
 &model_nml
    model_config_file  = 'fv_rst.res.nc', 

Modified: DART/trunk/models/bgrid_solo/work/input.nml
===================================================================
--- DART/trunk/models/bgrid_solo/work/input.nml	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/models/bgrid_solo/work/input.nml	2009-10-12 22:17:04 UTC (rev 4103)
@@ -105,7 +105,9 @@
    input_files              = '../../../obs_def/obs_def_reanalysis_bufr_mod.f90'  /
 
 &assim_model_nml
-   write_binary_restart_files = .false.  /
+   write_binary_restart_files = .false.,
+   netCDF_large_file_support  = .false. 
+  /
 
 # Group of namelists required for bgrid model
 

Modified: DART/trunk/models/cam/work/input.nml
===================================================================
--- DART/trunk/models/cam/work/input.nml	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/models/cam/work/input.nml	2009-10-12 22:17:04 UTC (rev 4103)
@@ -74,7 +74,9 @@
    write_binary_obs_sequence = .false.  /
 
 &assim_model_nml
-   write_binary_restart_files = .true. /
+   write_binary_restart_files = .true.,
+   netCDF_large_file_support  = .false.
+  /
 
 &model_nml
    output_state_vector      = .false.,

Modified: DART/trunk/models/forced_lorenz_96/work/input.nml
===================================================================
--- DART/trunk/models/forced_lorenz_96/work/input.nml	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/models/forced_lorenz_96/work/input.nml	2009-10-12 22:17:04 UTC (rev 4103)
@@ -95,7 +95,9 @@
    assimilate_these_obs_types = 'RAW_STATE_VARIABLE'  /
 
 &assim_model_nml
-   write_binary_restart_files = .false.  /
+   write_binary_restart_files = .false.,
+   netCDF_large_file_support  = .false.
+  /
 
 &model_nml
    num_state_vars    = 40,

Modified: DART/trunk/models/ikeda/work/input.nml
===================================================================
--- DART/trunk/models/ikeda/work/input.nml	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/models/ikeda/work/input.nml	2009-10-12 22:17:04 UTC (rev 4103)
@@ -95,7 +95,9 @@
    assimilate_these_obs_types = 'RAW_STATE_VARIABLE'  /
 
 &assim_model_nml
-   write_binary_restart_files = .false.  /
+   write_binary_restart_files = .false.,
+   netCDF_large_file_support  = .false.
+  /
 
 &model_nml
    a  = 0.40,

Modified: DART/trunk/models/lorenz_04/work/input.nml
===================================================================
--- DART/trunk/models/lorenz_04/work/input.nml	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/models/lorenz_04/work/input.nml	2009-10-12 22:17:04 UTC (rev 4103)
@@ -95,7 +95,9 @@
    assimilate_these_obs_types = 'RAW_STATE_VARIABLE'  /
 
 &assim_model_nml
-   write_binary_restart_files = .false.  /
+   write_binary_restart_files = .false.,
+   netCDF_large_file_support  = .false.
+  /
 
 &model_nml
    model_size        = 960,

Modified: DART/trunk/models/lorenz_63/work/input.nml
===================================================================
--- DART/trunk/models/lorenz_63/work/input.nml	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/models/lorenz_63/work/input.nml	2009-10-12 22:17:04 UTC (rev 4103)
@@ -95,7 +95,9 @@
    assimilate_these_obs_types = 'RAW_STATE_VARIABLE'  /
 
 &assim_model_nml
-   write_binary_restart_files = .false.  /
+   write_binary_restart_files = .false.,
+   netCDF_large_file_support  = .false.
+  /
 
 &model_nml
    sigma  = 10.0, 

Modified: DART/trunk/models/lorenz_84/work/input.nml
===================================================================
--- DART/trunk/models/lorenz_84/work/input.nml	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/models/lorenz_84/work/input.nml	2009-10-12 22:17:04 UTC (rev 4103)
@@ -95,7 +95,9 @@
    assimilate_these_obs_types = 'RAW_STATE_VARIABLE'  /
 
 &assim_model_nml
-   write_binary_restart_files = .false. /
+   write_binary_restart_files = .false.,
+   netCDF_large_file_support  = .false.
+  /
 
 &model_nml
    a      = 0.25,

Modified: DART/trunk/models/lorenz_96/work/input.nml
===================================================================
--- DART/trunk/models/lorenz_96/work/input.nml	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/models/lorenz_96/work/input.nml	2009-10-12 22:17:04 UTC (rev 4103)
@@ -95,7 +95,9 @@
    assimilate_these_obs_types = 'RAW_STATE_VARIABLE'  /
 
 &assim_model_nml
-   write_binary_restart_files = .false.  /
+   write_binary_restart_files = .false.,
+   netCDF_large_file_support  = .false.
+  /
 
 &model_nml
    model_size        = 40,

Modified: DART/trunk/models/lorenz_96_2scale/work/input.nml
===================================================================
--- DART/trunk/models/lorenz_96_2scale/work/input.nml	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/models/lorenz_96_2scale/work/input.nml	2009-10-12 22:17:04 UTC (rev 4103)
@@ -95,7 +95,9 @@
    assimilate_these_obs_types = 'RAW_STATE_VARIABLE'  /
 
 &assim_model_nml
-   write_binary_restart_files = .false.  /
+   write_binary_restart_files = .false.,
+   netCDF_large_file_support  = .false.
+  /
 
 &model_nml
    model_size_x        = 36,

Modified: DART/trunk/models/null_model/work/input.nml
===================================================================
--- DART/trunk/models/null_model/work/input.nml	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/models/null_model/work/input.nml	2009-10-12 22:17:04 UTC (rev 4103)
@@ -95,7 +95,9 @@
    assimilate_these_obs_types = 'RAW_STATE_VARIABLE'  /
 
 &assim_model_nml
-   write_binary_restart_files = .false.  /
+   write_binary_restart_files = .false.,
+   netCDF_large_file_support  = .false.
+  /
 
 &model_nml
    model_size        = 2,

Modified: DART/trunk/models/pe2lyr/work/input.nml
===================================================================
--- DART/trunk/models/pe2lyr/work/input.nml	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/models/pe2lyr/work/input.nml	2009-10-12 22:17:04 UTC (rev 4103)
@@ -98,7 +98,9 @@
    evaluate_these_obs_types   = 'GEOPOTENTIAL_HEIGHT'  /
 
 &assim_model_nml
-   write_binary_restart_files = .true.  /
+   write_binary_restart_files = .true.,
+   netCDF_large_file_support  = .false.
+  /
 
 &location_nml
    horiz_dist_only             = .true.,

Modified: DART/trunk/models/rose/work/input.nml
===================================================================
--- DART/trunk/models/rose/work/input.nml	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/models/rose/work/input.nml	2009-10-12 22:17:04 UTC (rev 4103)
@@ -104,7 +104,9 @@
    evaluate_these_obs_types = 'RADIOSONDE_SURFACE_PRESSURE' /
 
 &assim_model_nml
-   write_binary_restart_files = .true.  /
+   write_binary_restart_files = .true.,
+   netCDF_large_file_support  = .false.
+  /
 
 &location_nml
    horiz_dist_only             = .true.,

Modified: DART/trunk/models/simple_advection/work/input.nml
===================================================================
--- DART/trunk/models/simple_advection/work/input.nml	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/models/simple_advection/work/input.nml	2009-10-12 22:17:04 UTC (rev 4103)
@@ -97,9 +97,10 @@
    evaluate_these_obs_types   = 'TRACER_SOURCE' /
 
 &assim_model_nml
-   write_binary_restart_files = .false. /
+   write_binary_restart_files = .false.,
+   netCDF_large_file_support  = .false.
+  /
 
-
 &model_nml
    num_grid_points        = 10,
    grid_spacing_meters    = 100000,

Modified: DART/trunk/models/template/work/input.nml
===================================================================
--- DART/trunk/models/template/work/input.nml	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/models/template/work/input.nml	2009-10-12 22:17:04 UTC (rev 4103)
@@ -95,7 +95,9 @@
    assimilate_these_obs_types = 'RAW_STATE_VARIABLE'   /
 
 &assim_model_nml
-   write_binary_restart_files = .false. /
+   write_binary_restart_files = .false.,
+   netCDF_large_file_support  = .false.
+  /
 
 &model_nml
    output_state_vector = .true., 

Modified: DART/trunk/models/wrf/regression/CONUS-V2/input.nml
===================================================================
--- DART/trunk/models/wrf/regression/CONUS-V2/input.nml	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/models/wrf/regression/CONUS-V2/input.nml	2009-10-12 22:17:04 UTC (rev 4103)
@@ -65,7 +65,9 @@
    select_localization = 1  /
 
 &assim_model_nml
-   write_binary_restart_files = .true.  /
+   write_binary_restart_files = .true.,
+   netCDF_large_file_support  = .false.
+  /
 
 &reg_factor_nml
    select_regression = 1,

Modified: DART/trunk/models/wrf/regression/Radar/input.nml
===================================================================
--- DART/trunk/models/wrf/regression/Radar/input.nml	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/models/wrf/regression/Radar/input.nml	2009-10-12 22:17:04 UTC (rev 4103)
@@ -113,7 +113,9 @@
 
 
 &assim_model_nml
-   write_binary_restart_files = .true.  /
+   write_binary_restart_files = .true.,
+   netCDF_large_file_support  = .false.
+  /
 
 # Notes for model_nml:
 # (1) vert_localization_coord must be one of:

Modified: DART/trunk/models/wrf/work/input.nml
===================================================================
--- DART/trunk/models/wrf/work/input.nml	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/models/wrf/work/input.nml	2009-10-12 22:17:04 UTC (rev 4103)
@@ -128,7 +128,9 @@
    /
 
 &assim_model_nml
-   write_binary_restart_files = .true.  /
+   write_binary_restart_files = .true.,
+   netCDF_large_file_support  = .false.
+  /
 
 # Notes for model_nml:
 # (1) vert_localization_coord must be one of:

Modified: DART/trunk/observations/radar/work/input.nml
===================================================================
--- DART/trunk/observations/radar/work/input.nml	2009-10-12 20:39:09 UTC (rev 4102)
+++ DART/trunk/observations/radar/work/input.nml	2009-10-12 22:17:04 UTC (rev 4103)
@@ -37,7 +37,9 @@
    lowest_reflectivity_fwd_op =     0.0 /
 
 &assim_model_nml
-   write_binary_restart_files = .true.  /
+   write_binary_restart_files = .true.,
+   netCDF_large_file_support  = .false.
+  /
 
 &model_nml
    /


More information about the Dart-dev mailing list