Changeset 562 for codes/icosagcm/devel/src
- Timestamp:
- 09/28/17 21:58:12 (7 years ago)
- Location:
- codes/icosagcm/devel/src/dynamics
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/devel/src/dynamics/caldyn.f90
r531 r562 2 2 USE icosa 3 3 PRIVATE 4 SAVE 4 5 CHARACTER(LEN=255),SAVE :: caldyn_type 5 6 !$OMP THREADPRIVATE(caldyn_type) 6 7 PUBLIC init_caldyn, caldyn, caldyn_BC 7 8 PUBLIC init_caldyn, caldyn, caldyn_BC, dysl 8 9 9 10 CONTAINS … … 28 29 END SELECT 29 30 30 31 dysl=.FALSE. 32 CALL getin("dysl",dysl) 33 dysl_geopot=dysl 34 CALL getin("dysl_geopot",dysl_geopot) 35 dysl_caldyn_fast=dysl 36 CALL getin("dysl_caldyn_fast",dysl_caldyn_fast) 37 dysl_slow_hydro=dysl 38 CALL getin("dysl_slow_hydro",dysl_slow_hydro) 39 dysl_pvort_only=dysl 40 CALL getin("dysl_pvort_only",dysl_pvort_only) 41 dysl_caldyn_coriolis=dysl 42 CALL getin("dysl_caldyn_coriolis",dysl_caldyn_coriolis) 43 31 44 END SUBROUTINE init_caldyn 32 45 -
codes/icosagcm/devel/src/dynamics/caldyn_hevi.f90
r559 r562 48 48 TYPE(t_field) :: f_dPhi_fast(:) 49 49 50 REAL(rstd),POINTER :: ps(:), dps(:) 50 REAL(rstd),POINTER :: ps(:), dps(:), phis(:) 51 51 REAL(rstd),POINTER :: mass(:,:), theta_rhodz(:,:,:), dtheta_rhodz(:,:,:) 52 52 REAL(rstd),POINTER :: du(:,:), dW(:,:), dPhi(:,:), hflux(:,:), wflux(:,:) … … 115 115 CALL compute_geopot(mass,theta, ps,pk,geopot) 116 116 ELSE 117 phis = f_phis(ind) 117 118 W = f_W(ind) 118 119 dW = f_dW_fast(ind) … … 121 122 m_il = f_wil(ind) 122 123 pres = f_gradPhi2(ind) 123 CALL compute_caldyn_solver(tau, mass,theta,pk,geopot,W, m_il,pres, dPhi,dW,du) ! computes d(Phi,W,du)_fast and updates Phi,W124 CALL compute_caldyn_solver(tau,phis, mass,theta,pk,geopot,W, m_il,pres, dPhi,dW,du) ! computes d(Phi,W,du)_fast and updates Phi,W 124 125 END IF 125 126 u=f_u(ind) -
codes/icosagcm/devel/src/dynamics/caldyn_kernels_base.F90
r558 r562 49 49 Rd = kappa*cpp 50 50 51 IF(dysl_geopot) THEN 51 52 #ifdef CPP_DYSL 52 !#if 053 53 #include "../kernels/compute_geopot.k90" 54 54 #else 55 55 STOP 'dysl_geopot=.TRUE. but DYNAMICO has been compiled without the -dysl option' 56 #endif 57 ELSE 56 58 ! Pressure is computed first top-down (temporarily stored in pk) 57 59 ! Then Exner pressure and geopotential are computed bottom-up … … 164 166 END IF 165 167 166 #endif 168 END IF ! dysl 167 169 168 170 !ym flush geopot -
codes/icosagcm/devel/src/dynamics/caldyn_kernels_hevi.F90
r558 r562 9 9 PRIVATE 10 10 11 REAL(rstd), PARAMETER :: pbot=1e5, Phi_bot=0., rho_bot=1e6 ! FIXME11 REAL(rstd), PARAMETER :: pbot=1e5, rho_bot=1e6 12 12 13 13 LOGICAL, SAVE :: debug_hevi_solver = .FALSE. 14 LOGICAL, PARAMETER :: rigid=.TRUE.15 14 16 15 PUBLIC :: compute_theta, compute_pvort_only, compute_caldyn_Coriolis, & … … 62 61 CALL trace_start("compute_pvort_only") 63 62 !!! Compute shallow-water potential vorticity 63 IF(dysl_pvort_only) THEN 64 64 #ifdef CPP_DYSL 65 65 #include "../kernels/pvort_only.k90" 66 66 #else 67 STOP 'dysl_pvort_only=.TRUE. but DYNAMICO is compiled without the -dysl option' 68 #endif 69 ELSE 70 67 71 radius_m2=radius**(-2) 68 72 DO l = ll_begin,ll_end … … 94 98 95 99 ENDDO 96 #endif 100 101 END IF ! dysl 97 102 CALL trace_end("compute_pvort_only") 98 103 99 104 END SUBROUTINE compute_pvort_only 100 105 101 SUBROUTINE compute_NH_geopot(tau, m_ik, m_il, theta, W_il, Phi_il)106 SUBROUTINE compute_NH_geopot(tau, phis, m_ik, m_il, theta, W_il, Phi_il) 102 107 REAL(rstd),INTENT(IN) :: tau ! solve Phi-tau*dPhi/dt = Phi_rhs 108 REAL(rstd),INTENT(IN) :: phis(iim*jjm) 103 109 REAL(rstd),INTENT(IN) :: m_ik(iim*jjm,llm) 104 110 REAL(rstd),INTENT(IN) :: m_il(iim*jjm,llm+1) … … 125 131 126 132 #ifdef CPP_DYSL 133 #define PHI_BOT(ij) phis(ij) 127 134 #include "../kernels/compute_NH_geopot.k90" 128 135 #else … … 264 271 END SUBROUTINE compute_NH_geopot 265 272 266 SUBROUTINE compute_caldyn_solver(tau, rhodz,theta,pk, geopot,W, m_il,pres, dPhi,dW,du)273 SUBROUTINE compute_caldyn_solver(tau,phis, rhodz,theta,pk, geopot,W, m_il,pres, dPhi,dW,du) 267 274 REAL(rstd),INTENT(IN) :: tau ! "solve" Phi-tau*dPhi/dt = Phi_rhs 275 REAL(rstd),INTENT(IN) :: phis(iim*jjm) 268 276 REAL(rstd),INTENT(IN) :: rhodz(iim*jjm,llm) 269 277 REAL(rstd),INTENT(IN) :: theta(iim*jjm,llm,nqdyn) … … 287 295 #ifdef CPP_DYSL 288 296 !$OMP BARRIER 297 #define PHI_BOT(ij) phis(ij) 298 #define PHI_BOT_VAR phis 289 299 #include "../kernels/caldyn_solver.k90" 290 300 !$OMP BARRIER … … 396 406 Rd=cpp*kappa 397 407 408 IF(dysl_caldyn_fast) THEN 398 409 #ifdef CPP_DYSL 399 410 #include "../kernels/caldyn_fast.k90" 400 411 #else 412 STOP 'dysl_caldyn_fast=.TRUE. but DYNAMICO is compiled without the -dysl option' 413 #endif 414 ELSE 415 401 416 ! Compute Bernoulli term 402 417 IF(boussinesq) THEN … … 496 511 END IF 497 512 END DO 498 #endif 513 514 END IF ! dysl 499 515 CALL trace_end("compute_caldyn_fast") 500 516 … … 515 531 CALL trace_start("compute_caldyn_Coriolis") 516 532 533 IF(dysl_caldyn_coriolis) THEN 517 534 #ifdef CPP_DYSL 518 535 #include "../kernels/coriolis.k90" 519 536 #else 537 STOP 'dysl_caldyn_coriolis is .TRUE. but DYNAMICO is compiled without the -dysl option' 538 #endif 539 540 ELSE 520 541 #define FTHETA(ij) Ftheta(ij,1) 521 542 … … 653 674 END SELECT 654 675 #undef FTHETA 655 #endif 676 677 END IF ! dysl 656 678 657 679 CALL trace_end("compute_caldyn_Coriolis") … … 672 694 CALL trace_start("compute_caldyn_slow_hydro") 673 695 696 IF(dysl_slow_hydro) THEN 674 697 #ifdef CPP_DYSL 675 698 #define BERNI(ij,l) berni(ij,l) … … 677 700 #undef BERNI 678 701 #else 702 STOP 'dysl_slow_hydro=.TRUE. but DYNAMICO is compiled without the -dysl option' 703 #endif 704 705 ELSE 706 679 707 #define BERNI(ij) berni(ij,1) 680 708 … … 726 754 END DO 727 755 #undef BERNI 728 #endif 756 END IF ! dysl 729 757 CALL trace_end("compute_caldyn_slow_hydro") 730 758 END SUBROUTINE compute_caldyn_slow_hydro
Note: See TracChangeset
for help on using the changeset viewer.