psmile_loc_trans_real.F90
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 subroutine psmile_loc_trans_real ( task, nbr_fields, &
00012 len_in, data_in, &
00013 len_out, data_out, field_id )
00014
00015
00016
00017 use PRISM_constants, only: PRISM_UNDEFINED, PRISM_Error_Arg
00018 Use PSMILe, dummy_interface => PSMILe_Loc_Trans_real
00019
00020 Implicit None
00021
00022
00023
00024 Integer, Intent (In) :: task
00025
00026
00027
00028 Integer, Intent (In) :: nbr_fields
00029
00030
00031
00032 Integer, Intent (In) :: len_in
00033
00034
00035
00036 Real, Intent (In) :: data_in(len_in,nbr_fields)
00037
00038
00039
00040 Integer, Intent (In) :: len_out
00041
00042
00043
00044 Integer, Optional, Intent (In) :: field_id
00045
00046
00047
00048
00049
00050 Real, Intent (InOut) :: data_out(len_out,nbr_fields)
00051
00052
00053
00054
00055
00056 Integer :: i
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074 Character(len=len_cvs_string), save :: mycvs =
00075 '$Id: psmile_loc_trans_real.F90 2325 2010-04-21 15:00:07Z valcke $'
00076
00077
00078
00079 select case ( task )
00080
00081 case ( PSMILe_scat )
00082
00083 if ( Fields(field_id)%mask_id == PRISM_UNDEFINED ) then
00084 data_out = data_in
00085 else
00086 do i = 1, nbr_fields
00087 data_out(:,i) = unpack ( data_in(:,i), &
00088 Masks(Fields(field_id)%mask_id)%mask_array, &
00089 data_out(:,i) )
00090 enddo
00091 endif
00092
00093 case ( PSMILe_gath )
00094
00095 if ( Fields(field_id)%mask_id == PRISM_UNDEFINED ) then
00096 data_out = data_in
00097 else
00098 data_out(:,i) = pack ( data_in(:,i), Masks(Fields(field_id)%mask_id)%mask_array )
00099 endif
00100
00101 case default
00102
00103 print *, task, ' is not a valid number, no action performed '
00104
00105 end select
00106
00107 end subroutine PSMILe_Loc_Trans_real