Changeset 955 for codes/icosagcm/devel/src
- Timestamp:
- 07/15/19 23:21:31 (5 years ago)
- Location:
- codes/icosagcm/devel/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/devel/src/base/init_grid_param.f90
r952 r955 70 70 compute_pression_mid => compute_pression_mid_hex 71 71 compute_temperature => compute_temperature_hex 72 compute_hydrostatic_pressure => compute_hydrostatic_pressure_hex 72 73 ! dynamics 73 74 compute_pvort_only => compute_pvort_only_hex … … 85 86 compute_pression_mid => compute_pression_mid_unst 86 87 compute_temperature => compute_temperature_unst 88 compute_hydrostatic_pressure => compute_hydrostatic_pressure_unst 87 89 ! dynamics 88 90 compute_pvort_only => compute_pvort_only_unst -
codes/icosagcm/devel/src/diagnostics/compute_diagnostics.f90
r952 r955 31 31 END SUBROUTINE comp_temperature 32 32 33 SUBROUTINE comp_hydro_press(rhodz, theta_rhodz, ps, p) 34 IMPORT 35 REAL(rstd),INTENT(IN) :: rhodz(iim_jjm_i, llm_) 36 REAL(rstd),INTENT(IN) :: theta_rhodz(iim_jjm_i, llm_, nqdyn_) 37 REAL(rstd),INTENT(OUT) :: ps(iim_jjm_i) 38 REAL(rstd),INTENT(OUT) :: p(iim_jjm_i, llm_) 39 END SUBROUTINE comp_hydro_press 40 33 41 END INTERFACE 34 42 … … 36 44 PROCEDURE(comp_pression), POINTER :: compute_pression => NULL(), compute_pression_mid => NULL() 37 45 PROCEDURE(comp_temperature), POINTER :: compute_temperature => NULL() 46 PROCEDURE(comp_hydro_press), POINTER :: compute_hydrostatic_pressure => NULL() 38 47 39 PUBLIC :: compute_rhodz, compute_pression, compute_pression_mid, compute_temperature 48 PUBLIC :: compute_rhodz, compute_pression, compute_pression_mid, compute_temperature, compute_hydrostatic_pressure 40 49 41 50 END MODULE compute_diagnostics_mod -
codes/icosagcm/devel/src/diagnostics/compute_pression.F90
r913 r955 3 3 USE icosa 4 4 USE omp_para 5 USE disvert_mod, ONLY : ap, bp, ap_bp_present 5 USE disvert_mod, ONLY : ap, bp, ap_bp_present, ptop, caldyn_eta, eta_lag 6 6 IMPLICIT NONE 7 7 PRIVATE … … 10 10 11 11 PUBLIC :: pression, compute_pression_hex, compute_pression_unst, & 12 pression_mid, compute_pression_mid_hex, compute_pression_mid_unst 12 pression_mid, compute_pression_mid_hex, compute_pression_mid_unst, & 13 hydrostatic_pressure, compute_hydrostatic_pressure_unst, compute_hydrostatic_pressure_hex 13 14 14 15 CONTAINS … … 92 93 END SUBROUTINE pression_mid 93 94 95 SUBROUTINE hydrostatic_pressure(f_rhodz, f_theta_rhodz, f_ps, f_p) 96 TYPE(t_field), POINTER :: f_rhodz(:), f_theta_rhodz(:), f_ps(:), f_p(:) 97 REAL(rstd), POINTER :: ps(:), rhodz(:,:), p(:,:), theta_rhodz(:,:,:) 98 INTEGER :: ind 99 DO ind=1,ndomain 100 IF (.NOT. assigned_domain(ind)) CYCLE 101 CALL swap_dimensions(ind) 102 CALL swap_geometry(ind) 103 rhodz=f_rhodz(ind) 104 theta_rhodz=f_theta_rhodz(ind) 105 ps=f_ps(ind) 106 p=f_p(ind) 107 CALL compute_hydrostatic_pressure(rhodz, theta_rhodz, ps, p) 108 ENDDO 109 END SUBROUTINE hydrostatic_pressure 110 94 111 !------------- hexagonal-mesh compute kernels -------- 95 112 … … 115 132 #undef AP 116 133 #undef BP 134 135 SUBROUTINE compute_hydrostatic_pressure_hex(rhodz, theta_rhodz, ps, pk) 136 REAL(rstd),INTENT(IN) :: rhodz(iim*jjm,llm) ! mass per unit surface in each model level 137 REAL(rstd),INTENT(IN) :: theta_rhodz(iim*jjm,llm, nqdyn) ! dynamical tracers (theta/entropy) 138 REAL(rstd),INTENT(OUT) :: ps(iim*jjm) ! surface pressure, diagnosed if Lagrangian vertical coordinate 139 REAL(rstd),INTENT(OUT) :: pk(iim*jjm,llm) ! pressure at full levels 140 INTEGER :: ij,l, ij_omp_begin_ext, ij_omp_end_ext 141 !$OMP BARRIER 142 CALL distrib_level(ij_begin_ext,ij_end_ext, ij_omp_begin_ext,ij_omp_end_ext) 143 #include "../kernels_hex/compute_hydrostatic_pressure.k90" 144 !$OMP BARRIER 145 END SUBROUTINE compute_hydrostatic_pressure_hex 117 146 118 147 !----------- unstructured-mesh compute kernels -------- … … 140 169 #undef BP 141 170 171 SUBROUTINE compute_hydrostatic_pressure_unst(rhodz, theta_rhodz, ps, pk) 172 FIELD_MASS, INTENT(IN) :: rhodz ! mass per unit surface in each model level 173 FIELD_THETA, INTENT(IN) :: theta_rhodz(iim*jjm,llm, nqdyn) ! dynamical tracers (theta/entropy) 174 FIELD_PS, INTENT(OUT) :: ps(iim*jjm) ! surface pressure, diagnosed if Lagrangian vertical coordinate 175 FIELD_MASS, INTENT(OUT) :: pk(iim*jjm,llm) ! pressure at full levels 176 DECLARE_INDICES 177 #include "../kernels_unst/compute_hydrostatic_pressure.k90" 178 END SUBROUTINE compute_hydrostatic_pressure_unst 179 180 142 181 END MODULE compute_pression_mod -
codes/icosagcm/devel/src/diagnostics/observable.f90
r919 r955 43 43 USE xios_mod 44 44 USE earth_const 45 USE compute_pression_mod, ONLY : pression_mid 45 USE compute_pression_mod, ONLY : pression_mid, hydrostatic_pressure 46 46 USE compute_temperature_mod 47 47 USE compute_velocity_mod … … 98 98 END IF 99 99 100 CALL pression_mid(f_ps, f_pmid)100 CALL hydrostatic_pressure(f_mass, f_theta_rhodz, f_ps, f_pmid) 101 101 CALL temperature(f_pmid, f_q, f_buf_i) ! f_buf_i : IN = theta, out = T 102 102 -
codes/icosagcm/devel/src/dynamics/compute_geopot.F90
r937 r955 17 17 18 18 #ifdef BEGIN_DYSL 19 20 #define THECELL {{ thecell }}21 19 22 20 {# ---------------- macro to generate code computing pressure top-down --------------- … … 59 57 60 58 #define END_GEOPOT {% endcall %} 59 60 #define THECELL {{ thecell }} 61 62 KERNEL(compute_hydrostatic_pressure) 63 SELECT CASE(caldyn_thermo) 64 CASE(thermo_boussinesq) 65 ! use hydrostatic balance with theta*rhodz to find pk (=Lagrange multiplier=pressure) 66 BALANCE( theta_rhodz(THECELL,1) ) 67 CASE(thermo_theta, thermo_entropy, thermo_variable_Cp) 68 BALANCE( rhodz(THECELL) ) 69 CASE(thermo_moist) 70 BALANCE( (rhodz(THECELL)+theta_rhodz(THECELL,2)) ) 71 END SELECT 72 END_BLOCK 61 73 62 74 KERNEL(compute_geopot)
Note: See TracChangeset
for help on using the changeset viewer.