[2894] | 1 | !> @file user_last_actions.f90 |
---|
| 2 | !------------------------------------------------------------------------------! |
---|
| 3 | ! This file is part of the PALM model system. |
---|
| 4 | ! |
---|
| 5 | ! PALM is free software: you can redistribute it and/or modify it under the |
---|
| 6 | ! terms of the GNU General Public License as published by the Free Software |
---|
| 7 | ! Foundation, either version 3 of the License, or (at your option) any later |
---|
| 8 | ! version. |
---|
| 9 | ! |
---|
| 10 | ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY |
---|
| 11 | ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
---|
| 12 | ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
---|
| 13 | ! |
---|
| 14 | ! You should have received a copy of the GNU General Public License along with |
---|
| 15 | ! PALM. If not, see <http://www.gnu.org/licenses/>. |
---|
| 16 | ! |
---|
| 17 | ! Copyright 1997-2018 Leibniz Universitaet Hannover |
---|
| 18 | !------------------------------------------------------------------------------! |
---|
| 19 | ! |
---|
| 20 | ! Current revisions: |
---|
| 21 | ! ----------------- |
---|
| 22 | ! |
---|
| 23 | ! |
---|
| 24 | ! Former revisions: |
---|
| 25 | ! ----------------- |
---|
| 26 | ! $Id: wrd_write_string.f90 2894 2018-03-15 09:17:58Z gronemeier $ |
---|
| 27 | ! Initial revision |
---|
| 28 | ! |
---|
| 29 | ! |
---|
| 30 | ! Description: |
---|
| 31 | ! ------------ |
---|
| 32 | !> Calculates length of string and write the respective value together with the |
---|
| 33 | !> string into binary file(s) for restart runs |
---|
| 34 | !------------------------------------------------------------------------------! |
---|
| 35 | |
---|
| 36 | SUBROUTINE wrd_write_string( string ) |
---|
| 37 | |
---|
| 38 | |
---|
| 39 | USE kinds |
---|
| 40 | |
---|
| 41 | |
---|
| 42 | IMPLICIT NONE |
---|
| 43 | |
---|
| 44 | CHARACTER (LEN=*), INTENT (IN) :: string !< for storing strings in case of writing/reading restart data |
---|
| 45 | |
---|
| 46 | INTEGER(iwp) :: length !< integer that specifies the length of a string in case of writing/reading restart |
---|
| 47 | !< data |
---|
| 48 | |
---|
| 49 | |
---|
| 50 | length = LEN_TRIM( string ) |
---|
| 51 | |
---|
| 52 | WRITE ( 14 ) length |
---|
| 53 | WRITE ( 14 ) string(1:length) |
---|
| 54 | |
---|
| 55 | |
---|
| 56 | END SUBROUTINE wrd_write_string |
---|