Changeset 2874
- Timestamp:
- Jan 16, 2023, 4:47:14 PM (23 months ago)
- Location:
- trunk/WRF.COMMON/INTERFACES_V4
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WRF.COMMON/INTERFACES_V4/dynphy_wrf_generic_lmd/callphysiq_mod.F
r2868 r2874 40 40 ! these two quantities do not even have the same units (kg/kg and kg/m^2)!!! 41 41 ! seems it is the same for some other physics. It is probably a bug. 42 print*,'zdt_split',zdt_split43 42 44 43 call allocate_comm_wrf(klon,llm) -
trunk/WRF.COMMON/INTERFACES_V4/dynphy_wrf_generic_lmd/update_inputs_physiq_mod.F
r2872 r2874 26 26 REAL,INTENT(OUT) :: MY 27 27 REAL :: sec,nsec 28 print*,'GMT, elaps/3600=',GMT,elaps/3600.29 28 !IF (JULYR .le. 8999) THEN 30 29 if (tlocked .eqv. .false.) THEN … … 93 92 endif 94 93 nq=nqtot 95 print*,'in update_inputs_physiq_tracers: noms: ',noms96 print*,'nq',nq97 print*,'TRACER_MODE',TRACER_MODE98 94 99 95 END SUBROUTINE update_inputs_physiq_tracers … … 245 241 ips,ipe,jps,jpe,& 246 242 JULYR,TRACER_MODE,& 247 M_ALBEDO,CST_AL,&248 P_TSURF, M_EMISS,M_CO2ICE,&249 M_GW,M_Z0,CST_Z0,&250 M_H2OICE,&243 P_ALBEDO,CST_AL,& 244 P_TSURF,P_EMISS,P_CO2ICE,& 245 P_GW,P_Z0,CST_Z0,& 246 P_H2OICE,& 251 247 phisfi_val) 252 248 … … 262 258 REAL, INTENT(IN ) :: CST_AL, phisfi_val, CST_Z0 263 259 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN) :: & 264 M_ALBEDO,P_TSURF,M_EMISS,M_CO2ICE,M_H2OICE,M_Z0265 REAL, DIMENSION( ims:ime, 5, jms:jme ), INTENT(IN ) :: M_GW260 P_ALBEDO,P_TSURF,P_EMISS,P_CO2ICE,P_H2OICE,P_Z0 261 REAL, DIMENSION( ims:ime, 5, jms:jme ), INTENT(IN ) :: P_GW 266 262 267 263 DO j = jps,jpe … … 282 278 IF (JULYR .le. 8999) THEN 283 279 IF (CST_AL == 0) THEN 284 albedodat(subs)= M_ALBEDO(i,j)280 albedodat(subs)=P_ALBEDO(i,j) 285 281 ELSE 286 282 albedodat(subs)=CST_AL … … 311 307 !-----------------------------------------------! 312 308 tsurf(subs) = P_TSURF(i,j) 313 emis(subs) = M_EMISS(i,j)309 emis(subs) = P_EMISS(i,j) 314 310 !do i=1,noceanmx 315 311 tslab(subs,:)=tsurf(subs) … … 321 317 SELECT CASE (TRACER_MODE) 322 318 CASE(1) 323 qsurf(subs,2)= M_H2OICE(i,j) !! logique avec noms(2) = 'h2o_ice' defini ci-dessus319 qsurf(subs,2)=P_H2OICE(i,j) !! logique avec noms(2) = 'h2o_ice' defini ci-dessus 324 320 !! ----- retrocompatible ancienne physique 325 321 !! ----- [H2O ice is last tracer in qsurf in LMD physics] … … 353 349 ips,ipe,jps,jpe,& 354 350 JULYR,nsoil,& 355 M_TI,CST_TI,&356 M_ISOIL,M_DSOIL,&357 M_TSOIL,P_TSURF)351 P_TI,CST_TI,& 352 P_ISOIL,P_DSOIL,& 353 P_TSOIL,P_TSURF) 358 354 359 355 use comsoil_h, only: inertiedat,mlayer,layer,volcapa … … 365 361 REAL, INTENT(IN ) :: CST_TI 366 362 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN) :: & 367 M_TI, P_TSURF363 P_TI, P_TSURF 368 364 REAL, DIMENSION( ims:ime, nsoil, jms:jme ), INTENT(IN) :: & 369 M_TSOIL, M_ISOIL, M_DSOIL365 P_TSOIL, P_ISOIL, P_DSOIL 370 366 REAL :: inertiedat_val 371 367 REAL :: lay1,alpha … … 384 380 IF (JULYR .le. 8999) THEN 385 381 IF (CST_TI == 0) THEN 386 inertiedat_val= M_TI(i,j)382 inertiedat_val=P_TI(i,j) 387 383 ELSE 388 384 inertiedat_val=CST_TI … … 396 392 !--pb de dimensions???!!??? 397 393 IF (JULYR .le. 8999) THEN 398 inertiedat(subs,:)= M_ISOIL(i,:,j) !! verifier que cest bien hires TI en surface399 mlayer(0:nsoil-1)= M_DSOIL(i,:,j)394 inertiedat(subs,:)=P_ISOIL(i,:,j) !! verifier que cest bien hires TI en surface 395 mlayer(0:nsoil-1)=P_DSOIL(i,:,j) 400 396 ELSE 401 397 IF ( nsoil .lt. 18 ) THEN … … 425 421 ! Deep soil temperatures ! 426 422 !------------------------! 427 IF ( M_TSOIL(i,1,j) .gt. 0. .and. JULYR .le. 8999) THEN428 tsoil(subs,:)= M_TSOIL(i,:,j)423 IF (P_TSOIL(i,1,j) .gt. 0. .and. JULYR .le. 8999) THEN 424 tsoil(subs,:)=P_TSOIL(i,:,j) 429 425 ELSE 430 426 IF ( (i == ips) .AND. (j == jps) ) PRINT *,'** Mars ** no tsoil. set it to tsurf.' … … 457 453 ips,ipe,jps,jpe,& 458 454 RESTART,isles,& 459 M_Q2,M_WSTAR)455 P_Q2,P_WSTAR) 460 456 461 457 use turb_mod, only: q2,wstar,turb_resolved … … 465 461 INTEGER, INTENT(IN) :: ips,ipe,jps,jpe 466 462 INTEGER :: i,j,subs,nlast 467 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN) :: M_WSTAR468 REAL, DIMENSION( ims:ime, kms:kme+1, jms:jme ), INTENT(IN) :: M_Q2463 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN) :: P_WSTAR 464 REAL, DIMENSION( ims:ime, kms:kme+1, jms:jme ), INTENT(IN) :: P_Q2 469 465 LOGICAL, INTENT(IN ) :: RESTART,isles 470 466 … … 487 483 wstar(subs)=0. 488 484 ELSE 489 q2(subs,:)= M_Q2(i,:,j)!485 q2(subs,:)=P_Q2(i,:,j)! 490 486 !q2(subs,:) = 1.e-3 491 wstar(subs)= M_WSTAR(i,j)487 wstar(subs)=P_WSTAR(i,j) 492 488 ENDIF 493 489 … … 510 506 ips,ipe,jps,jpe,& 511 507 RESTART,& 512 M_FLUXRAD)508 P_FLUXRAD) 513 509 514 510 !use dimradmars_mod, only: fluxrad … … 518 514 INTEGER, INTENT(IN) :: ips,ipe,jps,jpe 519 515 INTEGER :: i,j,subs,nlast 520 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN) :: M_FLUXRAD516 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN) :: P_FLUXRAD 521 517 LOGICAL, INTENT(IN ) :: RESTART 522 518 … … 533 529 fluxrad(subs)=0. 534 530 ELSE 535 fluxrad(subs)= M_FLUXRAD(i,j)531 fluxrad(subs)=P_FLUXRAD(i,j) 536 532 ENDIF 537 533 !! et fluxrad_sky ???!??? -
trunk/WRF.COMMON/INTERFACES_V4/dynphy_wrf_generic_lmd/update_outputs_physiq_mod.F
r2872 r2874 9 9 ips,ipe,jps,jpe,& 10 10 TRACER_MODE,& 11 P_TSURF, M_CO2ICE,&12 M_H2OICE)11 P_TSURF,P_CO2ICE,& 12 P_H2OICE) 13 13 14 14 !use surfdat_h, only: tsurf, co2ice, qsurf … … 20 20 INTEGER :: i,j,subs 21 21 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: & 22 P_TSURF, M_CO2ICE,M_H2OICE22 P_TSURF,P_CO2ICE,P_H2OICE 23 23 24 24 DO j = jps,jpe … … 46 46 ips,ipe,jps,jpe,& 47 47 nsoil,& 48 M_TSOIL)48 P_TSOIL) 49 49 50 50 !use comsoil_h, only: tsoil … … 55 55 INTEGER :: i,j,subs 56 56 REAL, DIMENSION( ims:ime, nsoil, jms:jme ), INTENT(INOUT) :: & 57 M_TSOIL58 59 DO j = jps,jpe 60 DO i = ips,ipe 61 62 !-----------------------------------! 63 ! 1D subscript for physics "cursor" ! 64 !-----------------------------------! 65 subs = (j-jps)*(ipe-ips+1)+(i-ips+1) 66 67 !-------------------------------------------------------! 68 ! Save key variables for restart and output and nesting ! 69 !-------------------------------------------------------! 70 M_TSOIL(i,:,j) = tsoil(subs,:)57 P_TSOIL 58 59 DO j = jps,jpe 60 DO i = ips,ipe 61 62 !-----------------------------------! 63 ! 1D subscript for physics "cursor" ! 64 !-----------------------------------! 65 subs = (j-jps)*(ipe-ips+1)+(i-ips+1) 66 67 !-------------------------------------------------------! 68 ! Save key variables for restart and output and nesting ! 69 !-------------------------------------------------------! 70 P_TSOIL(i,:,j) = tsoil(subs,:) 71 71 72 72 ENDDO … … 80 80 ims,ime,jms,jme,& 81 81 ips,ipe,jps,jpe,& 82 M_FLUXRAD)82 P_FLUXRAD) 83 83 84 84 !use dimradmars_mod, only: fluxrad … … 88 88 INTEGER, INTENT(IN) :: ips,ipe,jps,jpe 89 89 INTEGER :: i,j,subs 90 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: M_FLUXRAD91 92 DO j = jps,jpe 93 DO i = ips,ipe 94 95 !-----------------------------------! 96 ! 1D subscript for physics "cursor" ! 97 !-----------------------------------! 98 subs = (j-jps)*(ipe-ips+1)+(i-ips+1) 99 100 !-------------------------------------------------------! 101 ! Save key variables for restart and output and nesting ! 102 !-------------------------------------------------------! 103 M_FLUXRAD(i,j) = fluxrad(subs)90 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: P_FLUXRAD 91 92 DO j = jps,jpe 93 DO i = ips,ipe 94 95 !-----------------------------------! 96 ! 1D subscript for physics "cursor" ! 97 !-----------------------------------! 98 subs = (j-jps)*(ipe-ips+1)+(i-ips+1) 99 100 !-------------------------------------------------------! 101 ! Save key variables for restart and output and nesting ! 102 !-------------------------------------------------------! 103 P_FLUXRAD(i,j) = fluxrad(subs) 104 104 105 105 ENDDO … … 113 113 ims,ime,jms,jme,kms,kme,& 114 114 ips,ipe,jps,jpe,kps,kpe,& 115 M_Q2,M_WSTAR,&115 P_Q2,P_WSTAR,& 116 116 HFMAX,ZMAX,USTM,HFX) 117 117 … … 124 124 INTEGER :: i,j,subs 125 125 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: & 126 M_WSTAR,HFMAX,ZMAX,USTM,HFX127 REAL, DIMENSION( ims:ime, kms:kme+1, jms:jme ), INTENT(INOUT) :: M_Q2126 P_WSTAR,HFMAX,ZMAX,USTM,HFX 127 REAL, DIMENSION( ims:ime, kms:kme+1, jms:jme ), INTENT(INOUT) :: P_Q2 128 128 129 129 DO j = jps,jpe … … 138 138 ! Save key variables for restart and output and nesting ! 139 139 !-------------------------------------------------------! 140 M_Q2(i,kps:kpe+1,j) = q2(subs,:)141 M_WSTAR(i,j) = wstar(subs)140 P_Q2(i,kps:kpe+1,j) = q2(subs,:) 141 P_WSTAR(i,j) = wstar(subs) 142 142 !! output only (arrays already in phys modules) 143 143 !HFMAX(i,j) = HFMAX_TH(subs) -
trunk/WRF.COMMON/INTERFACES_V4/module_lmd_driver.F
r2872 r2874 35 35 TRACER_MODE, & 36 36 planet_type, & 37 M_ALBEDO,M_TI,M_CO2ICE,M_EMISS, &38 M_H2OICE,M_TSOIL,M_Q2,P_TSURF, &39 M_FLUXRAD,M_WSTAR,M_ISOIL,M_DSOIL,&40 M_Z0, CST_Z0, M_GW, &37 P_ALBEDO,P_TI,P_CO2ICE,P_EMISS, & 38 P_H2OICE,P_TSOIL,P_Q2,P_TSURF, & 39 P_FLUXRAD,P_WSTAR,P_ISOIL,P_DSOIL,& 40 P_Z0, CST_Z0, P_GW, & 41 41 NUM_SOIL_LAYERS, & 42 42 CST_AL, CST_TI, & … … 97 97 XLAT,XLONG,HT, & 98 98 MUT, & !total dry air column mass (in Pa) 99 M_ALBEDO,M_TI,M_EMISS, &99 P_ALBEDO,P_TI,P_EMISS, & 100 100 SLPX,SLPY, & 101 M_CO2ICE,M_H2OICE, &102 P_TSURF, M_Z0, &103 M_FLUXRAD,M_WSTAR, &101 P_CO2ICE,P_H2OICE, & 102 P_TSURF, P_Z0, & 103 P_FLUXRAD,P_WSTAR, & 104 104 PSFC,TSK 105 105 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(OUT) :: & … … 116 116 CLOUDFRAC,RH,DQICE,DQVAP,DTLSC,DTRAIN,DT_MOIST,H2OICE_REFF 117 117 REAL, DIMENSION( ims:ime, kms:kme+1, jms:jme ), INTENT(INOUT ) :: & 118 M_Q2118 P_Q2 119 119 REAL, DIMENSION( ims:ime, NUM_SOIL_LAYERS, jms:jme ), INTENT(INOUT ) :: & 120 M_TSOIL,M_ISOIL, M_DSOIL120 P_TSOIL,P_ISOIL, P_DSOIL 121 121 REAL, INTENT(IN ) :: CST_Z0 122 122 REAL, DIMENSION( ims:ime, 5, jms:jme ), INTENT(IN ) :: & 123 M_GW123 P_GW 124 124 ! 4D arrays 125 125 INTEGER, INTENT(IN ) :: num_3d_s,num_3d_m … … 249 249 nlayer = kpe-kps+1 ! number of vertical layers: nlayermx 250 250 nsoil = NUM_SOIL_LAYERS ! number of soil layers: nsoilmx 251 PRINT *,'** ',planet_type,'** TRACERS NAMES'252 251 CALL update_inputs_physiq_tracers(TRACER_MODE,nq) 252 IF (firstcall .EQV. .true.) PRINT *,'** ',planet_type,'** TRACER MODE', TRACER_MODE 253 253 254 254 ! **** needed but hardcoded … … 303 303 ! ... and whenever domain is changed ! 304 304 !------------------------------------! 305 print *,'** ',planet_type,' ** DOMAIN',id306 305 IF (previous_id .ne. id) THEN 306 print *,'** ',planet_type,' ** DOMAIN',id 307 307 print *, '** ',planet_type,' ** ... INITIALIZE DOMAIN',id 308 308 print *, '** ',planet_type,' ** ... PREVIOUS DOMAIN was',previous_id … … 440 440 q_prof(:,2) = SCALAR(i,kps:kpe,j,P_QH2O_ICE) / (1.d0 + SCALAR(i,kps:kpe,j,P_QH2O)) 441 441 ! conversion from mass mixing ratio in WRF to specific concentration in Physiq 442 ELSE IF ((TRACER_MODE == 42).OR.(TRACER_MODE == 43)) THEN442 ELSE IF ((TRACER_MODE >= 42).AND.(TRACER_MODE <= 45)) THEN 443 443 ! to be clean we should have an automatized process that makes sure that moist is sent to igcm_h2o_vap and etc. 444 444 q_prof(:,1) = moist(i,kps:kpe,j,P_QV) / (1.d0 + moist(i,kps:kpe,j,P_QV)) !! P_xxx is the index for variable xxx. 445 445 q_prof(:,2) = moist(i,kps:kpe,j,P_QC) / (1.d0 + moist(i,kps:kpe,j,P_QV)) 446 ! conversion from mass mixing ratio in WRF to specific concentration in Physiq447 ELSE IF ((TRACER_MODE == 44).OR.(TRACER_MODE == 45)) THEN448 ! to be clean we should have an automatized process that makes sure that moist is sent to igcm_h2o_vap and etc.449 q_prof(:,1) = moist(i,kps:kpe,j,P_QV) / (1.d0 + moist(i,kps:kpe,j,P_QV)) !! P_xxx is the index for variable xxx.450 q_prof(:,2) = SCALAR(i,kps:kpe,j,P_QH2O_ICE) / (1.d0 + moist(i,kps:kpe,j,P_QV))451 446 ! conversion from mass mixing ratio in WRF to specific concentration in Physiq 452 447 ELSE … … 554 549 ips,ipe,jps,jpe,& 555 550 JULYR,nsoil,& 556 M_TI,CST_TI,&557 M_ISOIL,M_DSOIL,&558 M_TSOIL,P_TSURF)551 P_TI,CST_TI,& 552 P_ISOIL,P_DSOIL,& 553 P_TSOIL,P_TSURF) 559 554 !!! 560 555 CALL update_inputs_physiq_surf( & … … 562 557 ips,ipe,jps,jpe,& 563 558 JULYR,TRACER_MODE,& 564 M_ALBEDO,CST_AL,&565 P_TSURF, M_EMISS,M_CO2ICE,&566 M_GW,M_Z0,CST_Z0,&567 M_H2OICE,&559 P_ALBEDO,CST_AL,& 560 P_TSURF,P_EMISS,P_CO2ICE,& 561 P_GW,P_Z0,CST_Z0,& 562 P_H2OICE,& 568 563 phisfi_val) 569 564 !!! … … 572 567 ips,ipe,jps,jpe,& 573 568 RESTART,isles,& 574 M_Q2,M_WSTAR)569 P_Q2,P_WSTAR) 575 570 !!! 576 571 CALL update_inputs_physiq_rad( & … … 578 573 ips,ipe,jps,jpe,& 579 574 RESTART,& 580 M_FLUXRAD)575 P_FLUXRAD) 581 576 !!! 582 577 ENDIF pass_interface … … 629 624 ips,ipe,jps,jpe,& 630 625 TRACER_MODE,& 631 P_TSURF, M_CO2ICE,&632 M_H2OICE)626 P_TSURF,P_CO2ICE,& 627 P_H2OICE) 633 628 !!! 634 629 CALL update_outputs_physiq_soil( & … … 636 631 ips,ipe,jps,jpe,& 637 632 nsoil,& 638 M_TSOIL)633 P_TSOIL) 639 634 !!! 640 635 CALL update_outputs_physiq_rad( & 641 636 ims,ime,jms,jme,& 642 637 ips,ipe,jps,jpe,& 643 M_FLUXRAD)638 P_FLUXRAD) 644 639 !!! 645 640 CALL update_outputs_physiq_turb( & 646 641 ims,ime,jms,jme,kms,kme,& 647 642 ips,ipe,jps,jpe,kps,kpe,& 648 M_Q2,M_WSTAR,&643 P_Q2,P_WSTAR,& 649 644 HFMAX,ZMAX,USTM,HFX) 650 645 !!! … … 734 729 moist(i,kps:kpe,j,P_QV)=moist(i,kps:kpe,j,P_QV) & 735 730 +zdqfi_omp(subs,kps:kpe,1)*dt * (1.d0+moist(i,kps:kpe,j,P_QV)) 736 scalar(i,kps:kpe,j,P_QH2O_ICE)=scalar(i,kps:kpe,j,P_QH2O_ICE) &731 moist(i,kps:kpe,j,P_QC)=moist(i,kps:kpe,j,P_QC) & 737 732 +zdqfi_omp(subs,kps:kpe,2)*dt * (1.d0+moist(i,kps:kpe,j,P_QV)) 738 733 CASE(45) 739 734 moist(i,kps:kpe,j,P_QV)=moist(i,kps:kpe,j,P_QV) & 740 735 +zdqfi_omp(subs,kps:kpe,1)*dt * (1.d0+moist(i,kps:kpe,j,P_QV)) 741 scalar(i,kps:kpe,j,P_QH2O_ICE)=scalar(i,kps:kpe,j,P_QH2O_ICE) &736 moist(i,kps:kpe,j,P_QC)=moist(i,kps:kpe,j,P_QC) & 742 737 +zdqfi_omp(subs,kps:kpe,2)*dt * (1.d0+moist(i,kps:kpe,j,P_QV)) 743 738 tau_decay=86400.*100. !! why not make it a namelist argument?
Note: See TracChangeset
for help on using the changeset viewer.