Changeset 359 for palm/trunk


Ignore:
Timestamp:
Aug 19, 2009 4:56:44 PM (15 years ago)
Author:
letzel
Message:
  • Bugfix for extended NetCDF files: In order to avoid 'data mode' errors if updated attributes are larger than their original size, NF90_PUT_ATT is called in 'define mode' enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible performance loss; an alternative strategy would be to ensure equal attribute size in a job chain. (netcdf)
  • Changed: For extended NetCDF files, the updated title attribute includes an update of time_average_text where appropriate. (netcdf)
  • Bugfix: correction of initial volume flow for non-flat topography (init_3d_model)
  • Bugfix: zero initialization of arrays within buildings for 'cyclic_fill' (init_3d_model)
  • New: MPI debug option (mrun)
  • Documentation updates:
    • topography file format (chapter 3.5.4)
    • NC identifier range expanded to 444 (appendix_a)
Location:
palm/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/DOC/app/appendix_a.html

    r354 r359  
    11<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    2 <html>
    3 <head>
     2<html><head>
    43
    54   
     
    76
    87   
    9   <title>PALM Appendix A</title>
    10 </head>
    11 
    12 
    13   <body>
     8  <title>PALM Appendix A</title></head>
     9
     10<body>
    1411
    1512   
     
    36653662
    36663663         <td>
    3667       <p>**** contains numbers in the range from 1-428</p>
     3664      <p>**** contains numbers in the range from 1-444</p>
    36683665      </td>
    36693666
     
    36813678
    36823679 
    3683 </body>
    3684 </html>
     3680</body></html>
  • palm/trunk/DOC/app/chapter_3.4.html

    r270 r359  
    33493349the&nbsp;subroutine <span style="font-family: Cumberland AMT;">init_grid</span>&nbsp;reads
    33503350the topography height information (in m above ground) for each grid point in
    3351 a free floating point format. The data on file are laid out naturally,
     3351a free floating point format. <font color="#000000">The ascii file format is <a href="http://en.wikipedia.org/wiki/ESRI_grid#ASCII" target="_blank">ESRI grid</a> - also known as <a href="http://en.wikipedia.org/wiki/ESRI_grid#ASCII" target="_blank">ARC/INFO ASCII GRID</a> <span style="font-style: italic;">- without the header</span>. </font>The data on file are laid out naturally,
    33523352i.e. in W-E orientation horizontally and in S-N orientation vertically,
    33533353they must thus be organized as follows:<br>
     
    33723372
    33733373     
    3374       </ul>
    3375 
    3376 
    3377 Layout sketch:<br>
     3374      </ul>Layout sketch:<br>
    33783375
    33793376
  • palm/trunk/SCRIPTS/mrun

    r352 r359  
    185185     # 08/07/09 - Siggi  - default value for email_notification is none,
    186186     #                     option -e added to subjob
     187     # 19/08/09 - Marcus - MPI debug option
    187188
    188189 
     
    28662867    PATH=$PATH:$TEMPDIR
    28672868
     2869       # MPI debug option (argument checking, slows down execution due to increased latency)
     2870    if [[ "$mpi_debug" = true ]]
     2871    then
     2872       export MPI_CHECK_ARGS=1
     2873       printf "\n  +++ MPI_CHECK_ARGS=$MPI_CHECK_ARGS"
     2874    fi
     2875
    28682876    if [[ "$cond1" = debug  ||  "$cond2" = debug ]]
    28692877    then
  • palm/trunk/SOURCE/CURRENT_MODIFICATIONS

    r355 r359  
    5151Changed:
    5252-------
     53For extended NetCDF files, the updated title attribute includes an update of
     54time_average_text where appropriate. (netcdf)
     55
    5356In case of restart runs without extension, initial profiles are not written
    5457to NetCDF-file anymore. (data_output_profiles, modules, read_var_list, write_var_list)
     
    110113Errors:
    111114------
     115Bugfix for extended NetCDF files: In order to avoid 'data mode' errors if
     116updated attributes are larger than their original size, NF90_PUT_ATT is called
     117in 'define mode' enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a
     118possible performance loss; an alternative strategy would be to ensure equal
     119attribute size in a job chain. (netcdf)
     120
     121Bugfix: correction of initial volume flow for non-flat topography (init_3d_model)
     122Bugfix: zero initialization of arrays within buildings for 'cyclic_fill' (init_3d_model)
     123
    112124Bugfix: to_be_resorted => s_av for time-averaged scalars (data_output_2d, data_output_3d)
    113125
  • palm/trunk/SOURCE/init_3d_model.f90

    r333 r359  
    77! Current revisions:
    88! -----------------
     9! bugfix: correction of initial volume flow for non-flat topography
     10! bugfix: zero initialization of arrays within buildings for 'cyclic_fill'
    911! bugfix: avoid that ngp_2dh_s_inner becomes zero
    1012! initializing_actions='read_data_for_recycling' renamed to 'cyclic_fill', now
     
    485487                   DO  j = nys, nyn
    486488                      DO  k = nzb + 1, nzb_u_inner(j,nx)
    487                          u_nzb_p1_for_vfc(j) = u1d(k) * dzu(k)
     489                         u_nzb_p1_for_vfc(j) = u_nzb_p1_for_vfc(j) + &
     490                                               u1d(k) * dzu(k)
    488491                      ENDDO
    489492                   ENDDO
     
    492495                   DO  i = nxl, nxr
    493496                      DO  k = nzb + 1, nzb_v_inner(ny,i)
    494                          v_nzb_p1_for_vfc(i) = v1d(k) * dzu(k)
     497                         v_nzb_p1_for_vfc(i) = v_nzb_p1_for_vfc(i) + &
     498                                               v1d(k) * dzu(k)
    495499                      ENDDO
    496500                   ENDDO
     
    558562                DO  j = nys, nyn
    559563                   DO  k = nzb + 1, nzb_u_inner(j,nx) + 1
    560                       u_nzb_p1_for_vfc(j) = u_init(k) * dzu(k)
     564                      u_nzb_p1_for_vfc(j) = u_nzb_p1_for_vfc(j) + &
     565                                            u_init(k) * dzu(k)
    561566                   ENDDO
    562567                ENDDO
     
    565570                DO  i = nxl, nxr
    566571                   DO  k = nzb + 1, nzb_v_inner(ny,i) + 1
    567                       v_nzb_p1_for_vfc(i) = v_init(k) * dzu(k)
     572                      v_nzb_p1_for_vfc(i) = v_nzb_p1_for_vfc(i) + &
     573                                            v_init(k) * dzu(k)
    568574                   ENDDO
    569575                ENDDO
     
    10281034
    10291035!
     1036!--    Inside buildings set velocities and TKE back to zero
     1037       IF ( TRIM( initializing_actions ) == 'cyclic_fill' .AND.  &
     1038            topography /= 'flat' )  THEN
     1039!
     1040!--       Correction of initial volume flow
     1041          IF ( conserve_volume_flow )  THEN
     1042             IF ( nxr == nx )  THEN
     1043                DO  j = nys, nyn
     1044                   DO  k = nzb + 1, nzb_u_inner(j,nx)
     1045                      u_nzb_p1_for_vfc(j) = u_nzb_p1_for_vfc(j) + &
     1046                                            u(k,j,nx) * dzu(k)
     1047                   ENDDO
     1048                ENDDO
     1049             ENDIF
     1050             IF ( nyn == ny )  THEN
     1051                DO  i = nxl, nxr
     1052                   DO  k = nzb + 1, nzb_v_inner(ny,i)
     1053                      v_nzb_p1_for_vfc(i) = v_nzb_p1_for_vfc(i) + &
     1054                                            v(k,ny,i) * dzu(k)
     1055                   ENDDO
     1056                ENDDO
     1057             ENDIF
     1058          ENDIF
     1059
     1060!
     1061!--       Inside buildings set velocities and TKE back to zero.
     1062!--       Other scalars (pt, q, s, km, kh, p, sa, ...) are ignored at present,
     1063!--       maybe revise later.
     1064          IF ( timestep_scheme(1:5) == 'runge' )  THEN
     1065             DO  i = nxl-1, nxr+1
     1066                DO  j = nys-1, nyn+1
     1067                   u  (nzb:nzb_u_inner(j,i),j,i) = 0.0
     1068                   v  (nzb:nzb_v_inner(j,i),j,i) = 0.0
     1069                   w  (nzb:nzb_w_inner(j,i),j,i) = 0.0
     1070                   e  (nzb:nzb_w_inner(j,i),j,i) = 0.0
     1071                   u_m(nzb:nzb_u_inner(j,i),j,i) = 0.0
     1072                   v_m(nzb:nzb_v_inner(j,i),j,i) = 0.0
     1073                   w_m(nzb:nzb_w_inner(j,i),j,i) = 0.0
     1074                   e_m(nzb:nzb_w_inner(j,i),j,i) = 0.0
     1075                   tu_m(nzb:nzb_u_inner(j,i),j,i) = 0.0
     1076                   tv_m(nzb:nzb_v_inner(j,i),j,i) = 0.0
     1077                   tw_m(nzb:nzb_w_inner(j,i),j,i) = 0.0
     1078                   te_m(nzb:nzb_w_inner(j,i),j,i) = 0.0
     1079                   tpt_m(nzb:nzb_w_inner(j,i),j,i) = 0.0
     1080                ENDDO
     1081             ENDDO
     1082          ELSE
     1083             DO  i = nxl-1, nxr+1
     1084                DO  j = nys-1, nyn+1
     1085                   u  (nzb:nzb_u_inner(j,i),j,i) = 0.0
     1086                   v  (nzb:nzb_v_inner(j,i),j,i) = 0.0
     1087                   w  (nzb:nzb_w_inner(j,i),j,i) = 0.0
     1088                   e  (nzb:nzb_w_inner(j,i),j,i) = 0.0
     1089                   u_m(nzb:nzb_u_inner(j,i),j,i) = 0.0
     1090                   v_m(nzb:nzb_v_inner(j,i),j,i) = 0.0
     1091                   w_m(nzb:nzb_w_inner(j,i),j,i) = 0.0
     1092                   e_m(nzb:nzb_w_inner(j,i),j,i) = 0.0
     1093                   u_p(nzb:nzb_u_inner(j,i),j,i) = 0.0
     1094                   v_p(nzb:nzb_v_inner(j,i),j,i) = 0.0
     1095                   w_p(nzb:nzb_w_inner(j,i),j,i) = 0.0
     1096                   e_p(nzb:nzb_w_inner(j,i),j,i) = 0.0
     1097                ENDDO
     1098             ENDDO
     1099          ENDIF
     1100
     1101       ENDIF
     1102
     1103!
    10301104!--    Calculate the initial volume flow at the right and north boundary
    10311105       IF ( conserve_volume_flow  .AND.  &
     
    10431117                ENDDO
    10441118!
    1045 !--             Correction if velocity at nzb+1 has been set zero further above
    1046 !--             Note: at present, u_nzb_p1_for_vfc is zero (maybe revise later)
     1119!--             Correction if velocity inside buildings has been set to zero
     1120!--             further above
    10471121                volume_flow_initial_l(1) = volume_flow_initial_l(1) + &
    10481122                                           u_nzb_p1_for_vfc(j)
     
    10581132                ENDDO
    10591133!
    1060 !--             Correction if velocity at nzb+1 has been set zero further above
    1061 !--             Note: at present, v_nzb_p1_for_vfc is zero (maybe revise later)
     1134!--             Correction if velocity inside buildings has been set to zero
     1135!--             further above
    10621136                volume_flow_initial_l(2) = volume_flow_initial_l(2) + &
    10631137                                           v_nzb_p1_for_vfc(i)
  • palm/trunk/SOURCE/netcdf.f90

    r292 r359  
    77! Current revisions:
    88! ------------------
     9! For extended NetCDF files, the updated title attribute includes an update of
     10! time_average_text where appropriate.
     11! Bugfix for extended NetCDF files: In order to avoid 'data mode' errors if
     12! updated attributes are larger than their original size, NF90_PUT_ATT is called
     13! in 'define mode' enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a
     14! possible performance loss; an alternative strategy would be to ensure equal
     15! attribute size in a job chain.
    916! NetCDF unit attribute in timeseries output in case of statistic
    1017! regions added.
     
    650657
    651658!
    652 !--       Change the title attribute on file
     659!--       Update the title attribute on file
     660!--       In order to avoid 'data mode' errors if updated attributes are larger
     661!--       than their original size, NF90_PUT_ATT is called in 'define mode'
     662!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible
     663!--       performance loss due to data copying; an alternative strategy would be
     664!--       to ensure equal attribute size. Maybe revise later.
     665          IF ( av == 0 )  THEN
     666             time_average_text = ' '
     667          ELSE
     668             WRITE (time_average_text, '('', '',F7.1,'' s average'')') &
     669                                                            averaging_interval
     670          ENDIF
     671          nc_stat = NF90_REDEF( id_set_3d(av) )
     672          CALL handle_netcdf_error( 'netcdf', 429 )
    653673          nc_stat = NF90_PUT_ATT( id_set_3d(av), NF90_GLOBAL, 'title', &
    654                                   TRIM( run_description_header ) )
     674                                  TRIM( run_description_header ) //    &
     675                                  TRIM( time_average_text ) )
    655676          CALL handle_netcdf_error( 'netcdf', 96 )
     677          nc_stat = NF90_ENDDEF( id_set_3d(av) )
     678          CALL handle_netcdf_error( 'netcdf', 430 )
    656679          message_string = 'NetCDF file for volume data ' //             &
    657680                           TRIM( var ) // ' from previous run found.' // &
     
    12761299
    12771300!
    1278 !--       Change the title attribute on file
     1301!--       Update the title attribute on file
     1302!--       In order to avoid 'data mode' errors if updated attributes are larger
     1303!--       than their original size, NF90_PUT_ATT is called in 'define mode'
     1304!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible
     1305!--       performance loss due to data copying; an alternative strategy would be
     1306!--       to ensure equal attribute size in a job chain. Maybe revise later.
     1307          IF ( av == 0 )  THEN
     1308             time_average_text = ' '
     1309          ELSE
     1310             WRITE (time_average_text, '('', '',F7.1,'' s average'')') &
     1311                                                            averaging_interval
     1312          ENDIF
     1313          nc_stat = NF90_REDEF( id_set_xy(av) )
     1314          CALL handle_netcdf_error( 'netcdf', 431 )
    12791315          nc_stat = NF90_PUT_ATT( id_set_xy(av), NF90_GLOBAL, 'title', &
    1280                                   TRIM( run_description_header ) )
     1316                                  TRIM( run_description_header ) //    &
     1317                                  TRIM( time_average_text ) )
    12811318          CALL handle_netcdf_error( 'netcdf', 139 )
     1319          nc_stat = NF90_ENDDEF( id_set_xy(av) )
     1320          CALL handle_netcdf_error( 'netcdf', 432 )
    12821321          message_string = 'NetCDF file for cross-sections ' //           &
    12831322                            TRIM( var ) // ' from previous run found.' // &
     
    17981837
    17991838!
    1800 !--       Change the title attribute on file
     1839!--       Update the title attribute on file
     1840!--       In order to avoid 'data mode' errors if updated attributes are larger
     1841!--       than their original size, NF90_PUT_ATT is called in 'define mode'
     1842!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible
     1843!--       performance loss due to data copying; an alternative strategy would be
     1844!--       to ensure equal attribute size in a job chain. Maybe revise later.
     1845          IF ( av == 0 )  THEN
     1846             time_average_text = ' '
     1847          ELSE
     1848             WRITE (time_average_text, '('', '',F7.1,'' s average'')') &
     1849                                                            averaging_interval
     1850          ENDIF
     1851          nc_stat = NF90_REDEF( id_set_xz(av) )
     1852          CALL handle_netcdf_error( 'netcdf', 433 )
    18011853          nc_stat = NF90_PUT_ATT( id_set_xz(av), NF90_GLOBAL, 'title', &
    1802                                   TRIM( run_description_header ) )
     1854                                  TRIM( run_description_header ) //    &
     1855                                  TRIM( time_average_text ) )
    18031856          CALL handle_netcdf_error( 'netcdf', 178 )
     1857          nc_stat = NF90_ENDDEF( id_set_xz(av) )
     1858          CALL handle_netcdf_error( 'netcdf', 434 )
    18041859          message_string = 'NetCDF file for cross-sections ' //           &
    18051860                            TRIM( var ) // ' from previous run found.' // &
     
    23182373
    23192374!
    2320 !--       Change the title attribute on file
     2375!--       Update the title attribute on file
     2376!--       In order to avoid 'data mode' errors if updated attributes are larger
     2377!--       than their original size, NF90_PUT_ATT is called in 'define mode'
     2378!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible
     2379!--       performance loss due to data copying; an alternative strategy would be
     2380!--       to ensure equal attribute size in a job chain. Maybe revise later.
     2381          IF ( av == 0 )  THEN
     2382             time_average_text = ' '
     2383          ELSE
     2384             WRITE (time_average_text, '('', '',F7.1,'' s average'')') &
     2385                                                            averaging_interval
     2386          ENDIF
     2387          nc_stat = NF90_REDEF( id_set_yz(av) )
     2388          CALL handle_netcdf_error( 'netcdf', 435 )
    23212389          nc_stat = NF90_PUT_ATT( id_set_yz(av), NF90_GLOBAL, 'title', &
    2322                                   TRIM( run_description_header ) )
     2390                                  TRIM( run_description_header ) //    &
     2391                                  TRIM( time_average_text ) )
    23232392          CALL handle_netcdf_error( 'netcdf', 217 )
     2393          nc_stat = NF90_ENDDEF( id_set_yz(av) )
     2394          CALL handle_netcdf_error( 'netcdf', 436 )
    23242395          message_string = 'NetCDF file for cross-sections ' //           &
    23252396                            TRIM( var ) // ' from previous run found.' // &
     
    26112682
    26122683!
    2613 !--       Change the title attribute on file
     2684!--       Update the title attribute on file
     2685!--       In order to avoid 'data mode' errors if updated attributes are larger
     2686!--       than their original size, NF90_PUT_ATT is called in 'define mode'
     2687!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible
     2688!--       performance loss due to data copying; an alternative strategy would be
     2689!--       to ensure equal attribute size in a job chain. Maybe revise later.
     2690          IF ( averaging_interval_pr == 0.0 )  THEN
     2691             time_average_text = ' '
     2692          ELSE
     2693             WRITE (time_average_text, '('', '',F7.1,'' s average'')') &
     2694                                                            averaging_interval_pr
     2695          ENDIF
     2696          nc_stat = NF90_REDEF( id_set_pr )
     2697          CALL handle_netcdf_error( 'netcdf', 437 )
    26142698          nc_stat = NF90_PUT_ATT( id_set_pr, NF90_GLOBAL, 'title', &
    2615                                   TRIM( run_description_header ) )
     2699                                  TRIM( run_description_header ) //    &
     2700                                  TRIM( time_average_text ) )
    26162701          CALL handle_netcdf_error( 'netcdf', 248 )
     2702          nc_stat = NF90_ENDDEF( id_set_pr )
     2703          CALL handle_netcdf_error( 'netcdf', 438 )
    26172704          message_string = 'NetCDF file for vertical profiles ' // &
    26182705                           'from previous run found.' //           &
     
    28172904
    28182905!
    2819 !--       Change the title attribute on file
     2906!--       Update the title attribute on file
     2907!--       In order to avoid 'data mode' errors if updated attributes are larger
     2908!--       than their original size, NF90_PUT_ATT is called in 'define mode'
     2909!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible
     2910!--       performance loss due to data copying; an alternative strategy would be
     2911!--       to ensure equal attribute size in a job chain. Maybe revise later.
     2912          nc_stat = NF90_REDEF( id_set_ts )
     2913          CALL handle_netcdf_error( 'netcdf', 439 )
    28202914          nc_stat = NF90_PUT_ATT( id_set_ts, NF90_GLOBAL, 'title', &
    28212915                                  TRIM( run_description_header ) )
    28222916          CALL handle_netcdf_error( 'netcdf', 267 )
     2917          nc_stat = NF90_ENDDEF( id_set_ts )
     2918          CALL handle_netcdf_error( 'netcdf', 440 )
    28232919          message_string = 'NetCDF file for time series ' // &
    28242920                           'from previous run found.' //     &
     
    32303326
    32313327!
    3232 !--       Change the title attribute on file
     3328!--       Update the title attribute on file
     3329!--       In order to avoid 'data mode' errors if updated attributes are larger
     3330!--       than their original size, NF90_PUT_ATT is called in 'define mode'
     3331!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible
     3332!--       performance loss due to data copying; an alternative strategy would be
     3333!--       to ensure equal attribute size in a job chain. Maybe revise later.
     3334          nc_stat = NF90_REDEF( id_set_sp )
     3335          CALL handle_netcdf_error( 'netcdf', 441 )
    32333336          IF ( averaging_interval_sp /= 0.0 )  THEN
    32343337             WRITE (time_average_text,'('', '',F7.1,'' s average'')') &
     
    32473350          ENDIF
    32483351          CALL handle_netcdf_error( 'netcdf', 309 )
     3352          nc_stat = NF90_ENDDEF( id_set_sp )
     3353          CALL handle_netcdf_error( 'netcdf', 442 )
    32493354          message_string = 'NetCDF file for spectra ' //     &
    32503355                           'from previous run found.' //     &
     
    35863691
    35873692!
    3588 !--       Change the title attribute on file
     3693!--       Update the title attribute on file
     3694!--       In order to avoid 'data mode' errors if updated attributes are larger
     3695!--       than their original size, NF90_PUT_ATT is called in 'define mode'
     3696!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible
     3697!--       performance loss due to data copying; an alternative strategy would be
     3698!--       to ensure equal attribute size in a job chain. Maybe revise later.
     3699          nc_stat = NF90_REDEF( id_set_pts )
     3700          CALL handle_netcdf_error( 'netcdf', 443 )
    35893701          nc_stat = NF90_PUT_ATT( id_set_pts, NF90_GLOBAL, 'title', &
    35903702                                  TRIM( run_description_header ) )
    35913703          CALL handle_netcdf_error( 'netcdf', 411 )
     3704          nc_stat = NF90_ENDDEF( id_set_pts )
     3705          CALL handle_netcdf_error( 'netcdf', 444 )
    35923706          message_string = 'NetCDF file for particle time series ' // &
    35933707                           'from previous run found.' //              &
Note: See TracChangeset for help on using the changeset viewer.