smoothness.f90 File Reference

Data Types

type  smoothness_estimates
 

Modules

module  mod_smoothness_estimates
 

Functions/Subroutines

subroutine inter_pix_smooth_constr_incl (KNSING, npixels, UFS, QS, FFMS, FFMS0, SMMULTI, NISM, KSM, IMSM, ccor, FFMSQ)
 Routine calculates the change of quadratic form gradient at p - interation. More...
 
subroutine matrix_q_iter (KNSING, npixels, UFS, SMMULTI, NISM, KSM, IMSM, ccor, AAI)
 

More...
 
subroutine ordsing_for_smooth_single_pixel (RIN, ORDSING)
 

More...
 
subroutine smoothterm_single_pixel_apriori (RIN, KSM, SMSING, apriori_present)
 Routine determines smoothness term for single pixel (a priori estimates) More...
 
subroutine smoothterm_single_pixel_smoothness (RIN, KSM, SMSING, SMSEST, apriori_present)
 Routine determines smoothness term for single pixel (a priori smoothness) More...
 
subroutine smoothterm_multi_pixel (iu_main_output, RIN, index_clouds, NISM, KSM, IMSM, IKSIM, SMMULTI)
 Routine determines smoothness term for milti pixel inversion. More...
 
subroutine smoom (KM, KN, DIF, DIFWGT, SM1, xnorm)
 Routine calculates smoothness matrix. More...
 
subroutine diferw_dp (IPRI_verbose, KN, IO, X_dp, G_sp, DIF_sp, time_diff_threshold_sec_sp)
 Routine defines matrix of n-th differences. More...
 
subroutine diferw (IPRI_verbose, KN, IO, X, G, DIF)
 Routine defines matrix of n-th differences. More...
 
subroutine smoothterm_mutli_pixel_edges (iu_main_output, RIN, index_clouds, edges, NISM, KSM, IKSIM, IMSM, SMMULTI, FF_edge, AB_edge)
 Routine calculates matrices for applying constraints forcing. More...
 
subroutine mat_t_mat (KM1, KM2, KN, U1, U2, UFS)
 
real function ab_edge_xyt (KIMAGE_E, GSM, I2, ISTARSING, NIO, KSM_A, DIF_A, APX)
 
subroutine ff_edge_calcul (KIMAGE_E, GSM, I2, ISTARSING, IMSM_edge, KSM_A, KSM_AP, SM_A, APX, FF_edge)
 
subroutine smoothness_edge_term (GSM, I2, ISTARSING, IMSM_edge, KSM_AP, SM_AP, SMIM_edge)
 Routine calculates smoothness term for edges of inverted segment. More...
 
subroutine ksm_calcul (NSUM, N_EDGE_A, N_EDGE_AP, IOI, KSM_A, KSM_AP)
 
subroutine dif_before_calcul (NIO, KSM_A, NNN_E, DIF, DIF_A, DIF_AP)
 
subroutine dif_after_calcul (NIO, KSM_AP, NNN_E, DIF, DIF_A, DIF_AP)
 

Detailed Description

File contains routines related to smoothness constrains.

Authors
Oleg Dubovik and Tatsiana Lapionak

Function/Subroutine Documentation

◆ ab_edge_xyt()

real function ab_edge_xyt ( integer, intent(in)  KIMAGE_E,
real, intent(in)  GSM,
integer, intent(in)  I2,
integer, intent(in)  ISTARSING,
integer, intent(in)  NIO,
integer, intent(in)  KSM_A,
real, dimension(kdif,kdif), intent(in)  DIF_A,
real, dimension(kpars,kimage_e), intent(in)  APX 
)
Parameters
[in]KIMAGE_E-
[in]GSM-
[in]I2-
[in]ISTARSING-
[in]NIO-
[in]KSM_A-
[in]DIF_A-
[in]APX-

◆ dif_after_calcul()

subroutine dif_after_calcul ( integer, intent(in)  NIO,
integer, intent(in)  KSM_AP,
integer, intent(in)  NNN_E,
real, dimension(kdif,kdif), intent(in)  DIF,
real, dimension(kdif,kdif), intent(out)  DIF_A,
real, dimension(kdif,kdif), intent(out)  DIF_AP 
)
Parameters
[in]NIO-
[in]KSM_AP-
[in]NNN_E-
[in]DIF-
[in]DIF_A-
[in]DIF_AP-

