prism_reducedgrid_map.F90

Go to the documentation of this file.
00001 !-----------------------------------------------------------------------
00002 ! Copyright 2006-2010, CERFACS, Toulouse, France.
00003 ! Copyright 2006-2010, SGI Germany, Munich, Germany.
00004 ! Copyright 2006-2010, NEC Europe Ltd., London, UK.
00005 ! Copyright 2010, DKRZ, Hamburg, Germany.
00006 ! All rights reserved. Use is subject to OASIS4 license terms.
00007 !-----------------------------------------------------------------------
00008 !
00009 ! !DESCRIPTION:
00010 !
00011 ! The routine prism_reducedgrid_map checks the consistency of the data
00012 ! provided by the user before it is further processed.
00013 !
00014 !
00015 ! !REVISION HISTORY:
00016 !
00017 !   Date      Programmer   Description
00018 ! ----------  ----------   -----------
00019 ! 04.11.10    M. Hanke     created
00020 !
00021 !----------------------------------------------------------------------
00022 !
00023 !  $Id: prism_reducedgrid_map.F90 2708 2010-11-05 15:11:47Z hanke $
00024 !  $Author: hanke $
00025 !
00026 !----------------------------------------------------------------------
00027 subroutine prism_reducedgrid_map (grid_id, nbr_latitudes, &
00028                                   nbr_points_per_lat, ierror )
00029 
00030    use prism_constants, only : PRISM_Gaussreduced_regvrt, &
00031                                PRISM_Gaussreduced_sigmavrt, &
00032                                prism_error_invalid_arg
00033    use psmile, only : ch_id
00034    use psmile_user_data, only : psmile_store_data_reducedgrid, &
00035                                 test_user_grid_id, get_grid_type
00036 
00037    implicit none
00038 
00039    integer, intent (in)  :: grid_id
00040    integer, intent (in)  :: nbr_latitudes
00041    integer, intent (in)  :: nbr_points_per_lat(nbr_latitudes)
00042    integer, intent (out) :: ierror
00043 
00044    integer :: grid_type
00045 
00046 #ifdef VERBOSE
00047    print 9990, trim(ch_id)
00048    call psmile_flushstd
00049 #endif /* VERBOSE */
00050 
00051    ierror = 0
00052    call test_user_grid_id(grid_id, ierror)
00053 
00054    grid_type = get_grid_type(grid_id)
00055 
00056    ! check whether the grid is a reduced gauss grid
00057    if (grid_type /= PRISM_Gaussreduced_regvrt .and. &
00058        grid_type /= PRISM_Gaussreduced_sigmavrt) then
00059 
00060       ierror = prism_error_invalid_arg
00061       call psmile_error ( prism_error_invalid_arg, 'grid_id (grid_type does not match)', &
00062                         (/0/), 1, __FILE__, __LINE__ )
00063    endif
00064 
00065    call psmile_store_data_reducedgrid (grid_id, nbr_latitudes, &
00066                                        nbr_points_per_lat, ierror)
00067 
00068 #ifdef VERBOSE
00069    print 9980, trim(ch_id), ierror
00070    call psmile_flushstd
00071 #endif /* VERBOSE */
00072 
00073 9990 format (1x, a, ': prism_reducedgrid_map: ')
00074 9980 format (1x, a, ': prism_reducedgrid_map: eof ierror =', i5)
00075 
00076 end subroutine prism_reducedgrid_map

Generated on 18 Mar 2011 for Oasis4 by  doxygen 1.6.1