Ignore:
Timestamp:
Sep 7, 2018 2:06:15 PM (6 years ago)
Author:
sward
Message:

Bugfix in MAS output, added related messages, reworked MAS cpu logging

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/netcdf_interface_mod.f90

    r3198 r3235  
    2525! -----------------
    2626! $Id$
     27! Changed MAS output dimension id_dim_agtnum to be of defined size and no longer
     28! unlimited. Also changed some MAS output variables to be of type float
     29!
     30! 3198 2018-08-15 09:23:10Z sward
    2731! Redefined MAS limited time dimension to fit usage of multi_agent_system_end
    2832!
     
    292296    USE NETCDF
    293297#endif
     298    USE mas_global_attributes,                                                 &
     299        ONLY:  dim_size_agtnum
    294300
    295301    PRIVATE
    296302
    297303    CHARACTER (LEN=16), DIMENSION(13) ::  agt_var_names =                      &
    298           (/ 'ag_x            ', 'ag_y            ', 'ag_wind         ',       &
    299              'ag_temp         ', 'ag_group        ', 'ag_id           ',       &
     304          (/ 'ag_id           ', 'ag_x            ', 'ag_y            ',       &
     305             'ag_wind         ', 'ag_temp         ', 'ag_group        ',       &
    300306             'PM10            ', 'PM25            ', 'ag_therm_comf   ',       &
    301307             'ag_uv           ', 'not_used        ', 'not_used        ',       &
     
    303309
    304310    CHARACTER (LEN=16), DIMENSION(13) ::  agt_var_units = &
    305           (/ 'meters          ', 'meters          ', 'm/s             ',       &
    306              'K               ', 'dim_less        ', 'dim_less        ',       &
     311          (/ 'dim_less        ', 'meters          ', 'meters          ',       &
     312             'm/s             ', 'K               ', 'dim_less        ',       &
    307313             'tbd             ', 'tbd             ', 'tbd             ',       &
    308314             'tbd             ', 'not_used        ', 'not_used        ',       &
     
    19801986
    19811987          CALL netcdf_create_var( id_set_agt, (/ id_dim_time_agt /), 'time',   &
    1982                                   NF90_DOUBLE, id_var_time_agt, 'seconds', '', &
     1988                                  NF90_REAL4, id_var_time_agt, 'seconds', '', &
    19831989                                  332, 333, 000 )
    1984 !
    1985 !--       netCDF4 allows more than one unlimited dimension
    1986           CALL netcdf_create_dim( id_set_agt, 'agent_number',            &
    1987                                   NF90_UNLIMITED, id_dim_agtnum, 334 )
     1990
     1991          CALL netcdf_create_dim( id_set_agt, 'agent_number',                  &
     1992                                  dim_size_agtnum, id_dim_agtnum, 334 )
    19881993
    19891994          CALL netcdf_create_var( id_set_agt, (/ id_dim_agtnum /),             &
    1990                                   'agent_number', NF90_DOUBLE,              &
    1991                                   id_var_agtnum, 'agent number', '', 335,   &
     1995                                  'agent_number', NF90_REAL4,                  &
     1996                                  id_var_agtnum, 'agent number', '', 335,      &
    19921997                                  336, 000 )
    19931998!
    19941999!--       Define variable which contains the real number of agents in use
    19952000          CALL netcdf_create_var( id_set_agt, (/ id_dim_time_agt /),           &
    1996                                   'real_num_of_agt', NF90_DOUBLE,              &
    1997                                   id_var_rnoa_agt, 'agent number', '', 337, &
     2001                                  'real_num_of_agt', NF90_REAL4,               &
     2002                                  id_var_rnoa_agt, 'agent number', '', 337,    &
    19982003                                  338, 000 )
     2004          i = 1
     2005          CALL netcdf_create_var( id_set_agt, (/ id_dim_agtnum,                &
     2006                                  id_dim_time_agt /), agt_var_names(i),        &
     2007                                  NF90_DOUBLE, id_var_agt(i),                  &
     2008                                  TRIM( agt_var_units(i) ),                    &
     2009                                  TRIM( agt_var_names(i) ), 339, 340, 341 )
    19992010!
    20002011!--       Define the variables
    2001           DO  i = 1, 6
     2012          DO  i = 2, 6
    20022013             CALL netcdf_create_var( id_set_agt, (/ id_dim_agtnum,             &
    20032014                                     id_dim_time_agt /), agt_var_names(i),     &
    2004                                      NF90_DOUBLE, id_var_agt(i),           &
     2015                                     NF90_REAL4, id_var_agt(i),                &
    20052016                                     TRIM( agt_var_units(i) ),                 &
    20062017                                     TRIM( agt_var_names(i) ), 339, 340, 341 )
Note: See TracChangeset for help on using the changeset viewer.