[211] | 1 | SUBROUTINE user_data_output_3d( av, variable, found, local_pf, nz_do ) |
---|
| 2 | |
---|
| 3 | !------------------------------------------------------------------------------! |
---|
[484] | 4 | ! Current revisions: |
---|
[211] | 5 | ! ----------------- |
---|
| 6 | ! |
---|
| 7 | ! Former revisions: |
---|
| 8 | ! ----------------- |
---|
| 9 | ! $Id: user_data_output_3d.f90 668 2010-12-23 13:22:58Z gryschka $ |
---|
| 10 | ! |
---|
[668] | 11 | ! 667 2010-12-23 12:06:00Z suehring/gryschka |
---|
| 12 | ! nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng |
---|
| 13 | ! |
---|
[226] | 14 | ! 211 2008-11-11 04:46:24Z raasch |
---|
| 15 | ! Former file user_interface.f90 split into one file per subroutine |
---|
| 16 | ! |
---|
[211] | 17 | ! Description: |
---|
| 18 | ! ------------ |
---|
| 19 | ! Resorts the user-defined output quantity with indices (k,j,i) to a |
---|
| 20 | ! temporary array with indices (i,j,k). |
---|
| 21 | !------------------------------------------------------------------------------! |
---|
| 22 | |
---|
| 23 | USE array_kind |
---|
| 24 | USE indices |
---|
| 25 | USE user |
---|
| 26 | |
---|
| 27 | IMPLICIT NONE |
---|
| 28 | |
---|
| 29 | CHARACTER (LEN=*) :: variable |
---|
| 30 | |
---|
| 31 | INTEGER :: av, i, j, k, nz_do |
---|
| 32 | |
---|
| 33 | LOGICAL :: found |
---|
| 34 | |
---|
[667] | 35 | REAL(spk), DIMENSION(nxlg:nxrg,nysg:nyng,nzb:nz_do) :: local_pf |
---|
[211] | 36 | |
---|
| 37 | |
---|
| 38 | found = .TRUE. |
---|
| 39 | |
---|
| 40 | SELECT CASE ( TRIM( variable ) ) |
---|
| 41 | |
---|
| 42 | ! |
---|
| 43 | !-- Uncomment and extend the following lines, if necessary. |
---|
| 44 | !-- The arrays for storing the user defined quantities (here u2 and u2_av) |
---|
| 45 | !-- have to be declared and defined by the user! |
---|
| 46 | !-- Sample for user-defined output: |
---|
| 47 | ! CASE ( 'u2' ) |
---|
| 48 | ! IF ( av == 0 ) THEN |
---|
[667] | 49 | ! DO i = nxlg, nxrg |
---|
| 50 | ! DO j = nysg, nyng |
---|
[211] | 51 | ! DO k = nzb, nz_do |
---|
| 52 | ! local_pf(i,j,k) = u2(k,j,i) |
---|
| 53 | ! ENDDO |
---|
| 54 | ! ENDDO |
---|
| 55 | ! ENDDO |
---|
| 56 | ! ELSE |
---|
[667] | 57 | ! DO i = nxlg, nxrg |
---|
| 58 | ! DO j = nysg, nyng |
---|
[211] | 59 | ! DO k = nzb, nz_do |
---|
| 60 | ! local_pf(i,j,k) = u2_av(k,j,i) |
---|
| 61 | ! ENDDO |
---|
| 62 | ! ENDDO |
---|
| 63 | ! ENDDO |
---|
| 64 | ! ENDIF |
---|
| 65 | ! |
---|
| 66 | |
---|
| 67 | CASE DEFAULT |
---|
| 68 | found = .FALSE. |
---|
| 69 | |
---|
| 70 | END SELECT |
---|
| 71 | |
---|
| 72 | |
---|
| 73 | END SUBROUTINE user_data_output_3d |
---|
| 74 | |
---|