Changeset 3472 for palm/trunk/SOURCE


Ignore:
Timestamp:
Oct 30, 2018 8:43:50 PM (5 years ago)
Author:
suehring
Message:

module for virtual measurements added (in a preliminary state); new public routines to input NetCDF data directly from modules

Location:
palm/trunk/SOURCE
Files:
7 edited
1 copied

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/Makefile

    r3469 r3472  
    2020# Current revisions:
    2121# ------------------
    22 #
     22# Add virtual measurement module
    2323#
    2424# Former revisions:
     
    696696        vertical_nesting_mod.f90 \
    697697        virtual_flight_mod.f90 \
     698        virtual_measurement_mod.f90 \
    698699        wind_turbine_model_mod.f90 \
    699700        wrd_write_string.f90 \
     
    11341135        uv_exposure_model_mod.o \
    11351136        virtual_flight_mod.o \
     1137        virtual_measurement_mod.o \
    11361138        wind_turbine_model_mod.o
    11371139init_advec.o: \
     
    14511453        vertical_nesting_mod.o \
    14521454        virtual_flight_mod.o \
     1455        virtual_measurement_mod.o \
    14531456        wind_turbine_model_mod.o
    14541457plant_canopy_model_mod.o: \
     
    17501753        vertical_nesting_mod.o \
    17511754        virtual_flight_mod.o \
     1755        virtual_measurement_mod.o \
    17521756        wind_turbine_model_mod.o
    17531757time_integration_spinup.o: \
     
    19681972        user_flight.o \
    19691973        user_init_flight.o
     1974virtual_measurement_mod.o: \
     1975        cpulog_mod.o \
     1976        mod_kinds.o \
     1977        modules.o \
     1978        netcdf_data_input_mod.o \
     1979        netcdf_interface_mod.o
    19701980wind_turbine_model_mod.o: \
    19711981        basic_constants_and_equations_mod.o \
  • palm/trunk/SOURCE/check_parameters.f90

  • palm/trunk/SOURCE/init_3d_model.f90

    r3469 r3472  
    2020! Current revisions:
    2121! ------------------
    22 !
     22! Add virtual measurement module
    2323!
    2424! Former revisions:
     
    664664    USE uv_exposure_model_mod,                                                 &
    665665        ONLY:  uvem_init, uvem_init_arrays
     666       
     667    USE virtual_measurement_mod,                                               &
     668        ONLY:  vm_init
    666669
    667670    USE wind_turbine_model_mod,                                                &
     
    24432446       CALL surface_output_init
    24442447    ENDIF
     2448!
     2449!-- If virtual measurements should be taken, initialize all relevant
     2450!-- arrays and quantities.
     2451    IF ( virtual_measurement )  CALL vm_init
    24452452
    24462453!
  • palm/trunk/SOURCE/modules.f90

    r3469 r3472  
    2020! Current revisions:
    2121! ------------------
    22 !
     22! +virtual_measurement
    2323!
    2424! Former revisions:
     
    13981398    LOGICAL ::  use_upstream_for_tke = .FALSE.                   !< namelist parameter
    13991399    LOGICAL ::  uv_exposure = .FALSE.                            !< switch for uv exposure model
    1400     LOGICAL ::  virtual_flight = .FALSE.                         !< use virtual flight model?
     1400    LOGICAL ::  virtual_flight = .FALSE.                         !< use virtual flight model
     1401    LOGICAL ::  virtual_measurement = .FALSE.                    !< control parameter to switch-on virtual measurements
    14011402    LOGICAL ::  wall_adjustment = .TRUE.                         !< namelist parameter
    14021403    LOGICAL ::  wind_turbine = .FALSE.                           !< flag for use of wind turbine model
  • palm/trunk/SOURCE/netcdf_data_input_mod.f90

    r3467 r3472  
    228228!> Modulue contains routines to input data according to Palm input data
    229229!> standart using dynamic and static input files.
    230 !> @todo - Review Reading of netcdf files for chemistry
     230!> @todo - Chemistry: revise reading of netcdf file and ajdust formatting according to standard!!!
    231231!> @todo - Order input alphabetically
    232232!> @todo - Revise error messages and error numbers
     
    670670    CHARACTER(LEN=100) ::  input_file_dynamic = 'PIDS_DYNAMIC' !< Name of file which comprises dynamic input data
    671671    CHARACTER(LEN=100) ::  input_file_chem    = 'PIDS_CHEM'    !< Name of file which comprises chemistry input data
    672 
    673     CHARACTER (LEN=25), ALLOCATABLE, DIMENSION(:)    :: string_values  !< output of string variables read from netcdf input files
     672    CHARACTER(LEN=100) ::  input_file_vm      = 'PIDS_VM'      !< Name of file which comprises virtual measurement data
     673
     674    CHARACTER (LEN=25), ALLOCATABLE, DIMENSION(:)    ::  string_values  !< output of string variables read from netcdf input files
    674675 
    675     INTEGER(iwp)                                     :: id_emis        !< NetCDF id of input file for chemistry emissions: TBD: It has to be removed
     676    INTEGER(iwp)                                     ::  id_emis        !< NetCDF id of input file for chemistry emissions: TBD: It has to be removed
    676677
    677678    INTEGER(iwp) ::  nc_stat         !< return value of nf90 function call
     
    679680    LOGICAL ::  input_pids_static  = .FALSE.   !< Flag indicating whether Palm-input-data-standard file containing static information exists
    680681    LOGICAL ::  input_pids_dynamic = .FALSE.   !< Flag indicating whether Palm-input-data-standard file containing dynamic information exists
    681     LOGICAL ::  input_pids_chem = .FALSE.      !< Flag indicating whether Palm-input-data-standard file containing chemistry information exists
    682 
     682    LOGICAL ::  input_pids_chem    = .FALSE.   !< Flag indicating whether Palm-input-data-standard file containing chemistry information exists
     683    LOGICAL ::  input_pids_vm      = .FALSE.   !< Flag indicating whether input file for virtual measurements exist
     684   
    683685    LOGICAL ::  collective_read = .FALSE.      !< Enable NetCDF collective read
    684686
     
    707709       MODULE PROCEDURE netcdf_data_input_chemistry_data
    708710    END INTERFACE netcdf_data_input_chemistry_data
     711   
     712    INTERFACE netcdf_data_input_get_dimension_length                       
     713       MODULE PROCEDURE netcdf_data_input_get_dimension_length
     714    END INTERFACE netcdf_data_input_get_dimension_length
    709715
    710716    INTERFACE netcdf_data_input_inquire_file
     
    715721       MODULE PROCEDURE netcdf_data_input_init
    716722    END INTERFACE netcdf_data_input_init
     723   
     724    INTERFACE netcdf_data_input_att
     725       MODULE PROCEDURE netcdf_data_input_att_int
     726       MODULE PROCEDURE netcdf_data_input_att_real
     727       MODULE PROCEDURE netcdf_data_input_att_string
     728    END INTERFACE netcdf_data_input_att
    717729
    718730    INTERFACE netcdf_data_input_init_3d
     
    732744    END INTERFACE netcdf_data_input_surface_data
    733745
    734     INTERFACE netcdf_data_input_topo
    735        MODULE PROCEDURE netcdf_data_input_topo
    736     END INTERFACE netcdf_data_input_topo
     746    INTERFACE netcdf_data_input_var
     747       MODULE PROCEDURE netcdf_data_input_var_char
     748       MODULE PROCEDURE netcdf_data_input_var_real_1d
     749       MODULE PROCEDURE netcdf_data_input_var_real_2d
     750    END INTERFACE netcdf_data_input_var
    737751
    738752    INTERFACE get_variable
    739        MODULE PROCEDURE get_variable_string
     753       MODULE PROCEDURE get_variable_1d_char
    740754       MODULE PROCEDURE get_variable_1d_int
    741755       MODULE PROCEDURE get_variable_1d_real
     
    749763       MODULE PROCEDURE get_variable_4d_real
    750764       MODULE PROCEDURE get_variable_5d_to_4d_real
     765       MODULE PROCEDURE get_variable_string       
    751766    END INTERFACE get_variable
    752767
     
    769784           coord_ref_sys,                                                      &
    770785           init_3d, init_model, input_file_static, input_pids_static,          &
    771            input_pids_dynamic, leaf_area_density_f, nest_offl,                 &
     786           input_pids_dynamic, input_pids_vm, input_file_vm,                   &
     787           leaf_area_density_f, nest_offl,                                     &
    772788           pavement_pars_f, pavement_subsurface_pars_f, pavement_type_f,       &
    773789           root_area_density_lad_f, root_area_density_lsm_f, soil_pars_f,      &
     
    779795!-- Public subroutines
    780796    PUBLIC netcdf_data_input_check_dynamic, netcdf_data_input_check_static,    &
    781            netcdf_data_input_chemistry_data, netcdf_data_input_inquire_file,   &
     797           netcdf_data_input_chemistry_data,                                   &
     798           netcdf_data_input_get_dimension_length,                             &
     799           netcdf_data_input_inquire_file,                                     &
    782800           netcdf_data_input_init, netcdf_data_input_init_lsm,                 &
    783            netcdf_data_input_init_3d,                                          &
     801           netcdf_data_input_init_3d, netcdf_data_input_att,                   &
    784802           netcdf_data_input_interpolate, netcdf_data_input_offline_nesting,   &
    785803           netcdf_data_input_surface_data, netcdf_data_input_topo,             &
    786            get_attribute, get_dimension_length, get_variable, open_read_file
     804           netcdf_data_input_var, get_attribute, get_variable, open_read_file
    787805
    788806 CONTAINS
     
    802820
    803821#if defined ( __netcdf )
    804        INQUIRE( FILE = TRIM( input_file_static ) // TRIM( coupling_char ),     &
     822       INQUIRE( FILE = TRIM( input_file_static )   // TRIM( coupling_char ),   &
    805823                EXIST = input_pids_static  )
    806824       INQUIRE( FILE = TRIM( input_file_dynamic ) // TRIM( coupling_char ),    &
    807825                EXIST = input_pids_dynamic )
    808        INQUIRE( FILE = TRIM( input_file_chem ) // TRIM( coupling_char ),    &
     826       INQUIRE( FILE = TRIM( input_file_chem )    // TRIM( coupling_char ),    &
    809827                EXIST = input_pids_chem )
    810 
     828       INQUIRE( FILE = TRIM( input_file_vm )      // TRIM( coupling_char ),    &
     829                EXIST = input_pids_vm )
    811830#endif
    812831
     
    933952
    934953    END SUBROUTINE netcdf_data_input_init
     954   
     955!------------------------------------------------------------------------------!
     956! Description:
     957! ------------
     958!> Read an array of characters.
     959!------------------------------------------------------------------------------!
     960    SUBROUTINE netcdf_data_input_var_char( val, search_string, id_mod )
     961
     962       IMPLICIT NONE
     963
     964       CHARACTER(LEN=*) ::  search_string     !< name of the variable
     965       CHARACTER(LEN=*), DIMENSION(:) ::  val !< variable which should be read
     966       
     967       INTEGER(iwp) ::  id_mod   !< NetCDF id of input file
     968
     969#if defined ( __netcdf )
     970!
     971!--    Read variable
     972       CALL get_variable( id_mod, search_string, val )
     973#endif           
     974
     975    END SUBROUTINE netcdf_data_input_var_char
     976   
     977!------------------------------------------------------------------------------!
     978! Description:
     979! ------------
     980!> Read an 1D array of REAL values.
     981!------------------------------------------------------------------------------!
     982    SUBROUTINE netcdf_data_input_var_real_1d( val, search_string, id_mod )
     983
     984       IMPLICIT NONE
     985
     986       CHARACTER(LEN=*) ::  search_string     !< name of the variable     
     987       
     988       INTEGER(iwp) ::  id_mod        !< NetCDF id of input file
     989       
     990       REAL(wp), DIMENSION(:) ::  val !< variable which should be read
     991
     992#if defined ( __netcdf )
     993!
     994!--    Read variable
     995       CALL get_variable( id_mod, search_string, val )
     996#endif           
     997
     998    END SUBROUTINE netcdf_data_input_var_real_1d
     999   
     1000!------------------------------------------------------------------------------!
     1001! Description:
     1002! ------------
     1003!> Read an 1D array of REAL values.
     1004!------------------------------------------------------------------------------!
     1005    SUBROUTINE netcdf_data_input_var_real_2d( val, search_string,              &
     1006                                              id_mod, d1s, d1e, d2s, d2e )
     1007
     1008       IMPLICIT NONE
     1009
     1010       CHARACTER(LEN=*) ::  search_string     !< name of the variable     
     1011       
     1012       INTEGER(iwp) ::  id_mod  !< NetCDF id of input file
     1013       INTEGER(iwp) ::  d1e     !< end index of first dimension to be read
     1014       INTEGER(iwp) ::  d2e     !< end index of second dimension to be read
     1015       INTEGER(iwp) ::  d1s     !< start index of first dimension to be read
     1016       INTEGER(iwp) ::  d2s     !< start index of second dimension to be read
     1017       
     1018       REAL(wp), DIMENSION(:,:) ::  val !< variable which should be read
     1019
     1020#if defined ( __netcdf )
     1021!
     1022!--    Read character variable
     1023       CALL get_variable( id_mod, search_string, val, d1s, d1e, d2s, d2e )
     1024#endif           
     1025
     1026    END SUBROUTINE netcdf_data_input_var_real_2d
     1027   
     1028!------------------------------------------------------------------------------!
     1029! Description:
     1030! ------------
     1031!> Read a global string attribute
     1032!------------------------------------------------------------------------------!
     1033    SUBROUTINE netcdf_data_input_att_string( val, search_string, id_mod,       &
     1034                                             input_file, global, openclose,    &
     1035                                             variable_name )
     1036
     1037       IMPLICIT NONE
     1038
     1039       CHARACTER(LEN=*) ::  search_string !< name of the attribue
     1040       CHARACTER(LEN=*) ::  val           !< attribute
     1041       
     1042       CHARACTER(LEN=*) ::  input_file    !< name of input file
     1043       CHARACTER(LEN=*) ::  openclose     !< string indicating whether NetCDF needs to be opend or closed
     1044       CHARACTER(LEN=*) ::  variable_name !< string indicating whether NetCDF needs to be opend or closed 
     1045       
     1046       INTEGER(iwp) ::  id_mod   !< NetCDF id of input file
     1047       
     1048       LOGICAL ::  global                 !< flag indicating a global or a variable's attribute
     1049
     1050#if defined ( __netcdf )
     1051!
     1052!--    Open file in read-only mode if necessary
     1053       IF ( openclose == 'open' )  THEN
     1054          CALL open_read_file( TRIM( input_file ) // TRIM( coupling_char ), &
     1055                                  id_mod )
     1056       ENDIF
     1057!
     1058!--    Read global attribute
     1059       IF ( global )  THEN
     1060          CALL get_attribute( id_mod, search_string, val, global )
     1061!
     1062!--    Read variable attribute
     1063       ELSE
     1064          CALL get_attribute( id_mod, search_string, val, global, variable_name )
     1065       ENDIF
     1066!
     1067!--    Close input file
     1068       IF ( openclose == 'close' )  CALL close_input_file( id_mod )
     1069#endif           
     1070
     1071    END SUBROUTINE netcdf_data_input_att_string
     1072   
     1073!------------------------------------------------------------------------------!
     1074! Description:
     1075! ------------
     1076!> Read a global integer attribute
     1077!------------------------------------------------------------------------------!
     1078    SUBROUTINE netcdf_data_input_att_int( val, search_string, id_mod,          &
     1079                                          input_file, global, openclose,       &
     1080                                          variable_name )
     1081
     1082       IMPLICIT NONE
     1083
     1084       CHARACTER(LEN=*) ::  search_string !< name of the attribue
     1085       
     1086       CHARACTER(LEN=*) ::  input_file    !< name of input file
     1087       CHARACTER(LEN=*) ::  openclose     !< string indicating whether NetCDF needs to be opend or closed
     1088       CHARACTER(LEN=*) ::  variable_name !< string indicating whether NetCDF needs to be opend or closed
     1089       
     1090       INTEGER(iwp) ::  id_mod   !< NetCDF id of input file
     1091       INTEGER(iwp) ::  val      !< value of the attribute
     1092       
     1093       LOGICAL ::  global                 !< flag indicating a global or a variable's attribute
     1094
     1095#if defined ( __netcdf )
     1096!
     1097!--    Open file in read-only mode
     1098       IF ( openclose == 'open' )  THEN
     1099          CALL open_read_file( TRIM( input_file ) // TRIM( coupling_char ), &
     1100                                  id_mod )
     1101       ENDIF
     1102!
     1103!--    Read global attribute
     1104       IF ( global )  THEN
     1105          CALL get_attribute( id_mod, search_string, val, global )
     1106!
     1107!--    Read variable attribute
     1108       ELSE
     1109          CALL get_attribute( id_mod, search_string, val, global, variable_name )
     1110       ENDIF
     1111!
     1112!--    Finally, close input file
     1113       IF ( openclose == 'close' )  CALL close_input_file( id_mod )
     1114#endif           
     1115
     1116    END SUBROUTINE netcdf_data_input_att_int
     1117   
     1118!------------------------------------------------------------------------------!
     1119! Description:
     1120! ------------
     1121!> Read a global real attribute
     1122!------------------------------------------------------------------------------!
     1123    SUBROUTINE netcdf_data_input_att_real( val, search_string, id_mod,         &
     1124                                           input_file, global, openclose,      &
     1125                                           variable_name )
     1126
     1127       IMPLICIT NONE
     1128
     1129       CHARACTER(LEN=*) ::  search_string !< name of the attribue
     1130       
     1131       CHARACTER(LEN=*) ::  input_file    !< name of input file
     1132       CHARACTER(LEN=*) ::  openclose     !< string indicating whether NetCDF needs to be opend or closed
     1133       CHARACTER(LEN=*) ::  variable_name !< string indicating whether NetCDF needs to be opend or closed
     1134       
     1135       INTEGER(iwp) ::  id_mod            !< NetCDF id of input file
     1136       
     1137       LOGICAL ::  global                 !< flag indicating a global or a variable's attribute
     1138       
     1139       REAL(wp) ::  val                   !< value of the attribute
     1140
     1141#if defined ( __netcdf )
     1142!
     1143!--    Open file in read-only mode
     1144       IF ( openclose == 'open' )  THEN
     1145          CALL open_read_file( TRIM( input_file ) // TRIM( coupling_char ), &
     1146                                  id_mod )
     1147       ENDIF
     1148!
     1149!--    Read global attribute
     1150       IF ( global )  THEN
     1151          CALL get_attribute( id_mod, search_string, val, global )
     1152!
     1153!--    Read variable attribute
     1154       ELSE
     1155          CALL get_attribute( id_mod, search_string, val, global, variable_name )
     1156       ENDIF
     1157!
     1158!--    Finally, close input file
     1159       IF ( openclose == 'close' )  CALL close_input_file( id_mod )
     1160#endif           
     1161
     1162    END SUBROUTINE netcdf_data_input_att_real
    9351163
    9361164!------------------------------------------------------------------------------!
     
    10221250          !                                  the other dimensions depend on the mode of the emissions or on the presence of specific components
    10231251          !nspecies
    1024           CALL get_dimension_length( id_emis, emt_att%nspec, 'nspecies' )
     1252          CALL netcdf_data_input_get_dimension_length( id_emis, emt_att%nspec, 'nspecies' )
    10251253
    10261254 
     
    10511279 
    10521280             !number of categories
    1053              CALL get_dimension_length( id_emis, emt_att%ncat, 'ncat' )
     1281             CALL netcdf_data_input_get_dimension_length( id_emis, emt_att%ncat, 'ncat' )
    10541282
    10551283             !-- Read EMISSION CATEGORIES INDEX
     
    10641292                IF (TRIM(emt_att%species_name(ispec))=="VOC" .OR. TRIM(emt_att%species_name(ispec))=="voc") THEN
    10651293                   !Allocate Array
    1066                    CALL get_dimension_length( id_emis, emt_att%nvoc, 'nvoc' )
     1294                   CALL netcdf_data_input_get_dimension_length( id_emis, emt_att%nvoc, 'nvoc' )
    10671295                   ALLOCATE(emt_att%voc_name(1:emt_att%nvoc))
    10681296                   !Read-in Variable
     
    10811309                !-- EMISSION_PM_NAME (1-DIMENSIONAL)
    10821310                IF (TRIM(emt_att%species_name(ispec))=="PM" .OR. TRIM(emt_att%species_name(ispec))=="pm") THEN
    1083                    CALL get_dimension_length( id_emis, emt_att%npm, 'npm' )
     1311                   CALL netcdf_data_input_get_dimension_length( id_emis, emt_att%npm, 'npm' )
    10841312                   ALLOCATE(emt_att%pm_name(1:emt_att%npm))
    10851313                   !Read-in Variable
     
    11181346             IF (TRIM(time_fac_type)=="HOUR" .OR. TRIM(time_fac_type)=="hour") THEN
    11191347                !-- Allocate Array
    1120                 CALL get_dimension_length( id_emis, emt_att%nhoursyear, 'nhoursyear' )
     1348                CALL netcdf_data_input_get_dimension_length( id_emis, emt_att%nhoursyear, 'nhoursyear' )
    11211349                ALLOCATE(emt_att%hourly_emis_time_factor(1:emt_att%ncat,1:emt_att%nhoursyear))
    11221350                !Read-in Variable
     
    11271355             ELSE IF (TRIM(time_fac_type) == "MDH" .OR. TRIM(time_fac_type) == "mdh") THEN
    11281356                !-- Allocate Array
    1129                 CALL get_dimension_length( id_emis, emt_att%nmonthdayhour, 'nmonthdayhour' )
     1357                CALL netcdf_data_input_get_dimension_length( id_emis, emt_att%nmonthdayhour, 'nmonthdayhour' )
    11301358                ALLOCATE(emt_att%mdh_emis_time_factor(1:emt_att%ncat,1:emt_att%nmonthdayhour))
    11311359                !-- Read-in Variable
     
    11761404                IF (TRIM(emt_att%species_name(ispec))=="VOC" .OR. TRIM(emt_att%species_name(ispec))=="voc") THEN
    11771405                   !Allocate Array
    1178                    CALL get_dimension_length( id_emis, emt_att%nvoc, 'nvoc' )
     1406                   CALL netcdf_data_input_get_dimension_length( id_emis, emt_att%nvoc, 'nvoc' )
    11791407                   ALLOCATE(emt_att%voc_name(1:emt_att%nvoc))
    11801408                   !Read-in Variable
     
    11941422             !-- EMISSION_VALUES (4-DIMENSIONAL)
    11951423             !Calculate temporal dimension length
    1196              CALL get_dimension_length( id_emis, emt_att%dt_emission, 'time' )   
     1424             CALL netcdf_data_input_get_dimension_length( id_emis, emt_att%dt_emission, 'time' )   
    11971425         
    11981426
     
    12941522!
    12951523!--          Inquire number of vertical vegetation layer
    1296              CALL get_dimension_length( id_surf, leaf_area_density_f%nz,       &
    1297                                         'zlad' )
     1524             CALL netcdf_data_input_get_dimension_length( id_surf,             &
     1525                                                 leaf_area_density_f%nz,       &
     1526                                                 'zlad' )
    12981527!
    12991528!--          Allocate variable for leaf-area density
     
    13181547!
    13191548!--          Inquire number of vertical vegetation layer
    1320              CALL get_dimension_length( id_surf, basal_area_density_f%nz,      &
    1321                                         'zlad' )
     1549             CALL netcdf_data_input_get_dimension_length( id_surf,             &
     1550                                                 basal_area_density_f%nz,      &
     1551                                                 'zlad' )
    13221552!
    13231553!--          Allocate variable
     
    13411571!
    13421572!--          Inquire number of vertical soil layers
    1343              CALL get_dimension_length( id_surf,                               &
    1344                                         root_area_density_lad_f%nz,            &
    1345                                         'zsoil' )
     1573             CALL netcdf_data_input_get_dimension_length( id_surf,             &
     1574                                                   root_area_density_lad_f%nz, &
     1575                                                  'zsoil' )
    13461576!
    13471577!--          Allocate variable
     
    14271657!
    14281658!--          Obtain number of soil layers from file.
    1429              CALL get_dimension_length( id_surf, nz_soil, 'zsoil' )
     1659             CALL netcdf_data_input_get_dimension_length( id_surf, nz_soil,    &
     1660                                                          'zsoil' )
    14301661
    14311662             ALLOCATE ( soil_type_f%var_3d(0:nz_soil,nys:nyn,nxl:nxr) )
     
    14791710!
    14801711!--       Inquire number of surface fractions
    1481           CALL get_dimension_length( id_surf,                                  &
    1482                                      surface_fraction_f%nf,                    &
    1483                                      'nsurface_fraction' )
     1712          CALL netcdf_data_input_get_dimension_length( id_surf,                &
     1713                                                       surface_fraction_f%nf,  &
     1714                                                       'nsurface_fraction' )
    14841715!
    14851716!--       Allocate dimension array and input array for surface fractions
     
    15081739!
    15091740!--       Inquire number of building parameters
    1510           CALL get_dimension_length( id_surf,                                  &
    1511                                      building_pars_f%np,                       &
    1512                                      'nbuilding_pars' )
     1741          CALL netcdf_data_input_get_dimension_length( id_surf,                &
     1742                                                       building_pars_f%np,     &
     1743                                                       'nbuilding_pars' )
    15131744!
    15141745!--       Allocate dimension array and input array for building parameters
     
    15511782!
    15521783!--       Inquire number of albedo parameters
    1553           CALL get_dimension_length( id_surf, albedo_pars_f%np,                &
    1554                                      'nalbedo_pars' )
     1784          CALL netcdf_data_input_get_dimension_length( id_surf,                &
     1785                                                       albedo_pars_f%np,       &
     1786                                                       'nalbedo_pars' )
    15551787!
    15561788!--       Allocate dimension array and input array for albedo parameters
     
    15781810!
    15791811!--       Inquire number of pavement parameters
    1580           CALL get_dimension_length( id_surf, pavement_pars_f%np,              &
    1581                                      'npavement_pars' )
     1812          CALL netcdf_data_input_get_dimension_length( id_surf,                &
     1813                                                       pavement_pars_f%np,     &
     1814                                                       'npavement_pars' )
    15821815!
    15831816!--       Allocate dimension array and input array for pavement parameters
     
    16061839!
    16071840!--       Inquire number of parameters
    1608           CALL get_dimension_length( id_surf,                                  &
    1609                                      pavement_subsurface_pars_f%np,            &
    1610                                      'npavement_subsurface_pars' )
     1841          CALL netcdf_data_input_get_dimension_length( id_surf,                &
     1842                                                pavement_subsurface_pars_f%np, &
     1843                                               'npavement_subsurface_pars' )
    16111844!
    16121845!--       Inquire number of soil layers
    1613           CALL get_dimension_length( id_surf,                                  &
    1614                                      pavement_subsurface_pars_f%nz,            &
    1615                                      'zsoil' )
     1846          CALL netcdf_data_input_get_dimension_length( id_surf,                &
     1847                                                pavement_subsurface_pars_f%nz, &
     1848                                                'zsoil' )
    16161849!
    16171850!--       Allocate dimension array and input array for pavement parameters
     
    16461879!
    16471880!--       Inquire number of vegetation parameters
    1648           CALL get_dimension_length( id_surf, vegetation_pars_f%np,            &
    1649                                      'nvegetation_pars' )
     1881          CALL netcdf_data_input_get_dimension_length( id_surf,                &
     1882                                                       vegetation_pars_f%np,   &
     1883                                                       'nvegetation_pars' )
    16501884!
    16511885!--       Allocate dimension array and input array for surface fractions
     
    16791913!
    16801914!--       Inquire number of soil parameters
    1681           CALL get_dimension_length( id_surf,                                  &
    1682                                      soil_pars_f%np,                           &
    1683                                      'nsoil_pars' )
     1915          CALL netcdf_data_input_get_dimension_length( id_surf,                &
     1916                                                       soil_pars_f%np,         &
     1917                                                       'nsoil_pars' )
    16841918!
    16851919!--       Read parameters array
     
    16911925!--       soil layers, allocate memory and read the respective dimension
    16921926          IF ( soil_pars_f%lod == 2 )  THEN
    1693              CALL get_dimension_length( id_surf, soil_pars_f%nz, 'zsoil' )
     1927             CALL netcdf_data_input_get_dimension_length( id_surf,             &
     1928                                                          soil_pars_f%nz,      &
     1929                                                          'zsoil' )
    16941930
    16951931             ALLOCATE( soil_pars_f%layers(0:soil_pars_f%nz-1) )
     
    17301966!
    17311967!--       Inquire number of water parameters
    1732           CALL get_dimension_length( id_surf,                                  &
    1733                                      water_pars_f%np,                          &
    1734                                      'nwater_pars' )
     1968          CALL netcdf_data_input_get_dimension_length( id_surf,                &
     1969                                                       water_pars_f%np,        &
     1970                                                       'nwater_pars' )
    17351971!
    17361972!--       Allocate dimension array and input array for water parameters
     
    17561992!
    17571993!--       Obtain number of soil layers from file and allocate variable
    1758           CALL get_dimension_length( id_surf, root_area_density_lsm_f%nz,      &
    1759                                      'zsoil' )
     1994          CALL netcdf_data_input_get_dimension_length( id_surf,                &
     1995                                                   root_area_density_lsm_f%nz, &
     1996                                                   'zsoil' )
    17601997          ALLOCATE( root_area_density_lsm_f%var                                &
    17611998                                        (0:root_area_density_lsm_f%nz-1,       &
     
    23092546!
    23102547!--       Read x, y - dimensions. Only required for consistency checks.
    2311           CALL get_dimension_length( id_topo, dim_static%nx, 'x' )
    2312           CALL get_dimension_length( id_topo, dim_static%ny, 'y' )
     2548          CALL netcdf_data_input_get_dimension_length( id_topo, dim_static%nx, 'x' )
     2549          CALL netcdf_data_input_get_dimension_length( id_topo, dim_static%ny, 'y' )
    23132550          ALLOCATE( dim_static%x(0:dim_static%nx-1) )
    23142551          ALLOCATE( dim_static%y(0:dim_static%ny-1) )
     
    23712608                                 .FALSE., 'buildings_3d' )
    23722609
    2373              CALL get_dimension_length( id_topo, buildings_f%nz, 'z' )
     2610             CALL netcdf_data_input_get_dimension_length( id_topo,             &
     2611                                                          buildings_f%nz, 'z' )
    23742612!
    23752613!--          Read 3D buildings
     
    26092847!
    26102848!--    Read vertical dimension of scalar und w grid.
    2611        CALL get_dimension_length( id_dynamic, init_3d%nzu, 'z'     )
    2612        CALL get_dimension_length( id_dynamic, init_3d%nzw, 'zw'    )
     2849       CALL netcdf_data_input_get_dimension_length( id_dynamic, init_3d%nzu, 'z'     )
     2850       CALL netcdf_data_input_get_dimension_length( id_dynamic, init_3d%nzw, 'zw'    )
    26132851!
    26142852!--    Read also the horizontal dimensions. These are used just used fo
    26152853!--    checking the compatibility with the PALM grid before reading.
    2616        CALL get_dimension_length( id_dynamic, init_3d%nx,  'x'  )
    2617        CALL get_dimension_length( id_dynamic, init_3d%nxu, 'xu' )
    2618        CALL get_dimension_length( id_dynamic, init_3d%ny,  'y'  )
    2619        CALL get_dimension_length( id_dynamic, init_3d%nyv, 'yv' )
     2854       CALL netcdf_data_input_get_dimension_length( id_dynamic, init_3d%nx,  'x'  )
     2855       CALL netcdf_data_input_get_dimension_length( id_dynamic, init_3d%nxu, 'xu' )
     2856       CALL netcdf_data_input_get_dimension_length( id_dynamic, init_3d%ny,  'y'  )
     2857       CALL netcdf_data_input_get_dimension_length( id_dynamic, init_3d%nyv, 'yv' )
    26202858
    26212859!
     
    30653303!--    Read vertical dimension for soil depth.
    30663304       IF ( check_existence( var_names, 'zsoil' ) )                            &
    3067           CALL get_dimension_length( id_dynamic, init_3d%nzs, 'zsoil' )
     3305          CALL netcdf_data_input_get_dimension_length( id_dynamic, init_3d%nzs,&
     3306                                                       'zsoil' )
    30683307!
    30693308!--    Read also the horizontal dimensions required for soil initialization.
     
    30713310!--    these data is already available, but will be read again for the sake
    30723311!--    of clearness.
    3073        CALL get_dimension_length( id_dynamic, init_3d%nx,  'x'  )
    3074        CALL get_dimension_length( id_dynamic, init_3d%ny,  'y'  )
     3312       CALL netcdf_data_input_get_dimension_length( id_dynamic, init_3d%nx,    &
     3313                                                    'x'  )
     3314       CALL netcdf_data_input_get_dimension_length( id_dynamic, init_3d%ny,    &
     3315                                                    'y'  )
    30753316!
    30763317!--    Check for correct horizontal and vertical dimension. Please note,
     
    32073448!
    32083449!--       Read time dimension, allocate memory and finally read time array
    3209           CALL get_dimension_length( id_dynamic, nest_offl%nt, 'time' )
     3450          CALL netcdf_data_input_get_dimension_length( id_dynamic,             &
     3451                                                       nest_offl%nt, 'time' )
    32103452
    32113453          IF ( check_existence( nest_offl%var_names, 'time' ) )  THEN
     
    32153457!
    32163458!--       Read vertical dimension of scalar und w grid
    3217           CALL get_dimension_length( id_dynamic, nest_offl%nzu, 'z' )
    3218           CALL get_dimension_length( id_dynamic, nest_offl%nzw, 'zw' )
     3459          CALL netcdf_data_input_get_dimension_length( id_dynamic,             &
     3460                                                       nest_offl%nzu, 'z' )
     3461          CALL netcdf_data_input_get_dimension_length( id_dynamic,             &
     3462                                                       nest_offl%nzw, 'zw' )
    32193463
    32203464          IF ( check_existence( nest_offl%var_names, 'z' ) )  THEN
     
    45384782!> Get dimension array for a given dimension
    45394783!------------------------------------------------------------------------------!
    4540      SUBROUTINE get_dimension_length( id, dim_len, variable_name )
     4784     SUBROUTINE netcdf_data_input_get_dimension_length( id, dim_len,           &
     4785                                                        variable_name )
    45414786#if defined( __netcdf )
    45424787
     
    45554800!--    First, inquire dimension ID
    45564801       nc_stat = NF90_INQ_DIMID( id, TRIM( variable_name ), id_dim )
    4557        CALL handle_error( 'get_dimension_length', 526, variable_name )
     4802       CALL handle_error( 'netcdf_data_input_get_dimension_length', 526,       &
     4803                          variable_name )
    45584804!
    45594805!--    Inquire dimension length
    45604806       nc_stat = NF90_INQUIRE_DIMENSION( id, id_dim, dum, LEN = dim_len )
    4561        CALL handle_error( 'get_dimension_length', 526, variable_name )
     4807       CALL handle_error( 'netcdf_data_input_get_dimension_length', 526,       &
     4808                          variable_name )
    45624809
    45634810#endif
    4564     END SUBROUTINE get_dimension_length
     4811    END SUBROUTINE netcdf_data_input_get_dimension_length
    45654812
    45664813!------------------------------------------------------------------------------!
    45674814! Description:
    45684815! ------------
    4569 !> Routine for reading-in a character string from the chem emissions netcdf input file. 
    4570 !------------------------------------------------------------------------------!
    4571  
    4572  SUBROUTINE get_variable_string( id, variable_name, var_string, names_number)
     4816!> Routine for reading-in a character string from the chem emissions netcdf
     4817!> input file. 
     4818!------------------------------------------------------------------------------!
     4819    SUBROUTINE get_variable_string( id, variable_name, var_string, names_number)
    45734820#if defined( __netcdf )
    45744821
    4575     USE indices
    4576     USE pegrid
    4577 
    4578     IMPLICIT NONE
    4579 
    4580     CHARACTER (LEN=25), ALLOCATABLE, DIMENSION(:), INTENT(INOUT)  :: var_string
    4581 
    4582     CHARACTER(LEN=*)                                              :: variable_name          !> variable name
    4583 
    4584     CHARACTER (LEN=1), ALLOCATABLE, DIMENSION(:,:)                :: tmp_var_string         !> variable to be read
    4585 
    4586 
    4587     INTEGER(iwp), INTENT(IN)                                      :: id                     !> file id
    4588 
    4589     INTEGER(iwp), INTENT(IN)                                      :: names_number           !> number of names
    4590 
    4591     INTEGER(iwp)                                                  :: id_var                 !> variable id
    4592 
    4593     INTEGER(iwp)                                                  :: i,j                    !> index to go through the length of the dimensions
    4594 
    4595     INTEGER(iwp)                                                  :: max_string_length=25   !> this is both the maximum length of a name, but also 
     4822       USE indices
     4823       USE pegrid
     4824
     4825       IMPLICIT NONE
     4826
     4827       CHARACTER (LEN=25), ALLOCATABLE, DIMENSION(:), INTENT(INOUT)  :: var_string
     4828
     4829       CHARACTER(LEN=*)                                              :: variable_name          !> variable name
     4830
     4831       CHARACTER (LEN=1), ALLOCATABLE, DIMENSION(:,:)                :: tmp_var_string         !> variable to be read
     4832
     4833
     4834       INTEGER(iwp), INTENT(IN)                                      :: id                     !> file id
     4835
     4836       INTEGER(iwp), INTENT(IN)                                      :: names_number           !> number of names
     4837
     4838       INTEGER(iwp)                                                  :: id_var                 !> variable id
     4839
     4840       INTEGER(iwp)                                                  :: i,j                    !> index to go through the length of the dimensions
     4841
     4842       INTEGER(iwp)                                                  :: max_string_length=25   !> this is both the maximum length of a name, but also 
    45964843                                                                                            ! the number of the components of the first dimensions
    45974844                                                                                            ! (rows)
    45984845
    45994846
    4600     ALLOCATE(tmp_var_string(max_string_length,names_number))
    4601 
    4602     ALLOCATE(var_string(names_number))
     4847       ALLOCATE(tmp_var_string(max_string_length,names_number))
     4848
     4849       ALLOCATE(var_string(names_number))
    46034850
    46044851    !-- Inquire variable id
    4605     nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
     4852       nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
    46064853
    46074854
    46084855    !-- Get variable
    46094856    !-- Start cycle over the emission species
    4610     DO i = 1, names_number
     4857       DO i = 1, names_number
    46114858       !-- read the first letter of each component
    4612        nc_stat = NF90_GET_VAR( id, id_var, var_string(i), start = (/ 1,i /), &
     4859          nc_stat = NF90_GET_VAR( id, id_var, var_string(i), start = (/ 1,i /), &
    46134860                                 count = (/ 1,1 /) )
    4614        CALL handle_error( 'get_variable_string', 701 )
     4861          CALL handle_error( 'get_variable_string', 701 )
    46154862
    46164863       !-- Start cycle over charachters
    4617        DO j = 1, max_string_length
     4864          DO j = 1, max_string_length
    46184865                       
    46194866          !-- read the rest of the components of the name
    4620           nc_stat = NF90_GET_VAR( id, id_var, tmp_var_string(j,i), start = (/ j,i /),&
     4867             nc_stat = NF90_GET_VAR( id, id_var, tmp_var_string(j,i), start = (/ j,i /),&
    46214868                                     count = (/ 1,1 /) )
    4622           CALL handle_error( 'get_variable_string', 702 )
    4623 
    4624           IF ( iachar(tmp_var_string(j,i) ) == 0 ) THEN
    4625                tmp_var_string(j,i)=''
    4626           ENDIF
    4627 
    4628           IF ( j>1 ) THEN
    4629           !-- Concatenate first letter of the name and the others
    4630              var_string(i)=TRIM(var_string(i)) // TRIM(tmp_var_string(j,i))
    4631 
    4632           ENDIF
    4633        ENDDO
    4634     ENDDO
     4869             CALL handle_error( 'get_variable_string', 702 )
     4870
     4871             IF ( iachar(tmp_var_string(j,i) ) == 0 ) THEN
     4872                  tmp_var_string(j,i)=''
     4873             ENDIF
     4874
     4875             IF ( j>1 ) THEN
     4876             !-- Concatenate first letter of the name and the others
     4877                var_string(i)=TRIM(var_string(i)) // TRIM(tmp_var_string(j,i))
     4878
     4879             ENDIF
     4880          ENDDO
     4881       ENDDO
    46354882
    46364883#endif
    4637  END SUBROUTINE get_variable_string
    4638 
    4639 
     4884    END SUBROUTINE get_variable_string
     4885
     4886!------------------------------------------------------------------------------!
     4887! Description:
     4888! ------------
     4889!> Reads a character variable in a 1D array
     4890!------------------------------------------------------------------------------!
     4891     SUBROUTINE get_variable_1d_char( id, variable_name, var )
     4892
     4893       USE pegrid
     4894
     4895       IMPLICIT NONE
     4896
     4897       CHARACTER(LEN=*)            ::  variable_name          !< variable name
     4898       CHARACTER(LEN=*), DIMENSION(:), INTENT(INOUT) ::  var  !< variable to be read
     4899
     4900       INTEGER(iwp)                ::  i                !< running index over variable dimension
     4901       INTEGER(iwp), INTENT(IN)    ::  id               !< file id
     4902       INTEGER(iwp)                ::  id_var           !< dimension id
     4903       
     4904       INTEGER(iwp), DIMENSION(2)  ::  dimid            !< dimension IDs
     4905       INTEGER(iwp), DIMENSION(2)  ::  dimsize          !< dimension size
     4906
     4907#if defined( __netcdf )
     4908
     4909!
     4910!--    First, inquire variable ID
     4911       nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
     4912       CALL handle_error( 'get_variable_1d_int', 527, variable_name )
     4913!
     4914!--    Inquire dimension IDs
     4915       nc_stat = NF90_INQUIRE_VARIABLE( id, id_var, dimids = dimid(1:2) )
     4916       CALL handle_error( 'get_variable_1d_char', 527, variable_name )
     4917!
     4918!--    Read dimesnion length
     4919       nc_stat = NF90_INQUIRE_DIMENSION( id, dimid(1), LEN = dimsize(1) )
     4920       nc_stat = NF90_INQUIRE_DIMENSION( id, dimid(2), LEN = dimsize(2) )
     4921       
     4922!
     4923!--    Read character array. Note, each element is read individually, in order
     4924!--    to better separate single strings.
     4925       DO  i = 1, dimsize(2)
     4926          nc_stat = NF90_GET_VAR( id, id_var, var(i),                          &
     4927                                  start = (/ 1, i /),                          &
     4928                                  count = (/ dimsize(1), 1 /) )
     4929          CALL handle_error( 'get_variable_1d_char', 527, variable_name )
     4930       ENDDO     
     4931                         
     4932#endif
     4933    END SUBROUTINE get_variable_1d_char
     4934
     4935   
    46404936!------------------------------------------------------------------------------!
    46414937! Description:
     
    48035099       ELSE
    48045100!
    4805 !--    Allocate temporary variable according to memory access on file.
    4806        ALLOCATE( tmp(is:ie,js:je) )
    4807 !
    4808 !--    Get variable
    4809           nc_stat = NF90_GET_VAR( id, id_var, tmp,                                &
    4810                                start = (/ is+1,      js+1 /),                  &
    4811                                count = (/ ie-is + 1, je-js+1 /) )   
    4812                                
     5101!--       Allocate temporary variable according to memory access on file.
     5102          ALLOCATE( tmp(is:ie,js:je) )
     5103!
     5104!--       Get variable
     5105          nc_stat = NF90_GET_VAR( id, id_var, tmp,                             &
     5106                                  start = (/ is+1,      js+1 /),               &
     5107                                  count = (/ ie-is + 1, je-js+1 /) )   
    48135108          CALL handle_error( 'get_variable_2d_real', 530, variable_name )
    48145109!
    4815 !--    Resort data. Please note, dimension subscripts of var all start at 1.
     5110!--       Resort data. Please note, dimension subscripts of var all start at 1.
    48165111          DO  i = is, ie
    48175112             DO  j = js, je
     
    50895384#endif
    50905385    END SUBROUTINE get_variable_3d_real
    5091 
    5092 !------------------------------------------------------------------------------!
    5093 ! Description:
    5094 ! ------------
    5095 !> Reads a 3D float array from file.
    5096 !------------------------------------------------------------------------------!
    5097 !     SUBROUTINE get_variable_3d_real_v( id, variable_name, is, ie, js, je, var )
    5098 !
    5099 !        USE indices
    5100 !        USE pegrid
    5101 !
    5102 !        IMPLICIT NONE
    5103 !
    5104 !        CHARACTER(LEN=*)              ::  variable_name   !< variable name
    5105 !
    5106 !        INTEGER(iwp), INTENT(IN)      ::  is,ie           !< index range along x direction
    5107 !        INTEGER(iwp), INTENT(IN)      ::  id              !< file id
    5108 !        INTEGER(iwp)                  ::  id_var          !< variable id
    5109 !        INTEGER(iwp), INTENT(IN)      ::  js,je           !< index range along y direction
    5110 !        INTEGER(iwp)                  ::  n3              !< number of data-points along 3rd dimension
    5111 !
    5112 !        INTEGER(iwp)                  ::  i,j,k
    5113 !        INTEGER(iwp), DIMENSION(3)    ::  id_dim
    5114 !
    5115 !        REAL(wp), DIMENSION(:,:,:), INTENT(INOUT) ::  var         !< variable to be read
    5116 ! #if defined( __netcdf )
    5117 ! !
    5118 ! !--    Inside the ...static NetCDF files, the array is stored as float.
    5119 ! !--    Therefore single precision is sufficiant for the temporary array
    5120 !
    5121 !        REAL(sp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_var     !< temporary array to read NetCDF data in i,j,k direction
    5122 !
    5123 ! !kk    Please check, if it is time consuming to do the inquire every time
    5124 ! !
    5125 ! !--    Inquire variable id
    5126 !        nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
    5127 ! !
    5128 ! !--    Get length of third dimension, required for the count parameter.
    5129 ! !--    Therefore, first inquired dimension ids
    5130 !        nc_stat = NF90_INQUIRE_VARIABLE( id, id_var, DIMIDS = id_dim )
    5131 !        nc_stat = NF90_INQUIRE_DIMENSION( id, id_dim(3), LEN = n3 )
    5132 !
    5133 ! !
    5134 ! !--    Check for collective read-operation and set respective NetCDF flags if
    5135 ! !--    required.
    5136 !        IF ( collective_read )  THEN
    5137 ! #if defined( __netcdf4_parallel )
    5138 !           nc_stat = NF90_VAR_PAR_ACCESS (id, id_var, NF90_COLLECTIVE)
    5139 ! #endif
    5140 !        ENDIF
    5141 !
    5142 ! !
    5143 ! !--    Allocate temporary array ro read NetCDF data in i,j,k direction
    5144 !
    5145 !        ALLOCATE(tmp_var(is:ie,js:je,n3))
    5146 ! !
    5147 ! !--    Get variable
    5148 ! !--    Read complete local 3-D array in oone call
    5149 !
    5150 !        nc_stat = NF90_GET_VAR( id, id_var, tmp_var,                            &
    5151 !                                start = (/ is+1, js+1, 1 /),                    &
    5152 !                                count = (/ ie-is+1, je-js+1, n3 /) )
    5153 !
    5154 !        CALL handle_error( 'get_variable_3d_real', 532 )
    5155 !
    5156 ! !
    5157 ! !--    Resort data in k,j,i direction
    5158 !
    5159 !        DO i=is,ie
    5160 !           DO j=js,je
    5161 !              DO K=1,n3
    5162 !                 var (k,j-js+1,i-is+1) = tmp_var(i,j,k)
    5163 !              END DO
    5164 !           END DO
    5165 !        END DO
    5166 !
    5167 !        DEALLOCATE(tmp_var)
    5168 !
    5169 ! #endif
    5170 !     END SUBROUTINE get_variable_3d_real_v
    5171 
    51725386
    51735387!------------------------------------------------------------------------------!
  • palm/trunk/SOURCE/parin.f90

    r3469 r3472  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! Add virtual measurement module
    2323!
    2424! Former revisions:
     
    558558    USE vertical_nesting_mod,                                                  &
    559559        ONLY:  vnest_start_time
     560       
     561    USE virtual_measurement_mod,                                               &
     562        ONLY:  vm_parin
    560563
    561564    USE wind_turbine_model_mod,                                                &
     
    926929          CALL im_parin
    927930          CALL salsa_parin
     931          CALL vm_parin
    928932!
    929933!--       Read user-defined variables
  • palm/trunk/SOURCE/time_integration.f90

    r3469 r3472  
    2020! Current revisions:
    2121! ------------------
    22 !
     22! new module for virtual measurements introduced
    2323!
    2424! Former revisions:
     
    458458               use_initial_profile_as_reference,                               &
    459459               use_single_reference_value, uv_exposure, u_gtrans, v_gtrans,    &
    460                virtual_flight, wind_turbine, ws_scheme_mom, ws_scheme_sca
     460               virtual_flight, virtual_measurement, wind_turbine,              &
     461               ws_scheme_mom, ws_scheme_sca
    461462
    462463    USE cpulog,                                                                &
     
    581582               vnest_deallocate, vnest_init, vnest_init_fine,                  &
    582583               vnest_start_time
     584               
     585    USE virtual_measurement_mod,                                               &
     586        ONLY:  vm_sampling, vm_time_start
    583587
    584588    IMPLICIT NONE
     
    14581462          CALL data_output_flight
    14591463       ENDIF
     1464!
     1465!--    Take virtual measurements
     1466       IF ( virtual_measurement  .AND.                                         &
     1467            vm_time_start <= time_since_reference_point )  CALL vm_sampling
    14601468
    14611469!
Note: See TracChangeset for help on using the changeset viewer.