SUBROUTINE user_data_output_mask( av, variable, found, local_pf ) !------------------------------------------------------------------------------! ! Current revisions: ! ------------------ ! ! ! Former revisions: ! ----------------- ! $Id: user_data_output_mask.f90 410 2009-12-04 17:05:40Z franke $ ! Initial version ! ! Description: ! ------------ ! Resorts the user-defined output quantity with indices (k,j,i) to a ! temporary array with indices (i,j,k) for masked data output. !------------------------------------------------------------------------------! USE control_parameters USE indices USE user IMPLICIT NONE CHARACTER (LEN=*) :: variable INTEGER :: av, i, j, k LOGICAL :: found REAL, DIMENSION(mask_size_l(mid,1),mask_size_l(mid,2), & mask_size_l(mid,3)) :: local_pf found = .TRUE. SELECT CASE ( TRIM( variable ) ) ! !-- Uncomment and extend the following lines, if necessary. !-- The arrays for storing the user defined quantities (here u2 and u2_av) !-- have to be declared and defined by the user! !-- Sample for user-defined output: ! CASE ( 'u2' ) ! IF ( av == 0 ) THEN ! DO i = 1, mask_size_l(mid,1) ! DO j = 1, mask_size_l(mid,2) ! DO k = 1, mask_size_l(mid,3) ! local_pf(i,j,k) = u2(mask_k(mid,k), & ! mask_j(mid,j),mask_i(mid,i)) ! ENDDO ! ENDDO ! ENDDO ! ELSE ! DO i = 1, mask_size_l(mid,1) ! DO j = 1, mask_size_l(mid,2) ! DO k = 1, mask_size_l(mid,3) ! local_pf(i,j,k) = u2_av(mask_k(mid,k), & ! mask_j(mid,j),mask_i(mid,i)) ! ENDDO ! ENDDO ! ENDDO ! ENDIF ! CASE DEFAULT found = .FALSE. END SELECT END SUBROUTINE user_data_output_mask