Changeset 4226 for palm/trunk/SOURCE/salsa_mod.f90
- Timestamp:
- Sep 10, 2019 5:03:24 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/salsa_mod.f90
r4182 r4226 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Netcdf input routine for dimension length renamed 29 ! 30 ! 4182 2019-08-22 15:20:23Z scharf 28 31 ! Corrected "Former revisions" section 29 32 ! … … 1757 1760 1758 1761 USE netcdf_data_input_mod, & 1759 ONLY: check_existence, close_input_file, get_attribute, get_variable, & 1762 ONLY: check_existence, close_input_file, get_dimension_length, & 1763 get_attribute, get_variable, & 1760 1764 inquire_num_variables, inquire_variable_names, & 1761 netcdf_data_input_get_dimension_length,open_read_file1765 open_read_file 1762 1766 1763 1767 IMPLICIT NONE … … 1836 1840 ! 1837 1841 !-- Inquire vertical dimension and number of aerosol chemical components 1838 CALL netcdf_data_input_get_dimension_length( id_dyn, pr_nz, 'z' )1842 CALL get_dimension_length( id_dyn, pr_nz, 'z' ) 1839 1843 IF ( pr_nz /= nz ) THEN 1840 1844 WRITE( message_string, * ) 'Number of inifor horizontal grid points does not match '//& … … 1842 1846 CALL message( 'aerosol_init', 'PA0601', 1, 2, 0, 6, 0 ) 1843 1847 ENDIF 1844 CALL netcdf_data_input_get_dimension_length( id_dyn, pr_ncc, 'composition_index' )1848 CALL get_dimension_length( id_dyn, pr_ncc, 'composition_index' ) 1845 1849 ! 1846 1850 !-- Allocate memory … … 1915 1919 ! 1916 1920 !-- Bin mean diameters in the input file 1917 CALL netcdf_data_input_get_dimension_length( id_dyn, pr_nbins, 'Dmid')1921 CALL get_dimension_length( id_dyn, pr_nbins, 'Dmid') 1918 1922 IF ( pr_nbins /= nbins_aerosol ) THEN 1919 1923 message_string = 'Number of size bins in init_atmosphere_aerosol does not match ' & … … 2067 2071 ! 2068 2072 !-- Inquire dimensions: 2069 CALL netcdf_data_input_get_dimension_length( id_dyn, pr_nz, 'z' )2073 CALL get_dimension_length( id_dyn, pr_nz, 'z' ) 2070 2074 IF ( pr_nz /= nz ) THEN 2071 2075 WRITE( message_string, * ) 'Number of inifor horizontal grid points does not match '//& … … 8388 8392 ONLY: check_existence, close_input_file, get_attribute, get_variable, & 8389 8393 inquire_num_variables, inquire_variable_names, & 8390 netcdf_data_input_get_dimension_length, open_read_file, street_type_f8394 get_dimension_length, open_read_file, street_type_f 8391 8395 8392 8396 USE surface_mod, & … … 8525 8529 ! 8526 8530 !-- Read the index and name of chemical components 8527 CALL netcdf_data_input_get_dimension_length( id_salsa, aero_emission_att%ncc, &8531 CALL get_dimension_length( id_salsa, aero_emission_att%ncc, & 8528 8532 'composition_index' ) 8529 8533 ALLOCATE( aero_emission_att%cc_index(1:aero_emission_att%ncc) ) … … 8598 8602 ! 8599 8603 !-- Get number of emission categories and allocate emission arrays 8600 CALL netcdf_data_input_get_dimension_length( id_salsa, aero_emission_att%ncat, & 8601 'ncat' ) 8604 CALL get_dimension_length( id_salsa, aero_emission_att%ncat, 'ncat' ) 8602 8605 ALLOCATE( aero_emission_att%cat_index(1:aero_emission_att%ncat), & 8603 8606 aero_emission_att%rho(1:aero_emission_att%ncat), & … … 8636 8639 !-- For each hour of year: 8637 8640 IF ( check_existence( aero_emission_att%var_names, 'nhoursyear' ) ) THEN 8638 CALL netcdf_data_input_get_dimension_length( id_salsa,&8639 8641 CALL get_dimension_length( id_salsa, & 8642 aero_emission_att%nhoursyear, 'nhoursyear' ) 8640 8643 ALLOCATE( aero_emission_att%etf(1:aero_emission_att%ncat, & 8641 8644 1:aero_emission_att%nhoursyear) ) … … 8645 8648 !-- Based on the month, day and hour: 8646 8649 ELSEIF ( check_existence( aero_emission_att%var_names, 'nmonthdayhour' ) ) THEN 8647 CALL netcdf_data_input_get_dimension_length( id_salsa,&8648 aero_emission_att%nmonthdayhour,&8649 8650 CALL get_dimension_length( id_salsa, & 8651 aero_emission_att%nmonthdayhour, & 8652 'nmonthdayhour' ) 8650 8653 ALLOCATE( aero_emission_att%etf(1:aero_emission_att%ncat, & 8651 8654 1:aero_emission_att%nmonthdayhour) ) … … 8734 8737 ! 8735 8738 !-- Number of aerosol size bins in the emission data 8736 CALL netcdf_data_input_get_dimension_length( id_salsa, aero_emission_att%nbins, & 8737 'Dmid' ) 8739 CALL get_dimension_length( id_salsa, aero_emission_att%nbins, 'Dmid' ) 8738 8740 IF ( aero_emission_att%nbins /= nbins_aerosol ) THEN 8739 8741 message_string = 'The number of size bins in aerosol input data does not ' // & … … 8743 8745 ! 8744 8746 !-- Number of time steps in the emission data 8745 CALL netcdf_data_input_get_dimension_length( id_salsa, aero_emission_att%nt, 'time')8747 CALL get_dimension_length( id_salsa, aero_emission_att%nt, 'time') 8746 8748 ! 8747 8749 !-- Allocate bin diameters, time and mass fraction array … … 9124 9126 ONLY: check_existence, close_input_file, get_attribute, get_variable, & 9125 9127 inquire_num_variables, inquire_variable_names, & 9126 netcdf_data_input_get_dimension_length, open_read_file9128 get_dimension_length, open_read_file 9127 9129 9128 9130 USE surface_mod, & … … 9174 9176 ! 9175 9177 !-- Read the index and name of chemical components 9176 CALL netcdf_data_input_get_dimension_length( id_chem, chem_emission_att%n_emiss_species, & 9177 'nspecies' ) 9178 CALL get_dimension_length( id_chem, chem_emission_att%n_emiss_species, 'nspecies' ) 9178 9179 ALLOCATE( chem_emission_att%species_index(1:chem_emission_att%n_emiss_species) ) 9179 9180 CALL get_variable( id_chem, 'emission_index', chem_emission_att%species_index ) … … 9221 9222 ! 9222 9223 !-- Get number of emission categories and allocate emission arrays 9223 CALL netcdf_data_input_get_dimension_length( id_chem, chem_emission_att%ncat, 'ncat' )9224 CALL get_dimension_length( id_chem, chem_emission_att%ncat, 'ncat' ) 9224 9225 ALLOCATE( chem_emission_att%cat_index(1:chem_emission_att%ncat), & 9225 9226 time_factor(1:chem_emission_att%ncat) ) … … 9235 9236 !-- For each hour of year: 9236 9237 IF ( check_existence( var_names, 'nhoursyear' ) ) THEN 9237 CALL netcdf_data_input_get_dimension_length( id_chem, chem_emission_att%nhoursyear, & 9238 'nhoursyear' ) 9238 CALL get_dimension_length( id_chem, chem_emission_att%nhoursyear, 'nhoursyear' ) 9239 9239 ALLOCATE( chem_emission_att%hourly_emis_time_factor(1:chem_emission_att%ncat, & 9240 9240 1:chem_emission_att%nhoursyear) ) … … 9245 9245 !-- Based on the month, day and hour: 9246 9246 ELSEIF ( check_existence( var_names, 'nmonthdayhour' ) ) THEN 9247 CALL netcdf_data_input_get_dimension_length( id_chem, chem_emission_att%nmonthdayhour,& 9248 'nmonthdayhour' ) 9247 CALL get_dimension_length( id_chem, chem_emission_att%nmonthdayhour, 'nmonthdayhour' ) 9249 9248 ALLOCATE( chem_emission_att%mdh_emis_time_factor(1:chem_emission_att%ncat, & 9250 9249 1:chem_emission_att%nmonthdayhour) ) … … 9284 9283 ! 9285 9284 !-- Number of time steps in the emission data 9286 CALL netcdf_data_input_get_dimension_length( id_chem, chem_emission_att%dt_emission, & 9287 'time' ) 9285 CALL get_dimension_length( id_chem, chem_emission_att%dt_emission, 'time' ) 9288 9286 ! 9289 9287 !-- Allocate and read time
Note: See TracChangeset
for help on using the changeset viewer.