Changeset 3871 for trunk/LMDZ.MARS
- Timestamp:
- Jul 31, 2025, 1:01:40 PM (4 months ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 2 edited
-
changelog.txt (modified) (1 diff)
-
libf/phymars/watercloud_mod.F (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/changelog.txt
r3870 r3871 4934 4934 In writediag* routines, the files are now opened and closed only at dump time 4935 4935 instead of every physical step (sensible speed up in 1D mainly). 4936 4937 == 31/07/2025 == JBC 4938 Big corrections related to "simpleclouds" ("mircophys=.false.") because of r2984: 4939 - getting "simpleclouds" calls out of the loop to save unnecessary iterations (spotted by Jonah M.). Running time is particularly improved! 4940 - giving well-updated arguments to "simpleclouds" subroutine. 4941 - bringing the old 'imicro' time subsampling back again for "simpleclouds" subroutine (which was deleted in r2966 to implement an adaptative timestep within the "improvedclouds" subroutine). 4942 Resuls are now consistent in 1D with code versions before r2966). -
trunk/LMDZ.MARS/libf/phymars/watercloud_mod.F
r3739 r3871 51 51 c 52 52 c 2023: J. Naar, now with adaptative timestep for improvedclouds 53 c (done in improvedclouds_mod). 53 c (done in improvedclouds). 54 c 2025: J.-B. Clement, bringing the old imicro back again for simpleclouds 54 55 c======================================================================= 55 56 … … 110 111 111 112 ! global tendency (clouds+physics) 112 ! JN : keeping this for simpleclouds scheme113 113 REAL sum_subpdq(ngrid,nlay,nq) ! cf. pdqcloud 114 114 REAL sum_subpdt(ngrid,nlay) ! cf. pdtcloud … … 202 202 rhocloud(1:ngrid,1:nlay) = rho_dust 203 203 204 c------------------------------------------------------------------ -205 c 0.Representation of sub-grid water ice clouds206 c------------------ 204 c------------------------------------------------------------------ 205 c Representation of sub-grid water ice clouds 206 c------------------------------------------------------------------ 207 207 c-----Initialization 208 208 pteff(1:ngrid,1:nlay) = 0 … … 299 299 ! & 'K',cloudfrac(:,:)) 300 300 END IF ! end if (CLFvarying) 301 301 302 c------------------------------------------------------------------ 302 c Cloud physics (nucleation, condensation / sublimation)303 c Cloud physics (nucleation, condensation / sublimation) 303 304 c------------------------------------------------------------------ 304 305 rhocloud(1:ngrid,1:nlay) = rho_dust 305 306 306 c Initialisation of all the stuff (JN,2023)307 c Initialisation of all the stuff (JN,2023) 307 308 zt_micro(:,:)=pt(:,:) 308 309 zq_micro(:,:,:)=pq(:,:,:) 309 310 310 c------------------------------------------------------------------- 311 c 1. Main call to the different cloud schemes: 312 c------------------------------------------------ 313 c ds. 311 c------------------------------------------------------------------ 312 c Main call to the different cloud schemes 313 c------------------------------------------------------------------ 314 314 IF (microphys) THEN 315 CALLimprovedclouds(ngrid,nlay,ptimestep,315 call improvedclouds(ngrid,nlay,ptimestep, 316 316 & pplay,pt,pdt,pq,pdq,nq,tauscaling,imicro, 317 317 & zt_micro,zq_micro) 318 318 319 319 ELSE 320 321 c Specific loop for simpleclouds. 322 DO l=1,nlay 323 DO ig=1,ngrid 324 CALL simpleclouds(ngrid,nlay,ptimestep, 325 & pplay,pzlay,pteff,sum_subpdt, 326 & pqeff,sum_subpdq,subpdqcloud,subpdtcloud, 327 & nq,tau,rice) 328 c------------------------------------------------------------------- 329 c 2. Updating tracers and temperature after cloud scheme: 330 c For improved clouds (with microphysics) this is done directly 331 c in the microphysics, during the subtimestep 332 c I put it like that to be retrocompatible (JN) 333 c----------------------------------------------- 334 335 zq_micro(ig,l,igcm_h2o_ice) = 336 & zq_micro(ig,l,igcm_h2o_ice)+ 337 & (pdq(ig,l,igcm_h2o_ice) 338 & + subpdqcloud(ig,l,igcm_h2o_ice))*ptimestep 339 zq_micro(ig,l,igcm_h2o_vap) = 340 & zq_micro(ig,l,igcm_h2o_vap)+ 341 & (pdq(ig,l,igcm_h2o_vap) 342 & + subpdqcloud(ig,l,igcm_h2o_vap))*ptimestep 343 344 IF (hdo) THEN 345 zq_micro(ig,l,igcm_hdo_ice) = 346 & zq_micro(ig,l,igcm_hdo_ice)+ 347 & (pdq(ig,l,igcm_hdo_ice) 348 & + subpdqcloud(ig,l,igcm_hdo_ice))*ptimestep 349 zq_micro(ig,l,igcm_hdo_vap) = 350 & zq_micro(ig,l,igcm_hdo_vap)+ 351 & (pdq(ig,l,igcm_hdo_vap) 352 & + subpdqcloud(ig,l,igcm_hdo_vap))*ptimestep 353 ENDIF ! hdo 354 355 c Could also set subpdtcloud to 0 if not activice to make it simpler 356 c or change name of the flag 357 IF (activice) THEN 358 zt_micro(ig,l) = zt_micro(ig,l)+ 359 & subpdtcloud(ig,l)*ptimestep 360 ENDIF 361 362 ENDDO !ig=1,ngrid 363 ENDDO !l=1,nlay 364 ENDIF 365 366 367 368 c------------------------------------------------------------------- 369 c 3. Compute final tendencies after time loop: 370 c------------------------------------------------ 320 c Time subsampling for microphysics 321 DO microstep = 1,imicro 322 c Tendencies: 323 c------------------ 324 c------ Temperature tendency subpdt 325 ! Each microtimestep we give the cloud scheme a stepped entry subpdt instead of pdt 326 ! If imicro=1 subpdt is the same as pdt 327 DO l = 1,nlay 328 DO ig = 1,ngrid 329 sum_subpdt(ig,l) = sum_subpdt(ig,l) + pdt(ig,l) ! At each micro timestep we add pdt in order to have a stepped entry 330 ENDDO 331 ENDDO 332 c------ Tracers tendencies subpdq are additionned 333 c------ At each micro timestep we add pdq in order to have a stepped entry 334 DO l = 1,nlay 335 DO ig = 1,ngrid 336 sum_subpdq(ig,l,igcm_h2o_ice) = 337 & sum_subpdq(ig,l,igcm_h2o_ice) + pdq(ig,l,igcm_h2o_ice) 338 sum_subpdq(ig,l,igcm_h2o_vap) = 339 & sum_subpdq(ig,l,igcm_h2o_vap) + pdq(ig,l,igcm_h2o_vap) 340 IF (hdo) THEN 341 sum_subpdq(ig,l,igcm_hdo_ice) = 342 & sum_subpdq(ig,l,igcm_hdo_ice) + pdq(ig,l,igcm_hdo_ice) 343 sum_subpdq(ig,l,igcm_hdo_vap) = 344 & sum_subpdq(ig,l,igcm_hdo_vap) + pdq(ig,l,igcm_hdo_vap) 345 ENDIF !hdo 346 ENDDO 347 ENDDO 348 call simpleclouds(ngrid,nlay,microtimestep, 349 & pplay,pzlay,pteff,sum_subpdt, 350 & pqeff,sum_subpdq,subpdqcloud,subpdtcloud,nq,tau,rice) 351 DO l = 1,nlay 352 DO ig = 1,ngrid 353 sum_subpdq(ig,l,igcm_h2o_ice) = 354 & sum_subpdq(ig,l,igcm_h2o_ice) 355 & + subpdqcloud(ig,l,igcm_h2o_ice) 356 sum_subpdq(ig,l,igcm_h2o_vap) = 357 & sum_subpdq(ig,l,igcm_h2o_vap) 358 & + subpdqcloud(ig,l,igcm_h2o_vap) 359 360 IF (hdo) THEN 361 sum_subpdq(ig,l,igcm_hdo_ice) = 362 & sum_subpdq(ig,l,igcm_hdo_ice) 363 & + subpdqcloud(ig,l,igcm_hdo_ice) 364 sum_subpdq(ig,l,igcm_hdo_vap) = 365 & sum_subpdq(ig,l,igcm_hdo_vap) 366 & + subpdqcloud(ig,l,igcm_hdo_vap) 367 ENDIF ! hdo 368 ENDDO 369 ENDDO 370 371 IF (activice) THEN 372 DO l = 1,nlay 373 DO ig = 1,ngrid 374 sum_subpdt(ig,l) = sum_subpdt(ig,l) + subpdtcloud(ig,l) 375 ENDDO 376 ENDDO 377 ENDIF 378 ENDDO ! of DO microstep = 1,imicro 379 380 c------ Updating tracers and temperature to be consistent 381 c------ with the variables used for the improvedclouds scheme 382 zt_micro(:,:) = pt(:,:) + ptimestep*sum_subpdt(:,:)/real(imicro) 383 zq_micro(:,:,:) = pq(:,:,:) 384 & + ptimestep*sum_subpdq(:,:,:)/real(imicro) 385 386 ENDIF ! microphys 387 388 c------------------------------------------------------------------ 389 c Compute final tendencies after time loop: 390 c------------------------------------------------------------------ 371 391 372 392 c------ Temperature tendency pdtcloud … … 725 745 end subroutine end_watercloud_mod 726 746 727 728 729 747 END MODULE watercloud_mod
Note: See TracChangeset
for help on using the changeset viewer.
