Changeset 2874


Ignore:
Timestamp:
Jan 16, 2023, 4:47:14 PM (23 months ago)
Author:
jleconte
Message:

Changed nomenclature for planet variables from m_ to p_ in interface V4

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  
    4040  ! these two quantities do not even have the same units (kg/kg and kg/m^2)!!!
    4141  ! seems it is the same for some other physics. It is probably a bug.
    42   print*,'zdt_split',zdt_split
    4342
    4443  call allocate_comm_wrf(klon,llm)
  • trunk/WRF.COMMON/INTERFACES_V4/dynphy_wrf_generic_lmd/update_inputs_physiq_mod.F

    r2872 r2874  
    2626  REAL,INTENT(OUT) :: MY
    2727  REAL :: sec,nsec
    28   print*,'GMT, elaps/3600=',GMT,elaps/3600.
    2928  !IF (JULYR .le. 8999) THEN
    3029    if (tlocked .eqv. .false.) THEN
     
    9392  endif
    9493  nq=nqtot
    95   print*,'in update_inputs_physiq_tracers: noms: ',noms
    96   print*,'nq',nq
    97   print*,'TRACER_MODE',TRACER_MODE
    9894
    9995END SUBROUTINE update_inputs_physiq_tracers
     
    245241            ips,ipe,jps,jpe,&
    246242            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,&
    251247            phisfi_val)
    252248
     
    262258   REAL, INTENT(IN  ) :: CST_AL, phisfi_val, CST_Z0
    263259   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN)  :: &
    264      M_ALBEDO,P_TSURF,M_EMISS,M_CO2ICE,M_H2OICE,M_Z0
    265    REAL, DIMENSION( ims:ime, 5, jms:jme ), INTENT(IN   )  :: M_GW 
     260     P_ALBEDO,P_TSURF,P_EMISS,P_CO2ICE,P_H2OICE,P_Z0
     261   REAL, DIMENSION( ims:ime, 5, jms:jme ), INTENT(IN   )  :: P_GW 
    266262
    267263   DO j = jps,jpe
     
    282278     IF (JULYR .le. 8999) THEN
    283279      IF (CST_AL == 0) THEN
    284        albedodat(subs)=M_ALBEDO(i,j)
     280       albedodat(subs)=P_ALBEDO(i,j)
    285281      ELSE
    286282       albedodat(subs)=CST_AL
     
    311307     !-----------------------------------------------!
    312308     tsurf(subs) = P_TSURF(i,j)
    313      emis(subs) = M_EMISS(i,j)     
     309     emis(subs) = P_EMISS(i,j)     
    314310     !do i=1,noceanmx
    315311     tslab(subs,:)=tsurf(subs)
     
    321317     SELECT CASE (TRACER_MODE)
    322318       CASE(1)
    323          qsurf(subs,2)=M_H2OICE(i,j)  !! logique avec noms(2) = 'h2o_ice' defini ci-dessus
     319         qsurf(subs,2)=P_H2OICE(i,j)  !! logique avec noms(2) = 'h2o_ice' defini ci-dessus
    324320                                      !! ----- retrocompatible ancienne physique
    325321                                      !! ----- [H2O ice is last tracer in qsurf in LMD physics]
     
    353349            ips,ipe,jps,jpe,&
    354350            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)
    358354
    359355   use comsoil_h, only: inertiedat,mlayer,layer,volcapa
     
    365361   REAL, INTENT(IN  ) :: CST_TI
    366362   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN)  :: &
    367      M_TI, P_TSURF
     363     P_TI, P_TSURF
    368364   REAL, DIMENSION( ims:ime, nsoil, jms:jme ), INTENT(IN)  :: &
    369      M_TSOIL, M_ISOIL, M_DSOIL
     365     P_TSOIL, P_ISOIL, P_DSOIL
    370366   REAL :: inertiedat_val
    371367   REAL :: lay1,alpha
     
    384380     IF (JULYR .le. 8999) THEN
    385381      IF (CST_TI == 0) THEN
    386        inertiedat_val=M_TI(i,j)
     382       inertiedat_val=P_TI(i,j)
    387383      ELSE
    388384       inertiedat_val=CST_TI
     
    396392     !--pb de dimensions???!!???
    397393     IF (JULYR .le. 8999) THEN
    398        inertiedat(subs,:)=M_ISOIL(i,:,j) !! verifier que cest bien hires TI en surface
    399        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)
    400396     ELSE
    401397        IF ( nsoil .lt. 18 ) THEN
     
    425421     ! Deep soil temperatures !
    426422     !------------------------!
    427      IF (M_TSOIL(i,1,j) .gt. 0. .and. JULYR .le. 8999) THEN
    428        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)
    429425     ELSE
    430426       IF ( (i == ips) .AND. (j == jps) ) PRINT *,'** Mars ** no tsoil. set it to tsurf.'
     
    457453            ips,ipe,jps,jpe,&
    458454            RESTART,isles,&
    459             M_Q2,M_WSTAR)
     455            P_Q2,P_WSTAR)
    460456
    461457   use turb_mod, only: q2,wstar,turb_resolved
     
    465461   INTEGER, INTENT(IN) :: ips,ipe,jps,jpe
    466462   INTEGER :: i,j,subs,nlast     
    467    REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN)  :: M_WSTAR
    468    REAL, DIMENSION( ims:ime, kms:kme+1, jms:jme ), INTENT(IN) :: M_Q2
     463   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN)  :: P_WSTAR
     464   REAL, DIMENSION( ims:ime, kms:kme+1, jms:jme ), INTENT(IN) :: P_Q2
    469465   LOGICAL, INTENT(IN ) :: RESTART,isles
    470466
     
    487483      wstar(subs)=0.
    488484     ELSE
    489       q2(subs,:)=M_Q2(i,:,j)!
     485      q2(subs,:)=P_Q2(i,:,j)!
    490486      !q2(subs,:) = 1.e-3
    491       wstar(subs)=M_WSTAR(i,j)
     487      wstar(subs)=P_WSTAR(i,j)
    492488     ENDIF
    493489
     
    510506            ips,ipe,jps,jpe,&
    511507            RESTART,&
    512             M_FLUXRAD)
     508            P_FLUXRAD)
    513509
    514510   !use dimradmars_mod, only: fluxrad
     
    518514   INTEGER, INTENT(IN) :: ips,ipe,jps,jpe
    519515   INTEGER :: i,j,subs,nlast     
    520    REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN)  :: M_FLUXRAD
     516   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN)  :: P_FLUXRAD
    521517   LOGICAL, INTENT(IN ) :: RESTART
    522518
     
    533529      fluxrad(subs)=0.
    534530     ELSE
    535       fluxrad(subs)=M_FLUXRAD(i,j)
     531      fluxrad(subs)=P_FLUXRAD(i,j)
    536532     ENDIF
    537533     !! et fluxrad_sky ???!???
  • trunk/WRF.COMMON/INTERFACES_V4/dynphy_wrf_generic_lmd/update_outputs_physiq_mod.F

    r2872 r2874  
    99            ips,ipe,jps,jpe,&
    1010            TRACER_MODE,&
    11             P_TSURF,M_CO2ICE,&
    12             M_H2OICE)
     11            P_TSURF,P_CO2ICE,&
     12            P_H2OICE)
    1313
    1414   !use surfdat_h, only: tsurf, co2ice, qsurf
     
    2020   INTEGER :: i,j,subs
    2121   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT)  :: &
    22      P_TSURF,M_CO2ICE,M_H2OICE
     22     P_TSURF,P_CO2ICE,P_H2OICE
    2323
    2424   DO j = jps,jpe
     
    4646            ips,ipe,jps,jpe,&
    4747            nsoil,&
    48             M_TSOIL)
     48            P_TSOIL)
    4949
    5050   !use comsoil_h, only: tsoil
     
    5555   INTEGER :: i,j,subs
    5656   REAL, DIMENSION( ims:ime, nsoil, jms:jme ), INTENT(INOUT)  :: &
    57      M_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      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,:)
    7171
    7272   ENDDO
     
    8080            ims,ime,jms,jme,&
    8181            ips,ipe,jps,jpe,&
    82             M_FLUXRAD)
     82            P_FLUXRAD)
    8383
    8484   !use dimradmars_mod, only: fluxrad
     
    8888   INTEGER, INTENT(IN) :: ips,ipe,jps,jpe
    8989   INTEGER :: i,j,subs
    90    REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT)  :: M_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      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)
    104104
    105105   ENDDO
     
    113113            ims,ime,jms,jme,kms,kme,&
    114114            ips,ipe,jps,jpe,kps,kpe,&
    115             M_Q2,M_WSTAR,&
     115            P_Q2,P_WSTAR,&
    116116            HFMAX,ZMAX,USTM,HFX)
    117117
     
    124124   INTEGER :: i,j,subs   
    125125   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT)  :: &
    126      M_WSTAR,HFMAX,ZMAX,USTM,HFX
    127    REAL, DIMENSION( ims:ime, kms:kme+1, jms:jme ), INTENT(INOUT) :: M_Q2
     126     P_WSTAR,HFMAX,ZMAX,USTM,HFX
     127   REAL, DIMENSION( ims:ime, kms:kme+1, jms:jme ), INTENT(INOUT) :: P_Q2
    128128 
    129129   DO j = jps,jpe
     
    138138     ! Save key variables for restart and output and nesting ! 
    139139     !-------------------------------------------------------!
    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)
    142142     !! output only (arrays already in phys modules)
    143143     !HFMAX(i,j) = HFMAX_TH(subs)
  • trunk/WRF.COMMON/INTERFACES_V4/module_lmd_driver.F

    r2872 r2874  
    3535        TRACER_MODE, &
    3636        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, &
    4141        NUM_SOIL_LAYERS, &
    4242        CST_AL, CST_TI, &
     
    9797     XLAT,XLONG,HT,  &
    9898     MUT, & !total dry air column mass (in Pa)
    99      M_ALBEDO,M_TI,M_EMISS, &
     99     P_ALBEDO,P_TI,P_EMISS, &
    100100     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, &
    104104     PSFC,TSK
    105105REAL, DIMENSION( ims:ime, jms:jme ), INTENT(OUT) :: &
     
    116116     CLOUDFRAC,RH,DQICE,DQVAP,DTLSC,DTRAIN,DT_MOIST,H2OICE_REFF
    117117REAL, DIMENSION( ims:ime, kms:kme+1, jms:jme ), INTENT(INOUT ) :: &
    118      M_Q2
     118     P_Q2
    119119REAL, DIMENSION( ims:ime, NUM_SOIL_LAYERS, jms:jme ), INTENT(INOUT )  :: &
    120      M_TSOIL,M_ISOIL, M_DSOIL
     120     P_TSOIL,P_ISOIL, P_DSOIL
    121121REAL, INTENT(IN  ) :: CST_Z0
    122122REAL, DIMENSION( ims:ime, 5, jms:jme ), INTENT(IN   )  :: &
    123      M_GW
     123     P_GW
    124124! 4D arrays
    125125INTEGER, INTENT(IN ) :: num_3d_s,num_3d_m
     
    249249nlayer = kpe-kps+1                    ! number of vertical layers: nlayermx
    250250nsoil = NUM_SOIL_LAYERS               ! number of soil layers: nsoilmx
    251 PRINT *,'** ',planet_type,'** TRACERS NAMES'
    252251CALL update_inputs_physiq_tracers(TRACER_MODE,nq)
     252IF (firstcall .EQV. .true.) PRINT *,'** ',planet_type,'** TRACER MODE', TRACER_MODE
    253253
    254254! **** needed but hardcoded
     
    303303! ... and whenever domain is changed !
    304304!------------------------------------!
    305 print *,'** ',planet_type,' ** DOMAIN',id
    306305IF (previous_id .ne. id) THEN
     306    print *,'** ',planet_type,' ** DOMAIN',id
    307307    print *, '** ',planet_type,' ** ... INITIALIZE DOMAIN',id
    308308    print *, '** ',planet_type,' ** ... PREVIOUS DOMAIN was',previous_id
     
    440440    q_prof(:,2) = SCALAR(i,kps:kpe,j,P_QH2O_ICE) / (1.d0 + SCALAR(i,kps:kpe,j,P_QH2O))
    441441    ! conversion from mass mixing ratio in WRF to specific concentration in Physiq
    442 ELSE IF ((TRACER_MODE == 42).OR.(TRACER_MODE == 43)) THEN
     442ELSE IF ((TRACER_MODE >= 42).AND.(TRACER_MODE <= 45)) THEN
    443443    ! to be clean we should have an automatized process that makes sure that moist is sent to igcm_h2o_vap and etc.
    444444    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.
    445445    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 Physiq
    447 ELSE IF ((TRACER_MODE == 44).OR.(TRACER_MODE == 45)) THEN
    448     ! 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))
    451446    ! conversion from mass mixing ratio in WRF to specific concentration in Physiq
    452447ELSE
     
    554549            ips,ipe,jps,jpe,&
    555550            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)
    559554!!!
    560555CALL update_inputs_physiq_surf( &
     
    562557            ips,ipe,jps,jpe,&
    563558            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,&
    568563            phisfi_val)
    569564!!!
     
    572567            ips,ipe,jps,jpe,&
    573568            RESTART,isles,&
    574             M_Q2,M_WSTAR)
     569            P_Q2,P_WSTAR)
    575570!!!
    576571CALL update_inputs_physiq_rad( &
     
    578573            ips,ipe,jps,jpe,&
    579574            RESTART,&
    580             M_FLUXRAD)
     575            P_FLUXRAD)
    581576!!!
    582577ENDIF pass_interface
     
    629624            ips,ipe,jps,jpe,&
    630625            TRACER_MODE,&
    631             P_TSURF,M_CO2ICE,&
    632             M_H2OICE)
     626            P_TSURF,P_CO2ICE,&
     627            P_H2OICE)
    633628!!!
    634629CALL update_outputs_physiq_soil( &
     
    636631            ips,ipe,jps,jpe,&
    637632            nsoil,&
    638             M_TSOIL)
     633            P_TSOIL)
    639634!!!
    640635CALL update_outputs_physiq_rad( &
    641636            ims,ime,jms,jme,&
    642637            ips,ipe,jps,jpe,&
    643             M_FLUXRAD)
     638            P_FLUXRAD)
    644639!!!
    645640CALL update_outputs_physiq_turb( &
    646641            ims,ime,jms,jme,kms,kme,&
    647642            ips,ipe,jps,jpe,kps,kpe,&
    648             M_Q2,M_WSTAR,&
     643            P_Q2,P_WSTAR,&
    649644            HFMAX,ZMAX,USTM,HFX)
    650645!!!
     
    734729      moist(i,kps:kpe,j,P_QV)=moist(i,kps:kpe,j,P_QV) &
    735730          +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) &
    737732           +zdqfi_omp(subs,kps:kpe,2)*dt * (1.d0+moist(i,kps:kpe,j,P_QV))
    738733    CASE(45)
    739734      moist(i,kps:kpe,j,P_QV)=moist(i,kps:kpe,j,P_QV) &
    740735          +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) &
    742737           +zdqfi_omp(subs,kps:kpe,2)*dt * (1.d0+moist(i,kps:kpe,j,P_QV))
    743738      tau_decay=86400.*100. !! why not make it a namelist argument?
Note: See TracChangeset for help on using the changeset viewer.