85 '$Id: xODPS_Predictor_Define.f90 18500 2012-04-02 11:07:35Z paul.vandelst@noaa.gov $' 92 REAL(fp),
PARAMETER ::
zero = 0.0_fp
93 REAL(fp),
PARAMETER ::
one = 1.0_fp
95 INTEGER,
PARAMETER ::
ml = 256
108 LOGICAL :: is_allocated = .false.
114 INTEGER :: n_layers = 0
115 INTEGER :: n_user_layers = 0
116 INTEGER :: n_components = 0
117 INTEGER :: n_predictors = 0
119 REAL(fp) :: secant_zenith_surface
122 REAL(fp),
ALLOCATABLE :: secant_zenith(:)
123 INTEGER,
ALLOCATABLE :: component_id(:)
124 INTEGER,
ALLOCATABLE :: n_cp(:)
125 REAL(fp),
ALLOCATABLE :: x(:,:,:)
126 REAL(fp),
ALLOCATABLE :: ref_level_lnpressure(:)
127 REAL(fp),
ALLOCATABLE :: user_level_lnpressure(:)
129 LOGICAL :: optran = .false.
130 INTEGER :: n_opredictors = 0
131 REAL(fp),
ALLOCATABLE :: ap(:,:)
132 REAL(fp),
ALLOCATABLE :: da(:)
133 REAL(fp),
ALLOCATABLE :: ox(:,:)
183 status = self%Is_Allocated
212 self%Is_Allocated = .false.
285 n_User_Layers, & ! Input
286 n_Components , & ! Input
287 n_Predictors , & ! Input
291 INTEGER,
INTENT(IN) :: n_layers
292 INTEGER,
INTENT(IN) :: n_user_layers
293 INTEGER,
INTENT(IN) :: n_components
294 INTEGER,
INTENT(IN) :: n_predictors
295 LOGICAL,
OPTIONAL,
INTENT(IN) :: no_optran
297 LOGICAL :: use_optran
298 INTEGER :: alloc_stat
301 IF ( n_layers < 1 .OR. &
302 n_user_layers < 1 .OR. &
303 n_components < 1 .OR. &
304 n_predictors < 1 )
RETURN 307 IF (
PRESENT(no_optran) ) use_optran = .NOT. no_optran
310 ALLOCATE( self%Secant_Zenith(n_layers), &
311 self%Component_ID(n_components), &
312 self%n_CP(n_components), &
313 self%X(n_layers, n_predictors, n_components), &
314 self%Ref_Level_LnPressure(0:n_layers), &
315 self%User_Level_LnPressure(0:n_user_layers), &
317 IF ( alloc_stat /= 0 )
RETURN 321 self%Max_n_Layers = n_layers
322 self%n_Layers = n_layers
323 self%n_User_Layers = n_user_layers
324 self%n_Components = n_components
325 self%n_Predictors = n_predictors
329 IF ( use_optran )
THEN 334 IF ( alloc_stat /= 0 )
RETURN 343 self%Is_Allocated = .true.
378 WRITE(*,
'(1x,"ODPS_Predictor OBJECT")')
380 WRITE(*,
'(3x,"Release.Version :",1x,i0,".",i0)') self%Release, self%Version
382 WRITE(*,
'(3x,"n_Layers :",1x,i0)') self%n_Layers
383 WRITE(*,
'(3x,"n_User_Layers :",1x,i0)') self%n_User_Layers
384 WRITE(*,
'(3x,"n_Components :",1x,i0)') self%n_Components
385 WRITE(*,
'(3x,"n_Predictors :",1x,i0)') self%n_Predictors
388 WRITE(*,
'(3x,"ODPS data arrays :")')
390 WRITE(*,
'(5x,"Secant_Zenith :")')
391 WRITE(*,
'(5(1x,es23.15e3,:))') self%Secant_Zenith(1:self%n_Layers)
392 WRITE(*,
'(5x,"Component_ID :")')
393 WRITE(*,
'(10(1x,i0,:))') self%Component_ID(1:self%n_Components)
394 WRITE(*,
'(5x,"n_CP :")')
395 WRITE(*,
'(10(1x,i0,:))') self%n_CP(1:self%n_Components)
396 WRITE(*,
'(5x,"X (predictor array) :")')
397 DO j = 1, self%n_Components
398 DO i = 1, self%n_Predictors
399 WRITE(*,
'(7x,"Component#: ",i0,"; Predictor#: ",i0)') j, i
400 WRITE(*,
'(5(1x,es23.15e3,:))') self%X(1:self%n_Layers,i,j)
405 WRITE(*,
'(5x,"Ref_Level_LnPressure :")')
406 WRITE(*,
'(5(1x,es13.6,:))') self%Ref_Level_LnPressure
407 WRITE(*,
'(5x,"User_Level_LnPressure :")')
408 WRITE(*,
'(5(1x,es13.6,:))') self%User_Level_LnPressure
410 IF ( self%OPTRAN )
THEN 411 WRITE(*,
'(3x,"n_OPredictors :",1x,i0)') self%n_OPredictors
412 WRITE(*,
'(5x,"OX :")');
WRITE(*,
'(5(1x,es13.6,:))') self%OX
413 WRITE(*,
'(5x,"Ap :")');
WRITE(*,
'(5(1x,es13.6,:))') self%Ap
414 WRITE(*,
'(5x,"dA :")');
WRITE(*,
'(5(1x,es13.6,:))') self%dA
445 self%Secant_Zenith =
zero 446 self%Component_ID = 0
447 self%n_CP = self%n_Predictors
449 self%Ref_Level_LnPressure =
zero 450 self%User_Level_LnPressure =
zero 451 IF ( self%OPTRAN )
THEN character(*), parameter module_version_id
integer, parameter, public failure
real(fp), parameter, public zero
integer, parameter, public max_optran_used_predictors
integer, parameter, public fp
integer function, public readgatts_binary_file(fid, Write_Module, Created_On, Title, History, Comment)
integer, parameter odps_predictor_version
elemental subroutine, public pafv_create(self, n_ODPS_Layers, n_User_Layers, n_Absorbers, No_OPTRAN)
elemental subroutine, public odps_predictor_zero(self)
elemental subroutine, public odps_predictor_destroy(self)
subroutine, public odps_predictor_inspect(self)
character(*), parameter write_error_status
integer function, public open_binary_file(Filename, FileID, For_Output, No_Check)
real(fp), parameter, public one
recursive subroutine, public display_message(Routine_Name, Message, Error_State, Message_Log)
elemental logical function, public pafv_associated(self)
integer, parameter odps_predictor_release
elemental subroutine, public odps_predictor_create(self, n_Layers, n_User_Layers, n_Components, n_Predictors, No_OPTRAN)
integer, parameter, public max_optran_predictors
integer, parameter, public max_n_layers
integer function, public writegatts_binary_file(fid, Write_Module, Created_On, Title, History, Comment)
elemental logical function, public odps_predictor_associated(self)
elemental subroutine, public pafv_destroy(self)
integer, parameter, public success
integer, parameter, public information
integer, parameter, public max_optran_order