◆ dif_before_calcul()

subroutine dif_before_calcul ( integer, intent(in)  NIO,
integer, intent(in)  KSM_A,
integer, intent(in)  NNN_E,
real, dimension(kdif,kdif), intent(in)  DIF,
real, dimension(kdif,kdif), intent(out)  DIF_A,
real, dimension(kdif,kdif), intent(out)  DIF_AP 
)
Parameters
[in]NIO-
[in]KSM_A-
[in]NNN_E-
[in]DIF-
[in]DIF_A-
[in]DIF_AP-

◆ diferw()

subroutine diferw ( logical, intent(in)  IPRI_verbose,
integer, intent(in)  KN,
integer, intent(inout)  IO,
real, dimension(kdif), intent(in)  X,
real, intent(out)  G,
real, dimension(kdif,kdif), intent(out)  DIF 
)

Routine defines matrix of n-th differences.

Parameters
[in]KN- number of parameters
[in]X- values of ordinates Xi of the grid point
[in,out]IO- order of differences
[out]G- coefficient relating differences with derivatives
[out]DIF- matrix of differences

◆ diferw_dp()

subroutine diferw_dp ( logical, intent(in)  IPRI_verbose,
integer, intent(in)  KN,
integer, intent(inout)  IO,
double precision, dimension(kdif), intent(in)  X_dp,
real, intent(out)  G_sp,
real, dimension(kdif,kdif), intent(out)  DIF_sp,
real, intent(in)  time_diff_threshold_sec_sp 
)

Routine defines matrix of n-th differences.

Parameters
[in]IPRI_verbose- print info for grasp verbose mode
[in]KN- number of parameters
[in]X_dp- values of ordinates Xi of the grid point
[in]time_diff_threshold_sec_sp- value of time difference in seconds
[in,out]IO- order of differences
[out]G_sp- coefficient relating differences with derivatives
[out]DIF_sp- matrix of differences

◆ ff_edge_calcul()

subroutine ff_edge_calcul ( integer, intent(in)  KIMAGE_E,
real, intent(in)  GSM,
integer, intent(in)  I2,
integer, intent(in)  ISTARSING,
integer, dimension(kimage), intent(in)  IMSM_edge,
integer, intent(in)  KSM_A,
integer, intent(in)  KSM_AP,
real, dimension(kdif,kdif), intent(in)  SM_A,
real, dimension(kpars,kimage_e), intent(in)  APX,
real, dimension(kpars,kimage), intent(inout)  FF_edge 
)
Parameters
[in]KIMAGE_E-
[in]GSM-
[in]I2-
[in]ISTARSING-
[in]IMSM_edge-
[in]KSM_A-
[in]KSM_AP-
[in]SM_A-
[in]APX-
[in,out]FF_edge-

◆ inter_pix_smooth_constr_incl()

subroutine inter_pix_smooth_constr_incl ( integer, intent(in)  KNSING,
integer, intent(in)  npixels,
real, dimension(kpars,kpars,kimage), intent(in)  UFS,
real, dimension(kpars,kimage), intent(in)  QS,
real, dimension(kpars,kimage), intent(in)  FFMS,
real, dimension(kpars,kimage), intent(in)  FFMS0,
real, dimension(kimage,kpars,kimage), intent(in)  SMMULTI,
integer, intent(in)  NISM,
integer, dimension(kmpsm), intent(in)  KSM,
integer, dimension(kmpsm,kimage), intent(in)  IMSM,
real, intent(in)  ccor,
real, dimension(kpars,kimage), intent(out)  FFMSQ 
)

Routine calculates the change of quadratic form gradient at p - interation.

for the entire segment of pixels with inclusion of inter-pixel constraints.

