Line data Source code
1 : module dyn_tests_utils 2 : !----------------------------------------------------------------------- 3 : ! 4 : ! Utility data (and code) for dynamics testing 5 : ! 6 : ! The public items in this module are items used both by internal code 7 : ! (e.g., analytic initial conditions) and by infrastructure which uses 8 : ! the internal code (e.g., read_inidat). They cannot be members of the 9 : ! internal code because that is conditionally compiled. 10 : ! 11 : !----------------------------------------------------------------------- 12 : 13 : 14 : implicit none 15 : private 16 : save 17 : 18 : integer, parameter :: vc_moist_pressure = 0 ! Moist pressure vertical coord 19 : integer, parameter :: vc_dry_pressure = 1 ! Dry pressure vertical coord 20 : integer, parameter :: vc_height = 2 ! Height vertical coord 21 : 22 : integer, parameter :: vc_str_lgth = 108 ! Length of string in 23 : 24 : integer :: vc_dycore !vertical coordinate of dynamical core - set in dyn_comp.F90 25 : integer :: vc_physics !vertical coordinate of physics - set in physconst.F90 26 : 27 : public :: vc_moist_pressure, vc_dry_pressure, vc_height, string_vc 28 : public :: vc_dycore, vc_physics, vc_str_lgth 29 : 30 : contains 31 4 : subroutine string_vc(vc,str) 32 : use cam_abortutils, only: endrun 33 : use cam_logfile, only: iulog 34 : use string_utils, only: int2str 35 : integer, intent(in) :: vc 36 : character (len=vc_str_lgth), intent(out) :: str 37 : 38 6 : select case (vc) 39 : case(vc_moist_pressure) 40 2 : str = 'Moist pressure/mass vertical coordinate' 41 : case(vc_dry_pressure) 42 2 : str = 'Dry pressure/mass vertical coordinate' 43 : case(vc_height) 44 0 : str = 'Height (z) vertical coordinate' 45 : case default 46 0 : write(iulog,*) 'string_vc: invalid vc= ',vc 47 4 : call endrun('string_vc: invalid vc ='//trim(int2str(vc))) 48 : end select 49 4 : end subroutine string_vc 50 : end module dyn_tests_utils