10.4.1_peseiGFS_025bugfixes+enhancementsdevrelease-10release-10.4.1scaling-bug
Last change
on this file since 3481cc1 was
3481cc1,
checked in by Ignacio Pisso <ip@…>, 5 years ago
|
move license from headers to a different file
|
-
Property mode set to
100644
|
File size:
2.1 KB
|
Rev | Line | |
---|
[e200b7a] | 1 | subroutine shift_field_0(field,nxf,nyf) |
---|
| 2 | ! i/o i i |
---|
| 3 | !***************************************************************************** |
---|
| 4 | ! * |
---|
| 5 | ! This subroutine shifts global fields by nxshift grid cells, in order to * |
---|
| 6 | ! facilitate all sorts of nested wind fields, or output grids, which, * |
---|
| 7 | ! without shifting, would overlap with the domain "boundary". * |
---|
| 8 | ! * |
---|
| 9 | ! Author: A. Stohl * |
---|
| 10 | ! * |
---|
| 11 | ! 3 July 2002 * |
---|
| 12 | ! * |
---|
| 13 | !***************************************************************************** |
---|
| 14 | ! * |
---|
| 15 | ! Variables: * |
---|
| 16 | ! * |
---|
| 17 | ! Constants: * |
---|
| 18 | ! * |
---|
| 19 | !***************************************************************************** |
---|
| 20 | |
---|
| 21 | use par_mod |
---|
| 22 | |
---|
| 23 | implicit none |
---|
| 24 | |
---|
| 25 | integer :: nxf,nyf,ix,jy,ixs |
---|
| 26 | real :: field(0:nxmax-1,0:nymax-1),xshiftaux(0:nxmax-1) |
---|
| 27 | |
---|
| 28 | ! Loop over y and z |
---|
| 29 | !****************** |
---|
| 30 | |
---|
| 31 | do jy=0,nyf-1 |
---|
| 32 | |
---|
| 33 | ! Shift the data |
---|
| 34 | !*************** |
---|
| 35 | |
---|
| 36 | if (nxshift.ne.0) then |
---|
| 37 | do ix=0,nxf-1 |
---|
| 38 | if (ix.ge.nxshift) then |
---|
| 39 | ixs=ix-nxshift |
---|
| 40 | else |
---|
| 41 | ixs=nxf-nxshift+ix |
---|
| 42 | endif |
---|
| 43 | xshiftaux(ixs)=field(ix,jy) |
---|
| 44 | end do |
---|
| 45 | do ix=0,nxf-1 |
---|
| 46 | field(ix,jy)=xshiftaux(ix) |
---|
| 47 | end do |
---|
| 48 | endif |
---|
| 49 | |
---|
| 50 | ! Repeat the westernmost grid cells at the easternmost domain "boundary" |
---|
| 51 | !*********************************************************************** |
---|
| 52 | |
---|
| 53 | field(nxf,jy)=field(0,jy) |
---|
| 54 | end do |
---|
| 55 | |
---|
| 56 | return |
---|
| 57 | end subroutine shift_field_0 |
---|
Note: See
TracBrowser
for help on using the repository browser.