Parameters
[in]KNSING- number of parameters driving forwar model
[in]npixels- number of inverted pixels
[in]UFS- Fisher matrix
[in]QS-
[in]FFMS- gradient: contribution of measurements
[in]FFMS0- contribution of a priroi estimates to the gradient
[in]SMMULTI- multipixel smoothness matrix
[in]NISM- number of groups in which smoothness can be implemented
[in]KSM- number of elements in each of NISM groups
[in]IMSM- pixel numbers which belong to the group
[in]ccor-
[out]FFMSQ-
Parameters
[in]knsingThis subroutine calculates the change of quadratic form gradient at p - interation for the entire segment of pixels with inclusion of inter-pixel constraints :
[in]npixelsThis subroutine calculates the change of quadratic form gradient at p - interation for the entire segment of pixels with inclusion of inter-pixel constraints :
[in]nismThis subroutine calculates the change of quadratic form gradient at p - interation for the entire segment of pixels with inclusion of inter-pixel constraints :

◆ ksm_calcul()

subroutine ksm_calcul ( integer, intent(in)  NSUM,
integer, intent(in)  N_EDGE_A,
integer, intent(in)  N_EDGE_AP,
integer, intent(inout)  IOI,
integer, intent(out)  KSM_A,
integer, intent(out)  KSM_AP 
)
Parameters
[in]NSUM-
[in]N_EDGE_A-
[in]N_EDGE_AP-
[in,out]IOI-
[out]KSM_A-
[out]KSM_AP-

◆ mat_t_mat()

subroutine mat_t_mat ( integer, intent(in)  KM1,
integer, intent(in)  KM2,
integer, intent(in)  KN,
real, dimension(kdif,kdif), intent(in)  U1,
real, dimension(kdif,kdif), intent(in)  U2,
real, dimension(kdif,kdif), intent(out)  UFS 
)
Parameters
[in]KM1- number of columns of U1
[in]KM2- number of columns of U2
[in]KN- number of rows
[in]U1- matrix
[in]U2- matrix
[out]UFS- Fisher matrix

◆ matrix_q_iter()

subroutine matrix_q_iter ( integer, intent(in)  KNSING,
integer, intent(in)  npixels,
real, dimension(kpars,kpars,kimage), intent(in)  UFS,
real, dimension(kimage,kpars,kimage), intent(in)  SMMULTI,
integer, intent(in)  NISM,
integer, dimension(kmpsm), intent(in)  KSM,
integer, dimension(kmpsm,kimage), intent(in)  IMSM,
real, intent(in)  ccor,
real, dimension(kpars,kimage), intent(out)  AAI 
)

Parameters
[in]KNSING- number of parameters driving forwar model
[in]npixels- number of inverted pixels
[in]UFS- Fisher matrix
[in]SMMULTI- multipixel smoothness matrix
[in]NISM- number of groups in which smoothness can be implemented
[in]KSM- number of elements in each of NISM groups
[in]IMSM- pixel numbers which belong to the group
[in]ccor-
[out]AAI-

◆ ordsing_for_smooth_single_pixel()

subroutine ordsing_for_smooth_single_pixel ( type(retr_input_settings), intent(in)  RIN,
real, dimension(kidim3,kidim2,kidim1), intent(inout)  ORDSING 
)

Parameters
[in]RIN- invertion setting structure
[in,out]ORDSING(KIDIM3,KIDIM2,KIDIM1) is used for non-equal binning (aerosol particle radii and wave lengths) in smoothness.

◆ smoom()

subroutine smoom ( integer, intent(in)  KM,
integer, intent(in)  KN,
real, dimension(kdif,kdif), intent(in)  DIF,
real, dimension(kdif,kdif), intent(in)  DIFWGT,
real, dimension(kdif,kdif), intent(out)  SM1,
real, intent(inout)  xnorm 
)

Routine calculates smoothness matrix.

Parameters
[in]KM- number of rows
[in]KN- number of columns
[in]DIF- matrix of differences
[in]DIFWGT- matrix of differences with weights
[out]SM1- smoothness matrix
[in,out]xnorm- smoothness normalization coefficient

◆ smoothness_edge_term()

subroutine smoothness_edge_term ( real, intent(in)  GSM,
integer, intent(in)  I2,
integer, intent(in)  ISTARSING,
integer, dimension(kimage), intent(in)  IMSM_edge,
integer, intent(in)  KSM_AP,
real, dimension(kdif,kdif), intent(in)  SM_AP,
real, dimension(kimage,kpars,kimage), intent(inout)  SMIM_edge 
)

