Changeset 877


Ignore:
Timestamp:
05/29/19 11:16:16 (5 years ago)
Author:
jisesh
Message:

devel: moved DYSL into compute_caldyn_slow_hydro.F90

Location:
codes/icosagcm/devel
Files:
2 edited

Legend:

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

    r836 r877  
    9393END_BLOCK 
    9494 
    95 KERNEL(caldyn_slow_hydro) 
    96   FORALL_CELLS_EXT() 
    97     ON_EDGES 
    98       uu = .5*(rhodz(CELL1)+rhodz(CELL2))*u(EDGE) 
    99       hflux(EDGE) = uu*LE_DE 
    100     END_BLOCK 
    101   END_BLOCK 
    102  
    103   FORALL_CELLS() 
    104     ON_PRIMAL 
    105       ke=0.d0 
    106       FORALL_EDGES 
    107         ke = ke + LE_DE*u(EDGE)**2 
    108       END_BLOCK 
    109       BERNI(CELL)=ke*(.25/AI) 
    110     END_BLOCK 
    111   END_BLOCK 
    112   IF(zero) THEN 
    113     FORALL_CELLS() 
    114       ON_EDGES 
    115         du(EDGE) = SIGN*(berni(CELL1)-berni(CELL2)) ! minus gradient 
    116       END_BLOCK 
    117     END_BLOCK 
    118   ELSE 
    119     FORALL_CELLS() 
    120       ON_EDGES 
    121         du(EDGE) = du(EDGE) + SIGN*(berni(CELL1)-berni(CELL2)) ! minus gradient 
    122       END_BLOCK 
    123     END_BLOCK 
    124   END IF 
    125  
    126 END_BLOCK 
  • codes/icosagcm/devel/src/dynamics/compute_caldyn_slow_hydro.F90

    r851 r877  
    44  PRIVATE 
    55 
     6#include "../unstructured/unstructured.h90" 
     7 
    68  PUBLIC :: compute_caldyn_slow_hydro 
    79 
    810CONTAINS 
     11 
     12#ifdef BEGIN_DYSL 
     13 
     14KERNEL(caldyn_slow_hydro) 
     15  FORALL_CELLS_EXT() 
     16    ON_EDGES 
     17      uu = .5*(rhodz(CELL1)+rhodz(CELL2))*u(EDGE) 
     18      hflux(EDGE) = uu*LE_DE 
     19    END_BLOCK 
     20  END_BLOCK 
     21 
     22  FORALL_CELLS() 
     23    ON_PRIMAL 
     24      ke=0.d0 
     25      FORALL_EDGES 
     26        ke = ke + LE_DE*u(EDGE)**2 
     27      END_BLOCK 
     28      BERNI(CELL)=ke*(.25/AI) 
     29    END_BLOCK 
     30  END_BLOCK 
     31  IF(zero) THEN 
     32    FORALL_CELLS() 
     33      ON_EDGES 
     34        du(EDGE) = SIGN*(berni(CELL1)-berni(CELL2)) ! minus gradient 
     35      END_BLOCK 
     36    END_BLOCK 
     37  ELSE 
     38    FORALL_CELLS() 
     39      ON_EDGES 
     40        du(EDGE) = du(EDGE) + SIGN*(berni(CELL1)-berni(CELL2)) ! minus gradient 
     41      END_BLOCK 
     42    END_BLOCK 
     43  END IF 
     44 
     45END_BLOCK 
     46 
     47#endif END_DYSL 
     48 
     49  SUBROUTINE compute_caldyn_slow_hydro_unst(rhodz,theta,u, berni,hflux,du) 
     50    USE ISO_C_BINDING, only : C_DOUBLE, C_FLOAT 
     51    USE grid_param, ONLY : nqdyn 
     52    USE data_unstructured_mod, ONLY :left,right,edge_num,primal_num,dual_num,id_slow_hydro, & 
     53        primal_deg,le_de,primal_edge,Ai,enter_trace, exit_trace 
     54    FIELD_MASS  :: rhodz,berni! IN 
     55    FIELD_THETA :: theta      ! IN 
     56    FIELD_U     :: u,hflux,du ! IN, OUT, OUT 
     57    DECLARE_INDICES 
     58    DECLARE_EDGES 
     59    LOGICAL, PARAMETER :: zero=.TRUE. 
     60    NUM :: ke, uu 
     61    START_TRACE(id_slow_hydro, 3,0,3) 
     62#include "../kernels_unst/caldyn_slow_hydro.k90" 
     63    STOP_TRACE 
     64  END SUBROUTINE compute_caldyn_slow_hydro_unst 
    965 
    1066  SUBROUTINE compute_caldyn_slow_hydro(u,rhodz,hv, hflux,Kv,du, zero) 
Note: See TracChangeset for help on using the changeset viewer.