Changeset 4540 for LMDZ6/trunk/libf
- Timestamp:
- May 17, 2023, 2:17:37 AM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/output_physiqex_mod.F90
r4539 r4540 40 40 !$OMP THREADPRIVATE(itau) 41 41 42 integer, save :: ioex=1 42 43 43 44 … … 46 47 if(debut)then 47 48 48 CALL init_iophy_new(latitude_deg,longitude_deg) 49 call getin_p("iwrite_phys",iwrite_phys) 50 call getin_p("ioex",ioex) 49 51 50 dtime=pdtphys 51 itau=0 52 call histbeg_phy("histins.nc",itau,zjulian,dtime,nhori,nid_hist) 53 print*,'NNNNNNN ',nid_hist,debut 52 if ( ioex == 1 ) then 53 CALL iophys_ini(pdtphys) 54 else if ( ioex == 2 ) then 54 55 55 call getin_p("iwrite_phys",iwrite_phys) 56 print*,'NNNNNNN OK0' 57 t_ops=pdtphys*iwrite_phys ! frequency of the IOIPSL operation 58 t_wrt=pdtphys*iwrite_phys ! frequency of the outputs in the file 59 print*,'NNNNNNN OK1' 56 CALL init_iophy_new(latitude_deg,longitude_deg) 57 dtime=pdtphys 58 itau=0 59 call histbeg_phy("histins.nc",itau,zjulian,dtime,nhori,nid_hist) 60 print*,'NNNNNNN ',nid_hist,debut 61 print*,'NNNNNNN OK0' 62 t_ops=pdtphys*iwrite_phys ! frequency of the IOIPSL operation 63 t_wrt=pdtphys*iwrite_phys ! frequency of the outputs in the file 64 print*,'NNNNNNN OK1' 60 65 61 66 !$OMP MASTER 62 67 63 68 #ifndef CPP_IOIPSL_NO_OUTPUT 64 ! IOIPSL65 ! define vertical coordinate66 call histvert(nid_hist,"presnivs","Vertical levels","Pa",klev, &67 presnivs,zvertid,'down')68 ! define variables which will be written in "histins.nc" file69 call histdef(nid_hist,'Temp','Atmospheric temperature','K', &70 nbp_lon,jj_nb,nhori,klev,1,klev,zvertid,32, &71 'inst(X)',t_ops,t_wrt)72 print*,'NNNNNNN OK2a',nid_hist,t_ops,t_wrt73 call histdef(nid_hist,'u','Eastward Zonal Wind','m/s', &74 nbp_lon,jj_nb,nhori,klev,1,klev,zvertid,32, &75 'inst(X)',t_ops,t_wrt)76 print*,'NNNNNNN OK2b',nid_hist,t_ops,t_wrt77 call histdef(nid_hist,'v','Northward Meridional Wind','m/s', &78 nbp_lon,jj_nb,nhori,klev,1,klev,zvertid,32, &79 'inst(X)',t_ops,t_wrt)80 print*,'NNNNNNN OK2c',nid_hist,t_ops,t_wrt81 call histdef(nid_hist,'ps','Surface Pressure','Pa', &82 nbp_lon,jj_nb,nhori,1,1,1,zvertid,32, &83 'inst(X)',t_ops,t_wrt)84 ! end definition sequence85 print*,'NNNNNNN OK2',nid_hist,t_ops,t_wrt86 call histend(nid_hist)87 print*,'NNNNNNN OK3'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' 88 93 #endif 89 94 90 95 #ifdef CPP_XIOS 91 !XIOS92 ! Declare available vertical axes to be used in output files:93 CALL wxios_add_vaxis("presnivs", klev, presnivs)94 95 ! Declare calendar and time step96 CALL wxios_set_cal(dtime,"earth_360d",1,1,1,0.0,1,1,1,0.0)97 98 !Finalize the context:99 CALL wxios_closedef()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() 100 105 #endif 101 106 102 !$OMP END MASTER 103 !$OMP BARRIER 107 !$OMP END MASTER 108 !$OMP BARRIER 109 endif 104 110 105 111 endif … … 112 118 #ifndef CPP_IOIPSL_NO_OUTPUT 113 119 if (modulo(itau,iwrite_phys)==0) then 114 call histwrite_phy(nid_hist,.false.,"Temp",itau,t) 115 call histwrite_phy(nid_hist,.false.,"u",itau,u) 116 call histwrite_phy(nid_hist,.false.,"v",itau,v) 117 call histwrite_phy(nid_hist,.false.,"ps",itau,paprs(:,1)) 118 !$OMP MASTER 120 if ( ioex == 1 ) then 121 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) 124 call iophys_ecrit('ps',1,'Surface pressure','Pa',paprs(:,1)) 125 else if ( ioex == 2 ) then 126 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 MASTER 119 131 CALL histsync(nid_hist) 120 !$OMP END MASTER 132 !$OMP END MASTER 133 endif 121 134 endif 122 135 #endif
Note: See TracChangeset
for help on using the changeset viewer.