Changeset 410


Ignore:
Timestamp:
Dec 4, 2009 5:05:40 PM (14 years ago)
Author:
letzel
Message:
  • reintegrate branch letzel/masked_output into trunk; new funtionality: masked data output (not yet documented)
Location:
palm/trunk
Files:
16 edited
3 copied

Legend:

Unmodified
Added
Removed
  • palm/trunk

    • Property svn:mergeinfo set to False
      /palm/branches/letzel/masked_output296-409
  • palm/trunk/SCRIPTS/.mrun.config.default

    r272 r410  
    112112DATA_3D_NETCDF       out:loc:tr   3d#:3df   $base_data/$fname/OUTPUT  _3d     nc
    113113DATA_3D_AV_NETCDF    out:loc:tr   3d#:3df   $base_data/$fname/OUTPUT  _3d_av  nc
     114DATA_MASK_01_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m01     nc
     115DATA_MASK_01_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m01_av  nc
     116DATA_MASK_02_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m02     nc
     117DATA_MASK_02_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m02_av  nc
     118DATA_MASK_03_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m03     nc
     119DATA_MASK_03_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m03_av  nc
     120DATA_MASK_04_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m04     nc
     121DATA_MASK_04_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m04_av  nc
     122DATA_MASK_05_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m05     nc
     123DATA_MASK_05_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m05_av  nc
     124DATA_MASK_06_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m06     nc
     125DATA_MASK_06_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m06_av  nc
     126DATA_MASK_07_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m07     nc
     127DATA_MASK_07_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m07_av  nc
     128DATA_MASK_08_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m08     nc
     129DATA_MASK_08_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m08_av  nc
     130DATA_MASK_09_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m09     nc
     131DATA_MASK_09_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m09_av  nc
     132DATA_MASK_10_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m10     nc
     133DATA_MASK_10_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m10_av  nc
     134DATA_MASK_11_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m11     nc
     135DATA_MASK_11_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m11_av  nc
     136DATA_MASK_12_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m12     nc
     137DATA_MASK_12_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m12_av  nc
     138DATA_MASK_13_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m13     nc
     139DATA_MASK_13_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m13_av  nc
     140DATA_MASK_14_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m14     nc
     141DATA_MASK_14_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m14_av  nc
     142DATA_MASK_15_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m15     nc
     143DATA_MASK_15_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m15_av  nc
     144DATA_MASK_16_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m16     nc
     145DATA_MASK_16_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m16_av  nc
     146DATA_MASK_17_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m17     nc
     147DATA_MASK_17_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m17_av  nc
     148DATA_MASK_18_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m18     nc
     149DATA_MASK_18_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m18_av  nc
     150DATA_MASK_19_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m19     nc
     151DATA_MASK_19_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m19_av  nc
     152DATA_MASK_20_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m20     nc
     153DATA_MASK_20_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m20_av  nc
    114154DATA_PRT_NETCDF      out:loc:pe   prt#:prtf $base_data/$fname/OUTPUT  _prt    nc
    115155DATA_PRT_NETCDF      out:loc:trpe prt#:prtf $base_data/$fname/OUTPUT  _prt    nc
  • palm/trunk/SCRIPTS/.mrun.config.imuk

    r343 r410  
    195195DATA_3D_NETCDF       out:loc:tr   3d#:3df   $base_data/$fname/OUTPUT  _3d     nc
    196196DATA_3D_AV_NETCDF    out:loc:tr   3d#:3df   $base_data/$fname/OUTPUT  _3d_av  nc
     197DATA_MASK_01_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m01     nc
     198DATA_MASK_01_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m01_av  nc
     199DATA_MASK_02_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m02     nc
     200DATA_MASK_02_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m02_av  nc
     201DATA_MASK_03_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m03     nc
     202DATA_MASK_03_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m03_av  nc
     203DATA_MASK_04_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m04     nc
     204DATA_MASK_04_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m04_av  nc
     205DATA_MASK_05_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m05     nc
     206DATA_MASK_05_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m05_av  nc
     207DATA_MASK_06_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m06     nc
     208DATA_MASK_06_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m06_av  nc
     209DATA_MASK_07_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m07     nc
     210DATA_MASK_07_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m07_av  nc
     211DATA_MASK_08_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m08     nc
     212DATA_MASK_08_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m08_av  nc
     213DATA_MASK_09_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m09     nc
     214DATA_MASK_09_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m09_av  nc
     215DATA_MASK_10_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m10     nc
     216DATA_MASK_10_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m10_av  nc
     217DATA_MASK_11_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m11     nc
     218DATA_MASK_11_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m11_av  nc
     219DATA_MASK_12_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m12     nc
     220DATA_MASK_12_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m12_av  nc
     221DATA_MASK_13_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m13     nc
     222DATA_MASK_13_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m13_av  nc
     223DATA_MASK_14_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m14     nc
     224DATA_MASK_14_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m14_av  nc
     225DATA_MASK_15_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m15     nc
     226DATA_MASK_15_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m15_av  nc
     227DATA_MASK_16_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m16     nc
     228DATA_MASK_16_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m16_av  nc
     229DATA_MASK_17_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m17     nc
     230DATA_MASK_17_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m17_av  nc
     231DATA_MASK_18_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m18     nc
     232DATA_MASK_18_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m18_av  nc
     233DATA_MASK_19_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m19     nc
     234DATA_MASK_19_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m19_av  nc
     235DATA_MASK_20_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m20     nc
     236DATA_MASK_20_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m20_av  nc
    197237DATA_PRT_NETCDF      out:loc:pe   prt#:prtf $base_data/$fname/OUTPUT  _prt    nc
    198238DATA_PRT_NETCDF      out:loc:trpe prt#:prtf $base_data/$fname/OUTPUT  _prt    nc
  • palm/trunk/SCRIPTS/.mrun.config.riam

    r273 r410  
    116116DATA_3D_NETCDF       out:loc:tr   3d#:3df   $base_data/$fname/OUTPUT  _3d     nc
    117117DATA_3D_AV_NETCDF    out:loc:tr   3d#:3df   $base_data/$fname/OUTPUT  _3d_av  nc
     118DATA_MASK_01_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m01     nc
     119DATA_MASK_01_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m01_av  nc
     120DATA_MASK_02_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m02     nc
     121DATA_MASK_02_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m02_av  nc
     122DATA_MASK_03_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m03     nc
     123DATA_MASK_03_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m03_av  nc
     124DATA_MASK_04_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m04     nc
     125DATA_MASK_04_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m04_av  nc
     126DATA_MASK_05_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m05     nc
     127DATA_MASK_05_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m05_av  nc
     128DATA_MASK_06_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m06     nc
     129DATA_MASK_06_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m06_av  nc
     130DATA_MASK_07_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m07     nc
     131DATA_MASK_07_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m07_av  nc
     132DATA_MASK_08_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m08     nc
     133DATA_MASK_08_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m08_av  nc
     134DATA_MASK_09_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m09     nc
     135DATA_MASK_09_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m09_av  nc
     136DATA_MASK_10_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m10     nc
     137DATA_MASK_10_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m10_av  nc
     138DATA_MASK_11_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m11     nc
     139DATA_MASK_11_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m11_av  nc
     140DATA_MASK_12_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m12     nc
     141DATA_MASK_12_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m12_av  nc
     142DATA_MASK_13_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m13     nc
     143DATA_MASK_13_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m13_av  nc
     144DATA_MASK_14_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m14     nc
     145DATA_MASK_14_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m14_av  nc
     146DATA_MASK_15_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m15     nc
     147DATA_MASK_15_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m15_av  nc
     148DATA_MASK_16_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m16     nc
     149DATA_MASK_16_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m16_av  nc
     150DATA_MASK_17_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m17     nc
     151DATA_MASK_17_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m17_av  nc
     152DATA_MASK_18_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m18     nc
     153DATA_MASK_18_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m18_av  nc
     154DATA_MASK_19_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m19     nc
     155DATA_MASK_19_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m19_av  nc
     156DATA_MASK_20_NETCDF    out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m20     nc
     157DATA_MASK_20_AV_NETCDF out:loc:tr ma#:maf   $base_data/$fname/OUTPUT  _m20_av  nc
    118158DATA_PRT_NETCDF      out:loc:pe   prt#:prtf $base_data/$fname/OUTPUT  _prt    nc
    119159DATA_PRT_NETCDF      out:loc:trpe prt#:prtf $base_data/$fname/OUTPUT  _prt    nc
  • palm/trunk/SOURCE/Makefile

    r305 r410  
    55# -----------------
    66# +set_particle_attributes, set_slicer_attributes_dvrp
     7#
     8# Branch revisions:
     9# -----------------
     10# +data_output_mask, init_masks, user_data_output_mask
    711#
    812# Former revisions:
     
    5559        close_file.f90 compute_vpt.f90 coriolis.f90 cpu_log.f90 \
    5660        cpu_statistics.f90 data_log.f90 data_output_dvrp.f90 \
    57         data_output_profiles.f90 data_output_ptseries.f90 \
     61        data_output_mask.f90 data_output_profiles.f90 data_output_ptseries.f90 \
    5862        data_output_spectra.f90 data_output_tseries.f90 data_output_2d.f90 \
    5963        data_output_3d.f90 diffusion_e.f90 diffusion_s.f90 diffusion_u.f90 \
    6064        diffusion_v.f90 diffusion_w.f90 diffusivities.f90 disturb_field.f90 \
    61         disturb_heatflux.f90 eqn_state_seawater.f90 exchange_horiz.f90 exchange_horiz_2d.f90 \
     65        disturb_heatflux.f90 eqn_state_seawater.f90 exchange_horiz.f90 \
     66        exchange_horiz_2d.f90 \
    6267        fft_xy.f90 flow_statistics.f90 global_min_max.f90 \
    6368        header.f90 impact_of_latent_heat.f90 inflow_turbulence.f90 \
    6469        init_1d_model.f90 init_3d_model.f90 init_advec.f90 \
    6570        init_cloud_physics.f90 init_coupling.f90 init_dvrp.f90 init_grid.f90 \
    66         init_ocean.f90 init_particles.f90 init_pegrid.f90 \
     71        init_masks.f90 init_ocean.f90 init_particles.f90 init_pegrid.f90 \
    6772        init_pt_anomaly.f90 init_rankine.f90 init_slope.f90 \
    6873        interaction_droplets_ptq.f90 local_flush.f90 local_getenv.f90 \
     
    8388        user_check_data_output.f90 user_check_data_output_pr.f90 \
    8489        user_check_parameters.f90 user_data_output_2d.f90 \
    85         user_data_output_3d.f90 user_data_output_dvrp.f90 \
     90        user_data_output_3d.f90 user_data_output_dvrp.f90 user_data_output_mask.f90 \
    8691        user_define_netcdf_grid.f90 user_dvrp_coltab.f90 user_header.f90 \
    8792        user_init.f90 user_init_3d_model.f90 user_init_grid.f90 \
     
    100105        check_for_restart.o check_open.o check_parameters.o close_file.o \
    101106        compute_vpt.o coriolis.o cpu_log.o cpu_statistics.o data_log.o \
    102         data_output_dvrp.o data_output_profiles.o data_output_ptseries.o \
     107        data_output_dvrp.o data_output_mask.o data_output_profiles.o \
     108        data_output_ptseries.o \
    103109        data_output_spectra.o data_output_tseries.o data_output_2d.o \
    104110        data_output_3d.o diffusion_e.o diffusion_s.o diffusion_u.o \
     
    107113        flow_statistics.o global_min_max.o header.o impact_of_latent_heat.o \
    108114        inflow_turbulence.o init_1d_model.o init_3d_model.o init_advec.o init_cloud_physics.o \
    109         init_coupling.o init_dvrp.o init_grid.o init_ocean.o init_particles.o init_pegrid.o \
     115        init_coupling.o init_dvrp.o init_grid.o init_masks.o init_ocean.o init_particles.o init_pegrid.o \
    110116        init_pt_anomaly.o init_rankine.o init_slope.o \
    111117        interaction_droplets_ptq.o local_flush.o local_getenv.o local_stop.o \
     
    124130        user_advec_particles.o user_check_data_output.o \
    125131        user_check_data_output_pr.o user_check_parameters.o \
    126         user_data_output_2d.o user_data_output_3d.o user_data_output_dvrp.o \
     132        user_data_output_2d.o user_data_output_3d.o user_data_output_mask.o user_data_output_dvrp.o \
    127133        user_define_netcdf_grid.o user_dvrp_coltab.o user_header.o \
    128134        user_init.o user_init_3d_model.o user_init_grid.o \
     
    190196data_log.o: modules.o
    191197data_output_dvrp.o: modules.o
     198data_output_mask.o: modules.o
    192199data_output_profiles.o: modules.o
    193200data_output_ptseries.o: modules.o
     
    220227init_dvrp.o: modules.o
    221228init_grid.o: modules.o
     229init_masks.o: modules.o
    222230init_ocean.o: modules.o eqn_state_seawater.o
    223231init_particles.o: modules.o random_function.o
     
    282290user_data_output_2d.o: modules.o user_module.o
    283291user_data_output_3d.o: modules.o user_module.o
     292user_data_output_mask.o: modules.o user_module.o
    284293user_data_output_dvrp.o: modules.o user_module.o
    285294user_define_netcdf_grid.o: modules.o user_module.o
  • palm/trunk/SOURCE/check_open.f90

    r392 r410  
    55! -----------------
    66!
     7!
     8! Branch revisions:
     9! -----------------
     10! masked data output
    711!
    812! Former revisions:
     
    6064    IMPLICIT NONE
    6165
    62     CHARACTER (LEN=2)   ::  suffix
     66    CHARACTER (LEN=2)   ::  mask_char, suffix
    6367    CHARACTER (LEN=20)  ::  xtext = 'time in s'
    6468    CHARACTER (LEN=30)  ::  filename
     
    123127
    124128       CASE ( 15, 16, 17, 18, 19, 40:49, 50:59, 81:84, 101:107, 109, 111:113, &
    125               116 )
     129              116, 121:160 )
     130             
     131          IF ( .NOT. format_parallel_io) THEN
    126132         
    127           IF ( myid /= 0 )  THEN
    128              WRITE( message_string, * ) 'opening file-id ',file_id, &
    129                                         ' not allowed for PE ',myid
    130              CALL message( 'check_open', 'PA0167', 2, 2, -1, 6, 1 )
    131           ENDIF
     133             IF ( myid /= 0 )  THEN
     134                WRITE( message_string, * ) 'opening file-id ',file_id, &
     135                                           ' not allowed for PE ',myid
     136                CALL message( 'check_open', 'PA0167', 2, 2, -1, 6, 1 )
     137             ENDIF
     138             
     139          ENDIF
    132140
    133141       CASE ( 21, 22, 23 )
     
    12331241
    12341242          ENDIF
     1243
     1244       CASE ( 121:160 )
     1245!
     1246!--       Set filename depending on unit number
     1247          IF ( file_id <= 140 )  THEN
     1248             mid = file_id - 120
     1249             WRITE ( mask_char,'(I2.2)')  mid
     1250             filename = 'DATA_MASK_' // mask_char // '_NETCDF' // coupling_char
     1251             av = 0
     1252          ELSE
     1253             mid = file_id - 140
     1254             WRITE ( mask_char,'(I2.2)')  mid
     1255             filename = 'DATA_MASK_' // mask_char // '_AV_NETCDF' // &
     1256                  coupling_char
     1257             av = 1
     1258          ENDIF
     1259!
     1260!--       Inquire, if there is a NetCDF file from a previuos run. This should
     1261!--       be opened for extension, if its dimensions and variables match the
     1262!--       actual run.
     1263          INQUIRE( FILE=filename, EXIST=netcdf_extend )
     1264
     1265          IF ( netcdf_extend )  THEN
     1266!
     1267!--          Open an existing NetCDF file for output
     1268#if defined( __netcdf4 )
     1269             nc_stat = NF90_OPEN_PAR( filename, NF90_WRITE, comm2d, &
     1270                                      MPI_INFO_NULL, id_set_mask(mid,av) )
    12351271#else
    1236 
    1237        CASE ( 101:109, 111:113, 116 )
     1272             nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_mask(mid,av) )
     1273#endif
     1274             CALL handle_netcdf_error( 'check_open', 9998 )
     1275!
     1276!--          Read header information and set all ids. If there is a mismatch
     1277!--          between the previuos and the actual run, netcdf_extend is returned
     1278!--          as .FALSE.
     1279             CALL define_netcdf_header( 'ma', netcdf_extend, file_id )
     1280
     1281!
     1282!--          Remove the local file, if it can not be extended
     1283             IF ( .NOT. netcdf_extend )  THEN
     1284                nc_stat = NF90_CLOSE( id_set_mask(mid,av) )
     1285                CALL handle_netcdf_error( 'check_open', 9998 )
     1286                CALL local_system('rm ' // TRIM( filename ) )
     1287             ENDIF
     1288
     1289          ENDIF         
     1290
     1291          IF ( .NOT. netcdf_extend )  THEN
     1292!
     1293!--          Create a new NetCDF output file
     1294             SELECT CASE ( nc_format_mask(mid,av) )
     1295
     1296                CASE ( 1 )
     1297                   nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, &
     1298                        id_set_mask(mid,av) )
     1299
     1300                CASE ( 2 )
     1301#if defined( __netcdf_64bit )
     1302                   nc_stat = NF90_CREATE( filename, OR( NF90_NOCLOBBER, &
     1303                        NF90_64BIT_OFFSET ), id_set_mask(mid,av) )
     1304#else
     1305                   WRITE( message_string, * ) 'NetCDF: no 64-bit ', &
     1306                        'offset format allowed on this machine'
     1307                   CALL message( 'check_open', 'PA9998', 0, 1, 0, 6, 0 )
     1308                   nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, &
     1309                        id_set_mask(mid,av) )
     1310#endif
     1311
     1312                CASE ( 3 )
     1313#if defined( __netcdf4 )
     1314                   nc_stat = NF90_CREATE_PAR( filename, OR( NF90_NOCLOBBER, &
     1315                        NF90_NETCDF4 ), comm2d, MPI_INFO_NULL, &
     1316                        id_set_mask(mid,av) )
     1317#else
     1318                   WRITE( message_string, * ) 'NetCDF: no NetCDF 4 ', &
     1319                        'format allowed on this machine'
     1320                   CALL message( 'check_open', 'PA9998', 0, 1, 0, 6, 0 )
     1321                   nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, &
     1322                        id_set_mask(mid,av) )
     1323#endif
     1324
     1325                CASE ( 4 )
     1326#if defined( __netcdf4 )
     1327                   nc_stat = NF90_CREATE_PAR( filename, OR( NF90_NOCLOBBER, &
     1328                      NF90_CLASSIC_MODEL ), comm2d, &
     1329                      MPI_INFO_NULL, id_set_mask(mid,av) )
     1330#else
     1331                   WRITE( message_string, * ) 'NetCDF: no NetCDF 4 (Classic ', &
     1332                        'model) format allowed on this machine'
     1333                   CALL message( 'check_open', 'PA9998', 0, 1, 0, 6, 0 )
     1334                   nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, &
     1335                        id_set_mask(mid,av) )
     1336#endif
     1337
     1338                CASE DEFAULT
     1339                   WRITE( message_string, * ) 'illegal NetCDF file format: ', &
     1340                        'nc_format_mask(mid=',mid,',av=',av,')=', &
     1341                        nc_format_mask(mid,av)
     1342                   CALL message( 'check_open', 'PA9998', 2, 2, 0, 6, 0 )
     1343
     1344             END SELECT
     1345             CALL handle_netcdf_error( 'check_open', 9998 )
     1346!
     1347!--          Define the header
     1348             CALL define_netcdf_header( 'ma', netcdf_extend, file_id )
     1349
     1350          ENDIF
     1351
     1352
     1353#else
     1354
     1355       CASE ( 101:109, 111:113, 116, 121:160 )
    12381356
    12391357!
  • palm/trunk/SOURCE/check_parameters.f90

    r407 r410  
    55! -----------------
    66! Enabled passive scalar/humidity wall fluxes for non-flat topography
     7!
     8! Branch revisions:
     9! -----------------
     10! Masked data output
    711!
    812! Former revisions:
     
    14771481       IF ( dt_do3d           == 9999999.9 )  dt_do3d           = dt_data_output
    14781482       IF ( dt_data_output_av == 9999999.9 )  dt_data_output_av = dt_data_output
     1483       DO  mid = 1, 20
     1484          IF ( dt_domask(mid) == 9999999.9 )  dt_domask(mid)    = dt_data_output
     1485       ENDDO
    14791486    ENDIF
    14801487
     
    14951502    IF ( skip_time_data_output_av == 9999999.9 ) &
    14961503                                skip_time_data_output_av = skip_time_data_output
     1504    DO  mid = 1, 20
     1505       IF ( skip_time_domask(mid) == 9999999.9 ) &
     1506                                skip_time_domask(mid)    = skip_time_data_output
     1507    ENDDO
    14971508
    14981509!
     
    26472658
    26482659!
     2660!-- Check mask conditions
     2661    IF ( masks < 0 .OR. masks > max_masks )  THEN
     2662       WRITE( message_string, * )  'illegal value: masks must be >= 0 and ', &
     2663            '<= ', max_masks, ' (=max_masks)'
     2664       CALL message( 'check_parameters', 'PA9998', 1, 2, 0, 6, 0 )
     2665    ENDIF
     2666    IF ( masks > 0 )  THEN
     2667       mask_scale(1) = mask_scale_x
     2668       mask_scale(2) = mask_scale_y
     2669       mask_scale(3) = mask_scale_z
     2670       IF ( ANY( mask_scale <= 0.0 ) )  THEN
     2671          WRITE( message_string, * )  &
     2672               'illegal value: mask_scale_x, mask_scale_y and mask_scale_z', &
     2673               'must be > 0.0'
     2674          CALL message( 'check_parameters', 'PA9998', 1, 2, 0, 6, 0 )
     2675       ENDIF
     2676!
     2677!--    Generate masks for masked data output
     2678       CALL init_masks
     2679    ENDIF
     2680
     2681!
    26492682!-- Check netcdf precison
    26502683    ldum = .FALSE.
  • palm/trunk/SOURCE/close_file.f90

    r392 r410  
    55! -----------------
    66!
     7!
     8! Branch revisions:
     9! -----------------
     10! masked data output
    711!
    812! Former revisions:
     
    5963    CHARACTER (LEN=80)  ::  rtext, title, utext = '', xtext = '', ytext = ''
    6064
    61     INTEGER ::  anzzeile, cranz, cross_count, cross_numbers, dimx, dimy, &
     65    INTEGER ::  av, anzzeile, cranz, cross_count, cross_numbers, dimx, dimy, &
    6266                fid, file_id, j, k, legpos = 1, planz, timodex = 1
    6367    INTEGER, DIMENSION(100) ::  klist, lstyle, cucol
     
    9498!
    9599!-- Close all open unit numbers
    96     DO  fid = 1, 116
     100    DO  fid = 1, 160
    97101
    98102       IF ( openfile(fid)%opened .OR. openfile(fid)%opened_before )  THEN
     
    493497                   nc_stat = NF90_CLOSE( id_set_3d(1) )
    494498                   CALL handle_netcdf_error( 'close_file', 353 )
     499                ENDIF
     500
     501             CASE ( 121:160 )
     502             
     503                IF ( format_parallel_io ) THEN
     504!
     505!--                decompose fid into mid and av
     506                   IF ( fid <= 140 )  THEN
     507                      mid = fid - 120
     508                      av = 0
     509                   ELSE
     510                      mid = fid - 140
     511                      av = 1
     512                   ENDIF
     513                   nc_stat = NF90_CLOSE( id_set_mask(mid,av) )
     514                   CALL handle_netcdf_error( 'close_file', 9998 )
     515               
     516                ELSEIF ( myid == 0  .AND.  netcdf_output )  THEN
     517!
     518!--                decompose fid into mid and av
     519                   IF ( fid <= 140 )  THEN
     520                      mid = fid - 120
     521                      av = 0
     522                   ELSE
     523                      mid = fid - 140
     524                      av = 1
     525                   ENDIF
     526                   nc_stat = NF90_CLOSE( id_set_mask(mid,av) )
     527                   CALL handle_netcdf_error( 'close_file', 9998 )
     528                   
    495529                ENDIF
    496530
  • palm/trunk/SOURCE/header.f90

    r392 r410  
    66!
    77!
     8! Branch revisions:
     9! -----------------
     10! Masked data output: + dt_domask, mask_01~20_x|y|z, mask_01~20_x|y|z_loop,
     11! mask_scale|_x|y|z, masks, netcdf_format_mask[_av], skip_time_domask
     12!
    813! Former revisions:
    914! -----------------
     
    105110    CHARACTER (LEN=70) ::  char1, char2, dopr_chr, &
    106111                           do2d_xy, do2d_xz, do2d_yz, do3d_chr, &
    107                            run_classification
     112                           domask_chr, run_classification
    108113    CHARACTER (LEN=86) ::  coordinates, gradients, learde, slices,  &
    109114                           temperatures, ugcomponent, vgcomponent
    110115    CHARACTER (LEN=85) ::  roben, runten
    111116
    112     INTEGER ::  av, bh, blx, bly, bxl, bxr, byn, bys, ch, cwx, cwy, cxl, cxr, &
    113                 cyn, cys, i, ihost, io, j, l, ll, m, mpi_type
     117    CHARACTER (LEN=1), DIMENSION(1:3) ::  dir = (/ 'x', 'y', 'z' /)
     118
     119    INTEGER ::  av, bh, blx, bly, bxl, bxr, byn, bys, ch, count, cwx, cwy,  &
     120         cxl, cxr, cyn, cys, dim, i, ihost, io, j, l, ll, m, mpi_type
    114121    REAL    ::  cpuseconds_per_simulated_second
    115122
     
    988995       ENDIF
    989996
     997    ENDDO
     998
     999!
     1000!-- masked arrays
     1001    IF ( masks > 0 )  WRITE ( io, 345 )  &
     1002         mask_scale_x, mask_scale_y, mask_scale_z
     1003    DO  mid = 1, masks
     1004       DO  av = 0, 1
     1005
     1006          i = 1
     1007          domask_chr = ''
     1008          DO  WHILE ( domask(mid,av,i) /= ' ' )
     1009             domask_chr = TRIM( domask_chr ) // ' ' //  &
     1010                          TRIM( domask(mid,av,i) ) // ','
     1011             i = i + 1
     1012          ENDDO
     1013
     1014          IF ( domask_chr /= '' )  THEN
     1015             IF ( av == 0 )  THEN
     1016                WRITE ( io, 346 )  '', mid
     1017             ELSE
     1018                WRITE ( io, 346 )  ' (time-averaged)', mid
     1019             ENDIF
     1020
     1021             output_format = ''
     1022             IF ( netcdf_output )  THEN
     1023                SELECT CASE ( nc_format_mask(mid,av) )
     1024                   CASE ( 1 )
     1025                      output_format = 'netcdf (classic format)'
     1026                   CASE ( 2 )
     1027                      output_format = 'netcdf (64bit offset format)'
     1028                   CASE ( 3 )
     1029                      output_format = 'netcdf (NetCDF 4 format)'
     1030                   CASE ( 4 )
     1031                      output_format = 'netcdf (NetCDF 4 classic model format)'
     1032                END SELECT
     1033             ENDIF
     1034             WRITE ( io, 344 )  output_format
     1035
     1036             IF ( av == 0 )  THEN
     1037                WRITE ( io, 347 )  domask_chr, dt_domask(mid)
     1038             ELSE
     1039                WRITE ( io, 348 )  domask_chr, dt_data_output_av, &
     1040                                   averaging_interval, dt_averaging_input
     1041             ENDIF
     1042
     1043             IF ( av == 0 )  THEN
     1044                IF ( skip_time_domask(mid) /= 0.0 )  THEN
     1045                   WRITE ( io, 339 )  skip_time_domask(mid)
     1046                ENDIF
     1047             ELSE
     1048                IF ( skip_time_data_output_av /= 0.0 )  THEN
     1049                   WRITE ( io, 339 )  skip_time_data_output_av
     1050                ENDIF
     1051             ENDIF
     1052!
     1053!--          output locations
     1054             DO  dim = 1, 3
     1055                IF ( mask(mid,dim,1) >= 0.0 )  THEN
     1056                   count = 0
     1057                   DO  WHILE ( mask(mid,dim,count+1) >= 0.0 )
     1058                      count = count + 1
     1059                   ENDDO
     1060                   WRITE ( io, 349 )  dir(dim), dir(dim), mid, dir(dim), &
     1061                                      mask(mid,dim,:count)
     1062                ELSEIF ( mask_loop(mid,dim,1) < 0.0 .AND.  &
     1063                         mask_loop(mid,dim,2) < 0.0 .AND.  &
     1064                         mask_loop(mid,dim,3) == 0.0 )  THEN
     1065                   WRITE ( io, 350 )  dir(dim), dir(dim)
     1066                ELSEIF ( mask_loop(mid,dim,3) == 0.0 )  THEN
     1067                   WRITE ( io, 351 )  dir(dim), dir(dim), mid, dir(dim), &
     1068                                      mask_loop(mid,dim,1:2)
     1069                ELSE
     1070                   WRITE ( io, 351 )  dir(dim), dir(dim), mid, dir(dim), &
     1071                                      mask_loop(mid,dim,1:3)
     1072                ENDIF
     1073             ENDDO
     1074          ENDIF
     1075
     1076       ENDDO
    9901077    ENDDO
    9911078
     
    16191706            '       Upper output limit at    ',F8.2,' m  (GP ',I4,')'/)
    16201707344 FORMAT ('       Output format: ',A/)
     1708345 FORMAT (/'    Scaling lengths for output locations of all subsequent mask IDs:',/ &
     1709            '       mask_scale_x (in x-direction): ',F9.3, ' m',/ &
     1710            '       mask_scale_y (in y-direction): ',F9.3, ' m',/ &
     1711            '       mask_scale_z (in z-direction): ',F9.3, ' m' )
     1712346 FORMAT (/'    Masked data output',A,' for mask ID ',I2, ':')
     1713347 FORMAT ('       Variables: ',A/ &
     1714            '       Output every             ',F8.2,' s')
     1715348 FORMAT ('       Variables: ',A/ &
     1716            '       Output every             ',F8.2,' s'/ &
     1717            '       Time averaged over       ',F8.2,' s'/ &
     1718            '       Averaging input every    ',F8.2,' s')
     1719349 FORMAT (/'       Output locations in ',A,'-direction in multiples of ', &
     1720            'mask_scale_',A,' predefined by array mask_',I2.2,'_',A,':'/ &
     1721            13('       ',8(F8.2,',')/) )
     1722350 FORMAT (/'       Output locations in ',A,'-direction: ', &
     1723            'all gridpoints along ',A,'-direction (default).' )
     1724351 FORMAT (/'       Output locations in ',A,'-direction in multiples of ', &
     1725            'mask_scale_',A,' constructed from array mask_',I2.2,'_',A,'_loop:'/ &
     1726            '          loop begin:',F8.2,', end:',F8.2,', stride:',F8.2 )
    16211727#if defined( __dvrp_graphics )
    16221728360 FORMAT ('    Plot-Sequence with dvrp-software:'/ &
  • palm/trunk/SOURCE/modules.f90

    r405 r410  
    88! initial data assignments to some dvrp arrays changed due to error messages
    99! from gfortran compiler
     10!
     11! Branch revisions:
     12! -----------------
     13! Masked data output: + dt_domask, mask_01~20_x|y|z, mask_01~20_x|y|z_loop,
     14! mask_scale|_x|y|z, masks, netcdf_format_mask[_av], skip_time_domask
    1015!
    1116! Former revisions:
     
    281286    TYPE(file_status), DIMENSION(200) :: openfile = file_status(.FALSE.,.FALSE.)
    282287
     288
     289    INTEGER, PARAMETER :: mask_xyz_dimension = 100, max_masks = 20
    283290
    284291    CHARACTER (LEN=1)    ::  cycle_mg = 'w', timestep_reason = ' '
     
    322329    CHARACTER (LEN=11), DIMENSION(100) ::  data_output = ' ',    &
    323330                                           data_output_user = ' ', doav = ' '
     331    CHARACTER (LEN=10), DIMENSION(100) ::  &
     332         data_output_mask_01      = ' ', data_output_mask_02      = ' ',  &
     333         data_output_mask_03      = ' ', data_output_mask_04      = ' ',  &
     334         data_output_mask_05      = ' ', data_output_mask_06      = ' ',  &
     335         data_output_mask_07      = ' ', data_output_mask_08      = ' ',  &
     336         data_output_mask_09      = ' ', data_output_mask_10      = ' ',  &
     337         data_output_mask_11      = ' ', data_output_mask_12      = ' ',  &
     338         data_output_mask_13      = ' ', data_output_mask_14      = ' ',  &
     339         data_output_mask_15      = ' ', data_output_mask_16      = ' ',  &
     340         data_output_mask_17      = ' ', data_output_mask_18      = ' ',  &
     341         data_output_mask_19      = ' ', data_output_mask_20      = ' ',  &
     342         data_output_mask_user_01 = ' ', data_output_mask_user_02 = ' ',  &
     343         data_output_mask_user_03 = ' ', data_output_mask_user_04 = ' ',  &
     344         data_output_mask_user_05 = ' ', data_output_mask_user_06 = ' ',  &
     345         data_output_mask_user_07 = ' ', data_output_mask_user_08 = ' ',  &
     346         data_output_mask_user_09 = ' ', data_output_mask_user_10 = ' ',  &
     347         data_output_mask_user_11 = ' ', data_output_mask_user_12 = ' ',  &
     348         data_output_mask_user_13 = ' ', data_output_mask_user_14 = ' ',  &
     349         data_output_mask_user_15 = ' ', data_output_mask_user_16 = ' ',  &
     350         data_output_mask_user_17 = ' ', data_output_mask_user_18 = ' ',  &
     351         data_output_mask_user_19 = ' ', data_output_mask_user_20 = ' '
     352
    324353    CHARACTER (LEN=10), DIMENSION(300) ::  data_output_pr = ' '
    325354    CHARACTER (LEN=10), DIMENSION(200) ::  data_output_pr_user = ' '
    326     CHARACTER (LEN=20), DIMENSION(10)  ::  netcdf_precision = ' '
    327 
     355    CHARACTER (LEN=20), DIMENSION(50)  ::  netcdf_precision = ' '
     356
     357    CHARACTER (LEN=10), DIMENSION(max_masks,0:1,100) ::  domask = ' '
    328358    CHARACTER (LEN=10), DIMENSION(0:1,100) ::  do2d = ' ', do3d = ' '
    329359
     
    341371                inflow_disturbance_begin = -1, inflow_disturbance_end = -1, &
    342372                intermediate_timestep_count, intermediate_timestep_count_max, &
    343                 iran = -1234567, last_dt_change = 0, maximum_grid_level, &
     373                iran = -1234567, last_dt_change = 0, masks = 0, &
     374                maximum_grid_level, &
    344375                max_pr_user = 0, mgcycles = 0, mg_cycles = -1, &
    345                 mg_switch_to_pe0_level = 0, ngsrb = 2, nsor = 20, &
     376                mg_switch_to_pe0_level = 0, mid, ngsrb = 2, nsor = 20, &
    346377                nsor_ini = 100, n_sor, normalizing_region = 0, &
    347378                nz_do1d, nz_do3d = -9999, outflow_damping_width = -1, &
     
    354385                do2d_xz_time_count(0:1), do2d_yz_time_count(0:1), &
    355386                do3d_no(0:1) = 0, do3d_time_count(0:1), &
     387                domask_no(max_masks,0:1) = 0, domask_time_count(max_masks,0:1),&
    356388                lad_vertical_gradient_level_ind(10) = -9999, &
     389                mask_size(max_masks,3) = -1, mask_size_l(max_masks,3) = -1, &
     390                mask_start_l(max_masks,3) = -1, &
     391                nc_format_mask(1:max_masks,0:1), &
     392                netcdf_format_mask(1:max_masks) = 1, &
     393                netcdf_format_mask_av(1:max_masks) = 1, &
    357394                pt_vertical_gradient_level_ind(10) = -9999, &
    358395                q_vertical_gradient_level_ind(10) = -9999, &
     
    364401
    365402    INTEGER, DIMENSION(:), ALLOCATABLE ::  grid_level_count
     403
     404    INTEGER, DIMENSION(:,:), ALLOCATABLE   ::  mask_i, mask_j, mask_k
     405    INTEGER, DIMENSION(:,:), ALLOCATABLE   ::  &
     406                mask_i_global, mask_j_global, mask_k_global
    366407
    367408    LOGICAL ::  adjust_mixing_length = .FALSE., avs_output = .FALSE., &
     
    381422                disturbance_created = .FALSE., &
    382423                first_call_advec_particles = .TRUE., &
    383                 force_print_header = .FALSE., galilei_transformation = .FALSE.,&
     424                force_print_header = .FALSE., format_parallel_io = .FALSE., &
     425                galilei_transformation = .FALSE.,&
    384426                humidity = .FALSE., humidity_remote = .FALSE., &
    385427                inflow_l = .FALSE., inflow_n = .FALSE., &
     
    439481             km_damp_max = -1.0, lad_surface = 0.0,  &
    440482             leaf_surface_concentration = 0.0, long_filter_factor = 0.0, &
    441              maximum_cpu_time_allowed = 0.0, molecular_viscosity = 1.461E-5, &
     483             mask_scale_x = 1.0, mask_scale_y = 1.0, mask_scale_z = 1.0, &
     484             maximum_cpu_time_allowed = 0.0,  &
     485             molecular_viscosity = 1.461E-5, &
    442486             old_dt = 1.0E-10, omega = 7.29212E-5, omega_sor = 1.8, &
    443487             overshoot_limit_e = 0.0, overshoot_limit_pt = 0.0, &
     
    480524    REAL ::  do2d_xy_last_time(0:1) = -1.0, do2d_xz_last_time(0:1) = -1.0, &
    481525             do2d_yz_last_time(0:1) = -1.0, dpdxy(1:2) = 0.0, &
    482              lad_vertical_gradient(10) = 0.0, &
     526             dt_domask(max_masks) = 9999999.9, lad_vertical_gradient(10) = 0.0,&
    483527             lad_vertical_gradient_level(10) = -9999999.9, &
     528             mask_scale(3), &
    484529             pt_vertical_gradient(10) = 0.0, &
    485530             pt_vertical_gradient_level(10) = -9999999.9, &
     
    489534             s_vertical_gradient_level(10) = -1.0, &
    490535             sa_vertical_gradient(10) = 0.0, &
    491              sa_vertical_gradient_level(10) = -9999999.9, threshold(20) = 0.0, &
     536             sa_vertical_gradient_level(10) = -9999999.9, &
     537             skip_time_domask(max_masks) = 9999999.9, threshold(20) = 0.0, &
     538             time_domask(max_masks) = 0.0, &
    492539             tsc(10) = (/ 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 /), &
    493540             ug_vertical_gradient(10) = 0.0, &
     
    502549    REAL, DIMENSION(:), ALLOCATABLE ::  dp_smooth_factor
    503550
     551    REAL, DIMENSION(mask_xyz_dimension) ::  &
     552       mask_01_x = -1.0, mask_02_x = -1.0, mask_03_x = -1.0, mask_04_x = -1.0, &
     553       mask_05_x = -1.0, mask_06_x = -1.0, mask_07_x = -1.0, mask_08_x = -1.0, &
     554       mask_09_x = -1.0, mask_10_x = -1.0, mask_11_x = -1.0, mask_12_x = -1.0, &
     555       mask_13_x = -1.0, mask_14_x = -1.0, mask_15_x = -1.0, mask_16_x = -1.0, &
     556       mask_17_x = -1.0, mask_18_x = -1.0, mask_19_x = -1.0, mask_20_x = -1.0, &
     557       mask_01_y = -1.0, mask_02_y = -1.0, mask_03_y = -1.0, mask_04_y = -1.0, &
     558       mask_05_y = -1.0, mask_06_y = -1.0, mask_07_y = -1.0, mask_08_y = -1.0, &
     559       mask_09_y = -1.0, mask_10_y = -1.0, mask_11_y = -1.0, mask_12_y = -1.0, &
     560       mask_13_y = -1.0, mask_14_y = -1.0, mask_15_y = -1.0, mask_16_y = -1.0, &
     561       mask_17_y = -1.0, mask_18_y = -1.0, mask_19_y = -1.0, mask_20_y = -1.0, &
     562       mask_01_z = -1.0, mask_02_z = -1.0, mask_03_z = -1.0, mask_04_z = -1.0, &
     563       mask_05_z = -1.0, mask_06_z = -1.0, mask_07_z = -1.0, mask_08_z = -1.0, &
     564       mask_09_z = -1.0, mask_10_z = -1.0, mask_11_z = -1.0, mask_12_z = -1.0, &
     565       mask_13_z = -1.0, mask_14_z = -1.0, mask_15_z = -1.0, mask_16_z = -1.0, &
     566       mask_17_z = -1.0, mask_18_z = -1.0, mask_19_z = -1.0, mask_20_z = -1.0
     567    REAL, DIMENSION(3) ::  &
     568       mask_01_x_loop = (/ -1.0, -1.0, 0.0 /), &
     569       mask_02_x_loop = (/ -1.0, -1.0, 0.0 /), &
     570       mask_03_x_loop = (/ -1.0, -1.0, 0.0 /), &
     571       mask_04_x_loop = (/ -1.0, -1.0, 0.0 /), &
     572       mask_05_x_loop = (/ -1.0, -1.0, 0.0 /), &
     573       mask_06_x_loop = (/ -1.0, -1.0, 0.0 /), &
     574       mask_07_x_loop = (/ -1.0, -1.0, 0.0 /), &
     575       mask_08_x_loop = (/ -1.0, -1.0, 0.0 /), &
     576       mask_09_x_loop = (/ -1.0, -1.0, 0.0 /), &
     577       mask_10_x_loop = (/ -1.0, -1.0, 0.0 /), &
     578       mask_11_x_loop = (/ -1.0, -1.0, 0.0 /), &
     579       mask_12_x_loop = (/ -1.0, -1.0, 0.0 /), &
     580       mask_13_x_loop = (/ -1.0, -1.0, 0.0 /), &
     581       mask_14_x_loop = (/ -1.0, -1.0, 0.0 /), &
     582       mask_15_x_loop = (/ -1.0, -1.0, 0.0 /), &
     583       mask_16_x_loop = (/ -1.0, -1.0, 0.0 /), &
     584       mask_17_x_loop = (/ -1.0, -1.0, 0.0 /), &
     585       mask_18_x_loop = (/ -1.0, -1.0, 0.0 /), &
     586       mask_19_x_loop = (/ -1.0, -1.0, 0.0 /), &
     587       mask_20_x_loop = (/ -1.0, -1.0, 0.0 /), &
     588       mask_01_y_loop = (/ -1.0, -1.0, 0.0 /), &
     589       mask_02_y_loop = (/ -1.0, -1.0, 0.0 /), &
     590       mask_03_y_loop = (/ -1.0, -1.0, 0.0 /), &
     591       mask_04_y_loop = (/ -1.0, -1.0, 0.0 /), &
     592       mask_05_y_loop = (/ -1.0, -1.0, 0.0 /), &
     593       mask_06_y_loop = (/ -1.0, -1.0, 0.0 /), &
     594       mask_07_y_loop = (/ -1.0, -1.0, 0.0 /), &
     595       mask_08_y_loop = (/ -1.0, -1.0, 0.0 /), &
     596       mask_09_y_loop = (/ -1.0, -1.0, 0.0 /), &
     597       mask_10_y_loop = (/ -1.0, -1.0, 0.0 /), &
     598       mask_11_y_loop = (/ -1.0, -1.0, 0.0 /), &
     599       mask_12_y_loop = (/ -1.0, -1.0, 0.0 /), &
     600       mask_13_y_loop = (/ -1.0, -1.0, 0.0 /), &
     601       mask_14_y_loop = (/ -1.0, -1.0, 0.0 /), &
     602       mask_15_y_loop = (/ -1.0, -1.0, 0.0 /), &
     603       mask_16_y_loop = (/ -1.0, -1.0, 0.0 /), &
     604       mask_17_y_loop = (/ -1.0, -1.0, 0.0 /), &
     605       mask_18_y_loop = (/ -1.0, -1.0, 0.0 /), &
     606       mask_19_y_loop = (/ -1.0, -1.0, 0.0 /), &
     607       mask_20_y_loop = (/ -1.0, -1.0, 0.0 /), &
     608       mask_01_z_loop = (/ -1.0, -1.0, 0.0 /), &
     609       mask_02_z_loop = (/ -1.0, -1.0, 0.0 /), &
     610       mask_03_z_loop = (/ -1.0, -1.0, 0.0 /), &
     611       mask_04_z_loop = (/ -1.0, -1.0, 0.0 /), &
     612       mask_05_z_loop = (/ -1.0, -1.0, 0.0 /), &
     613       mask_06_z_loop = (/ -1.0, -1.0, 0.0 /), &
     614       mask_07_z_loop = (/ -1.0, -1.0, 0.0 /), &
     615       mask_08_z_loop = (/ -1.0, -1.0, 0.0 /), &
     616       mask_09_z_loop = (/ -1.0, -1.0, 0.0 /), &
     617       mask_10_z_loop = (/ -1.0, -1.0, 0.0 /), &
     618       mask_11_z_loop = (/ -1.0, -1.0, 0.0 /), &
     619       mask_12_z_loop = (/ -1.0, -1.0, 0.0 /), &
     620       mask_13_z_loop = (/ -1.0, -1.0, 0.0 /), &
     621       mask_14_z_loop = (/ -1.0, -1.0, 0.0 /), &
     622       mask_15_z_loop = (/ -1.0, -1.0, 0.0 /), &
     623       mask_16_z_loop = (/ -1.0, -1.0, 0.0 /), &
     624       mask_17_z_loop = (/ -1.0, -1.0, 0.0 /), &
     625       mask_18_z_loop = (/ -1.0, -1.0, 0.0 /), &
     626       mask_19_z_loop = (/ -1.0, -1.0, 0.0 /), &
     627       mask_20_z_loop = (/ -1.0, -1.0, 0.0 /)
     628!
     629!--    internal mask arrays ("mask,dimension,selection")
     630       REAL, DIMENSION(:,:,:), ALLOCATABLE ::  mask, mask_loop
    504631
    505632    SAVE
     
    832959!------------------------------------------------------------------------------!
    833960
     961    USE control_parameters
    834962#if defined( __netcdf )
    835963    USE netcdf
     
    9341062                id_var_zw_xy, id_var_zw_xz, id_var_zw_yz, id_var_zw_3d
    9351063
    936     INTEGER, DIMENSION(10)  ::  id_var_dospx, id_var_dospy, nc_precision
     1064    INTEGER, DIMENSION(10)  ::  id_var_dospx, id_var_dospy
    9371065    INTEGER, DIMENSION(20)  ::  id_var_prt
     1066    INTEGER, DIMENSION(50)  ::  nc_precision
    9381067    INTEGER, DIMENSION(dopr_norm_num) ::  id_var_norm_dopr
    9391068
     
    9441073    INTEGER, DIMENSION(dots_max,0:9)   ::  id_var_dots
    9451074
     1075!
     1076!-- masked output
     1077    CHARACTER (LEN=7), DIMENSION(max_masks,0:1,100) ::  domask_unit
     1078
    9461079    LOGICAL ::  output_for_t0 = .FALSE.
     1080
     1081    INTEGER, DIMENSION(1:max_masks,0:1) ::  id_dim_time_mask, id_dim_x_mask, &
     1082                id_dim_xu_mask, id_dim_y_mask, id_dim_yv_mask, id_dim_zu_mask, &
     1083                id_dim_zw_mask, &
     1084                id_set_mask, &
     1085                id_var_time_mask, id_var_x_mask, id_var_xu_mask, &
     1086                id_var_y_mask, id_var_yv_mask, id_var_zu_mask, id_var_zw_mask, &
     1087                id_var_zusi_mask, id_var_zwwi_mask
     1088
     1089    INTEGER, DIMENSION(1:max_masks,0:1,100)         ::  id_var_domask
    9471090
    9481091    SAVE
  • palm/trunk/SOURCE/netcdf.f90

    r392 r410  
    88! ------------------
    99!
     10!
     11! Branch revisions:
     12! -----------------
     13! masked data output
    1014!
    1115! Former revisions:
     
    9498    CHARACTER (LEN=2000)           ::  var_list, var_list_old
    9599
    96     INTEGER ::  av, i, id_x, id_y, id_z, j, ns, ns_old, nz_old
     100    INTEGER ::  av, file_id, i, id_x, id_y, id_z, j, ns, ns_old, nz_old
    97101
    98102    INTEGER, DIMENSION(1) ::  id_dim_time_old, id_dim_x_yz_old,  &
    99103                              id_dim_y_xz_old, id_dim_zu_sp_old, &
    100                               id_dim_zu_xy_old, id_dim_zu_3d_old
     104                              id_dim_zu_xy_old, id_dim_zu_3d_old, &
     105                              id_dim_zu_mask_old
    101106
    102107    LOGICAL ::  found
     
    108113    REAL, DIMENSION(1) ::  last_time_coordinate
    109114
    110     REAL, DIMENSION(:), ALLOCATABLE ::  netcdf_data
     115    REAL, DIMENSION(:), ALLOCATABLE   ::  netcdf_data
     116    REAL, DIMENSION(:,:), ALLOCATABLE ::  netcdf_data_2d
     117
    111118
    112119
     
    161168             CASE ( 'prt' )
    162169                nc_precision(8) = j
     170             CASE ( 'masks' )
     171                nc_precision(11:50) = j
     172             CASE ( 'mask01' )
     173                nc_precision(11) = j
     174             CASE ( 'mask02' )
     175                nc_precision(12) = j
     176             CASE ( 'mask03' )
     177                nc_precision(13) = j
     178             CASE ( 'mask04' )
     179                nc_precision(14) = j
     180             CASE ( 'mask05' )
     181                nc_precision(15) = j
     182             CASE ( 'mask06' )
     183                nc_precision(16) = j
     184             CASE ( 'mask07' )
     185                nc_precision(17) = j
     186             CASE ( 'mask08' )
     187                nc_precision(18) = j
     188             CASE ( 'mask09' )
     189                nc_precision(19) = j
     190             CASE ( 'mask10' )
     191                nc_precision(20) = j
     192             CASE ( 'mask11' )
     193                nc_precision(21) = j
     194             CASE ( 'mask12' )
     195                nc_precision(22) = j
     196             CASE ( 'mask13' )
     197                nc_precision(23) = j
     198             CASE ( 'mask14' )
     199                nc_precision(24) = j
     200             CASE ( 'mask15' )
     201                nc_precision(25) = j
     202             CASE ( 'mask16' )
     203                nc_precision(26) = j
     204             CASE ( 'mask17' )
     205                nc_precision(27) = j
     206             CASE ( 'mask18' )
     207                nc_precision(28) = j
     208             CASE ( 'mask19' )
     209                nc_precision(29) = j
     210             CASE ( 'mask20' )
     211                nc_precision(30) = j
     212             CASE ( 'maskav01' )
     213                nc_precision(31) = j
     214             CASE ( 'maskav02' )
     215                nc_precision(32) = j
     216             CASE ( 'maskav03' )
     217                nc_precision(33) = j
     218             CASE ( 'maskav04' )
     219                nc_precision(34) = j
     220             CASE ( 'maskav05' )
     221                nc_precision(35) = j
     222             CASE ( 'maskav06' )
     223                nc_precision(36) = j
     224             CASE ( 'maskav07' )
     225                nc_precision(37) = j
     226             CASE ( 'maskav08' )
     227                nc_precision(38) = j
     228             CASE ( 'maskav09' )
     229                nc_precision(39) = j
     230             CASE ( 'maskav10' )
     231                nc_precision(40) = j
     232             CASE ( 'maskav11' )
     233                nc_precision(41) = j
     234             CASE ( 'maskav12' )
     235                nc_precision(42) = j
     236             CASE ( 'maskav13' )
     237                nc_precision(43) = j
     238             CASE ( 'maskav14' )
     239                nc_precision(44) = j
     240             CASE ( 'maskav15' )
     241                nc_precision(45) = j
     242             CASE ( 'maskav16' )
     243                nc_precision(46) = j
     244             CASE ( 'maskav17' )
     245                nc_precision(47) = j
     246             CASE ( 'maskav18' )
     247                nc_precision(48) = j
     248             CASE ( 'maskav19' )
     249                nc_precision(49) = j
     250             CASE ( 'maskav20' )
     251                nc_precision(50) = j
    163252             CASE ( 'all' )
    164253                nc_precision    = j
     
    173262
    174263          i = i + 1
    175           IF ( i > 10 )  EXIT
     264          IF ( i > 50 )  EXIT
    176265       ENDDO
    177266
     
    191280
    192281!
    193 !-- Select the mode to be processed. Possibilities are 3d, xy, xz, yz,
     282!-- Select the mode to be processed. Possibilities are 3d, mask, xy, xz, yz,
    194283!-- pr and ts.
    195284    SELECT CASE ( mode )
     285
     286       CASE ( 'ma_new' )
     287
     288!
     289!--       decompose actual parameter file_id (=formal parameter av) into
     290!--       mid and av
     291          file_id = av
     292          IF ( file_id <= 140 )  THEN
     293             mid = file_id - 120
     294             av = 0
     295          ELSE
     296             mid = file_id - 140
     297             av = 1
     298          ENDIF
     299
     300!
     301!--       Define some global attributes of the dataset
     302          nc_stat = NF90_PUT_ATT( id_set_mask(mid,av), NF90_GLOBAL, &
     303               'Conventions', 'COARDS' )
     304          CALL handle_netcdf_error( 'netcdf', 9998 )
     305
     306          IF ( av == 0 )  THEN
     307             time_average_text = ' '
     308          ELSE
     309             WRITE (time_average_text, '('', '',F7.1,'' s average'')') &
     310                                                            averaging_interval
     311          ENDIF
     312          nc_stat = NF90_PUT_ATT( id_set_mask(mid,av), NF90_GLOBAL, 'title', &
     313                                  TRIM( run_description_header ) //    &
     314                                  TRIM( time_average_text ) )
     315          CALL handle_netcdf_error( 'netcdf', 9998 )
     316          IF ( av == 1 )  THEN
     317             WRITE ( time_average_text,'(F7.1,'' s avg'')' )  averaging_interval
     318             nc_stat = NF90_PUT_ATT( id_set_mask(mid,av), NF90_GLOBAL, &
     319                                     'time_avg', TRIM( time_average_text ) )
     320             CALL handle_netcdf_error( 'netcdf', 9998 )
     321          ENDIF
     322
     323!
     324!--       Define time coordinate for volume data (unlimited dimension)
     325          nc_stat = NF90_DEF_DIM( id_set_mask(mid,av), 'time', NF90_UNLIMITED, &
     326                                  id_dim_time_mask(mid,av) )
     327          CALL handle_netcdf_error( 'netcdf', 9998 )
     328
     329          nc_stat = NF90_DEF_VAR( id_set_mask(mid,av), 'time', NF90_DOUBLE, &
     330                                  id_dim_time_mask(mid,av), &
     331                                  id_var_time_mask(mid,av) )
     332          CALL handle_netcdf_error( 'netcdf', 9998 )
     333
     334          nc_stat = NF90_PUT_ATT( id_set_mask(mid,av), &
     335                                  id_var_time_mask(mid,av), 'units', &
     336                                  'seconds')
     337          CALL handle_netcdf_error( 'netcdf', 9998 )
     338
     339!
     340!--       Define spatial dimensions and coordinates:
     341!--       Define vertical coordinate grid (zu grid)
     342          nc_stat = NF90_DEF_DIM( id_set_mask(mid,av), 'zu_3d', &
     343                                  mask_size(mid,3), id_dim_zu_mask(mid,av) )
     344          CALL handle_netcdf_error( 'netcdf', 9998 )
     345
     346          nc_stat = NF90_DEF_VAR( id_set_mask(mid,av), 'zu_3d', NF90_DOUBLE, &
     347                                  id_dim_zu_mask(mid,av), &
     348                                  id_var_zu_mask(mid,av) )
     349          CALL handle_netcdf_error( 'netcdf', 9998 )
     350
     351          nc_stat = NF90_PUT_ATT( id_set_mask(mid,av), id_var_zu_mask(mid,av), &
     352                                  'units', 'meters' )
     353          CALL handle_netcdf_error( 'netcdf', 9998 )
     354
     355!
     356!--       Define vertical coordinate grid (zw grid)
     357          nc_stat = NF90_DEF_DIM( id_set_mask(mid,av), 'zw_3d', &
     358                                  mask_size(mid,3), id_dim_zw_mask(mid,av) )
     359          CALL handle_netcdf_error( 'netcdf', 9998 )
     360
     361          nc_stat = NF90_DEF_VAR( id_set_mask(mid,av), 'zw_3d', NF90_DOUBLE, &
     362                                  id_dim_zw_mask(mid,av), &
     363                                  id_var_zw_mask(mid,av) )
     364          CALL handle_netcdf_error( 'netcdf', 9998 )
     365
     366          nc_stat = NF90_PUT_ATT( id_set_mask(mid,av), id_var_zw_mask(mid,av), &
     367                                  'units', 'meters' )
     368          CALL handle_netcdf_error( 'netcdf', 9998 )
     369
     370!
     371!--       Define x-axis (for scalar position)
     372          nc_stat = NF90_DEF_DIM( id_set_mask(mid,av), 'x', &
     373                                  mask_size(mid,1), id_dim_x_mask(mid,av) )
     374          CALL handle_netcdf_error( 'netcdf', 9998 )
     375
     376          nc_stat = NF90_DEF_VAR( id_set_mask(mid,av), 'x', NF90_DOUBLE, &
     377                                  id_dim_x_mask(mid,av), id_var_x_mask(mid,av) )
     378          CALL handle_netcdf_error( 'netcdf', 9998 )
     379
     380          nc_stat = NF90_PUT_ATT( id_set_mask(mid,av), id_var_x_mask(mid,av), &
     381                                  'units', 'meters' )
     382          CALL handle_netcdf_error( 'netcdf', 9998 )
     383
     384!
     385!--       Define x-axis (for u position)
     386          nc_stat = NF90_DEF_DIM( id_set_mask(mid,av), 'xu', &
     387                                  mask_size(mid,1), id_dim_xu_mask(mid,av) )
     388          CALL handle_netcdf_error( 'netcdf', 9998 )
     389
     390          nc_stat = NF90_DEF_VAR( id_set_mask(mid,av), 'xu', NF90_DOUBLE, &
     391                                  id_dim_xu_mask(mid,av), &
     392                                  id_var_xu_mask(mid,av) )
     393          CALL handle_netcdf_error( 'netcdf', 9998 )
     394
     395          nc_stat = NF90_PUT_ATT( id_set_mask(mid,av), id_var_xu_mask(mid,av), &
     396                                  'units', 'meters' )
     397          CALL handle_netcdf_error( 'netcdf', 9998 )
     398
     399!
     400!--       Define y-axis (for scalar position)
     401          nc_stat = NF90_DEF_DIM( id_set_mask(mid,av), 'y', &
     402                                  mask_size(mid,2), id_dim_y_mask(mid,av) )
     403          CALL handle_netcdf_error( 'netcdf', 9998 )
     404
     405          nc_stat = NF90_DEF_VAR( id_set_mask(mid,av), 'y', NF90_DOUBLE, &
     406                                  id_dim_y_mask(mid,av), id_var_y_mask(mid,av) )
     407          CALL handle_netcdf_error( 'netcdf', 9998 )
     408
     409          nc_stat = NF90_PUT_ATT( id_set_mask(mid,av), id_var_y_mask(mid,av), &
     410                                  'units', 'meters' )
     411          CALL handle_netcdf_error( 'netcdf', 9998 )
     412
     413!
     414!--       Define y-axis (for v position)
     415          nc_stat = NF90_DEF_DIM( id_set_mask(mid,av), 'yv', &
     416                                  mask_size(mid,2), id_dim_yv_mask(mid,av) )
     417          CALL handle_netcdf_error( 'netcdf', 9998 )
     418
     419          nc_stat = NF90_DEF_VAR( id_set_mask(mid,av), 'yv', NF90_DOUBLE, &
     420                                  id_dim_yv_mask(mid,av), &
     421                                  id_var_yv_mask(mid,av) )
     422          CALL handle_netcdf_error( 'netcdf', 9998 )
     423
     424          nc_stat = NF90_PUT_ATT( id_set_mask(mid,av), id_var_yv_mask(mid,av), &
     425                                  'units', 'meters' )
     426          CALL handle_netcdf_error( 'netcdf', 9998 )
     427
     428!
     429!--       In case of non-flat topography define 2d-arrays containing the height
     430!--       informations
     431          IF ( TRIM( topography ) /= 'flat' )  THEN
     432!
     433!--          Define zusi = zu(nzb_s_inner)
     434             nc_stat = NF90_DEF_VAR( id_set_mask(mid,av), 'zusi', NF90_DOUBLE, &
     435                                     (/ id_dim_x_mask(mid,av),    &
     436                                        id_dim_y_mask(mid,av) /), &
     437                                     id_var_zusi_mask(mid,av) )
     438             CALL handle_netcdf_error( 'netcdf', 9998 )
     439             
     440             nc_stat = NF90_PUT_ATT( id_set_mask(mid,av), &
     441                                     id_var_zusi_mask(mid,av), &
     442                                     'units', 'meters' )
     443             CALL handle_netcdf_error( 'netcdf', 9998 )
     444             
     445             nc_stat = NF90_PUT_ATT( id_set_mask(mid,av), &
     446                                     id_var_zusi_mask(mid,av), &
     447                                     'long_name', 'zu(nzb_s_inner)' )
     448             CALL handle_netcdf_error( 'netcdf', 9998 )
     449
     450!             
     451!--          Define zwwi = zw(nzb_w_inner)
     452             nc_stat = NF90_DEF_VAR( id_set_mask(mid,av), 'zwwi', NF90_DOUBLE, &
     453                                     (/ id_dim_x_mask(mid,av),    &
     454                                        id_dim_y_mask(mid,av) /), &
     455                                     id_var_zwwi_mask(mid,av) )
     456             CALL handle_netcdf_error( 'netcdf', 9998 )
     457             
     458             nc_stat = NF90_PUT_ATT( id_set_mask(mid,av), &
     459                                     id_var_zwwi_mask(mid,av), &
     460                                     'units', 'meters' )
     461             CALL handle_netcdf_error( 'netcdf', 9998 )
     462             
     463             nc_stat = NF90_PUT_ATT( id_set_mask(mid,av), &
     464                                     id_var_zwwi_mask(mid,av), &
     465                                     'long_name', 'zw(nzb_w_inner)' )
     466             CALL handle_netcdf_error( 'netcdf', 9998 )
     467
     468          ENDIF             
     469
     470
     471!
     472!--       Define the variables
     473          var_list = ';'
     474          i = 1
     475
     476          DO WHILE ( domask(mid,av,i)(1:1) /= ' ' )
     477
     478!
     479!--          Check for the grid
     480             found = .TRUE.
     481             SELECT CASE ( domask(mid,av,i) )
     482!
     483!--             Most variables are defined on the scalar grid
     484                CASE ( 'e', 'p', 'pc', 'pr', 'pt', 'q', 'ql', 'ql_c', 'ql_v', &
     485                       'ql_vp', 'qv', 'rho', 's', 'sa', 'vpt' )
     486
     487                   grid_x = 'x'
     488                   grid_y = 'y'
     489                   grid_z = 'zu'
     490!
     491!--             u grid
     492                CASE ( 'u' )
     493
     494                   grid_x = 'xu'
     495                   grid_y = 'y'
     496                   grid_z = 'zu'
     497!
     498!--             v grid
     499                CASE ( 'v' )
     500
     501                   grid_x = 'x'
     502                   grid_y = 'yv'
     503                   grid_z = 'zu'
     504!
     505!--             w grid
     506                CASE ( 'w' )
     507
     508                   grid_x = 'x'
     509                   grid_y = 'y'
     510                   grid_z = 'zw'
     511
     512                CASE DEFAULT
     513!
     514!--                Check for user-defined quantities
     515                   CALL user_define_netcdf_grid( domask(mid,av,i), found, &
     516                                                 grid_x, grid_y, grid_z )
     517
     518             END SELECT
     519
     520!
     521!--          Select the respective dimension ids
     522             IF ( grid_x == 'x' )  THEN
     523                id_x = id_dim_x_mask(mid,av)
     524             ELSEIF ( grid_x == 'xu' )  THEN
     525                id_x = id_dim_xu_mask(mid,av)
     526             ENDIF
     527
     528             IF ( grid_y == 'y' )  THEN
     529                id_y = id_dim_y_mask(mid,av)
     530             ELSEIF ( grid_y == 'yv' )  THEN
     531                id_y = id_dim_yv_mask(mid,av)
     532             ENDIF
     533
     534             IF ( grid_z == 'zu' )  THEN
     535                id_z = id_dim_zu_mask(mid,av)
     536             ELSEIF ( grid_z == 'zw' )  THEN
     537                id_z = id_dim_zw_mask(mid,av)
     538             ENDIF
     539
     540!
     541!--          Define the grid
     542             nc_stat = NF90_DEF_VAR( id_set_mask(mid,av), domask(mid,av,i), &
     543                                     nc_precision(10+mid+av*20),            &
     544                                     (/ id_x, id_y, id_z,                   &
     545                                        id_dim_time_mask(mid,av) /),        &
     546                                     id_var_domask(mid,av,i) )
     547
     548             IF ( .NOT. found )  THEN
     549                WRITE ( message_string, * ) 'no grid defined for', &
     550                     ' variable ', TRIM( domask(mid,av,i) )
     551                CALL message( 'define_netcdf_header', 'PA9998', 0, 1, 0, 6, 0 )
     552             ENDIF
     553
     554             var_list = TRIM( var_list ) // TRIM( domask(mid,av,i) ) // ';'
     555
     556             CALL handle_netcdf_error( 'netcdf', 9998 )
     557!
     558!--          Store the 'real' name of the variable (with *, for example)
     559!--          in the long_name attribute. This is evaluated by Ferret,
     560!--          for example.
     561             nc_stat = NF90_PUT_ATT( id_set_mask(mid,av),     &
     562                                     id_var_domask(mid,av,i), &
     563                                     'long_name', domask(mid,av,i) )
     564             CALL handle_netcdf_error( 'netcdf', 9998 )
     565!
     566!--          Define the variable's unit
     567             nc_stat = NF90_PUT_ATT( id_set_mask(mid,av), &
     568                                     id_var_domask(mid,av,i), &
     569                                     'units', TRIM( domask_unit(mid,av,i) ) )
     570             CALL handle_netcdf_error( 'netcdf', 9998 )
     571
     572             i = i + 1
     573
     574          ENDDO
     575
     576!
     577!--       No arrays to output
     578          IF ( i == 1 )  RETURN
     579
     580!
     581!--       Write the list of variables as global attribute (this is used by
     582!--       restart runs and by combine_plot_fields)
     583          nc_stat = NF90_PUT_ATT( id_set_mask(mid,av), NF90_GLOBAL, &
     584                                  'VAR_LIST', var_list )
     585          CALL handle_netcdf_error( 'netcdf', 9998 )
     586
     587!
     588!--       Leave NetCDF define mode
     589          nc_stat = NF90_ENDDEF( id_set_mask(mid,av) )
     590          CALL handle_netcdf_error( 'netcdf', 9998 )
     591
     592!
     593!--       Write data for x (shifted by +dx/2) and xu axis
     594          ALLOCATE( netcdf_data(mask_size(mid,1)) )
     595
     596          netcdf_data = ( mask_i_global(mid,:mask_size(mid,1)) + 0.5 ) * dx
     597
     598          nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), id_var_x_mask(mid,av), &
     599                                  netcdf_data, start = (/ 1 /),               &
     600                                  count = (/ mask_size(mid,1) /) )
     601          CALL handle_netcdf_error( 'netcdf', 9998 )
     602
     603          netcdf_data = mask_i_global(mid,:mask_size(mid,1)) * dx
     604
     605          nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), id_var_xu_mask(mid,av),&
     606                                  netcdf_data, start = (/ 1 /),               &
     607                                  count = (/ mask_size(mid,1) /) )
     608          CALL handle_netcdf_error( 'netcdf', 9998 )
     609
     610          DEALLOCATE( netcdf_data )
     611
     612!
     613!--       Write data for y (shifted by +dy/2) and yv axis
     614          ALLOCATE( netcdf_data(mask_size(mid,2)) )
     615
     616          netcdf_data = ( mask_j_global(mid,:mask_size(mid,2)) + 0.5 ) * dy
     617
     618          nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), id_var_y_mask(mid,av), &
     619                                  netcdf_data, start = (/ 1 /),               &
     620                                  count = (/ mask_size(mid,2) /))
     621          CALL handle_netcdf_error( 'netcdf', 9998 )
     622
     623          netcdf_data = mask_j_global(mid,:mask_size(mid,2)) * dy
     624
     625          nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), id_var_yv_mask(mid,av), &
     626                                  netcdf_data, start = (/ 1 /),    &
     627                                  count = (/ mask_size(mid,2) /))
     628          CALL handle_netcdf_error( 'netcdf', 9998 )
     629
     630          DEALLOCATE( netcdf_data )
     631
     632!
     633!--       Write zu and zw data (vertical axes)
     634          ALLOCATE( netcdf_data(mask_size(mid,3)) )
     635
     636          netcdf_data = zu( mask_k_global(mid,:mask_size(mid,3)) )
     637
     638          nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), id_var_zu_mask(mid,av), &
     639                                  netcdf_data, start = (/ 1 /), &
     640                                  count = (/ mask_size(mid,3) /) )
     641          CALL handle_netcdf_error( 'netcdf', 9998 )
     642
     643          netcdf_data = zw( mask_k_global(mid,:mask_size(mid,3)) )
     644
     645          nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), id_var_zw_mask(mid,av), &
     646                                  netcdf_data, start = (/ 1 /), &
     647                                  count = (/ mask_size(mid,3) /) )
     648          CALL handle_netcdf_error( 'netcdf', 9998 )
     649
     650          DEALLOCATE( netcdf_data )
     651
     652!
     653!--       In case of non-flat topography write height information
     654          IF ( TRIM( topography ) /= 'flat' )  THEN
     655
     656             ALLOCATE( netcdf_data_2d(mask_size(mid,1),mask_size(mid,2)) )
     657             netcdf_data_2d = zu_s_inner( mask_i_global(mid,:mask_size(mid,1)),&
     658                                          mask_j_global(mid,:mask_size(mid,2)) )
     659
     660             nc_stat = NF90_PUT_VAR( id_set_mask(mid,av),         &
     661                                     id_var_zusi_mask(mid,av),    &
     662                                     netcdf_data_2d,              &
     663                                     start = (/ 1, 1 /),          &
     664                                     count = (/ mask_size(mid,1), &
     665                                                mask_size(mid,2) /) )
     666             CALL handle_netcdf_error( 'netcdf', 9998 )
     667
     668             netcdf_data_2d = zw_w_inner( mask_i_global(mid,:mask_size(mid,1)),&
     669                                          mask_j_global(mid,:mask_size(mid,2)) )
     670
     671             nc_stat = NF90_PUT_VAR( id_set_mask(mid,av),         &
     672                                     id_var_zwwi_mask(mid,av),    &
     673                                     netcdf_data_2d,              &
     674                                     start = (/ 1, 1 /),          &
     675                                     count = (/ mask_size(mid,1), &
     676                                                mask_size(mid,2) /) )
     677             CALL handle_netcdf_error( 'netcdf', 9998 )
     678
     679             DEALLOCATE( netcdf_data_2d )
     680
     681          ENDIF
     682!
     683!--       restore original parameter file_id (=formal parameter av) into av
     684          av = file_id
     685
     686
     687       CASE ( 'ma_ext' )
     688
     689!
     690!--       decompose actual parameter file_id (=formal parameter av) into
     691!--       mid and av
     692          file_id = av
     693          IF ( file_id <= 140 )  THEN
     694             mid = file_id - 120
     695             av = 0
     696          ELSE
     697             mid = file_id - 140
     698             av = 1
     699          ENDIF
     700
     701!
     702!--       Get the list of variables and compare with the actual run.
     703!--       First var_list_old has to be reset, since GET_ATT does not assign
     704!--       trailing blanks.
     705          var_list_old = ' '
     706          nc_stat = NF90_GET_ATT( id_set_mask(mid,av), NF90_GLOBAL, 'VAR_LIST',&
     707                                  var_list_old )
     708          CALL handle_netcdf_error( 'netcdf', 9998 )
     709
     710          var_list = ';'
     711          i = 1
     712          DO WHILE ( domask(mid,av,i)(1:1) /= ' ' )
     713             var_list = TRIM(var_list) // TRIM( domask(mid,av,i) ) // ';'
     714             i = i + 1
     715          ENDDO
     716
     717          IF ( av == 0 )  THEN
     718             var = '(mask)'
     719          ELSE
     720             var = '(mask_av)'
     721          ENDIF
     722
     723          IF ( TRIM( var_list ) /= TRIM( var_list_old ) )  THEN
     724             WRITE ( message_string, * ) 'NetCDF file for ', TRIM( var ), &
     725                  ' data for mask', mid, ' from previous run found,', &
     726                  '&but this file cannot be extended due to variable ', &
     727                  'mismatch.&New file is created instead.'
     728             CALL message( 'define_netcdf_header', 'PA9998', 0, 1, 0, 6, 0 )
     729             extend = .FALSE.
     730             RETURN
     731          ENDIF
     732
     733!
     734!--       Get and compare the number of vertical gridpoints
     735          nc_stat = NF90_INQ_VARID( id_set_mask(mid,av), 'zu', &
     736                                    id_var_zu_mask(mid,av) )
     737          CALL handle_netcdf_error( 'netcdf', 9998 )
     738
     739          nc_stat = NF90_INQUIRE_VARIABLE( id_set_mask(mid,av),     &
     740                                           id_var_zu_mask(mid,av),  &
     741                                           dimids = id_dim_zu_mask_old )
     742          CALL handle_netcdf_error( 'netcdf', 9998 )
     743          id_dim_zu_mask(mid,av) = id_dim_zu_mask_old(1)
     744
     745          nc_stat = NF90_INQUIRE_DIMENSION( id_set_mask(mid,av),    &
     746                                            id_dim_zu_mask(mid,av), &
     747                                            len = nz_old )
     748          CALL handle_netcdf_error( 'netcdf', 9998 )
     749
     750          IF ( mask_size(mid,3) /= nz_old )  THEN
     751             WRITE ( message_string, * ) 'NetCDF file for ', TRIM( var ), &
     752                  ' data for mask', mid, ' from previous run found,', &
     753                  '&but this file cannot be extended due to mismatch in ', &
     754                  ' number of&vertical grid points.', &
     755                  '&New file is created instead.'
     756             CALL message( 'define_netcdf_header', 'PA9998', 0, 1, 0, 6, 0 )
     757             extend = .FALSE.
     758             RETURN
     759          ENDIF
     760
     761!
     762!--       Get the id of the time coordinate (unlimited coordinate) and its
     763!--       last index on the file. The next time level is plmask..count+1.
     764!--       The current time must be larger than the last output time
     765!--       on the file.
     766          nc_stat = NF90_INQ_VARID( id_set_mask(mid,av), 'time', &
     767                                    id_var_time_mask(mid,av) )
     768          CALL handle_netcdf_error( 'netcdf', 9998 )
     769
     770          nc_stat = NF90_INQUIRE_VARIABLE( id_set_mask(mid,av), &
     771                                           id_var_time_mask(mid,av), &
     772                                           dimids = id_dim_time_old )
     773          CALL handle_netcdf_error( 'netcdf', 9998 )
     774          id_dim_time_mask(mid,av) = id_dim_time_old(1)
     775
     776          nc_stat = NF90_INQUIRE_DIMENSION( id_set_mask(mid,av), &
     777                                            id_dim_time_mask(mid,av), &
     778                                            len = domask_time_count(mid,av) )
     779          CALL handle_netcdf_error( 'netcdf', 9998 )
     780
     781          nc_stat = NF90_GET_VAR( id_set_mask(mid,av), &
     782                                  id_var_time_mask(mid,av), &
     783                                  last_time_coordinate,              &
     784                                  start = (/ domask_time_count(mid,av) /), &
     785                                  count = (/ 1 /) )
     786          CALL handle_netcdf_error( 'netcdf', 9998 )
     787
     788          IF ( last_time_coordinate(1) >= simulated_time )  THEN
     789             WRITE ( message_string, * ) 'NetCDF file for ', TRIM( var ), &
     790                  ' data for mask', mid, ' from previous run found,', &
     791                  '&but this file cannot be extended because the current ', &
     792                  'output time&is less or equal than the last output time ', &
     793                  'on this file.&New file is created instead.'
     794             CALL message( 'define_netcdf_header', 'PA9998', 0, 1, 0, 6, 0 )
     795             domask_time_count(mid,av) = 0
     796             extend = .FALSE.
     797             RETURN
     798          ENDIF
     799
     800!
     801!--       Dataset seems to be extendable.
     802!--       Now get the variable ids.
     803          i = 1
     804          DO WHILE ( domask(mid,av,i)(1:1) /= ' ' )
     805             nc_stat = NF90_INQ_VARID( id_set_mask(mid,av), &
     806                                       TRIM( domask(mid,av,i) ), &
     807                                       id_var_domask(mid,av,i) )
     808             CALL handle_netcdf_error( 'netcdf', 9998 )
     809             i = i + 1
     810          ENDDO
     811
     812!
     813!--       Update the title attribute on file
     814!--       In order to avoid 'data mode' errors if updated attributes are larger
     815!--       than their original size, NF90_PUT_ATT is called in 'define mode'
     816!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible
     817!--       performance loss due to data copying; an alternative strategy would be
     818!--       to ensure equal attribute size in a job chain. Maybe revise later.
     819          IF ( av == 0 )  THEN
     820             time_average_text = ' '
     821          ELSE
     822             WRITE (time_average_text, '('', '',F7.1,'' s average'')') &
     823                                                            averaging_interval
     824          ENDIF
     825          nc_stat = NF90_REDEF( id_set_mask(mid,av) )
     826          CALL handle_netcdf_error( 'netcdf', 9998 )
     827          nc_stat = NF90_PUT_ATT( id_set_mask(mid,av), NF90_GLOBAL, 'title', &
     828                                  TRIM( run_description_header ) //    &
     829                                  TRIM( time_average_text ) )
     830          CALL handle_netcdf_error( 'netcdf', 9998 )
     831          nc_stat = NF90_ENDDEF( id_set_mask(mid,av) )
     832          CALL handle_netcdf_error( 'netcdf', 9998 )
     833          WRITE ( message_string, * ) 'NetCDF file for ', TRIM( var ), &
     834               ' data for mask', mid, ' from previous run found.', &
     835               '&This file will be extended.'
     836          CALL message( 'define_netcdf_header', 'PA9998', 0, 0, 0, 6, 0 )
     837!
     838!--       restore original parameter file_id (=formal parameter av) into av
     839          av = file_id
     840
    196841
    197842       CASE ( '3d_new' )
  • palm/trunk/SOURCE/parin.f90

    r407 r410  
    55! -----------------
    66! +wall_humidityflux, wall_scalarflux
     7!
     8! Branch revisions:
     9! -----------------
     10! Masked data output: + dt_domask, mask_01~20_x|y|z, mask_01~20_x|y|z_loop,
     11! mask_scale_x|y|z, masks, netcdf_format_mask[_av], skip_time_domask
    712!
    813! Former revisions:
     
    108113             lad_vertical_gradient, lad_vertical_gradient_level, &
    109114             leaf_surface_concentration, long_filter_factor, &
    110              loop_optimization, mixing_length_1d, momentum_advec, &
     115             loop_optimization, mixing_length_1d, masks, momentum_advec, &
    111116             netcdf_precision, nsor_ini, nx, ny, &
    112117             nz, ocean, omega, outflow_damping_width, overshoot_limit_e, &
     
    140145                       cross_normalized_y, cross_profiles, cross_ts_uymax, &
    141146                       cross_ts_uymin, cross_xtext, cycle_mg, data_output, &
    142                        data_output_format, data_output_pr, &
     147                       data_output_format, &
     148                       data_output_mask_01, data_output_mask_02, &
     149                       data_output_mask_03, data_output_mask_04, &
     150                       data_output_mask_05, data_output_mask_06, &
     151                       data_output_mask_07, data_output_mask_08, &
     152                       data_output_mask_09, data_output_mask_10, &
     153                       data_output_mask_11, data_output_mask_12, &
     154                       data_output_mask_13, data_output_mask_14, &
     155                       data_output_mask_15, data_output_mask_16, &
     156                       data_output_mask_17, data_output_mask_18, &
     157                       data_output_mask_19, data_output_mask_20, &
     158                       data_output_pr, &
    143159                       data_output_2d_on_each_pe, disturbance_amplitude, &
    144160                       disturbance_energy_limit, disturbance_level_b, &
     
    146162                       do3d_compress, do3d_comp_prec, dt, dt_averaging_input, &
    147163                       dt_averaging_input_pr, dt_coupling, dt_data_output, &
    148                        dt_data_output_av, dt_disturb, dt_dopr, &
     164                       dt_data_output_av, dt_disturb, dt_domask, dt_dopr, &
    149165                       dt_dopr_listing, dt_dots, dt_do2d_xy, dt_do2d_xz, &
    150166                       dt_do2d_yz, dt_do3d, dt_max, dt_restart, dt_run_control,&
    151                        end_time, force_print_header, mg_cycles, &
    152                        mg_switch_to_pe0_level, netcdf_64bit, netcdf_64bit_3d, &
     167                       end_time, force_print_header, &
     168                       mask_scale_x, mask_scale_y, mask_scale_z, &
     169                       mask_01_x, mask_02_x, mask_03_x, mask_04_x, &
     170                       mask_05_x, mask_06_x, mask_07_x, mask_08_x, &
     171                       mask_09_x, mask_10_x, mask_11_x, mask_12_x, &
     172                       mask_13_x, mask_14_x, mask_15_x, mask_16_x, &
     173                       mask_17_x, mask_18_x, mask_19_x, mask_20_x, &
     174                       mask_01_y, mask_02_y, mask_03_y, mask_04_y, &
     175                       mask_05_y, mask_06_y, mask_07_y, mask_08_y, &
     176                       mask_09_y, mask_10_y, mask_11_y, mask_12_y, &
     177                       mask_13_y, mask_14_y, mask_15_y, mask_16_y, &
     178                       mask_17_y, mask_18_y, mask_19_y, mask_20_y, &
     179                       mask_01_z, mask_02_z, mask_03_z, mask_04_z, &
     180                       mask_05_z, mask_06_z, mask_07_z, mask_08_z, &
     181                       mask_09_z, mask_10_z, mask_11_z, mask_12_z, &
     182                       mask_13_z, mask_14_z, mask_15_z, mask_16_z, &
     183                       mask_17_z, mask_18_z, mask_19_z, mask_20_z, &
     184                       mask_01_x_loop, mask_02_x_loop, mask_03_x_loop, &
     185                       mask_04_x_loop, mask_05_x_loop, mask_06_x_loop, &
     186                       mask_07_x_loop, mask_08_x_loop, mask_09_x_loop, &
     187                       mask_10_x_loop, mask_11_x_loop, mask_12_x_loop, &
     188                       mask_13_x_loop, mask_14_x_loop, mask_15_x_loop, &
     189                       mask_16_x_loop, mask_17_x_loop, mask_18_x_loop, &
     190                       mask_19_x_loop, mask_20_x_loop, &
     191                       mask_01_y_loop, mask_02_y_loop, mask_03_y_loop, &
     192                       mask_04_y_loop, mask_05_y_loop, mask_06_y_loop, &
     193                       mask_07_y_loop, mask_08_y_loop, mask_09_y_loop, &
     194                       mask_10_y_loop, mask_11_y_loop, mask_12_y_loop, &
     195                       mask_13_y_loop, mask_14_y_loop, mask_15_y_loop, &
     196                       mask_16_y_loop, mask_17_y_loop, mask_18_y_loop, &
     197                       mask_19_y_loop, mask_20_y_loop, &
     198                       mask_01_z_loop, mask_02_z_loop, mask_03_z_loop, &
     199                       mask_04_z_loop, mask_05_z_loop, mask_06_z_loop, &
     200                       mask_07_z_loop, mask_08_z_loop, mask_09_z_loop, &
     201                       mask_10_z_loop, mask_11_z_loop, mask_12_z_loop, &
     202                       mask_13_z_loop, mask_14_z_loop, mask_15_z_loop, &
     203                       mask_16_z_loop, mask_17_z_loop, mask_18_z_loop, &
     204                       mask_19_z_loop, mask_20_z_loop, &
     205                       mg_cycles, mg_switch_to_pe0_level, &
     206                       netcdf_64bit, netcdf_64bit_3d, &
     207                       netcdf_format_mask, netcdf_format_mask_av, &
    153208                       ngsrb, normalizing_region, npex, npey, nsor, nz_do3d, &
    154209                       omega_sor, &
     
    160215                       skip_time_data_output_av, skip_time_dopr, &
    161216                       skip_time_do2d_xy, skip_time_do2d_xz, &
    162                        skip_time_do2d_yz, skip_time_do3d, &
     217                       skip_time_do2d_yz, skip_time_do3d, skip_time_domask, &
    163218                       termination_time_needed, use_prior_plot1d_parameters, &
    164219                       z_max_do1d, z_max_do1d_normalized, z_max_do2d
  • palm/trunk/SOURCE/production_e.f90

    r392 r410  
    635635       USE indices
    636636       USE statistics
    637 
     637USE pegrid
    638638       IMPLICIT NONE
    639639
     
    988988
    989989                DO  k = nzb_diff_s_inner(j,i), nzt_diff
     990IF ( pt(k,j,i) == 0.0 .OR. dd2zu(k) == 0.0 )  &
     991WRITE (*,'(6(I4,1X),F6.2,1X,F6.2)')  &
     992myid, i, j, nzb_diff_s_inner(j,i), nzt_diff, k, pt(k,j,i), dd2zu(k)
    990993                   tend(k,j,i) = tend(k,j,i) - kh(k,j,i) * g / pt(k,j,i) * &
    991994                                       ( pt(k+1,j,i) - pt(k-1,j,i) ) * dd2zu(k)
  • palm/trunk/SOURCE/read_3d_binary.f90

    r392 r410  
    181181          DO  k = 1, j
    182182             WRITE (9,*) 'k = ', k
    183              WRITE (9,'(6(A,I2))')  'nxlfa = ', nxlfa(files_to_be_opened,k), &
     183             WRITE (9,'(6(A,I4))')  'nxlfa = ', nxlfa(files_to_be_opened,k), &
    184184                         ' nxrfa = ', nxrfa(files_to_be_opened,k), &
    185185                         ' offset_xa = ', offset_xa(files_to_be_opened,k), &
  • palm/trunk/SOURCE/time_integration.f90

    r398 r410  
    55! -----------------
    66! Bugfix: exchange of ghost points for prho included
     7!
     8! Branch revisions:
     9! -----------------
     10! masked data output
    711!
    812! Former revisions:
     
    324328          time_do3d          = time_do3d        + dt_3d
    325329       ENDIF
     330       DO  mid = 1, masks
     331          IF ( simulated_time >= skip_time_domask(mid) )  THEN
     332             time_domask(mid)= time_domask(mid) + dt_3d
     333          ENDIF
     334       ENDDO
    326335       time_dvrp          = time_dvrp        + dt_3d
    327336       IF ( simulated_time >= skip_time_dosp )  THEN
     
    399408
    400409!
    401 !--    Sum-up 3d-arrays for later output of time-averaged data
     410!--    Sum-up 3d-arrays for later output of time-averaged 2d/3d/masked data
    402411       IF ( averaging_interval /= 0.0  .AND.                                &
    403412            ( dt_data_output_av - time_do_av ) <= averaging_interval  .AND. &
     
    495504
    496505!
    497 !--    Output of time-averaged 2d/3d-data
     506!--    masked data output
     507       DO  mid = 1, masks
     508          IF ( time_domask(mid) >= dt_domask(mid) )  THEN
     509             CALL data_output_mask( 0 )
     510             time_domask(mid) = MOD( time_domask(mid),  &
     511                                     MAX( dt_domask(mid), dt_3d ) )
     512          ENDIF
     513       ENDDO
     514
     515!
     516!--    Output of time-averaged 2d/3d/masked data
    498517       IF ( time_do_av >= dt_data_output_av )  THEN
    499518          CALL average_3d_data
     
    502521          CALL data_output_2d( 'yz', 1 )
    503522          CALL data_output_3d( 1 )
     523          DO  mid = 1, masks
     524             CALL data_output_mask( 1 )
     525          ENDDO
    504526          time_do_av = MOD( time_do_av, MAX( dt_data_output_av, dt_3d ) )
    505527       ENDIF
  • palm/trunk/SOURCE/user_parin.f90

    r392 r410  
    55! -----------------
    66!
     7!
     8! Branch revisions:
     9! -----------------
     10! masked data output
    711!
    812! Former revisions:
     
    3539
    3640
    37     NAMELIST /userpar/  data_output_pr_user, data_output_user, region
     41    NAMELIST /userpar/  data_output_pr_user, data_output_user, region,  &
     42                        data_output_mask_user_01, data_output_mask_user_02, &
     43                        data_output_mask_user_03, data_output_mask_user_04, &
     44                        data_output_mask_user_05, data_output_mask_user_06, &
     45                        data_output_mask_user_07, data_output_mask_user_08, &
     46                        data_output_mask_user_09, data_output_mask_user_10, &
     47                        data_output_mask_user_11, data_output_mask_user_12, &
     48                        data_output_mask_user_13, data_output_mask_user_14, &
     49                        data_output_mask_user_15, data_output_mask_user_16, &
     50                        data_output_mask_user_17, data_output_mask_user_18, &
     51                        data_output_mask_user_19, data_output_mask_user_20
    3852
    3953!
Note: See TracChangeset for help on using the changeset viewer.