psmile_loc_trans_dble.F90
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 subroutine psmile_loc_trans_dble ( 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_dble
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 Double Precision, 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 Double Precision, 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
00075 Character(len=len_cvs_string), save :: mycvs =
00076 '$Id: psmile_loc_trans_dble.F90 2325 2010-04-21 15:00:07Z valcke $'
00077
00078
00079
00080 select case ( task )
00081
00082 case ( PSMILe_scat )
00083
00084 if ( Fields(field_id)%mask_id == PRISM_UNDEFINED ) then
00085 data_out = data_in
00086 else
00087 do i = 1, nbr_fields
00088 data_out(:,i) = unpack ( data_in(:,i), &
00089 Masks(Fields(field_id)%mask_id)%mask_array, &
00090 data_out(:,i) )
00091 enddo
00092 endif
00093
00094 case ( PSMILe_gath )
00095
00096 if ( Fields(field_id)%mask_id == PRISM_UNDEFINED ) then
00097 data_out = data_in
00098 else
00099 data_out(:,i) = pack(data_in(:,i),Masks(Fields(field_id)%mask_id)%mask_array)
00100 endif
00101
00102 case default
00103
00104 print *, task, ' is not a valid number, no action performed '
00105
00106 end select
00107
00108 end subroutine PSMILe_Loc_Trans_dble