77 INTEGER,
PARAMETER ::
set = 1
79 INTEGER,
PARAMETER ::
sl = 20
80 INTEGER,
PARAMETER ::
ml = 256
99 CHARACTER(*),
PARAMETER,
DIMENSION( 0:N_SENSOR_TYPES ) :: &
113 INTEGER :: n_allocates = 0
120 INTEGER(Long) :: n_layers = 0
121 INTEGER(Long) :: n_components = 0
122 INTEGER(Long) :: n_absorbers = 0
123 INTEGER(Long) :: n_channels = 0
124 INTEGER(Long) :: n_coeffs = 0
128 INTEGER(Long) :: n_ocoeffs = 0
135 INTEGER(Long) :: group_index = 0
137 CHARACTER(SL) :: sensor_id =
' ' 143 REAL(fp),
POINTER :: ref_level_pressure(:) => null()
145 REAL(fp),
POINTER :: ref_pressure(:) => null()
146 REAL(fp),
POINTER :: ref_temperature(:) => null()
150 REAL(fp),
POINTER :: ref_absorber(:,:) => null()
152 REAL(fp),
POINTER :: min_absorber(:,:) => null()
153 REAL(fp),
POINTER :: max_absorber(:,:) => null()
156 INTEGER(Long),
POINTER :: sensor_channel(:) => null()
158 INTEGER(Long),
POINTER :: component_id(:) => null()
160 INTEGER(Long),
POINTER :: absorber_id(:) => null()
186 INTEGER(Long),
POINTER :: n_predictors(:,:) => null()
187 INTEGER(Long),
POINTER :: pos_index(:,:) => null()
188 REAL(Single),
POINTER :: c(:) => null()
200 INTEGER(Long),
POINTER :: osignificance(:) => null()
201 INTEGER(LONG),
POINTER :: order(:) => null()
202 INTEGER(Long),
POINTER :: op_index(:,:) => null()
203 INTEGER(Long),
POINTER :: opos_index(:) => null()
204 REAL(fp),
POINTER :: oc(:) => null()
205 REAL(fp) :: alpha = 0.0_fp, alpha_c1 = 0.0_fp, alpha_c2 = 0.0_fp
206 INTEGER(Long) :: ocomponent_index = -1
269 result( association_status )
272 INTEGER,
OPTIONAL,
INTENT(IN) :: any_test
274 LOGICAL :: association_status
284 IF (
PRESENT( any_test ) )
THEN 285 IF ( any_test ==
set ) all_test = .false.
290 association_status = .false.
292 IF (
ASSOCIATED( odps%Sensor_Channel ) .AND. &
293 ASSOCIATED( odps%Component_ID ) .AND. &
294 ASSOCIATED( odps%Absorber_ID ) .AND. &
295 ASSOCIATED( odps%Ref_Level_Pressure) .AND. &
296 ASSOCIATED( odps%Ref_Pressure ) .AND. &
297 ASSOCIATED( odps%Ref_Temperature ) .AND. &
298 ASSOCIATED( odps%Ref_Absorber ) .AND. &
299 ASSOCIATED( odps%Min_Absorber ) .AND. &
300 ASSOCIATED( odps%Max_Absorber ) .AND. &
301 ASSOCIATED( odps%n_Predictors ) .AND. &
302 ASSOCIATED( odps%Pos_Index ) )
THEN 303 association_status = .true.
305 IF( odps%n_Coeffs > 0 )
THEN 306 association_status = association_status .AND.
ASSOCIATED( odps%C )
308 IF( odps%n_OCoeffs > 0 )
THEN 309 association_status = association_status .AND.
ASSOCIATED( odps%OC ) &
310 .AND.
ASSOCIATED( odps%OSignificance ) &
311 .AND.
ASSOCIATED( odps%Order ) &
312 .AND.
ASSOCIATED( odps%OP_Index ) &
313 .AND.
ASSOCIATED( odps%OPos_Index )
317 IF (
ASSOCIATED( odps%Sensor_Channel ) .OR. &
318 ASSOCIATED( odps%Component_ID ) .OR. &
319 ASSOCIATED( odps%Absorber_ID ) .OR. &
320 ASSOCIATED( odps%Ref_Level_Pressure) .OR. &
321 ASSOCIATED( odps%Ref_Pressure ) .OR. &
322 ASSOCIATED( odps%Ref_Temperature ) .OR. &
323 ASSOCIATED( odps%Ref_Absorber ) .OR. &
324 ASSOCIATED( odps%Min_Absorber ) .OR. &
325 ASSOCIATED( odps%Max_Absorber ) .OR. &
326 ASSOCIATED( odps%n_Predictors ) .OR. &
327 ASSOCIATED( odps%Pos_Index ) )
THEN 328 association_status = .true.
330 IF( odps%n_Coeffs > 0 )
THEN 331 association_status = association_status .OR.
ASSOCIATED( odps%C )
333 IF( odps%n_OCoeffs > 0 )
THEN 334 association_status = association_status .OR.
ASSOCIATED( odps%OC ) &
335 .OR.
ASSOCIATED( odps%OSignificance ) &
336 .OR.
ASSOCIATED( odps%Order ) &
337 .OR.
ASSOCIATED( odps%OP_Index ) &
338 .OR.
ASSOCIATED( odps%OPos_Index )
407 No_Clear , & ! Optional input
408 RCS_Id , & ! Revision control
410 result( error_status )
413 INTEGER,
OPTIONAL,
INTENT(IN) :: no_clear
414 CHARACTER(*),
OPTIONAL,
INTENT(OUT) :: rcs_id
415 CHARACTER(*),
OPTIONAL,
INTENT(IN) :: message_log
417 INTEGER :: error_status
419 CHARACTER(*),
PARAMETER :: routine_name =
'Destroy_ODPS' 421 CHARACTER(ML) :: message
423 INTEGER :: allocate_status
432 odps%n_Components = 0
439 IF (
PRESENT( no_clear ) )
THEN 440 IF ( no_clear ==
set ) clear = .false.
450 DEALLOCATE( odps%Sensor_Channel , &
451 odps%Component_ID , &
453 odps%Ref_Level_Pressure , &
454 odps%Ref_Pressure , &
455 odps%Ref_Temperature , &
456 odps%Ref_Absorber , &
457 odps%Min_Absorber , &
458 odps%Max_Absorber , &
459 odps%n_Predictors , &
461 stat=allocate_status )
462 IF ( allocate_status /= 0 )
THEN 464 WRITE( message,
'("Error deallocating ODPS components. STAT = ",i0)' ) &
469 message_log=message_log )
472 IF( odps%n_Coeffs > 0 )
THEN 474 DEALLOCATE( odps%C , &
475 stat=allocate_status )
476 IF ( allocate_status /= 0 )
THEN 478 WRITE( message,
'("Error deallocating ODPS C component. STAT = ",i0)' ) &
483 message_log=message_log )
487 IF( odps%n_OCoeffs > 0 )
THEN 489 DEALLOCATE( odps%OC , &
490 odps%OSignificance , &
494 stat=allocate_status )
495 IF ( allocate_status /= 0 )
THEN 497 WRITE( message,
'("Error deallocating ODPS OPTRAN component. STAT = ",i0)' ) &
502 message_log=message_log )
508 odps%n_Allocates = odps%n_Allocates - 1
509 IF ( odps%n_Allocates /= 0 )
THEN 511 WRITE( message,
'("Allocation counter /= 0, Value = ",i0)' ) &
516 message_log=message_log )
624 n_Components, & ! Input
625 n_Absorbers, & ! Input
626 n_Channels , & ! Input
629 RCS_Id , & ! Revision control
631 result( error_status )
633 INTEGER ,
INTENT(IN) :: n_layers
634 INTEGER ,
INTENT(IN) :: n_components
635 INTEGER ,
INTENT(IN) :: n_absorbers
636 INTEGER ,
INTENT(IN) :: n_channels
637 INTEGER ,
INTENT(IN) :: n_coeffs
639 CHARACTER(*),
OPTIONAL,
INTENT(OUT) :: rcs_id
640 CHARACTER(*),
OPTIONAL,
INTENT(IN) :: message_log
642 INTEGER :: error_status
644 CHARACTER(*),
PARAMETER :: routine_name =
'Allocate_ODPS' 646 CHARACTER(ML) :: message
647 INTEGER :: allocate_status
655 IF ( n_layers < 1 .OR. &
656 n_components < 1 .OR. &
657 n_absorbers < 1 .OR. &
658 n_channels < 1 .OR. &
662 "The input ODPS dimension must be >= 0 "//&
663 "and other dimensions must be > 0", &
665 message_log=message_log )
674 message_log=message_log )
675 IF ( error_status /=
success )
THEN 677 'Error deallocating ODPS prior to reallocation.', &
679 message_log=message_log )
686 ALLOCATE( odps%Sensor_Channel( n_channels ), &
687 odps%Component_ID( n_components ), &
688 odps%Absorber_ID( n_absorbers ), &
689 odps%Ref_Level_Pressure( 0:n_layers ), &
690 odps%Ref_Pressure( n_layers ), &
691 odps%Ref_Temperature( n_layers ), &
692 odps%Ref_Absorber( n_layers, n_absorbers ), &
693 odps%Min_Absorber( n_layers, n_absorbers ), &
694 odps%Max_Absorber( n_layers, n_absorbers ), &
695 odps%n_Predictors( n_components, n_channels ), &
696 odps%Pos_Index( n_components, n_channels ), &
697 stat=allocate_status )
698 IF ( allocate_status /= 0 )
THEN 700 WRITE( message,
'("Error allocating ODPS data arrays. STAT = ",i0)' ) &
705 message_log=message_log )
709 IF( n_coeffs > 0 )
THEN 710 ALLOCATE( odps%C( n_coeffs ), &
711 stat=allocate_status )
712 IF ( allocate_status /= 0 )
THEN 714 WRITE( message,
'("Error allocating the ODPS C array. STAT = ",i0)' ) &
719 message_log=message_log )
725 odps%n_Layers = n_layers
726 odps%n_Components = n_components
727 odps%n_Absorbers = n_absorbers
728 odps%n_Channels = n_channels
729 odps%n_Coeffs = n_coeffs
731 odps%Sensor_Channel = 0
733 odps%n_Predictors = 0
738 odps%n_Allocates = odps%n_Allocates + 1
739 IF ( odps%n_Allocates /= 1 )
THEN 741 WRITE( message,
'("Allocation counter /= 1, Value = ",i0)' ) &
746 message_log=message_log )
827 RCS_Id , & ! Revision control
829 result( error_status )
831 INTEGER ,
INTENT(IN) :: n_ocoeffs
833 CHARACTER(*),
OPTIONAL,
INTENT(OUT) :: rcs_id
834 CHARACTER(*),
OPTIONAL,
INTENT(IN) :: message_log
836 INTEGER :: error_status
838 CHARACTER(*),
PARAMETER :: routine_name =
'Allocate_ODPS_OPTRAN' 840 CHARACTER(ML) :: message
841 INTEGER :: allocate_status
848 IF ( n_ocoeffs < 1 )
THEN 851 "The input ODPS n_OCoeffs dimension must be > 0 ",&
853 message_log=message_log )
858 IF ( odps%n_Channels < 1 )
THEN 861 "The input ODPS n_Channels dimension must be > 0 ",&
863 message_log=message_log )
868 IF ( odps%n_OCoeffs > 0 )
THEN 869 DEALLOCATE( odps%OSignificance,&
874 stat=allocate_status )
875 IF ( allocate_status /= 0 )
THEN 877 WRITE( message,
'("Error deallocating ODPS OPTRAN component prior to reallocation. STAT = ",i0)' ) &
882 message_log=message_log )
888 ALLOCATE( odps%OSignificance( odps%n_Channels ), &
889 odps%Order( odps%n_Channels ) , &
891 odps%OPos_Index( odps%n_Channels), &
892 odps%OC( n_ocoeffs ), &
893 stat=allocate_status )
894 IF ( allocate_status /= 0 )
THEN 896 WRITE( message,
'("Error allocating ODPS OPTRAN data arrays. STAT = ",i0)' ) &
901 message_log=message_log )
906 odps%n_OCoeffs = n_ocoeffs
973 ODPS_out , & ! Output
974 RCS_Id , & ! Revision control
976 result( error_status )
979 TYPE(
odps_type) ,
INTENT(IN OUT) :: odps_out
980 CHARACTER(*),
OPTIONAL,
INTENT(OUT) :: rcs_id
981 CHARACTER(*),
OPTIONAL,
INTENT(IN) :: message_log
983 INTEGER :: error_status
985 CHARACTER(*),
PARAMETER :: routine_name =
'Assign_ODPS' 995 'Some or all INPUT ODPS pointer '//&
996 'members are NOT associated.', &
998 message_log=message_log )
1006 odps_in%n_Components, &
1007 odps_in%n_Absorbers , &
1008 odps_in%n_Channels , &
1011 message_log=message_log )
1012 IF ( error_status /=
success )
THEN 1014 'Error allocating output ODPS arrays.', &
1016 message_log=message_log )
1023 odps_out%Release = odps_in%Release
1024 odps_out%Version = odps_in%Version
1026 odps_out%Group_Index = odps_in%Group_Index
1027 odps_out%Sensor_Id = odps_in%Sensor_Id
1028 odps_out%Sensor_Type = odps_in%Sensor_Type
1029 odps_out%WMO_Satellite_ID = odps_in%WMO_Satellite_ID
1030 odps_out%WMO_Sensor_ID = odps_in%WMO_Sensor_ID
1031 odps_out%Sensor_Channel = odps_in%Sensor_Channel
1032 odps_out%Component_ID = odps_in%Component_ID
1033 odps_out%Absorber_ID = odps_in%Absorber_ID
1034 odps_out%Ref_Level_Pressure= odps_in%Ref_Level_Pressure
1035 odps_out%Ref_Pressure = odps_in%Ref_Pressure
1036 odps_out%Ref_Temperature = odps_in%Ref_Temperature
1037 odps_out%Ref_Absorber = odps_in%Ref_Absorber
1038 odps_out%Min_Absorber = odps_in%Min_Absorber
1039 odps_out%Max_Absorber = odps_in%Max_Absorber
1040 odps_out%n_Predictors = odps_in%n_Predictors
1041 odps_out%Pos_Index = odps_in%Pos_Index
1042 IF( odps_in%n_Coeffs > 0 )
THEN 1043 odps_out%C = odps_in%C
1047 IF(odps_in%n_OCoeffs > 0)
THEN 1050 message_log=message_log )
1051 IF ( error_status /=
success )
THEN 1053 'Error allocating output ODPS OPTRAN data arrays.', &
1055 message_log=message_log )
1059 odps_out%OC = odps_in%OC
1060 odps_out%OSignificance = odps_in%OSignificance
1061 odps_out%Order = odps_in%Order
1062 odps_out%OP_Index = odps_in%OP_Index
1063 odps_out%OPos_Index = odps_in%OPos_Index
1064 odps_out%OComponent_Index = odps_in%OComponent_Index
1065 odps_out%Alpha = odps_in%Alpha
1066 odps_out%Alpha_C1 = odps_in%Alpha_C1
1067 odps_out%Alpha_C2 = odps_in%Alpha_C2
1154 RCS_Id , & ! Revision control
1156 result( error_status )
1158 TYPE(
odps_type) ,
INTENT(IN OUT) :: odps1
1160 CHARACTER(*),
OPTIONAL,
INTENT(OUT) :: rcs_id
1161 CHARACTER(*),
OPTIONAL,
INTENT(IN) :: message_log
1163 INTEGER :: error_status
1165 CHARACTER(*),
PARAMETER :: routine_name =
'Concatenate_Channel_ODPS' 1167 INTEGER :: destroy_status
1168 INTEGER :: n_channels, l1, l2
1169 INTEGER(Long) :: n_coeffs, n_ocoeffs
1181 'Some or all INPUT ODPS1 pointer '//&
1182 'members are NOT associated.', &
1184 message_log=message_log )
1190 'Some or all INPUT ODPS2 pointer '//&
1191 'members are NOT associated.', &
1193 message_log=message_log )
1198 IF ( odps1%Release /= odps2%Release )
THEN 1201 'Input ODPS Release values are different.', &
1203 message_log=message_log )
1206 IF ( odps1%Version /= odps2%Version )
THEN 1208 'Input ODPS Version values are different.', &
1210 message_log=message_log )
1215 IF ( odps1%n_Layers /= odps2%n_Layers .OR. &
1216 odps1%n_Components /= odps2%n_Components .OR. &
1217 odps1%n_Absorbers /= odps2%n_Absorbers )
THEN 1220 'Non-channel ODPS dimensions are different.', &
1222 message_log=message_log )
1227 IF ( odps1%Group_Index /= odps2%Group_Index )
THEN 1230 'ODPS Group ID values are different.', &
1232 message_log=message_log )
1237 IF ( odps1%Sensor_ID /= odps2%Sensor_ID .OR. &
1238 odps1%WMO_Satellite_ID /= odps2%WMO_Satellite_ID .OR. &
1239 odps1%WMO_Sensor_ID /= odps2%WMO_Sensor_ID )
THEN 1242 'ODPS sensor ID values are different.', &
1244 message_log=message_log )
1249 IF ( any(odps1%Component_ID /= odps2%Component_ID) .OR. &
1250 any(odps1%Absorber_ID /= odps2%Absorber_ID) )
THEN 1253 'ODPS component ID or absorber ID values are different.', &
1255 message_log=message_log )
1263 message_log=message_log )
1264 IF ( error_status /=
success )
THEN 1266 'Error copying ODPS1 structure.', &
1268 message_log=message_log )
1274 message_log=message_log )
1275 IF ( error_status /=
success )
THEN 1277 'Error destroying ODPS1 structure.', &
1279 message_log=message_log )
1284 n_channels = odps_tmp%n_Channels + odps2%n_Channels
1285 n_coeffs = odps_tmp%n_Coeffs + odps2%n_Coeffs
1287 odps_tmp%n_Components, &
1288 odps_tmp%n_Absorbers, &
1292 message_log=message_log )
1293 IF ( error_status /=
success )
THEN 1295 'Error reallocating ODPS1 structure.', &
1297 message_log=message_log )
1302 n_ocoeffs = odps_tmp%n_OCoeffs + odps2%n_OCoeffs
1303 IF( n_ocoeffs > 0 )
THEN 1304 IF( odps_tmp%n_OCoeffs * odps2%n_OCoeffs == 0 )
THEN 1306 'ODPS OPTRAN data in the two ODPS structures are not consistent.', &
1308 message_log=message_log )
1314 message_log=message_log )
1315 IF ( error_status /=
success )
THEN 1317 'Error reallocating ODPS1 OPTRAN data arrays.', &
1319 message_log=message_log )
1326 odps1%Version =
max(odps_tmp%Version, odps2%Version)
1327 odps1%Group_Index = odps_tmp%Group_Index
1328 odps1%Sensor_ID = odps_tmp%Sensor_ID
1329 odps1%Sensor_type = odps_tmp%Sensor_type
1330 odps1%WMO_Satellite_ID = odps_tmp%WMO_Satellite_ID
1331 odps1%WMO_Sensor_ID = odps_tmp%WMO_Sensor_ID
1332 odps1%Component_ID = odps_tmp%Component_ID
1333 odps1%Absorber_ID = odps_tmp%Absorber_ID
1334 odps1%Ref_Level_Pressure= odps_tmp%Ref_Level_Pressure
1335 odps1%Ref_Pressure = odps_tmp%Ref_Pressure
1336 odps1%Ref_Temperature = odps_tmp%Ref_Temperature
1337 odps1%Ref_Absorber = odps_tmp%Ref_Absorber
1338 odps1%Min_Absorber = odps_tmp%Min_Absorber
1339 odps1%Max_Absorber = odps_tmp%Max_Absorber
1341 odps1%OComponent_Index = odps_tmp%OComponent_Index
1342 odps1%Alpha = odps_tmp%Alpha
1343 odps1%Alpha_C1 = odps_tmp%Alpha_C1
1344 odps1%Alpha_C2 = odps_tmp%Alpha_C2
1350 l2 = odps_tmp%n_Channels
1351 odps1%Sensor_Channel(l1:l2) = odps_tmp%Sensor_Channel
1352 odps1%n_Predictors(:,l1:l2) = odps_tmp%n_Predictors
1353 odps1%Pos_Index(:,l1:l2) = odps_tmp%Pos_Index
1355 IF( odps_tmp%n_Coeffs > 0 )
THEN 1356 odps1%C(l1:odps_tmp%n_Coeffs) = odps_tmp%C
1360 IF( odps_tmp%n_OCoeffs > 0 )
THEN 1361 odps1%OC(l1:odps_tmp%n_OCoeffs)= odps_tmp%OC
1362 odps1%OSignificance(l1:l2) = odps_tmp%OSignificance
1363 odps1%Order(l1:l2) = odps_tmp%Order
1364 odps1%OP_Index(:,l1:l2) = odps_tmp%OP_Index
1365 odps1%OPos_Index(l1:l2) = odps_tmp%OPos_Index
1371 odps1%Sensor_Channel(l1:l2) = odps2%Sensor_Channel
1372 odps1%n_Predictors(:,l1:l2) = odps2%n_Predictors
1373 odps1%Pos_Index(:,l1:l2) = odps2%Pos_Index + odps_tmp%n_Coeffs
1375 IF( odps2%n_Coeffs > 0 )
THEN 1376 odps1%C(odps_tmp%n_Coeffs+1:n_coeffs) = odps2%C
1380 IF( odps2%n_OCoeffs > 0 )
THEN 1381 odps1%OC(odps_tmp%n_OCoeffs+1:n_ocoeffs)= odps2%OC
1382 odps1%OSignificance(l1:l2) = odps2%OSignificance
1383 odps1%Order(l1:l2) = odps2%Order
1384 odps1%OP_Index(:,l1:l2) = odps2%OP_Index
1385 odps1%OPos_Index(l1:l2) = odps2%OPos_Index
1391 message_log=message_log )
1392 IF ( destroy_status /=
success )
THEN 1394 'Error destroying ODPS_Tmp structure.', &
1396 message_log=message_log )
1482 RCS_Id , & ! Revision control
1484 result( error_status )
1486 TYPE(
odps_type) ,
INTENT(IN OUT) :: odps1
1488 CHARACTER(*),
OPTIONAL,
INTENT(OUT) :: rcs_id
1489 CHARACTER(*),
OPTIONAL,
INTENT(IN) :: message_log
1491 INTEGER :: error_status
1493 CHARACTER(*),
PARAMETER :: routine_name =
'Concatenate_Absorber_ODPS' 1495 INTEGER :: destroy_status
1496 INTEGER :: i, j, l, n_components, n_layers, n_absorbers
1497 INTEGER(Long) :: j1, j2, m, n, n_coeffs
1510 'Some or all INPUT ODPS1 pointer '//&
1511 'members are NOT associated.', &
1513 message_log=message_log )
1519 'Some or all INPUT ODPS2 pointer '//&
1520 'members are NOT associated.', &
1522 message_log=message_log )
1527 IF ( odps1%Release /= odps2%Release )
THEN 1530 'Input ODPS Release values are different.', &
1532 message_log=message_log )
1535 IF ( odps1%Version /= odps2%Version )
THEN 1537 'Input ODPS Version values are different.', &
1539 message_log=message_log )
1543 IF ( odps1%n_Layers /= odps2%n_Layers .OR. &
1544 odps1%n_Channels /= odps2%n_Channels )
THEN 1547 'Non-absorber ODPS dimensions are different.', &
1549 message_log=message_log )
1554 IF ( odps1%Group_Index /= odps2%Group_Index )
THEN 1557 'ODPS group ID values are different.', &
1559 message_log=message_log )
1564 IF ( odps1%Sensor_ID /= odps2%Sensor_ID .OR. &
1565 odps1%WMO_Satellite_ID /= odps2%WMO_Satellite_ID .OR. &
1566 odps1%WMO_Sensor_ID /= odps2%WMO_Sensor_ID )
THEN 1569 'ODPS sensor ID values are different.', &
1571 message_log=message_log )
1576 IF ( any( ( odps1%Sensor_Channel - odps2%Sensor_Channel ) /= 0 ) )
THEN 1579 'ODPS channel values are different.', &
1581 message_log=message_log )
1590 message_log=message_log )
1591 IF ( error_status /=
success )
THEN 1593 'Error copying ODPS1 structure.', &
1595 message_log=message_log )
1601 n_absorbers = odps1%n_Absorbers
1603 DO i = 1, odps2%n_Absorbers
1604 DO j = 1, odps1%n_Absorbers
1605 IF(odps2%Absorber_ID(i) == odps1%Absorber_ID(j))
EXIT 1608 IF( j > odps1%n_Absorbers)
THEN 1613 n_absorbers = n_absorbers + n
1617 message_log=message_log )
1618 IF ( error_status /=
success )
THEN 1620 'Error destroying ODPS1 structure.', &
1622 message_log=message_log )
1628 n_components = odps_tmp%n_Components + odps2%n_Components
1629 n_coeffs = odps_tmp%n_Coeffs + odps2%n_Coeffs
1633 odps_tmp%n_Channels, &
1636 message_log=message_log )
1637 IF ( error_status /=
success )
THEN 1639 'Error reallocating ODPS1 structure.', &
1641 message_log=message_log )
1646 odps1%Ref_Level_Pressure = odps_tmp%Ref_Level_Pressure
1647 odps1%Ref_Pressure = odps_tmp%Ref_Pressure
1648 odps1%Ref_Temperature = odps_tmp%Ref_Temperature
1651 odps1%Ref_Absorber(:, 1:odps_tmp%n_Absorbers) = odps_tmp%Ref_Absorber
1652 odps1%Min_Absorber(:, 1:odps_tmp%n_Absorbers) = odps_tmp%Min_Absorber
1653 odps1%Max_Absorber(:, 1:odps_tmp%n_Absorbers) = odps_tmp%Max_Absorber
1654 odps1%Absorber_ID(1:odps_tmp%n_Absorbers) = odps_tmp%Absorber_ID
1656 odps1%Ref_Absorber(:, odps_tmp%n_Absorbers + j) = &
1657 odps2%Ref_Absorber(:, indx(j))
1658 odps1%Min_Absorber(:, odps_tmp%n_Absorbers + j) = &
1659 odps2%Min_Absorber(:, indx(j))
1660 odps1%Max_Absorber(:, odps_tmp%n_Absorbers + j) = &
1661 odps2%Max_Absorber(:, indx(j))
1662 odps1%Absorber_ID(odps_tmp%n_Absorbers + j) = &
1663 odps2%Absorber_ID(indx(j))
1668 odps1%Version =
max( odps_tmp%Version, odps2%Version )
1669 odps1%Group_Index = odps_tmp%Group_Index
1670 odps1%Sensor_ID = odps_tmp%Sensor_ID
1671 odps1%Sensor_type = odps_tmp%Sensor_type
1672 odps1%WMO_Satellite_ID = odps_tmp%WMO_Satellite_ID
1673 odps1%WMO_Sensor_ID = odps_tmp%WMO_Sensor_ID
1674 odps1%Sensor_Channel = odps_tmp%Sensor_Channel
1676 odps1%OComponent_Index = odps_tmp%OComponent_Index
1677 odps1%Alpha = odps_tmp%Alpha
1678 odps1%Alpha_C1 = odps_tmp%Alpha_C1
1679 odps1%Alpha_C2 = odps_tmp%Alpha_C2
1687 j2 = odps_tmp%n_Components
1688 odps1%Component_ID(j1:j2) = odps_tmp%Component_ID
1689 odps1%n_Predictors(j1:j2,:) = odps_tmp%n_Predictors
1692 j1 = odps_tmp%n_Components + 1
1694 odps1%Component_ID(j1:j2) = odps2%Component_ID
1695 odps1%n_Predictors(j1:j2,:) = odps2%n_Predictors
1699 n_layers = odps_tmp%n_Layers
1700 DO l = 1, odps1%n_Channels
1702 DO j = 1, odps_tmp%n_Components
1703 n = n_layers*odps_tmp%n_Predictors(j, l)
1705 j1 = odps_tmp%Pos_Index(j, l)
1707 odps1%Pos_Index(j,l) = m
1708 odps1%C(m:m+n-1)= odps_tmp%C(j1:j2)
1714 DO j = 1, odps2%n_Components
1715 n = n_layers*odps2%n_Predictors(j, l)
1717 j1 = odps2%Pos_Index(j, l)
1719 odps1%Pos_Index(odps_tmp%n_Components+j,l) = m
1720 odps1%C(m:m+n-1)= odps2%C(j1:j2)
1730 message_log=message_log )
1731 IF ( destroy_status /=
success )
THEN 1733 'Error destroying ODPS_Tmp structure.', &
1735 message_log=message_log )
1842 ODPS_RHS , & ! Input
1843 ULP_Scale , & ! Optional input
1844 Check_All , & ! Optional input
1845 RCS_Id , & ! Revision control
1847 result( error_status )
1849 TYPE(
odps_type) ,
INTENT(IN) :: odps_lhs
1850 TYPE(
odps_type) ,
INTENT(IN) :: odps_rhs
1851 INTEGER,
OPTIONAL,
INTENT(IN) :: ulp_scale
1852 INTEGER,
OPTIONAL,
INTENT(IN) :: check_all
1853 CHARACTER(*),
OPTIONAL,
INTENT(OUT) :: rcs_id
1854 CHARACTER(*),
OPTIONAL,
INTENT(IN) :: message_log
1856 INTEGER :: error_status
1858 CHARACTER(*),
PARAMETER :: routine_name =
'Equal_ODPS' 1860 CHARACTER(ML) :: message
1862 LOGICAL :: check_once
1874 IF (
PRESENT( ulp_scale ) )
THEN 1875 IF ( ulp_scale > 0 ) ulp = ulp_scale
1881 IF (
PRESENT( check_all ) )
THEN 1882 IF ( check_all == 1 ) check_once = .false.
1889 'Some or all INPUT ODPS_LHS pointer '//&
1890 'members are NOT associated.', &
1892 message_log=message_log )
1898 'Some or all INPUT ODPS_RHS pointer '//&
1899 'members are NOT associated.', &
1901 message_log=message_log )
1908 IF ( ( odps_lhs%Release /= odps_rhs%Release ) .OR. &
1909 ( odps_lhs%Version /= odps_rhs%Version ) )
THEN 1911 WRITE( message,
'( "Release/Version numbers are different : ", & 1912 &i2, ".", i2.2, " vs. ", i2, ".", i2.2 )' ) &
1913 odps_lhs%Release, odps_lhs%Version, &
1914 odps_rhs%Release, odps_rhs%Version
1918 message_log=message_log )
1919 IF ( check_once )
RETURN 1925 IF ( odps_lhs%n_Layers /= odps_rhs%n_Layers .OR. &
1926 odps_lhs%n_Components /= odps_rhs%n_Components .OR. &
1927 odps_lhs%n_Absorbers /= odps_rhs%n_Absorbers .OR. &
1928 odps_lhs%n_Channels /= odps_rhs%n_Channels .OR. &
1929 odps_lhs%n_Coeffs /= odps_rhs%n_Coeffs .OR. &
1930 odps_lhs%n_OCoeffs /= odps_rhs%n_OCoeffs )
THEN 1933 'Structure dimensions are different', &
1935 message_log=message_log )
1942 IF ( odps_lhs%Group_Index /= odps_rhs%Group_Index )
THEN 1944 WRITE( message,
'( "Group_Index values are different, ", & 1945 &i0, " vs. ", i0 )' ) &
1946 odps_lhs%Group_Index, odps_rhs%Group_Index
1950 message_log=message_log )
1951 IF ( check_once )
RETURN 1955 IF ( odps_lhs%Sensor_Id /= odps_rhs%Sensor_Id )
THEN 1957 WRITE( message,
'( "Sensor_ID values are different, ", & 1958 &a, " vs. ", a )' ) &
1959 trim( odps_lhs%Sensor_Id), &
1960 trim( odps_rhs%Sensor_Id)
1964 message_log=message_log )
1965 IF ( check_once )
RETURN 1969 IF ( odps_lhs%Sensor_Type /= odps_rhs%Sensor_Type )
THEN 1970 WRITE( message,
'("Sensor types are different, ", & 1971 &i0,"(",a,") vs. ", i0,"(",a,")")' ) &
1972 odps_lhs%Sensor_Type, &
1974 odps_rhs%Sensor_Type, &
1979 message_log=message_log )
1980 IF ( check_once )
RETURN 1984 IF ( odps_lhs%WMO_Satellite_ID /= odps_rhs%WMO_Satellite_ID )
THEN 1986 WRITE( message,
'("WMO_Satellite_ID values are different, ",i0,& 1988 odps_lhs%WMO_Satellite_ID, &
1989 odps_rhs%WMO_Satellite_ID
1993 message_log=message_log )
1994 IF ( check_once )
RETURN 1998 IF ( odps_lhs%WMO_Sensor_ID /= odps_rhs%WMO_Sensor_ID )
THEN 2000 WRITE( message,
'("WMO_Sensor_ID values are different, ",i0,& 2002 odps_lhs%WMO_Sensor_ID, &
2003 odps_rhs%WMO_Sensor_ID
2007 message_log=message_log )
2008 IF ( check_once )
RETURN 2012 DO l = 1, odps_rhs%n_Channels
2013 IF ( odps_lhs%Sensor_Channel(l) /= odps_rhs%Sensor_Channel(l) )
THEN 2015 WRITE( message,
'("Sensor_Channel values are different, ",i0,& 2016 &" vs. ",i0,", for channel index # ",i0)' ) &
2017 odps_lhs%Sensor_Channel(l), &
2018 odps_rhs%Sensor_Channel(l), &
2023 message_log=message_log )
2024 IF ( check_once )
RETURN 2029 DO j = 1, odps_rhs%n_Components
2030 IF ( odps_lhs%Component_ID(j) /= odps_rhs%Component_ID(j) )
THEN 2032 WRITE( message,
'("Component_ID values are different, ",i0,& 2033 &" vs. ",i0,", for absorber index # ",i0)' ) &
2034 odps_lhs%Component_ID(j), &
2035 odps_rhs%Component_ID(j), &
2040 message_log=message_log )
2041 IF ( check_once )
RETURN 2047 DO l = 1, odps_rhs%n_Channels
2048 DO j = 1, odps_rhs%n_Components
2049 IF ( odps_lhs%n_Predictors(j,l) /= odps_rhs%n_Predictors(j,l) )
THEN 2051 WRITE( message,
'("n_Predictors values are different, ",i0,& 2052 &" vs. ",i0,", for index (",i0,1x,i0,")")' ) &
2053 odps_lhs%n_Predictors(j,l), &
2054 odps_rhs%n_Predictors(j,l), &
2059 message_log=message_log )
2060 IF ( check_once )
RETURN 2066 DO l = 1, odps_rhs%n_Channels
2067 DO j = 1, odps_rhs%n_Components
2068 IF ( odps_lhs%Pos_Index(j,l) /= odps_rhs%Pos_Index(j,l) )
THEN 2070 WRITE( message,
'("Pos_Index values are different, ",i0,& 2071 &" vs. ",i0,", for index (",i0,1x,i0,")")' ) &
2072 odps_lhs%Pos_Index(j,l), &
2073 odps_rhs%Pos_Index(j,l), &
2078 message_log=message_log )
2079 IF ( check_once )
RETURN 2085 DO i = 1, odps_rhs%n_Coeffs
2086 IF ( odps_lhs%C(i) /= odps_rhs%C(i) )
THEN 2088 WRITE( message,
'("C values are different, ",i0,& 2089 &" vs. ",i0,", for index (",i0,")")' ) &
2096 message_log=message_log )
2097 IF ( check_once )
RETURN 2103 IF(odps_rhs%n_OCoeffs > 0)
THEN 2104 IF(any(odps_lhs%OC /= odps_rhs%OC) .OR. &
2105 any(odps_lhs%OSignificance /= odps_rhs%OSignificance) .OR. &
2106 any(odps_lhs%Order /= odps_rhs%Order) .OR. &
2107 any(odps_lhs%OP_Index /= odps_rhs%OP_Index) .OR. &
2108 any(odps_lhs%OPos_Index /= odps_rhs%OPos_Index) .OR. &
2109 odps_lhs%OComponent_Index /= odps_rhs%OComponent_Index .OR. &
2110 odps_lhs%Alpha /= odps_rhs%Alpha .OR. &
2111 odps_lhs%Alpha_C1 /= odps_rhs%Alpha_C1 .OR. &
2112 odps_lhs%Alpha_C2 /= odps_rhs%Alpha_C2 )
THEN 2115 "ODPS OPTRAN data are different", &
2117 message_log=message_log )
2118 IF ( check_once )
RETURN 2177 RCS_Id , & ! Revision control
2179 result( error_status )
2182 CHARACTER(*),
OPTIONAL,
INTENT(OUT) :: rcs_id
2183 CHARACTER(*),
OPTIONAL,
INTENT(IN) :: message_log
2185 INTEGER :: error_status
2187 CHARACTER(*),
PARAMETER :: routine_name =
'CheckRelease_ODPS' 2189 CHARACTER(ML) :: message
2202 WRITE( message,
'( "An ODPS data update is needed. ", & 2203 &"ODPS release is ", i2, & 2204 &". Valid release is ",i2,"." )' ) &
2209 message_log=message_log )
2216 WRITE( message,
'( "An ODPS software update is needed. ", & 2217 &"ODPS release is ", i2, & 2218 &". Valid release is ",i2,"." )' ) &
2223 message_log=message_log )
2280 RCS_Id , & ! Revision control
2282 result( error_status )
2285 CHARACTER(*),
OPTIONAL,
INTENT(OUT) :: rcs_id
2286 CHARACTER(*),
OPTIONAL,
INTENT(IN) :: message_log
2288 INTEGER :: error_status
2290 CHARACTER(*),
PARAMETER :: routine_name =
'CheckAlgorithm_ODPS' 2303 'The ODPS Algorithm ID check failed. '//&
2304 'The data structure is not an ODPS structure', &
2306 message_log=message_log )
2357 CHARACTER(*),
INTENT(OUT) :: info
2358 CHARACTER(*),
OPTIONAL,
INTENT(OUT) :: rcs_id
2360 CHARACTER(2000) :: longstring
2368 WRITE( longstring,
'( a,3x,"ODPS RELEASE.VERSION: ",i2,".",i2.2,2x,& 2369 &"N_LAYERS=",i0,2x,& 2370 &"N_COMPONENTS=",i0,2x,& 2371 &"N_ABSORBERS=",i0,2x,& 2372 &"N_CHANNELS=",i0,2x, & 2373 &"N_COEFFS=",i0)' ) &
2375 odps%Release, odps%Version, &
2377 odps%n_Components, &
2385 info = longstring(1:
min( len(info), len_trim(longstring) ))
2426 TYPE(ODPS_type),
INTENT(IN OUT) :: ODPS
2431 odps%Sensor_Id =
' ' integer, parameter, public microwave_sensor
integer, parameter linefeed
integer, parameter, public failure
integer function, public checkalgorithm_odps(ODPS, RCS_Id, Message_Log)
integer function, public equal_odps(ODPS_LHS, ODPS_RHS, ULP_Scale, Check_All, RCS_Id, Message_Log)
integer, parameter, public warning
integer, parameter, public invalid_wmo_satellite_id
integer function, public allocate_odps(n_Layers, n_Components, n_Absorbers, n_Channels, n_Coeffs, ODPS, RCS_Id, Message_Log)
integer, parameter, public long
subroutine, public info_odps(ODPS, Info, RCS_Id)
integer, parameter carriage_return
integer, parameter, public fp
integer function, public destroy_odps(ODPS, No_Clear, RCS_Id, Message_Log)
integer, parameter n_predictor_used_optran
integer, parameter ip_invalid
integer, parameter, public invalid_wmo_sensor_id
integer function, public assign_odps(ODPS_in, ODPS_out, RCS_Id, Message_Log)
integer, parameter, public single
integer, parameter ultraviolet_sensor
integer, parameter, public visible_sensor
integer function, public concatenate_channel_odps(ODPS1, ODPS2, RCS_Id, Message_Log)
integer, parameter, public significance_optran
subroutine clear_odps(ODPS)
integer, parameter odps_version
integer, parameter, public infrared_sensor
recursive subroutine, public display_message(Routine_Name, Message, Error_State, Message_Log)
logical function, public associated_odps(ODPS, ANY_Test)
integer function, public checkrelease_odps(ODPS, RCS_Id, Message_Log)
integer, parameter, public n_sensor_types
integer, parameter, public odps_algorithm
integer, parameter, public invalid_sensor
character(*), parameter module_rcs_id
character(*), dimension(0:n_sensor_types), parameter, public sensor_type_name
integer function, public concatenate_absorber_odps(ODPS1, ODPS2, RCS_Id, Message_Log)
character(*), parameter odps_algorithm_name
integer, parameter, public success
integer, parameter odps_release
real(fp), parameter fp_invalid
integer function, public allocate_odps_optran(n_OCoeffs, ODPS, RCS_Id, Message_Log)