Changeset 5181 for LMDZ6/trunk
- Timestamp:
- Sep 10, 2024, 3:06:08 PM (3 months ago)
- Location:
- LMDZ6/trunk/libf/phylmd
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/lmdz_wake.F90
r4908 r5181 1 1 MODULE lmdz_wake 2 2 3 ! $Id$ 3 USE lmdz_wake_ini, ONLY: CPPKEY_IOPHYS_WK 4 5 IMPLICIT NONE; PRIVATE 6 PUBLIC wake 4 7 5 8 CONTAINS … … 353 356 ! 354 357 IF (first_call) THEN 355 !!#define IOPHYS_WK 356 #undef IOPHYS_WK 357 #ifdef IOPHYS_WK 358 IF (CPPKEY_IOPHYS_WK) THEN 358 359 IF (phys_sub) THEN 359 360 call iophys_ini(dtimesub) … … 361 362 call iophys_ini(dtime) 362 363 ENDIF 363 #endif 364 END IF 364 365 first_call = .false. 365 366 ENDIF !(first_call) … … 771 772 772 773 END DO 773 #ifdef IOPHYS_WK 774 IF (CPPKEY_IOPHYS_WK) THEN 774 775 IF (.not.phys_sub) CALL iophys_ecrit('wape_a',1,'wape_a','J/kg',wape) 775 #endif 776 END IF 776 777 777 778 ! 2.2 Prognostic variable update … … 1007 1008 !!-------------------------------------------------------- 1008 1009 ELSEIF (iflag_wk_pop_dyn == 3) THEN 1009 #ifdef IOPHYS_WK 1010 IF (CPPKEY_IOPHYS_WK) THEN 1010 1011 IF (phys_sub) THEN 1011 1012 CALL iophys_ecrit('ptop',1,'ptop','Pa',ptop) … … 1018 1019 CALL iophys_ecrit('irad_wk',1,'irad_wk','m',irad_wk) 1019 1020 ENDIF 1020 #endif 1021 END IF 1021 1022 ! 1022 1023 CALL wake_popdyn_3 ( klon, klev, phys_sub, wk_adv, dtimesub, wgen, & … … 1072 1073 !!-------------------------------------------------------- 1073 1074 1074 #ifdef IOPHYS_WK 1075 IF (CPPKEY_IOPHYS_WK) THEN 1075 1076 IF (phys_sub) THEN 1076 1077 CALL iophys_ecrit('wdensa',1,'wdensa','m',wdens) … … 1079 1080 CALL iophys_ecrit('asigmawa',1,'asigmawa','m',asigmaw) 1080 1081 ENDIF 1081 #endif 1082 END IF 1082 1083 ! calcul de la difference de vitesse verticale poche - zone non perturbee 1083 1084 ! IM 060208 differences par rapport au code initial; init. a 0 dp_deltomg … … 1669 1670 END DO 1670 1671 1671 #ifdef IOPHYS_WK 1672 IF (CPPKEY_IOPHYS_WK) THEN 1672 1673 IF (phys_sub) THEN 1673 1674 CALL iophys_ecrit('wdensb',1,'wdensb','m',wdens) … … 1702 1703 CALL iophys_ecrit('d_asig_bnd2',1,'d_asig_bnd2','m',d_asig_bnd2) 1703 1704 ENDIF 1704 #endif 1705 END IF 1705 1706 ENDIF ! (iflag_wk_pop_dyn == 3) 1706 1707 ENDIF ! (iflag_wk_pop_dyn >= 2) … … 1866 1867 ! 1867 1868 1868 #ifdef IOPHYS_WK 1869 IF (CPPKEY_IOPHYS_WK) THEN 1869 1870 IF (.not.phys_sub) CALL iophys_ecrit('wape_b',1,'wape_b','J/kg',wape) 1870 #endif 1871 END IF 1871 1872 IF (prt_level>=10) THEN 1872 1873 PRINT *, 'wake-5, sigmaw(igout), cstar(igout), wape(igout), ptop(igout) ', & … … 2009 2010 END IF 2010 2011 END DO 2011 #ifdef IOPHYS_WK 2012 IF (CPPKEY_IOPHYS_WK) THEN 2012 2013 IF (.not.phys_sub) CALL iophys_ecrit('wape2_a',1,'wape2_a','J/kg',wape2) 2013 #endif 2014 END IF 2014 2015 2015 2016 … … 2041 2042 END DO 2042 2043 END IF 2043 #ifdef IOPHYS_WK 2044 IF (CPPKEY_IOPHYS_WK) THEN 2044 2045 IF (.not.phys_sub) CALL iophys_ecrit('wape2_b',1,'wape2_b','J/kg',wape2) 2045 #endif 2046 END IF 2046 2047 2047 2048 … … 2087 2088 gwake(i) = .TRUE. 2088 2089 END IF 2089 #ifdef IOPHYS_WK 2090 IF (CPPKEY_IOPHYS_WK) THEN 2090 2091 IF (.not.phys_sub) CALL iophys_ecrit('cstar2',1,'cstar2','J/kg',cstar2) 2091 #endif 2092 END IF 2092 2093 END IF ! (ok_qx_qw(i)) 2093 2094 END DO … … 2123 2124 END DO 2124 2125 IF (iflag_wk_pop_dyn >= 3) THEN 2125 #ifdef IOPHYS_WK 2126 IF (CPPKEY_IOPHYS_WK) THEN 2126 2127 IF (.not.phys_sub) THEN 2127 2128 CALL iophys_ecrit('fip',1,'fip','J/kg',fip) … … 2163 2164 CALL iophys_ecrit('d_asig_bnd2',1,'d_asig_bnd2','m',d_asig_bnd2) 2164 2165 ENDIF ! (.not.phys_sub) 2165 #endif 2166 END IF 2166 2167 ENDIF ! (iflag_wk_pop_dyn >= 3) 2167 2168 ! Limitation de sigmaw … … 2268 2269 wape(igout),wape2(igout),ktopw(igout),OK_qx_qw(igout) 2269 2270 ENDIF 2270 #ifdef IOPHYS_WK 2271 IF (CPPKEY_IOPHYS_WK) THEN 2271 2272 IF (.not.phys_sub) CALL iophys_ecrit('wape_c',1,'wape_c','J/kg',wape) 2272 #endif 2273 END IF 2273 2274 2274 2275 … … 3255 3256 d_sig_spread(i) = d_sig_spread(i)*dtimesub 3256 3257 d_sigmaw(i) = d_sig_gen(i) + d_sig_death(i) + d_sig_col(i) + d_sig_spread(i) 3257 #ifdef IOPHYS_WK 3258 IF (CPPKEY_IOPHYS_WK) THEN 3258 3259 IF (phys_sub) call iophys_ecrit('d_sigmaw0',1,'d_sigmaw0','',d_sigmaw) 3259 #endif 3260 END IF 3260 3261 3261 3262 … … 3266 3267 d_sigmaw(i) = d_sigmaw_targ 3267 3268 !! d_sigmaw(i) = max(d_sigmaw(i), sigmad-sigmaw(i)) 3268 #ifdef IOPHYS_WK 3269 IF (CPPKEY_IOPHYS_WK) THEN 3269 3270 IF (phys_sub) THEN 3270 3271 call iophys_ecrit('tauwk_inv',1,'tau_wk_inv_min','',tau_wk_inv_min) … … 3276 3277 call iophys_ecrit('d_sig_bnd',1,'d_sig_bnd','',d_sig_bnd) 3277 3278 ENDIF 3278 #endif 3279 END IF 3279 3280 d_asig_death(i) = - asigmaw(i)/tau_prime(i) 3280 3281 d_asig_aicol(i) = (agfl(i)*iwdens(i) + igfl(i)*awdens(i))*cstar(i)*is_wk(i) … … 3287 3288 d_asig_spread(i) = d_asig_spread(i)*dtimesub 3288 3289 d_asigmaw(i) = d_sig_gen(i) + d_asig_death(i) + d_asig_aicol(i) + d_asig_iicol(i) + d_asig_spread(i) 3289 #ifdef IOPHYS_WK 3290 IF (CPPKEY_IOPHYS_WK) THEN 3290 3291 IF (phys_sub) call iophys_ecrit('d_asigmaw0',1,'d_asigmaw0','',d_asigmaw) 3291 #endif 3292 END IF 3292 3293 3293 3294 d_sigmaw_targ = min(max(d_asigmaw(i),-asigmaw(i)), sigmaw(i)-asigmaw(i)) … … 3295 3296 d_asig_bnd(i) = d_sigmaw_targ - d_asigmaw(i) 3296 3297 d_asigmaw(i) = d_sigmaw_targ 3297 #ifdef IOPHYS_WK 3298 IF (CPPKEY_IOPHYS_WK) THEN 3298 3299 IF (phys_sub) THEN 3299 3300 call iophys_ecrit('d_asigmaw',1,'d_asigmaw','',d_asigmaw) … … 3304 3305 call iophys_ecrit('d_asig_bnd',1,'d_asig_bnd','',d_asig_bnd) 3305 3306 ENDIF 3306 #endif 3307 END IF 3307 3308 d_dens_gen(i) = wgen(i) 3308 3309 d_dens_death(i) = - iwdens(i)*tau_wk_inv_min … … 3318 3319 d_dens_bnd(i) = d_wdens_targ - d_wdens(i) 3319 3320 d_wdens(i) = d_wdens_targ 3320 #ifdef IOPHYS_WK 3321 IF (CPPKEY_IOPHYS_WK) THEN 3321 3322 IF (phys_sub) THEN 3322 3323 call iophys_ecrit('d_wdens',1,'d_wdens','',d_wdens) … … 3325 3326 call iophys_ecrit('d_dens_col',1,'d_dens_col','',d_dens_col) 3326 3327 ENDIF 3327 #endif 3328 END IF 3328 3329 3329 3330 d_adens_death(i) = -awdens(i)/tau_prime(i) … … 3335 3336 d_adens_acol(i) = d_adens_acol(i)*dtimesub 3336 3337 d_awdens(i) = d_dens_gen(i) + d_adens_death(i) + d_adens_icol(i) + d_adens_acol(i) 3337 #ifdef IOPHYS_WK 3338 IF (CPPKEY_IOPHYS_WK) THEN 3338 3339 IF (phys_sub) THEN 3339 3340 call iophys_ecrit('d_awdens',1,'d_awdens','',d_awdens) … … 3342 3343 call iophys_ecrit('d_adens_acol',1,'d_adens_acol','',d_adens_acol) 3343 3344 ENDIF 3344 #endif 3345 END IF 3345 3346 d_wdens_targ = min(max(d_awdens(i),-awdens(i)), wdens(i)-awdens(i)) 3346 3347 !! d_dens_bnd(i) = d_dens_bnd(i) + d_wdens_targ - d_wdens(i) -
LMDZ6/trunk/libf/phylmd/lmdz_wake_ini.F90
r4908 r5181 81 81 !$OMP THREADPRIVATE(wk_int_delta_t_min) 82 82 83 ! CPP key used only in this module for debugging purposes. jyg 09/24 84 !!#define IOPHYS_WK 85 #ifdef IOPHYS_WK 86 LOGICAL, PARAMETER :: CPPKEY_IOPHYS_WK = .TRUE. 87 #else 88 LOGICAL, PARAMETER :: CPPKEY_IOPHYS_WK = .FALSE. 89 #endif 90 83 91 84 92
Note: See TracChangeset
for help on using the changeset viewer.