Index: palm/trunk/SOURCE/netcdf_interface_mod.f90
===================================================================
--- palm/trunk/SOURCE/netcdf_interface_mod.f90	(revision 3198)
+++ palm/trunk/SOURCE/netcdf_interface_mod.f90	(revision 3235)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! Changed MAS output dimension id_dim_agtnum to be of defined size and no longer
+! unlimited. Also changed some MAS output variables to be of type float
+! 
+! 3198 2018-08-15 09:23:10Z sward
 ! Redefined MAS limited time dimension to fit usage of multi_agent_system_end
 ! 
@@ -292,10 +296,12 @@
     USE NETCDF
 #endif
+    USE mas_global_attributes,                                                 &
+        ONLY:  dim_size_agtnum
 
     PRIVATE
 
     CHARACTER (LEN=16), DIMENSION(13) ::  agt_var_names =                      &
-          (/ 'ag_x            ', 'ag_y            ', 'ag_wind         ',       &
-             'ag_temp         ', 'ag_group        ', 'ag_id           ',       &
+          (/ 'ag_id           ', 'ag_x            ', 'ag_y            ',       &
+             'ag_wind         ', 'ag_temp         ', 'ag_group        ',       &
              'PM10            ', 'PM25            ', 'ag_therm_comf   ',       &
              'ag_uv           ', 'not_used        ', 'not_used        ',       &
@@ -303,6 +309,6 @@
 
     CHARACTER (LEN=16), DIMENSION(13) ::  agt_var_units = &
-          (/ 'meters          ', 'meters          ', 'm/s             ',       &
-             'K               ', 'dim_less        ', 'dim_less        ',       &
+          (/ 'dim_less        ', 'meters          ', 'meters          ',       &
+             'm/s             ', 'K               ', 'dim_less        ',       &
              'tbd             ', 'tbd             ', 'tbd             ',       &
              'tbd             ', 'not_used        ', 'not_used        ',       &
@@ -1980,27 +1986,32 @@
 
           CALL netcdf_create_var( id_set_agt, (/ id_dim_time_agt /), 'time',   &
-                                  NF90_DOUBLE, id_var_time_agt, 'seconds', '', &
+                                  NF90_REAL4, id_var_time_agt, 'seconds', '',  &
                                   332, 333, 000 )
-!
-!--       netCDF4 allows more than one unlimited dimension
-          CALL netcdf_create_dim( id_set_agt, 'agent_number',            &
-                                  NF90_UNLIMITED, id_dim_agtnum, 334 )
+
+          CALL netcdf_create_dim( id_set_agt, 'agent_number',                  &
+                                  dim_size_agtnum, id_dim_agtnum, 334 )
 
           CALL netcdf_create_var( id_set_agt, (/ id_dim_agtnum /),             &
-                                  'agent_number', NF90_DOUBLE,              &
-                                  id_var_agtnum, 'agent number', '', 335,   &
+                                  'agent_number', NF90_REAL4,                  &
+                                  id_var_agtnum, 'agent number', '', 335,      &
                                   336, 000 )
 !
 !--       Define variable which contains the real number of agents in use
           CALL netcdf_create_var( id_set_agt, (/ id_dim_time_agt /),           &
-                                  'real_num_of_agt', NF90_DOUBLE,              &
-                                  id_var_rnoa_agt, 'agent number', '', 337, &
+                                  'real_num_of_agt', NF90_REAL4,               &
+                                  id_var_rnoa_agt, 'agent number', '', 337,    &
                                   338, 000 )
+          i = 1
+          CALL netcdf_create_var( id_set_agt, (/ id_dim_agtnum,                &
+                                  id_dim_time_agt /), agt_var_names(i),        &
+                                  NF90_DOUBLE, id_var_agt(i),                  &
+                                  TRIM( agt_var_units(i) ),                    &
+                                  TRIM( agt_var_names(i) ), 339, 340, 341 )
 !
 !--       Define the variables
-          DO  i = 1, 6
+          DO  i = 2, 6
              CALL netcdf_create_var( id_set_agt, (/ id_dim_agtnum,             &
                                      id_dim_time_agt /), agt_var_names(i),     &
-                                     NF90_DOUBLE, id_var_agt(i),           &
+                                     NF90_REAL4, id_var_agt(i),                &
                                      TRIM( agt_var_units(i) ),                 &
                                      TRIM( agt_var_names(i) ), 339, 340, 341 )
