Changeset 4706
- Timestamp:
- Sep 28, 2020 1:15:23 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/virtual_measurement_mod.f90
r4695 r4706 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Revise setting of measurement height above ground for trajectory measurements 28 ! 29 ! 4695 2020-09-24 11:30:03Z suehring 27 30 ! Introduce additional namelist parameters to further customize sampling in the horizontal and 28 31 ! vertical surroundings of the original observation coordinates … … 325 328 REAL(wp) :: origin_y_obs !< origin of the observation in UTM coordiates in y-direction 326 329 327 REAL(wp), DIMENSION(:), ALLOCATABLE :: depth 328 REAL(wp), DIMENSION(:), ALLOCATABLE :: zar 330 REAL(wp), DIMENSION(:), ALLOCATABLE :: depth !< measurement depth in soil 331 REAL(wp), DIMENSION(:), ALLOCATABLE :: zar !< measurement height above ground level 329 332 330 333 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: measured_vars !< measured variables … … 339 342 ! This need to be generalized 340 343 CHARACTER(LEN=10) :: char_fill = '_FillValue' !< attribute name for fill value 344 CHARACTER(LEN=1) :: char_height = "height" !< attribute name indicating height above surface (for trajectories only) 341 345 CHARACTER(LEN=9) :: char_long = 'long_name' !< attribute name for long_name 342 346 CHARACTER(LEN=18) :: char_mv = "measured_variables" !< variable name for the array with the measured variable names … … 822 826 823 827 NAMELIST /virtual_measurement_parameters/ dt_virtual_measurement, & 828 off_pr, & 829 off_pr_z, & 830 off_tr, & 831 off_tr_z, & 824 832 off_ts, & 825 off_pr, & 826 off_tr, & 833 off_ts_z, & 827 834 use_virtual_measurement, & 828 835 vm_time_start … … 902 909 LOGICAL :: on_pe !< flag indicating that the respective measurement coordinate is on subdomain 903 910 904 REAL(wp) :: fill_eutm !< _FillValue for coordinate array E_UTM 905 REAL(wp) :: fill_nutm !< _FillValue for coordinate array N_UTM 906 REAL(wp) :: fill_zar !< _FillValue for height coordinate 911 REAL(wp) :: fill_height !< _FillValue for height coordinate (for trajectories) 912 REAL(wp) :: fill_eutm !< _FillValue for coordinate array E_UTM 913 REAL(wp) :: fill_nutm !< _FillValue for coordinate array N_UTM 914 REAL(wp) :: fill_zar !< _FillValue for zar coordinate 907 915 908 916 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: e_utm !< easting UTM coordinate, temporary variable 909 917 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: e_utm_tmp !< EUTM coordinate before rotation 918 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: height !< observation height above ground (for trajectories) 910 919 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: n_utm !< northing UTM coordinate, temporary variable 911 920 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: n_utm_tmp !< NUTM coordinate before rotation … … 1052 1061 ALLOCATE( station_h(1:vmea(l)%n_tr_st,1:dim_ntime) ) 1053 1062 ALLOCATE( zar(1:vmea(l)%n_tr_st,1:dim_ntime) ) 1063 IF ( vmea(l)%trajectory ) ALLOCATE( height(1:vmea(l)%n_tr_st,1:dim_ntime) ) 1054 1064 e_utm = 0.0_wp 1055 1065 n_utm = 0.0_wp 1056 1066 station_h = 0.0_wp 1057 1067 zar = 0.0_wp 1068 IF ( vmea(l)%trajectory ) height = 0.0_wp 1058 1069 1059 1070 ALLOCATE( e_utm_tmp(1:vmea(l)%n_tr_st,1:dim_ntime) ) … … 1062 1073 !-- Read UTM and height coordinates for all trajectories and times. Note, in case 1063 1074 !-- these obtain any missing values, replace them with default _FillValues. 1064 CALL inquire_fill_value( pids_id, char_eutm // TRIM( dum ), nofill, fill_eutm ) 1065 CALL inquire_fill_value( pids_id, char_nutm // TRIM( dum ), nofill, fill_nutm ) 1066 CALL inquire_fill_value( pids_id, char_zar // TRIM( dum ), nofill, fill_zar ) 1075 CALL inquire_fill_value( pids_id, char_eutm // TRIM( dum ), nofill, fill_eutm ) 1076 CALL inquire_fill_value( pids_id, char_nutm // TRIM( dum ), nofill, fill_nutm ) 1077 CALL inquire_fill_value( pids_id, char_zar // TRIM( dum ), nofill, fill_zar ) 1078 IF ( vmea(l)%trajectory ) & 1079 CALL inquire_fill_value( pids_id, char_height // TRIM( dum ), nofill, fill_height ) 1067 1080 ! 1068 1081 !-- Further line is just to avoid compiler warnings. nofill might be used in future. … … 1073 1086 !-- UC2-standard. 1074 1087 IF ( vmea(l)%trajectory ) THEN 1075 CALL get_variable( pids_id, char_eutm // TRIM( dum ), e_utm, 0, dim_ntime-1, 0,&1088 CALL get_variable( pids_id, char_eutm // TRIM( dum ), e_utm, 0, dim_ntime-1, 0, & 1076 1089 vmea(l)%n_tr_st-1 ) 1077 CALL get_variable( pids_id, char_nutm // TRIM( dum ), n_utm, 0, dim_ntime-1, 0,&1090 CALL get_variable( pids_id, char_nutm // TRIM( dum ), n_utm, 0, dim_ntime-1, 0, & 1078 1091 vmea(l)%n_tr_st-1 ) 1079 CALL get_variable( pids_id, char_zar // TRIM( dum ), zar, 0, dim_ntime-1, 0, & 1092 CALL get_variable( pids_id, char_zar // TRIM( dum ), zar, 0, dim_ntime-1, 0, & 1093 vmea(l)%n_tr_st-1 ) 1094 CALL get_variable( pids_id, char_height // TRIM( dum ), height, 0, dim_ntime-1, 0, & 1080 1095 vmea(l)%n_tr_st-1 ) 1081 1096 ELSE 1082 CALL get_variable( pids_id, char_eutm // TRIM( dum ), e_utm(:,1))1083 CALL get_variable( pids_id, char_nutm // TRIM( dum ), n_utm(:,1))1097 CALL get_variable( pids_id, char_eutm // TRIM( dum ), e_utm(:,1) ) 1098 CALL get_variable( pids_id, char_nutm // TRIM( dum ), n_utm(:,1) ) 1084 1099 CALL get_variable( pids_id, char_station_h // TRIM( dum ), station_h(:,1) ) 1085 CALL get_variable( pids_id, char_zar // TRIM( dum ), zar(:,1))1100 CALL get_variable( pids_id, char_zar // TRIM( dum ), zar(:,1) ) 1086 1101 ENDIF 1087 1102 … … 1089 1104 n_utm = MERGE( n_utm, vmea(l)%fillout, n_utm /= fill_nutm ) 1090 1105 zar = MERGE( zar, vmea(l)%fillout, zar /= fill_zar ) 1091 ! 1092 !-- Compute observation height above ground. 1093 zar = zar - station_h 1106 IF ( vmea(l)%trajectory ) & 1107 height = MERGE( height, vmea(l)%fillout, height /= fill_height ) 1108 ! 1109 !-- Compute observation height above ground. Note, for trajectory measurements the height 1110 !-- above the surface is actually stored in 'height' 1111 IF ( vmea(l)%trajectory ) THEN 1112 zar = height 1113 fill_zar = fill_height 1114 ELSE 1115 zar = zar - station_h 1116 ENDIF 1094 1117 ! 1095 1118 !-- Based on UTM coordinates, check if the measurement station or parts of the trajectory are … … 1288 1311 IF ( ALLOCATED( zar ) ) DEALLOCATE( vmea(l)%dim_t ) 1289 1312 IF ( ALLOCATED( zar ) ) DEALLOCATE( zar ) 1313 IF ( ALLOCATED( height ) ) DEALLOCATE( height ) 1290 1314 IF ( ALLOCATED( station_h ) ) DEALLOCATE( station_h ) 1291 1315
Note: See TracChangeset
for help on using the changeset viewer.