Changeset 4298 for palm/trunk
- Timestamp:
- Nov 21, 2019 3:59:16 PM (5 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/netcdf_data_input_mod.f90
r4280 r4298 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Open input files with read-only attribute instead of write attribute. 28 ! 29 ! 4280 2019-10-29 14:34:15Z monakurppa 27 30 ! Remove id_emis flags from get_variable_4d_to_3d_real and 28 31 ! get_variable_5d_to_4d_real … … 4154 4157 #if defined( __netcdf4_parallel ) 4155 4158 ! 4156 !-- If __netcdf4_parallel is defined, parrallel NetCDF will be used 4157 !-- unconditionally 4158 nc_stat = NF90_OPEN( filename, IOR( NF90_WRITE, NF90_MPIIO ), id, & 4159 !-- If __netcdf4_parallel is defined, parrallel NetCDF will be used. 4160 nc_stat = NF90_OPEN( filename, IOR( NF90_NOWRITE, NF90_MPIIO ), id, & 4159 4161 COMM = comm2d, INFO = MPI_INFO_NULL ) 4160 4162 ! 4161 !-- Check for possible Netcdf 3 file. 4163 !-- In case the previous open call fails, check for possible Netcdf 3 file, 4164 !-- and open it. However, this case, disable parallel access. 4162 4165 IF( nc_stat /= NF90_NOERR ) THEN 4163 4166 nc_stat = NF90_OPEN( filename, NF90_NOWRITE, id ) … … 4167 4170 ENDIF 4168 4171 #else 4169 ! All MPI processes open und read 4172 ! 4173 !-- All MPI processes open the file and read it (but not in parallel). 4170 4174 nc_stat = NF90_OPEN( filename, NF90_NOWRITE, id ) 4171 4175 #endif -
palm/trunk/SOURCE/salsa_mod.f90
r4295 r4298 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Bugfix, close netcdf input files after reading 29 ! 30 ! 4295 2019-11-14 06:15:31Z monakurppa 28 31 ! 29 32 ! … … 2154 2157 2155 2158 DEALLOCATE( pr_z, pr_mass_fracs_a, pr_mass_fracs_b ) 2159 ! 2160 !-- Close input file 2161 CALL close_input_file( id_dyn ) 2156 2162 2157 2163 ELSE … … 2159 2165 ' for SALSA missing!' 2160 2166 CALL message( 'salsa_mod: aerosol_init', 'PA0607', 1, 2, 0, 6, 0 ) 2161 ! 2162 !-- Close input file 2163 CALL close_input_file( id_dyn ) 2167 2164 2168 ENDIF ! netcdf_extend 2165 2169 … … 2253 2257 ENDIF 2254 2258 ENDDO 2259 ! 2260 !-- Close input file 2261 CALL close_input_file( id_dyn ) 2255 2262 2256 2263 ELSEIF ( .NOT. netcdf_extend .AND. .NOT. salsa_gases_from_chem ) THEN … … 2258 2265 ' for SALSA missing!' 2259 2266 CALL message( 'salsa_mod: aerosol_init', 'PA0610', 1, 2, 0, 6, 0 ) 2260 ! 2261 !-- Close input file 2262 CALL close_input_file( id_dyn ) 2267 2263 2268 ENDIF ! netcdf_extend 2264 2269 #else … … 12702 12707 'PA0662', 2, 2, 0, 6, 0 ) 12703 12708 ENDIF 12709 12710 CALL close_input_file( salsa_nest_offl%id_dynamic ) 12704 12711 #endif 12705 12712 ENDIF -
palm/trunk/SOURCE/surface_layer_fluxes_mod.f90
r4258 r4298 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Calculation of 2-m temperature adjusted to the case the 2-m level is above 29 ! the first grid point. 30 ! 31 ! 4258 2019-10-07 13:29:08Z suehring 28 32 ! Initialization of Obukhov lenght also at vertical surfaces (if allocated). 29 33 ! … … 105 109 debug_output_timestep, & 106 110 do_output_at_2m, humidity, & 107 ibc_e_b, ibc_pt_b, indoor_model, initializing_actions, & 108 intermediate_timestep_count, intermediate_timestep_count_max, & 111 ibc_e_b, ibc_pt_b, indoor_model, & 109 112 land_surface, large_scale_forcing, lsf_surf, message_string, & 110 113 neutral, passive_scalar, pt_surface, q_surface, & 111 run_coupled, surface_pressure, simulated_time, terminate_run,&114 run_coupled, surface_pressure, simulated_time, & 112 115 time_since_reference_point, urban_surface, & 113 116 use_free_convection_scaling, zeta_max, zeta_min … … 117 120 118 121 USE indices, & 119 ONLY: n xl, nxr, nys, nyn, nzb122 ONLY: nzt 120 123 121 124 USE kinds … … 1856 1859 IMPLICIT NONE 1857 1860 1858 CHARACTER (LEN = *), INTENT(IN) :: z_char !< string identifier to identify z level 1859 INTEGER(iwp) :: i, j, k, m !< running indices 1861 CHARACTER (LEN = *), INTENT(IN) :: z_char !< string identifier to identify z level 1862 INTEGER(iwp) :: i !< grid index x-dimension 1863 INTEGER(iwp) :: j !< grid index y-dimension 1864 INTEGER(iwp) :: k !< grid index z-dimension 1865 INTEGER(iwp) :: kk !< running index along the z-dimension 1866 INTEGER(iwp) :: m !< running index for surface elements 1860 1867 1861 1868 … … 1873 1880 surf%pt_10cm(m) = surf%pt_surface(m) + surf%ts(m) / kappa & 1874 1881 * ( LOG( 0.1_wp / surf%z0h(m) ) & 1875 - psi_h( 0.1_wp / surf%ol(m) )&1882 - psi_h( 0.1_wp / surf%ol(m) ) & 1876 1883 + psi_h( surf%z0h(m) / surf%ol(m) ) ) 1877 1884 1878 1885 ENDDO 1879 1886 1880 1887 ! 1888 !-- 2-m temperature. Note, this is only calculated for output reasons at 1889 !-- horizontal upward-facing surfaces. 1881 1890 CASE ( '2m' ) 1882 1891 … … 1886 1895 j = surf%j(m) 1887 1896 k = surf%k(m) 1888 1889 surf%pt_2m(m) = surf%pt_surface(m) + surf%ts(m) / kappa & 1897 ! 1898 !-- If 2-m level is below the first grid level, MOST is 1899 !-- used for calculation of 2-m temperature. 1900 IF ( surf%z_mo(m) > 2.0_wp ) THEN 1901 surf%pt_2m(m) = surf%pt_surface(m) + surf%ts(m) / kappa & 1890 1902 * ( LOG( 2.0_wp / surf%z0h(m) ) & 1891 1903 - psi_h( 2.0_wp / surf%ol(m) ) & 1892 1904 + psi_h( surf%z0h(m) / surf%ol(m) ) ) 1905 ! 1906 !-- If 2-m level is above the first grid level, 2-m temperature 1907 !-- is linearly interpolated between the two nearest vertical grid 1908 !-- levels. Note, since 2-m temperature is only computed for 1909 !-- horizontal upward-facing surfaces, only a vertical 1910 !-- interpolation is necessary. 1911 ELSE 1912 ! 1913 !-- zw(k-1) defines the height of the surface. 1914 kk = k 1915 DO WHILE ( zu(kk) - zw(k-1) < 2.0_wp .AND. kk <= nzt ) 1916 kk = kk + 1 1917 ENDDO 1918 ! 1919 !-- kk defines the index of the first grid level >= 2m. 1920 surf%pt_2m(m) = pt(kk-1,j,i) + & 1921 ( zw(k-1) + 2.0_wp - zu(kk-1) ) * & 1922 ( pt(kk,j,i) - pt(kk-1,j,i) ) / & 1923 ( zu(kk) - zu(kk-1) ) 1924 ENDIF 1893 1925 1894 1926 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.