psmile_store_data_reducedgrid.F90
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 subroutine psmile_store_data_reducedgrid (grid_id, nbr_latitudes, &
00026 nbr_points_per_lat, ierror)
00027
00028 use psmile_user_data, only : grid_data, test_user_grid_id
00029 use prism_constants, only : PRISM_Error_Arg
00030 use psmile_common, only : ch_id
00031
00032 implicit none
00033
00034 integer, intent (in) :: grid_id
00035 integer, intent (in) :: nbr_latitudes
00036 integer, intent (in) :: nbr_points_per_lat(nbr_latitudes)
00037 integer, intent (out) :: ierror
00038
00039 #ifdef VERBOSE
00040 print 9990, trim(ch_id)
00041 call psmile_flushstd
00042 #endif /* VERBOSE */
00043
00044 ierror = 0
00045 call test_user_grid_id(grid_id, ierror)
00046
00047 if (associated (grid_data(grid_id)%nbr_points_per_lat)) then
00048
00049 ierror = PRISM_Error_Arg
00050 call psmile_error ( PRISM_Error_Arg, 'reduced grid map data already existed', &
00051 (/grid_id/), 1, __FILE__, __LINE__ )
00052 return
00053 endif
00054
00055 allocate (grid_data(grid_id)%nbr_points_per_lat(nbr_latitudes))
00056 grid_data(grid_id)%nbr_points_per_lat = nbr_points_per_lat
00057
00058 #ifdef VERBOSE
00059 print 9980, trim(ch_id), ierror
00060 call psmile_flushstd
00061 #endif /* VERBOSE */
00062
00063 9990 format (1x, a, ': psmile_store_data_reducedgrid: ')
00064 9980 format (1x, a, ': psmile_store_data_reducedgrid: eof ierror =', i5)
00065 end subroutine psmile_store_data_reducedgrid