- Timestamp:
- Oct 3, 2023, 11:21:28 AM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/dyn1d/init_testphys1d_mod.F90
r3066 r3067 5 5 contains 6 6 7 SUBROUTINE init_testphys1d(pem1d,ngrid,nlayer,odpref,nq,q,time,psurf,u,v,temp,startfiles_1D,therestart1D, therestartfi,&8 ndt,ptif,pks,dttestphys,zqsat,dq,dqdyn,day0,day,gru,grv,w,q2,play,plev,&9 latitude,longitude,cell_area,atm_wat_profile,atm_wat_tau)7 SUBROUTINE init_testphys1d(pem1d,ngrid,nlayer,odpref,nq,q,time,psurf,u,v,temp,startfiles_1D,therestart1D, & 8 therestartfi,ndt,ptif,pks,dttestphys,zqsat,dq,dqdyn,day0,day,gru,grv,w, & 9 play,plev,latitude,longitude,cell_area,atm_wat_profile,atm_wat_tau) 10 10 11 11 use ioipsl_getincom, only: getin ! To use 'getin' … … 13 13 use time_phylmdz_mod, only: daysec, day_step, ecritphy, iphysiq 14 14 use planete_h, only: year_day, periheli, aphelie, peri_day, obliquit, emin_turb, lmixmin 15 use surfdat_h, only: albedodat, z0_default, z0, emissiv, emisice, albedice, iceradius, dtemisice, &15 use surfdat_h, only: albedodat, z0_default, z0, emissiv, emisice, albedice, iceradius, dtemisice, & 16 16 zmea, zstd, zsig, zgam, zthe, hmons, summit, base, phisfi, watercaptag, watercap, & 17 17 tsurf, emis, qsurf … … 37 37 use mod_grid_phy_lmdz, only: regular_lonlat 38 38 use phys_state_var_init_mod, only: phys_state_var_init 39 use turb_mod, only: q2 39 40 ! Mostly for XIOS outputs: 40 41 use mod_const_mpi, only: COMM_LMDZ … … 48 49 ! Arguments 49 50 !======================================================================= 50 integer, 51 real, 52 logical, 51 integer, intent(in) :: ngrid, nlayer 52 real, intent(in) :: odpref ! DOD reference pressure (Pa) 53 logical, intent(in) :: pem1d ! If initialization for the 1D PEM 53 54 54 55 integer, intent(inout) :: nq 55 56 56 real, dimension(:,:), allocatable, intent(out) :: q ! tracer mixing ratio (e.g. kg/kg) 57 real, intent(out) :: time ! time (0<time<1; time=0.5 at noon) 58 real, intent(out) :: psurf ! Surface pressure 59 real, dimension(nlayer), intent(out) :: u, v ! zonal, meridional wind 60 real, dimension(nlayer), intent(out) :: temp ! temperature at the middle of the layers 61 logical, intent(out) :: startfiles_1D, therestart1D, therestartfi ! Use of starting files for 1D 62 integer, intent(out) :: ndt 63 real, intent(out) :: ptif, pks 64 real, intent(out) :: dttestphys ! testphys1d timestep 65 real, dimension(:), allocatable, intent(out) :: zqsat ! useful for (atm_wat_profile=2) 66 real, dimension(:,:), allocatable, intent(out) :: dq, dqdyn ! Physical and dynamical tandencies 67 integer, intent(out) :: day0 ! initial (sol ; =0 at Ls=0) and final date 68 real, intent(out) :: day ! date during the run 69 real, intent(out) :: gru, grv ! prescribed "geostrophic" background wind 70 real, dimension(nlayer), intent(out) :: w ! "Dummy wind" in 1D 71 real, dimension(nlayer + 1), intent(out) :: q2 ! Turbulent Kinetic Energy 72 real, dimension(nlayer), intent(out) :: play ! Pressure at the middle of the layers (Pa) 73 real, dimension(nlayer + 1), intent(out) :: plev ! intermediate pressure levels (pa) 74 real, dimension(1), intent(out) :: latitude, longitude, cell_area 75 real, intent(out) :: atm_wat_profile, atm_wat_tau ! Force atmospheric water profiles 57 real, dimension(:,:,:), allocatable, intent(out) :: q ! tracer mixing ratio (e.g. kg/kg) 58 real, intent(out) :: time ! time (0<time<1; time=0.5 at noon) 59 real, intent(out) :: psurf ! Surface pressure 60 real, dimension(nlayer), intent(out) :: u, v ! zonal, meridional wind 61 real, dimension(nlayer), intent(out) :: temp ! temperature at the middle of the layers 62 logical, intent(out) :: startfiles_1D, therestart1D, therestartfi ! Use of starting files for 1D 63 integer, intent(out) :: ndt 64 real, intent(out) :: ptif, pks 65 real, intent(out) :: dttestphys ! testphys1d timestep 66 real, dimension(:), allocatable, intent(out) :: zqsat ! useful for (atm_wat_profile=2) 67 real, dimension(:,:,:), allocatable, intent(out) :: dq, dqdyn ! Physical and dynamical tandencies 68 integer, intent(out) :: day0 ! initial (sol ; =0 at Ls=0) and final date 69 real, intent(out) :: day ! date during the run 70 real, intent(out) :: gru, grv ! prescribed "geostrophic" background wind 71 real, dimension(nlayer), intent(out) :: w ! "Dummy wind" in 1D 72 real, dimension(nlayer), intent(out) :: play ! Pressure at the middle of the layers (Pa) 73 real, dimension(nlayer + 1), intent(out) :: plev ! intermediate pressure levels (pa) 74 real, dimension(1), intent(out) :: latitude, longitude, cell_area 75 real, intent(out) :: atm_wat_profile, atm_wat_tau ! Force atmospheric water profiles 76 76 77 77 !======================================================================= … … 237 237 238 238 ! allocate arrays: 239 allocate(tname(nq),q( nlayer,nq),zqsat(nlayer))240 allocate(dq( nlayer,nq),dqdyn(nlayer,nq),tnom_transp(nq))239 allocate(tname(nq),q(1,nlayer,nq),zqsat(nlayer)) 240 allocate(dq(1,nlayer,nq),dqdyn(1,nlayer,nq),tnom_transp(nq)) 241 241 242 242 ! read tracer names from file traceur.def … … 289 289 write(*,*) 'nqfils=',nqfils 290 290 291 292 293 291 #ifdef CPP_XIOS 294 292 call init_physics_distribution(regular_lonlat,4,1,1,1,nlayer,COMM_LMDZ) … … 455 453 do iq = 1,nq 456 454 open(3,file = start1Dname,status = "old",action = "read") 457 read(3,*) header, qsurf(1,iq,1),(q( ilayer,iq), ilayer = 1,nlayer)455 read(3,*) header, qsurf(1,iq,1),(q(1,ilayer,iq), ilayer = 1,nlayer) 458 456 if (trim(tname(iq)) /= trim(header)) then 459 457 write(*,*) 'Tracer names not compatible for initialization with "'//trim(start1Dname)//'"!' … … 554 552 w = 0. ! default: no vertical wind 555 553 556 ! Initialize turbulent ekinetic energy554 ! Initialize turbulent kinetic energy 557 555 q2 = 0. 558 556 … … 690 688 ! q & psurf arrays are on the dynamics scalar grid 691 689 allocate(qdyn(2,1,llm,nq),psdyn(2,1)) 692 qdyn(1,1,1:llm,1:nq) = q(1 :llm,1:nq)690 qdyn(1,1,1:llm,1:nq) = q(1,1:llm,1:nq) 693 691 psdyn(1:2,1) = psurf 694 692 call inichim_newstart(ngrid,nq,qdyn,qsurf(1,:,1),psdyn,flagh2o,flagthermo) 695 q(1 :llm,1:nq) = qdyn(1,1,1:llm,1:nq)693 q(1,1:llm,1:nq) = qdyn(1,1,1:llm,1:nq) 696 694 endif 697 695
Note: See TracChangeset
for help on using the changeset viewer.