Routine calculates smoothness term for edges of inverted segment.

Parameters
[in]GSM-
[in]I2-
[in]ISTARSING-
[in]IMSM_edge-
[in]KSM_AP-
[in]SM_AP-
[in,out]SMIM_edge-

◆ smoothterm_multi_pixel()

subroutine smoothterm_multi_pixel ( integer, intent(in)  iu_main_output,
type(retr_input_settings), intent(in)  RIN,
type(ind_clouds), intent(in)  index_clouds,
integer, intent(out)  NISM,
integer, dimension(kmpsm), intent(out)  KSM,
integer, dimension(kmpsm,kimage), intent(out)  IMSM,
integer, intent(out)  IKSIM,
real, dimension(kimage,kpars,kimage), intent(out)  SMMULTI 
)

Routine determines smoothness term for milti pixel inversion.

Parameters
[in]iu_main_output- type of constrains 'smoothness' or 'apriori' estimates
[in]RIN- invertion setting structure
[in]index_clouds- contains indices for recurcive function CHECK
[out]NISM- number of groups in which smoothness can be implemented
[out]KSM- number of elements in each of NISM groups
[out]IMSM- pixel numbers which belong to the group
[out]IKSIM- number of equivalent measurements defining smoothness (used for residual)
[out]SMMULTI- smoothness term of smoothness matrix for multi pixel

◆ smoothterm_mutli_pixel_edges()

subroutine smoothterm_mutli_pixel_edges ( integer, intent(in)  iu_main_output,
type(retr_input_settings), intent(in)  RIN,
type(ind_clouds), intent(in)  index_clouds,
type(segment_edges), intent(in)  edges,
integer, intent(inout)  NISM,
integer, dimension(kmpsm), intent(inout)  KSM,
integer, intent(inout)  IKSIM,
integer, dimension(kmpsm,kimage), intent(inout)  IMSM,
real, dimension(kimage,kpars,kimage), intent(inout)  SMMULTI,
real, dimension(kpars,kimage), intent(out)  FF_edge,
real, intent(out)  AB_edge 
)

Routine calculates matrices for applying constraints forcing.

smooth connection between the parameters at the edge of the block of

inverted pixels and those retrieved perviouly outside of this block

next to the edge

Author
Oleg Dubovik and Tatsiana Lapionak
Date
20 APR 2015
Parameters
[in]iu_main_output- unit number of main output file of retrieval
[in]RIN- structure of settings for retrieval
[in]index_cloudsTO_BE_DOCUMENTED
[in]edges- structure of egdes data
[in,out]NISM- number of groups in which smoothness can be implemented
[in,out]KSM- number of elements in each of NISM groups
[in,out]IKSIM- number of equivalent measurements defining smoothness (used for residual)
[in,out]IMSM- pixel numbers which belong to the group
[in,out]SMMULTI- smoothness matrix
[out]FF_edgeTO_BE_DOCUMENTED
[out]AB_edgeTO_BE_DOCUMENTED

◆ smoothterm_single_pixel_apriori()

subroutine smoothterm_single_pixel_apriori ( type(retr_input_settings), intent(in)  RIN,
integer, intent(out)  KSM,
real, dimension(kpars,kpars), intent(out)  SMSING,
logical, intent(out)  apriori_present 
)

Routine determines smoothness term for single pixel (a priori estimates)

Parameters
[in]RIN- invertion setting structure
[out]KSM-
[out]SMSING- a priori estimates term of smoothness matrix for single pixel
[out]apriori_present- presence of a priori estimates

◆ smoothterm_single_pixel_smoothness()

subroutine smoothterm_single_pixel_smoothness ( type(retr_input_settings), intent(in)  RIN,
integer, intent(out)  KSM,
real, dimension(kpars,kpars), intent(out)  SMSING,
type(smoothness_estimates), intent(out)  SMSEST,
logical, intent(out)  apriori_present 
)

Routine determines smoothness term for single pixel (a priori smoothness)

Parameters
[in]RIN- invertion setting structure
[out]KSM-
[out]SMSING- smoothness term of smoothness matrix for single pixel
[out]SMSEST- structure of single pixel smoothness estimates
[out]apriori_present- presence of a priori estimates