Ignore:
Timestamp:
03/08/18 13:05:02 (6 years ago)
Author:
dubos
Message:

devel/unstructured : piecewise-constant vertical remapping

File:
1 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/devel/Python/src/kernels_transport.jin

    r685 r687  
    234234        rhodz_cum(CELL)=0. 
    235235        cur_lev(HIDX(CELL))=1 
    236         eta(CELL)=0. 
     236        eta(CELL)=1. 
    237237        new_rhodz_cum(HIDX(CELL))=0. 
    238238      END_BLOCK 
     
    252252           IF(rhodz_cum_target<=rhodz_cum_levp1) EXIT 
    253253        END DO 
     254        IF(level>llm) level=llm 
    254255        rhodz_cum_lev = rhodz_cum(AT_LEVEL(CELL,level)) 
    255256        ! now rhodz_cum_lev <= rhodz_cum_target <= rhodz_cum_levp1   
     
    275276      BODY('1,llm+1') 
    276277        X = eta(CELL) 
    277         level = FLOOR(X) 
     278        level = MIN(llm,FLOOR(X)) ! eta=llm+1 => level=llm, X=1 
    278279        X = X-level 
    279280        new_thetarhodz_cum(CELL) = thetarhodz_cum(AT_LEVEL(CELL,level))+X*thetarhodz(AT_LEVEL(CELL,level)) 
    280281      END_BLOCK 
    281282      BODY('1,llm') 
    282         thetarhodz(CELL)) = new_thetarhodz_cum(UP(CELL)) - new_thetarhodz_cum(CELL) 
     283        thetarhodz(CELL) = new_thetarhodz_cum(UP(CELL)) - new_thetarhodz_cum(CELL) 
    283284      END_BLOCK 
    284285    END_BLOCK 
     
    300301      BODY('1,llm+1') 
    301302        X = .5*(eta(CELL1)+eta(CELL2)) 
    302         level = FLOOR(X) 
     303        level = MIN(llm,FLOOR(X)) 
    303304        X = X-level 
    304305        new_urhodz_cum(EDGE) = urhodz_cum(AT_LEVEL(EDGE,level))+X*urhodz(AT_LEVEL(EDGE,level)) 
Note: See TracChangeset for help on using the changeset viewer.