Changeset 3618 for palm/trunk/UTIL
- Timestamp:
- Dec 10, 2018 1:25:22 PM (6 years ago)
- Location:
- palm/trunk/UTIL/inifor
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/UTIL/inifor/src/inifor.f90
r3615 r3618 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Prefixed all INIFOR modules with inifor_ 29 ! 30 ! 31 ! 3615 2018-12-10 07:21:03Z raasch 28 32 ! bugfix: abort replaced by inifor_abort 29 33 ! … … 74 78 PROGRAM inifor 75 79 76 USE control77 USE defs78 USE grid,&80 USE inifor_control 81 USE inifor_defs 82 USE inifor_grid, & 79 83 ONLY: setup_parameters, setup_grids, setup_variable_tables, & 80 84 setup_io_groups, fini_grids, fini_variables, fini_io_groups, & … … 84 88 averaging_width_ns, averaging_width_ew, phi_n, lambda_n, & 85 89 lam_centre, phi_centre 86 USE i o87 USE transform,&90 USE inifor_io 91 USE inifor_transform, & 88 92 ONLY: average_profile, interpolate_2d, interpolate_3d, & 89 93 geostrophic_winds, extrapolate_density, extrapolate_pressure, & 90 94 get_surface_pressure 91 USE types95 USE inifor_types 92 96 93 97 IMPLICIT NONE -
palm/trunk/UTIL/inifor/src/inifor_control.f90
r3614 r3618 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Prefixed all INIFOR modules with inifor_ 29 ! 30 ! 31 ! 3614 2018-12-10 07:05:46Z raasch 28 32 ! abort renamed inifor_abort to avoid intrinsic problem in Fortran 29 33 ! … … 58 62 !> feedback to the terminal and a log file. 59 63 !------------------------------------------------------------------------------! 60 MODULE control61 62 USE defs,&64 MODULE inifor_control 65 66 USE inifor_defs, & 63 67 ONLY: LNAME, dp, VERSION, COPYRIGHT 64 68 65 USE util,&69 USE inifor_util, & 66 70 ONLY: real_to_str, real_to_str_f 67 71 … … 258 262 END SUBROUTINE run_control 259 263 260 END MODULE 261 264 END MODULE inifor_control 265 -
palm/trunk/UTIL/inifor/src/inifor_defs.f90
r3613 r3618 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Prefixed module with inifor_ 29 ! 30 ! 31 ! 3613 2018-12-07 18:20:37Z eckhard 28 32 ! Bumped version number 29 33 ! … … 73 77 !> The defs module provides global constants used in INIFOR. 74 78 !------------------------------------------------------------------------------! 75 MODULE defs79 MODULE inifor_defs 76 80 77 81 IMPLICIT NONE … … 127 131 ACHAR( 10 ) // ' Copyright 2017-2018 Deutscher Wetterdienst Offenbach' !< Copyright notice 128 132 129 END MODULE defs133 END MODULE inifor_defs -
palm/trunk/UTIL/inifor/src/inifor_grid.f90
r3615 r3618 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Prefixed all INIFOR modules with inifor_, removed unused variables 29 ! 30 ! 31 ! 3615 2018-12-10 07:21:03Z raasch 28 32 ! bugfix: abort replaced by inifor_abort 29 33 ! … … 97 101 !------------------------------------------------------------------------------! 98 102 99 MODULE grid100 101 USE control102 USE defs,&103 MODULE inifor_grid 104 105 USE inifor_control 106 USE inifor_defs, & 103 107 ONLY: DATE, EARTH_RADIUS, TO_RADIANS, TO_DEGREES, PI, dp, hp, sp, & 104 108 SNAME, LNAME, PATH, FORCING_STEP, WATER_ID, FILL_ITERATIONS, & 105 109 BETA, P_SL, T_SL, BETA, RD, RV, G, P_REF, RD_PALM, CP_PALM, & 106 110 RHO_L, OMEGA, HECTO 107 USE i o,&111 USE inifor_io, & 108 112 ONLY: get_netcdf_attribute, get_netcdf_dim_vector, & 109 113 get_netcdf_variable, parse_command_line_arguments, & 110 114 validate_config 111 USE netcdf, & 112 ONLY: NF90_MAX_NAME, NF90_MAX_VAR_DIMS 113 USE transform, & 115 USE inifor_transform, & 114 116 ONLY: average_2d, rotate_to_cosmo, find_horizontal_neighbours,& 115 117 compute_horizontal_interp_weights, & … … 119 121 project, centre_velocities, phi2phirot, rla2rlarot, uv2uvrot, & 120 122 phirot2phi, rlarot2rla 121 USE types 122 USE util 123 USE inifor_types 124 USE inifor_util 125 USE netcdf, & 126 ONLY: NF90_MAX_NAME, NF90_MAX_VAR_DIMS 123 127 124 128 IMPLICIT NONE … … 628 632 phirot = project(0.5_dp*ly, y0, EARTH_RADIUS) * TO_DEGREES, & 629 633 rlarot = project(0.5_dp*lx, x0, EARTH_RADIUS) * TO_DEGREES, & 630 polphi = phi_cn * TO_DEGREES, pollam = lambda_cn * TO_DEGREES,&634 polphi = phi_cn * TO_DEGREES, & 631 635 polgam = gam * TO_DEGREES & 632 636 ) * TO_RADIANS … … 660 664 f3 = 2.0_dp * OMEGA * SIN( & 661 665 TO_RADIANS*phirot2phi( phi_centre * TO_DEGREES, lam_centre * TO_DEGREES,& 662 phi_n * TO_DEGREES, lambda_n * TO_DEGREES,&666 phi_n * TO_DEGREES, & 663 667 gam * TO_DEGREES ) & 664 668 ) … … 1825 1829 IF ( number_stretch_level_end >= 1 ) THEN 1826 1830 CALL calculate_stretching_factor( number_stretch_level_end, dz, & 1827 dz_stretch_factor, &1828 1831 dz_stretch_factor_array, & 1829 1832 dz_stretch_level_end, & … … 1903 1906 !> results into an overdetermined system. 1904 1907 !------------------------------------------------------------------------------! 1905 SUBROUTINE calculate_stretching_factor( number_end, dz, dz_stretch_factor,&1908 SUBROUTINE calculate_stretching_factor( number_end, dz, & 1906 1909 dz_stretch_factor_array, & 1907 1910 dz_stretch_level_end, & … … 1911 1914 REAL(dp), DIMENSION(:), INTENT(INOUT) :: dz_stretch_factor_array 1912 1915 REAL(dp), DIMENSION(:), INTENT(IN) :: dz_stretch_level_end, dz_stretch_level_start 1913 REAL(dp) :: dz_stretch_factor1914 1916 1915 1917 INTEGER :: iterations !< number of iterations until stretch_factor_lower/upper_limit is reached … … 4117 4119 END SUBROUTINE get_soil_layer_thickness 4118 4120 4119 END MODULE grid4121 END MODULE inifor_grid -
palm/trunk/UTIL/inifor/src/inifor_io.f90
r3615 r3618 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Prefixed all INIFOR modules with inifor_ 29 ! 30 ! 31 ! 3615 2018-12-10 07:21:03Z raasch 28 32 ! bugfix: abort replaced by inifor_abort 29 33 ! … … 87 91 !> INIFOR. 88 92 !------------------------------------------------------------------------------! 89 MODULE i o90 91 USE control92 USE defs,&93 MODULE inifor_io 94 95 USE inifor_control 96 USE inifor_defs, & 93 97 ONLY: DATE, SNAME, PATH, PI, dp, hp, TO_RADIANS, TO_DEGREES, VERSION 98 USE inifor_types 99 USE inifor_util, & 100 ONLY: reverse, str, real_to_str 94 101 USE netcdf 95 USE types96 USE util, &97 ONLY: reverse, str, real_to_str98 102 99 103 IMPLICIT NONE … … 1222 1226 END SUBROUTINE check 1223 1227 1224 END MODULE i o1228 END MODULE inifor_io -
palm/trunk/UTIL/inifor/src/inifor_transform.f90
r3615 r3618 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Prefixed all INIFOR modules with inifor_, removed unused variables 29 ! 30 ! 31 ! 3615 2018-12-10 07:21:03Z raasch 28 32 ! bugfix: abort replaced by inifor_abort 29 33 ! … … 76 80 !> int2lm's utility routines. 77 81 !------------------------------------------------------------------------------! 78 MODULE transform79 80 USE control81 USE defs,&82 MODULE inifor_transform 83 84 USE inifor_control 85 USE inifor_defs, & 82 86 ONLY: G, TO_DEGREES, TO_RADIANS, PI, dp 83 USE types84 USE util, &87 USE inifor_types 88 USE inifor_util, & 85 89 ONLY: real_to_str, str 86 90 … … 622 626 lamr(i) * TO_DEGREES, & 623 627 phip * TO_DEGREES, & 624 lamp * TO_DEGREES, &625 628 gam * TO_DEGREES) * TO_RADIANS 626 629 … … 1162 1165 !> Compute the geographical latitude of a point given in rotated-pole cordinates 1163 1166 !------------------------------------------------------------------------------! 1164 FUNCTION phirot2phi (phirot, rlarot, polphi, pol lam, polgam)1167 FUNCTION phirot2phi (phirot, rlarot, polphi, polgam) 1165 1168 1166 1169 REAL(dp), INTENT (IN) :: polphi !< latitude of the rotated north pole 1167 REAL(dp), INTENT (IN) :: pollam !< longitude of the rotated north pole1168 1170 REAL(dp), INTENT (IN) :: phirot !< latitude in the rotated system 1169 1171 REAL(dp), INTENT (IN) :: rlarot !< longitude in the rotated system … … 1396 1398 END SUBROUTINE uvrot2uv 1397 1399 1398 END MODULE 1399 1400 END MODULE inifor_transform 1401 -
palm/trunk/UTIL/inifor/src/inifor_types.f90
r3557 r3618 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Prefixed all INIFOR modules with inifor_ 29 ! 30 ! 31 ! 3557 2018-11-22 16:01:22Z eckhard 28 32 ! Updated documentation 29 33 ! … … 61 65 !> The types module provides derived data types used in INIFOR. 62 66 !------------------------------------------------------------------------------! 63 MODULE types67 MODULE inifor_types 64 68 65 USE defs,&69 USE inifor_defs, & 66 70 ONLY: dp, DATE, PATH, SNAME, LNAME 67 71 USE netcdf, & … … 253 257 END TYPE container 254 258 255 END MODULE types256 259 END MODULE inifor_types 260 -
palm/trunk/UTIL/inifor/src/inifor_util.f90
r3557 r3618 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Prefixed all INIFOR modules with inifor_ 29 ! 30 ! 31 ! 3557 2018-11-22 16:01:22Z eckhard 28 32 ! Updated documentation 29 33 ! … … 54 58 !> The util module provides miscellaneous utility routines for INIFOR. 55 59 !------------------------------------------------------------------------------! 56 MODULE util 57 60 MODULE inifor_util 61 62 USE inifor_defs, & 63 ONLY : dp, PI, DATE, SNAME 64 USE inifor_types, & 65 ONLY : grid_definition 58 66 USE, INTRINSIC :: ISO_C_BINDING, & 59 67 ONLY : C_CHAR, C_INT, C_PTR, C_SIZE_T 60 USE defs, &61 ONLY : dp, PI, DATE, SNAME62 USE types, &63 ONLY : grid_definition64 68 65 69 IMPLICIT NONE … … 415 419 END SUBROUTINE 416 420 417 END MODULE 418 421 END MODULE inifor_util 422 -
palm/trunk/UTIL/inifor/tests/Makefile
r2718 r3618 25 25 # ----------------- 26 26 # $Id$ 27 # Prefixed INIFOR modules with inifor_ 28 # 29 # 30 # 2718 2018-01-02 08:49:38Z maronga 27 31 # Initial revision 28 32 # … … 43 47 TESTS = $(patsubst %.f90,%,$(wildcard test-*.f90)) 44 48 45 MODULES = util.mod $(SRC_PATH)/ defs.mod $(SRC_PATH)/control.mod $(SRC_PATH)/util.mod $(SRC_PATH)/types.mod $(SRC_PATH)/transform.mod $(SRC_PATH)/io.mod $(SRC_PATH)/grid.mod49 MODULES = util.mod $(SRC_PATH)/inifor_defs.mod $(SRC_PATH)/inifor_control.mod $(SRC_PATH)/inifor_util.mod $(SRC_PATH)/inifor_types.mod $(SRC_PATH)/inifor_transform.mod $(SRC_PATH)/inifor_io.mod $(SRC_PATH)/inifor_grid.mod 46 50 SOURCES = $(MODULES:%.mod=%.f90) 47 51 OBJECTS = $(SOURCES:%.f90=%.o) -
palm/trunk/UTIL/inifor/tests/Makefile.gnu
r2718 r3618 25 25 # ----------------- 26 26 # $Id$ 27 # Prefixed INIFOR modules with inifor_ 28 # 29 # 30 # 2718 2018-01-02 08:49:38Z maronga 27 31 # Initial revision 28 32 # … … 44 48 TESTS = $(patsubst %.f90,%,$(wildcard test-*.f90)) 45 49 46 MODULES = util.mod $(SRC_PATH)/ defs.mod $(SRC_PATH)/control.mod $(SRC_PATH)/util.mod $(SRC_PATH)/types.mod $(SRC_PATH)/transform.mod $(SRC_PATH)/io.mod $(SRC_PATH)/grid.mod50 MODULES = util.mod $(SRC_PATH)/inifor_defs.mod $(SRC_PATH)/inifor_control.mod $(SRC_PATH)/inifor_util.mod $(SRC_PATH)/inifor_types.mod $(SRC_PATH)/inifor_transform.mod $(SRC_PATH)/inifor_io.mod $(SRC_PATH)/inifor_grid.mod 47 51 SOURCES = $(MODULES:%.mod=%.f90) 48 52 OBJECTS = $(SOURCES:%.f90=%.o) -
palm/trunk/UTIL/inifor/tests/Makefile.ifort
r2718 r3618 25 25 # ----------------- 26 26 # $Id$ 27 # Prefixed INIFOR modules with inifor_ 28 # 29 # 30 # 2718 2018-01-02 08:49:38Z maronga 27 31 # Initial revision 28 32 # … … 44 48 TESTS = $(patsubst %.f90,%,$(wildcard test-*.f90)) 45 49 46 MODULES = util.mod $(SRC_PATH)/ defs.mod $(SRC_PATH)/control.mod $(SRC_PATH)/util.mod $(SRC_PATH)/types.mod $(SRC_PATH)/transform.mod $(SRC_PATH)/io.mod $(SRC_PATH)/grid.mod50 MODULES = util.mod $(SRC_PATH)/inifor_defs.mod $(SRC_PATH)/inifor_control.mod $(SRC_PATH)/inifor_util.mod $(SRC_PATH)/inifor_types.mod $(SRC_PATH)/inifor_transform.mod $(SRC_PATH)/inifor_io.mod $(SRC_PATH)/inifor_grid.mod 47 51 SOURCES = $(MODULES:%.mod=%.f90) 48 52 OBJECTS = $(SOURCES:%.f90=%.o) -
palm/trunk/UTIL/inifor/tests/test-boundaries.f90
r3183 r3618 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Prefixed all INIFOR modules with inifor_ 29 ! 30 ! 31 ! 3183 2018-07-27 14:25:55Z suehring 28 32 ! Updated test for new PALM grid strechting 29 33 ! … … 45 49 PROGRAM test_boundaries 46 50 47 USE grid, ONLY : init_grid_definition 48 USE types, ONLY : grid_definition 51 USE inifor_grid, & 52 ONLY : init_grid_definition 53 USE inifor_types, & 54 ONLY : grid_definition 49 55 USE test_utils 50 56 -
palm/trunk/UTIL/inifor/tests/test-centre-velocities.f90
r2718 r3618 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Prefixed all INIFOR modules with inifor_ 29 ! 30 ! 31 ! 2718 2018-01-02 08:49:38Z maronga 28 32 ! Initial revision 29 33 ! … … 40 44 PROGRAM test_centre_velocities 41 45 46 USE inifor_transform, & 47 ONLY : centre_velocities 42 48 USE test_utils 43 USE transform, &44 ONLY : centre_velocities45 49 46 50 IMPLICIT NONE -
palm/trunk/UTIL/inifor/tests/test-grid.f90
r3183 r3618 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Prefixed all INIFOR modules with inifor_ 29 ! 30 ! 31 ! 3183 2018-07-27 14:25:55Z suehring 28 32 ! Updated test for new PALM grid strechting 29 33 ! … … 45 49 PROGRAM test_grid 46 50 47 USE grid, ONLY : grid_definition, init_grid_definition, dx, dy, dz 51 USE inifor_grid, & 52 ONLY : grid_definition, init_grid_definition, dx, dy, dz 48 53 USE test_utils 49 54 -
palm/trunk/UTIL/inifor/tests/test-input-files.f90
r3183 r3618 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Prefixed all INIFOR modules with inifor_ 29 ! 30 ! 31 ! 3183 2018-07-27 14:25:55Z suehring 28 32 ! New test for negative start_hour and greater-than-one step_hour 29 33 ! … … 45 49 PROGRAM test_input_files 46 50 47 USE defs,&51 USE inifor_defs, & 48 52 ONLY : PATH 49 USE grid, &53 USE inifor_grid, & 50 54 ONLY : get_input_file_list 51 55 USE test_utils -
palm/trunk/UTIL/inifor/tests/test-interpolation.f90
r3183 r3618 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Prefixed all INIFOR modules with inifor_ 29 ! 30 ! 31 ! 3183 2018-07-27 14:25:55Z suehring 28 32 ! Updated test for new grid_definition 29 33 ! … … 44 48 PROGRAM test_interpolation 45 49 46 USE grid,&47 ONLY: grid_definition, init_grid_definition, TO_RADIANS, TO_DEGREES, &50 USE inifor_grid, & 51 ONLY: grid_definition, init_grid_definition, TO_RADIANS, TO_DEGREES, & 48 52 linspace, hhl 49 USE transform,&53 USE inifor_transform, & 50 54 ONLY: find_horizontal_neighbours, compute_horizontal_interp_weights 51 55 USE test_utils -
palm/trunk/UTIL/inifor/tests/test-stretching.f90
r3396 r3618 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Prefixed all INIFOR modules with inifor_ 29 ! 30 ! 31 ! 28 32 ! Initial revision 29 33 ! … … 43 47 PROGRAM test_stretching 44 48 45 USE defs,&49 USE inifor_defs, & 46 50 ONLY : dp 47 51 48 USE grid,&52 USE inifor_grid, & 49 53 ONLY : stretched_z 50 54 -
palm/trunk/UTIL/inifor/tests/test-transform.f90
r2718 r3618 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Prefixed all modules with inifor_ 29 ! 30 ! 31 ! 2718 2018-01-02 08:49:38Z maronga 28 32 ! Initial revision 29 33 ! … … 40 44 PROGRAM test_transform 41 45 42 USE defs, ONLY : TO_RADIANS, TO_DEGREES 43 USE grid, ONLY : grid_definition, init_grid_definition 44 USE transform, ONLY : phi2phirot, rla2rlarot, phirot2phi, rlarot2rla 46 USE inifor_defs, & 47 ONLY : TO_RADIANS, TO_DEGREES 48 USE inifor_grid, & 49 ONLY : grid_definition, init_grid_definition 50 USE inifor_transform, & 51 ONLY : phi2phirot, rla2rlarot, phirot2phi, rlarot2rla 45 52 USE test_utils 46 53 … … 68 75 lambda_c = rla2rlarot(phi, lambda, phi_n, lambda_n, 0.) 69 76 70 phi2 = phirot2phi(phi_c, lambda_c, phi_n, lambda_n,0.)77 phi2 = phirot2phi(phi_c, lambda_c, phi_n, 0.) 71 78 lambda2 = rlarot2rla(phi_c, lambda_c, phi_n, lambda_n, 0.) 72 79 … … 91 98 lambda_c = rla2rlarot(phi, lambda, phi_n, lambda_n, 0.) 92 99 93 phi2 = phirot2phi(phi_c, lambda_c, phi_n, lambda_n,0.)100 phi2 = phirot2phi(phi_c, lambda_c, phi_n, 0.) 94 101 lambda2 = rlarot2rla(phi_c, lambda_c, phi_n, lambda_n, 0.) 95 102
Note: See TracChangeset
for help on using the changeset viewer.