Last change
on this file since 837 was
686,
checked in by dubos, 6 years ago
|
devel/unstructured : piecewise-constant vertical remapping
|
File size:
966 bytes
|
Rev | Line | |
---|
[686] | 1 | !-------------------------------------------------------------------------- |
---|
| 2 | !---------------------------- remap_theta ---------------------------------- |
---|
| 3 | ! IN : thetarhodz, eta |
---|
| 4 | ! TMP : thetarhodz_cum, new_thetarhodz_cum |
---|
| 5 | ! OUT : thetarhodz |
---|
| 6 | !$OMP DO SCHEDULE(STATIC) |
---|
| 7 | DO ij=1,primal_num |
---|
| 8 | thetarhodz_cum(1,ij)=0. |
---|
| 9 | DO l = 1,llm |
---|
| 10 | thetarhodz_cum(l+1,ij) = thetarhodz_cum(l,ij) + thetarhodz(l,ij) |
---|
| 11 | END DO |
---|
| 12 | DO l = 1,llm+1 |
---|
| 13 | X = eta(l,ij) |
---|
| 14 | level = MIN(llm,FLOOR(X)) ! eta=llm+1 => level=llm, X=1 |
---|
| 15 | X = X-level |
---|
| 16 | new_thetarhodz_cum(l,ij) = thetarhodz_cum(level,ij)+X*thetarhodz(level,ij) |
---|
| 17 | END DO |
---|
| 18 | DO l = 1,llm |
---|
| 19 | thetarhodz(l,ij) = new_thetarhodz_cum(l+1,ij) - new_thetarhodz_cum(l,ij) |
---|
| 20 | END DO |
---|
| 21 | END DO |
---|
| 22 | !$OMP END DO |
---|
| 23 | !---------------------------- remap_theta ---------------------------------- |
---|
| 24 | !-------------------------------------------------------------------------- |
---|
Note: See
TracBrowser
for help on using the repository browser.