Changeset 4547 for LMDZ6/trunk/libf
- Timestamp:
- May 27, 2023, 12:08:31 PM (18 months ago)
- Location:
- LMDZ6/trunk/libf/phylmd
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/output_physiqex_mod.F90
r4540 r4547 5 5 CONTAINS 6 6 7 SUBROUTINE output_physiqex(debut,zjulian,pdtphys,presnivs,paprs,u,v,t )7 SUBROUTINE output_physiqex(debut,zjulian,pdtphys,presnivs,paprs,u,v,t,qx,cf,zqr,zqs,zqg,ptke,theta) 8 8 9 9 USE dimphy, only : klon,klev … … 15 15 USE iophy, ONLY : init_iophy_new 16 16 USE geometry_mod, ONLY: latitude_deg, longitude_deg 17 USE infotrac_phy, only : nqtot 17 18 18 19 … … 25 26 real,intent(in) :: v(klon,klev) ! northward meridional wind (m/s) 26 27 real,intent(in) :: t(klon,klev) ! temperature (K) 28 real,intent(in) :: theta(klon,klev) ! temperature (K) 27 29 real,intent(in) :: paprs(klon,klev+1) ! interlayer pressure (Pa) 30 real,intent(in) :: qx(klon,klev,nqtot) !tracers 31 real,intent(in) :: cf(klon,klev) !cloud fraction 32 real,intent(in) :: zqr(klon,klev) !rain specifiq content 33 real,intent(in) :: zqs(klon,klev) !snow specifiq content 34 real,intent(in) :: zqg(klon,klev) !graupel specifiq content 35 real,intent(in) :: ptke(klon,klev) !tke 28 36 29 37 real :: t_ops ! frequency of the IOIPSL operations (eg average over...) … … 48 56 49 57 call getin_p("iwrite_phys",iwrite_phys) 50 call getin_p("ioex",ioex)51 52 if ( ioex == 1 ) then53 CALL iophys_ini(pdtphys)54 else if ( ioex == 2 ) then55 56 CALL init_iophy_new(latitude_deg,longitude_deg)57 dtime=pdtphys58 itau=059 call histbeg_phy("histins.nc",itau,zjulian,dtime,nhori,nid_hist)60 print*,'NNNNNNN ',nid_hist,debut61 print*,'NNNNNNN OK0'62 t_ops=pdtphys*iwrite_phys ! frequency of the IOIPSL operation63 t_wrt=pdtphys*iwrite_phys ! frequency of the outputs in the file64 print*,'NNNNNNN OK1'65 58 66 59 !$OMP MASTER 67 68 #ifndef CPP_IOIPSL_NO_OUTPUT 69 ! IOIPSL 70 ! define vertical coordinate 71 call histvert(nid_hist,"presnivs","Vertical levels","Pa",klev, & 72 presnivs,zvertid,'down') 73 ! define variables which will be written in "histins.nc" file 74 call histdef(nid_hist,'Temp','Atmospheric temperature','K', & 75 nbp_lon,jj_nb,nhori,klev,1,klev,zvertid,32, & 76 'inst(X)',t_ops,t_wrt) 77 print*,'NNNNNNN OK2a',nid_hist,t_ops,t_wrt 78 call histdef(nid_hist,'u','Eastward Zonal Wind','m/s', & 79 nbp_lon,jj_nb,nhori,klev,1,klev,zvertid,32, & 80 'inst(X)',t_ops,t_wrt) 81 print*,'NNNNNNN OK2b',nid_hist,t_ops,t_wrt 82 call histdef(nid_hist,'v','Northward Meridional Wind','m/s', & 83 nbp_lon,jj_nb,nhori,klev,1,klev,zvertid,32, & 84 'inst(X)',t_ops,t_wrt) 85 print*,'NNNNNNN OK2c',nid_hist,t_ops,t_wrt 86 call histdef(nid_hist,'ps','Surface Pressure','Pa', & 87 nbp_lon,jj_nb,nhori,1,1,1,zvertid,32, & 88 'inst(X)',t_ops,t_wrt) 89 ! end definition sequence 90 print*,'NNNNNNN OK2',nid_hist,t_ops,t_wrt 91 call histend(nid_hist) 92 print*,'NNNNNNN OK3' 93 #endif 94 95 #ifdef CPP_XIOS 96 !XIOS 97 ! Declare available vertical axes to be used in output files: 98 CALL wxios_add_vaxis("presnivs", klev, presnivs) 99 100 ! Declare calendar and time step 101 CALL wxios_set_cal(dtime,"earth_360d",1,1,1,0.0,1,1,1,0.0) 102 103 !Finalize the context: 104 CALL wxios_closedef() 105 #endif 106 107 !$OMP END MASTER 108 !$OMP BARRIER 109 endif 60 CALL iophys_ini(pdtphys) 61 !$OMP END MASTER 62 !$OMP BARRIER 110 63 111 64 endif … … 114 67 itau=itau+1 115 68 116 ! write some outputs:117 ! IOIPSL118 #ifndef CPP_IOIPSL_NO_OUTPUT119 69 if (modulo(itau,iwrite_phys)==0) then 120 if ( ioex == 1 ) then121 70 call iophys_ecrit('temp',klev,'Temperature','K',t) 122 call iophys_ecrit('u',klev,'zonal wind','m/s', t)123 call iophys_ecrit('v',klev,'meridinal wind','m/s', t)71 call iophys_ecrit('u',klev,'zonal wind','m/s',u) 72 call iophys_ecrit('v',klev,'meridinal wind','m/s',v) 124 73 call iophys_ecrit('ps',1,'Surface pressure','Pa',paprs(:,1)) 125 else if ( ioex == 2 ) then126 call histwrite_phy(nid_hist,.false.,"Temp",itau,t)127 call histwrite_phy(nid_hist,.false.,"u",itau,u)128 call histwrite_phy(nid_hist,.false.,"v",itau,v)129 call histwrite_phy(nid_hist,.false.,"ps",itau,paprs(:,1))130 !$OMP MASTER131 CALL histsync(nid_hist)132 !$OMP END MASTER133 endif74 call iophys_ecrit('qv',klev,'Water vapor specifiq content', 'kg/kg', qx(:,:,1)) 75 call iophys_ecrit('qc',klev,'Cloud liquid water specifiq content', 'kg/kg', qx(:,:,2)) 76 call iophys_ecrit('qi',klev,'Cloud solid water specifiq content', 'kg/kg', qx(:,:,3)) 77 call iophys_ecrit('CF',klev,'Cloud fraction', '0-1', cf) 78 call iophys_ecrit('qr',klev,'Rain specifiq content', 'kg/kg', zqr) 79 call iophys_ecrit('qs',klev,'Snow specifiq content', 'kg/kg', zqs) 80 call iophys_ecrit('qg',klev,'Graupel specifiq content', 'kg/kg', zqg) 81 call iophys_ecrit('TKE',klev,'TKE', 'm2/s2', ptke) 82 call iophys_ecrit('theta',klev,'Temperature potentielle', 'K', theta) 134 83 endif 135 #endif136 137 !XIOS138 #ifdef CPP_XIOS139 !$OMP MASTER140 !Increment XIOS time141 CALL xios_update_calendar(itau)142 !$OMP END MASTER143 !$OMP BARRIER144 145 !Send fields to XIOS: (NB these fields must also be defined as146 ! <field id="..." /> in iodef.xml to be correctly used147 CALL histwrite_phy("Temp",t)148 CALL histwrite_phy("temp_newton",temp_newton)149 CALL histwrite_phy("u",u)150 CALL histwrite_phy("v",v)151 CALL histwrite_phy("ps",paprs(:,1))152 #endif153 84 154 85 -
LMDZ6/trunk/libf/phylmd/physiq_mod.F90
r4537 r4547 324 324 zxsnow,snowhgt,qsnow,to_ice,sissnow,runoff,albsol3_lic 325 325 ! 326 USE output_physiqex_mod, ONLY: output_physiqex 327 326 328 327 329 IMPLICIT NONE … … 1237 1239 !======================================================================! 1238 1240 if (debut) then ! 1239 iflag_physiq= 1 !1241 iflag_physiq=0 1240 1242 call getin_p('iflag_physiq', iflag_physiq) ! 1241 1243 endif ! … … 5484 5486 5485 5487 #endif 5488 ! Petit appelle de sorties pour accompagner le travail sur phyex 5489 if ( iflag_physiq == 1 ) then 5490 call output_physiqex(debut,jD_eq,pdtphys,presnivs,paprs,u,v,t,qx,cldfra,0.*t,0.*t,0.*t,pbl_tke,theta) 5491 endif 5486 5492 5487 5493 !==================================================================== … … 5504 5510 ! Disabling calls to the prt_alerte function 5505 5511 alert_first_call = .FALSE. 5512 5506 5513 5507 5514 IF (lafin) THEN
Note: See TracChangeset
for help on using the changeset viewer.