- Timestamp:
- 05/28/19 22:44:58 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/devel/src/dynamics/compute_caldyn_Coriolis.F90
r844 r876 4 4 PRIVATE 5 5 6 #include "../unstructured/unstructured.h90" 7 6 8 PUBLIC :: compute_caldyn_Coriolis 7 9 8 10 CONTAINS 11 12 #ifdef BEGIN_DYSL 13 14 KERNEL(coriolis) 15 ! 16 DO iq=1,nqdyn 17 FORALL_CELLS_EXT() 18 ON_EDGES 19 Ftheta(EDGE) = .5*(theta(CELL1,iq)+theta(CELL2,iq))*hflux(EDGE) 20 END_BLOCK 21 END_BLOCK 22 FORALL_CELLS() 23 ON_PRIMAL 24 divF=0. 25 FORALL_EDGES 26 divF = divF + Ftheta(EDGE)*SIGN 27 END_BLOCK 28 dtheta_rhodz(CELL,iq) = -divF / AI 29 END_BLOCK 30 END_BLOCK 31 END DO ! iq 32 ! 33 FORALL_CELLS() 34 ON_PRIMAL 35 divF=0. 36 FORALL_EDGES 37 divF = divF + hflux(EDGE)*SIGN 38 END_BLOCK 39 convm(CELL) = -divF / AI 40 END_BLOCK 41 END_BLOCK 42 ! 43 FORALL_CELLS() 44 ON_EDGES 45 du_trisk=0. 46 FORALL_TRISK 47 du_trisk = du_trisk + WEE*hflux(EDGE_TRISK)*(qu(EDGE)+qu(EDGE_TRISK)) 48 END_BLOCK 49 du(EDGE) = du(EDGE) + .5*du_trisk 50 END_BLOCK 51 END_BLOCK 52 53 END_BLOCK 54 55 #endif END_DYSL 56 57 SUBROUTINE compute_coriolis_unst(hflux,theta,qu,Ftheta, convm,dtheta_rhodz,du) 58 USE ISO_C_BINDING, only : C_DOUBLE, C_FLOAT 59 USE grid_param, ONLY : nqdyn 60 USE data_unstructured_mod, ONLY : id_coriolis, primal_num, dual_num, edge_num, & 61 left, right,primal_deg,primal_edge,primal_ne,trisk_deg,wee,trisk,Ai, & 62 enter_trace, exit_trace 63 FIELD_U :: hflux, Ftheta, qu, du 64 FIELD_MASS :: convm 65 FIELD_THETA :: theta, dtheta_rhodz 66 DECLARE_INDICES 67 DECLARE_EDGES 68 NUM :: divF, du_trisk 69 START_TRACE(id_coriolis, 3,4,0) ! primal, dual, edge 70 #include "../kernels_unst/coriolis.k90" 71 STOP_TRACE 72 END SUBROUTINE compute_coriolis_unst 9 73 10 74 SUBROUTINE compute_caldyn_Coriolis(hflux,theta,qu, convm,dtheta_rhodz,du)
Note: See TracChangeset
for help on using the changeset viewer.