Changeset 3235 for palm/trunk/SOURCE/netcdf_interface_mod.f90
- Timestamp:
- Sep 7, 2018 2:06:15 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/netcdf_interface_mod.f90
r3198 r3235 25 25 ! ----------------- 26 26 ! $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 27 31 ! Redefined MAS limited time dimension to fit usage of multi_agent_system_end 28 32 ! … … 292 296 USE NETCDF 293 297 #endif 298 USE mas_global_attributes, & 299 ONLY: dim_size_agtnum 294 300 295 301 PRIVATE 296 302 297 303 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 ', & 300 306 'PM10 ', 'PM25 ', 'ag_therm_comf ', & 301 307 'ag_uv ', 'not_used ', 'not_used ', & … … 303 309 304 310 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 ', & 307 313 'tbd ', 'tbd ', 'tbd ', & 308 314 'tbd ', 'not_used ', 'not_used ', & … … 1980 1986 1981 1987 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', '', & 1983 1989 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 ) 1988 1993 1989 1994 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, & 1992 1997 336, 000 ) 1993 1998 ! 1994 1999 !-- Define variable which contains the real number of agents in use 1995 2000 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, & 1998 2003 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 ) 1999 2010 ! 2000 2011 !-- Define the variables 2001 DO i = 1, 62012 DO i = 2, 6 2002 2013 CALL netcdf_create_var( id_set_agt, (/ id_dim_agtnum, & 2003 2014 id_dim_time_agt /), agt_var_names(i), & 2004 NF90_ DOUBLE, id_var_agt(i),&2015 NF90_REAL4, id_var_agt(i), & 2005 2016 TRIM( agt_var_units(i) ), & 2006 2017 TRIM( agt_var_names(i) ), 339, 340, 341 )
Note: See TracChangeset
for help on using the changeset viewer.