Changeset 1353 for palm/trunk/SOURCE/netcdf.f90
- Timestamp:
- Apr 8, 2014 3:21:23 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/netcdf.f90
r1323 r1353 23 23 ! Current revisions: 24 24 ! ------------------ 25 ! 25 ! REAL constants provided with KIND-attribute 26 26 ! 27 27 ! Former revisions: … … 603 603 ALLOCATE( netcdf_data(mask_size(mid,1)) ) 604 604 605 netcdf_data = ( mask_i_global(mid,:mask_size(mid,1)) + 0.5 ) * dx605 netcdf_data = ( mask_i_global(mid,:mask_size(mid,1)) + 0.5_wp ) * dx 606 606 607 607 nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), id_var_x_mask(mid,av), & … … 623 623 ALLOCATE( netcdf_data(mask_size(mid,2)) ) 624 624 625 netcdf_data = ( mask_j_global(mid,:mask_size(mid,2)) + 0.5 ) * dy625 netcdf_data = ( mask_j_global(mid,:mask_size(mid,2)) + 0.5_wp ) * dy 626 626 627 627 nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), id_var_y_mask(mid,av), & … … 1187 1187 1188 1188 DO i = 0, ny+1 1189 netcdf_data(i) = ( i + 0.5 ) * dy1189 netcdf_data(i) = ( i + 0.5_wp ) * dy 1190 1190 ENDDO 1191 1191 … … 1785 1785 DO i = 1, ns 1786 1786 IF( section(i,1) == -1 ) THEN 1787 netcdf_data(i) = -1.0 ! section averaged along z1787 netcdf_data(i) = -1.0_wp ! section averaged along z 1788 1788 ELSE 1789 1789 netcdf_data(i) = zu( section(i,1) ) … … 1799 1799 DO i = 1, ns 1800 1800 IF( section(i,1) == -1 ) THEN 1801 netcdf_data(i) = -1.0 ! section averaged along z1801 netcdf_data(i) = -1.0_wp ! section averaged along z 1802 1802 ELSE 1803 1803 netcdf_data(i) = zw( section(i,1) ) … … 1831 1831 1832 1832 DO i = 0, nx+1 1833 netcdf_data(i) = ( i + 0.5 ) * dx1833 netcdf_data(i) = ( i + 0.5_wp ) * dx 1834 1834 ENDDO 1835 1835 … … 1855 1855 1856 1856 DO i = 0, ny+1 1857 netcdf_data(i) = ( i + 0.5 ) * dy1857 netcdf_data(i) = ( i + 0.5_wp ) * dy 1858 1858 ENDDO 1859 1859 … … 1986 1986 ENDIF 1987 1987 ELSE 1988 IF ( -1.0 /= netcdf_data(i) ) THEN1988 IF ( -1.0_wp /= netcdf_data(i) ) THEN 1989 1989 message_string = 'netCDF file for cross-sections ' // & 1990 1990 TRIM( var ) // ' from previous run found,' // & … … 2437 2437 DO i = 1, ns 2438 2438 IF( section(i,2) == -1 ) THEN 2439 netcdf_data(i) = -1.0 ! section averaged along y2439 netcdf_data(i) = -1.0_wp ! section averaged along y 2440 2440 ELSE 2441 netcdf_data(i) = ( section(i,2) + 0.5 ) * dy2441 netcdf_data(i) = ( section(i,2) + 0.5_wp ) * dy 2442 2442 ENDIF 2443 2443 ENDDO … … 2451 2451 DO i = 1, ns 2452 2452 IF( section(i,2) == -1 ) THEN 2453 netcdf_data(i) = -1.0 ! section averaged along y2453 netcdf_data(i) = -1.0_wp ! section averaged along y 2454 2454 ELSE 2455 2455 netcdf_data(i) = section(i,2) * dy … … 2477 2477 2478 2478 DO i = 0, nx+1 2479 netcdf_data(i) = ( i + 0.5 ) * dx2479 netcdf_data(i) = ( i + 0.5_wp ) * dx 2480 2480 ENDDO 2481 2481 … … 2610 2610 ENDIF 2611 2611 ELSE 2612 IF ( -1.0 /= netcdf_data(i) ) THEN2612 IF ( -1.0_wp /= netcdf_data(i) ) THEN 2613 2613 message_string = 'netCDF file for cross-sections ' // & 2614 2614 TRIM( var ) // ' from previous run found,' // & … … 3076 3076 DO i = 1, ns 3077 3077 IF( section(i,3) == -1 ) THEN 3078 netcdf_data(i) = -1.0 ! section averaged along x3078 netcdf_data(i) = -1.0_wp ! section averaged along x 3079 3079 ELSE 3080 netcdf_data(i) = ( section(i,3) + 0.5 ) * dx3080 netcdf_data(i) = ( section(i,3) + 0.5_wp ) * dx 3081 3081 ENDIF 3082 3082 ENDDO … … 3090 3090 DO i = 1, ns 3091 3091 IF( section(i,3) == -1 ) THEN 3092 netcdf_data(i) = -1.0 ! section averaged along x3092 netcdf_data(i) = -1.0_wp ! section averaged along x 3093 3093 ELSE 3094 3094 netcdf_data(i) = section(i,3) * dx … … 3115 3115 3116 3116 DO j = 0, ny+1 3117 netcdf_data(j) = ( j + 0.5 ) * dy3117 netcdf_data(j) = ( j + 0.5_wp ) * dy 3118 3118 ENDDO 3119 3119 … … 3248 3248 ENDIF 3249 3249 ELSE 3250 IF ( -1.0 /= netcdf_data(i) ) THEN3250 IF ( -1.0_wp /= netcdf_data(i) ) THEN 3251 3251 message_string = 'netCDF file for cross-sections ' // & 3252 3252 TRIM( var ) // ' from previous run found,' // & … … 3395 3395 ! 3396 3396 !-- Define some global attributes of the dataset 3397 IF ( averaging_interval_pr /= 0.0 ) THEN3397 IF ( averaging_interval_pr /= 0.0_wp ) THEN 3398 3398 WRITE (time_average_text,'('', '',F7.1,'' s average'')') & 3399 3399 averaging_interval_pr … … 3820 3820 !-- performance loss due to data copying; an alternative strategy would be 3821 3821 !-- to ensure equal attribute size in a job chain. Maybe revise later. 3822 IF ( averaging_interval_pr == 0.0 ) THEN3822 IF ( averaging_interval_pr == 0.0_wp ) THEN 3823 3823 time_average_text = ' ' 3824 3824 ELSE … … 4050 4050 ! 4051 4051 !-- Define some global attributes of the dataset 4052 IF ( averaging_interval_sp /= 0.0 ) THEN4052 IF ( averaging_interval_sp /= 0.0_wp ) THEN 4053 4053 WRITE (time_average_text,'('', '',F7.1,'' s average'')') & 4054 4054 averaging_interval_sp … … 4268 4268 ALLOCATE( netcdf_data(nx/2) ) 4269 4269 DO i = 1, nx/2 4270 netcdf_data(i) = 2.0 * pi * i / ( dx * ( nx + 1 ) )4270 netcdf_data(i) = 2.0_wp * pi * i / ( dx * ( nx + 1 ) ) 4271 4271 ENDDO 4272 4272 … … 4279 4279 ALLOCATE( netcdf_data(ny/2) ) 4280 4280 DO i = 1, ny/2 4281 netcdf_data(i) = 2.0 * pi * i / ( dy * ( ny + 1 ) )4281 netcdf_data(i) = 2.0_wp * pi * i / ( dy * ( ny + 1 ) ) 4282 4282 ENDDO 4283 4283 … … 4456 4456 nc_stat = NF90_REDEF( id_set_sp ) 4457 4457 CALL handle_netcdf_error( 'netcdf', 441 ) 4458 IF ( averaging_interval_sp /= 0.0 ) THEN4458 IF ( averaging_interval_sp /= 0.0_wp ) THEN 4459 4459 WRITE (time_average_text,'('', '',F7.1,'' s average'')') & 4460 4460 averaging_interval_sp
Note: See TracChangeset
for help on using the changeset viewer.