psmile_reducedgrid_map.F90
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 subroutine psmile_reducedgrid_map ( grid_id, nbr_latitudes, &
00014 nbr_points_per_lat, ierror )
00015
00016
00017
00018 use PRISM
00019
00020 use PSMILe, dummy => psmile_reducedgrid_map
00021
00022 use psmile_grid_reduced_gauss, only : psmile_init_gauss_data
00023
00024 implicit none
00025
00026
00027
00028 integer, Intent (In) :: grid_id
00029
00030
00031
00032 integer, Intent (In) :: nbr_latitudes
00033
00034
00035
00036 integer, Intent (In) :: nbr_points_per_lat(nbr_latitudes)
00037
00038
00039
00040 integer, Intent (Out) :: ierror
00041
00042
00043
00044
00045
00046
00047
00048
00049 integer, parameter :: nerrp = 2
00050 integer :: ierrp (nerrp)
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070 Character(len=len_cvs_string), save :: mycvs =
00071 '$Id: psmile_reducedgrid_map.F90 3032 2011-03-18 17:29:36Z hanke $'
00072
00073
00074
00075 #ifdef VERBOSE
00076 print *, trim(ch_id), ': psmile_reducedgrid_map: grid_id =', grid_id
00077
00078 call psmile_flushstd
00079 #endif /* VERBOSE */
00080
00081
00082
00083
00084
00085 ierror = 0
00086
00087 call psmile_init_gauss_data (grid_id, nbr_points_per_lat)
00088
00089
00090
00091
00092
00093 if (grid_id < 1 .or. &
00094 grid_id > Number_of_Grids_allocated) then
00095
00096 ierrp (1) = grid_id
00097 ierrp (2) = Number_of_Grids_allocated
00098
00099 ierror = PRISM_Error_Arg
00100
00101 call psmile_error ( ierror, 'grid_id', &
00102 ierrp, 2, __FILE__, __LINE__ )
00103 return
00104 endif
00105
00106 if (Grids(grid_id)%status == PSMILe_status_free) then
00107
00108 ierrp (1) = grid_id
00109
00110 ierror = PRISM_Error_Arg
00111
00112 call psmile_error ( PRISM_Error_Arg, 'grid_id (not active)', &
00113 ierrp, 1, __FILE__, __LINE__ )
00114 return
00115 endif
00116
00117
00118
00119
00120
00121 #ifdef VERBOSE
00122 print *, trim(ch_id), ': psmile_reducedgrid_map: eof ierror =', &
00123 ierror, '; grid_id', grid_id
00124
00125 call psmile_flushstd
00126 #endif /* VERBOSE */
00127
00128 end subroutine psmile_reducedgrid_map