! $Id: ropp_pp_read_baro.f90 3491 2014-05-06 12:43:43Z idculv $ !****s* ModelRefraction/ropp_pp_read_BARO * ! ! NAME ! ropp_pp_read_BARO - Read spherical harmonic coefficients from file ! ! SYNOPSIS ! call ropp_pp_read_BARO(file, month, coeff) ! ! DESCRIPTION ! -> This subroutine reads a file of BAROCLIM climatology spherical harmonic ! -> coefficients for the month specified and fills the elements of a ! -> structure of derived type BAROCLIMcoeff. ! ! INPUTS ! character(*) :: file Filename ! integer, :: month Month of year ! ! OUTPUT ! type(BAROcoeff) :: coeff Coefficients (ba) ! ! AUTHOR ! Met Office, Exeter, UK. ! Any comments on this software should be given via the ROM SAF ! Helpdesk at http://www.romsaf.org ! ! COPYRIGHT ! (c) EUMETSAT. All rights reserved. ! For further details please refer to the file COPYRIGHT ! which you should have received as part of this distribution. ! !**** !------------------------------------------------------------------------------- ! 1. Read refractivity coefficients !------------------------------------------------------------------------------- !------------------------------------------------------------------------------- ! 2. Read bending angle coefficients !------------------------------------------------------------------------------- SUBROUTINE ropp_pp_read_BARO_ba(file, month, coeff) ! 2.1 Declarations !----------------- USE ropp_pp_BARO, not_this => ropp_pp_read_BARO_ba USE ncdf USE ropp_utils USE ropp_io IMPLICIT NONE CHARACTER(len=*), INTENT(in) :: file INTEGER, INTENT(in) :: month TYPE(BAROcoeff_ba), INTENT(out) :: coeff INTEGER :: n0, n2 ! 2.2 Open file !-------------- CALL ncdf_open(file) ! 2.3 Obtain dimensions !---------------------- CALL ncdf_getsize('ba_Ac' , n2 , dim=1) CALL ncdf_getsize('ba_Ac' , n0 , dim=2) ! 2.4 Initialise data structures and read data !--------------------------------------------- CALL callocate(coeff%Ac, (/n2, n0/) , ropp_MDFV) CALL ncdf_getvar('ba_Ac', coeff%Ac , rec=month) CALL callocate(coeff%Aa , n2 , ropp_MDFV) CALL ncdf_getvar('ba_Aa' , coeff%Aa , rec=month) CALL callocate(coeff%Ab , n2 , ropp_MDFV) CALL ncdf_getvar('ba_Ab' , coeff%Ab , rec=month) CALL callocate(coeff%Ad , n2 , ropp_MDFV) CALL ncdf_getvar('ba_Ad' , coeff%Ad , rec=month) CALL callocate(coeff%Ae , n2 , ropp_MDFV) CALL ncdf_getvar('ba_Ae' , coeff%Ae , rec=month) ! 2.5 Close file !--------------- CALL ncdf_close() END SUBROUTINE ropp_pp_read_BARO_ba