- Timestamp:
- Jun 29, 2018, 12:31:11 PM (6 years ago)
- Location:
- LMDZ6/branches/DYNAMICO-conv
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/DYNAMICO-conv
- Property svn:mergeinfo changed
-
LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cosp/phys_cosp.F90
r2835 r3356 84 84 use cosp_output_write_mod 85 85 ! use MOD_COSP_Modis_Simulator, only : cosp_modis 86 #ifdef CPP_XIOS 87 USE xios, ONLY: xios_field_is_active 88 #endif 89 use cosp_read_otputkeys 86 90 87 91 IMPLICIT NONE … … 136 140 !$OMP THREADPRIVATE(debut_cosp) 137 141 142 logical, save :: first_write=.true. 143 !$OMP THREADPRIVATE(first_write) 144 138 145 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Input variables from LMDZ-GCM 139 146 integer :: overlaplmdz ! overlap type: 1=max, 2=rand, 3=max/rand ! cosp input (output lmdz) … … 147 154 real :: dtime,freq_cosp 148 155 real,dimension(2) :: time_bnds 156 157 double precision :: d_dtime 158 double precision,dimension(2) :: d_time_bnds 149 159 160 real,dimension(2,SR_BINS) :: sratio_bounds 161 real,dimension(SR_BINS) :: sratio_ax 162 150 163 namelist/COSP_INPUT/overlap,isccp_topheight,isccp_topheight_direction, & 151 164 npoints_it,ncolumns,use_vgrid,nlr,csat_vgrid, & … … 157 170 158 171 !---------------- End of declaration of variables -------------- 159 160 172 161 173 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ … … 170 182 CALL read_cosp_input 171 183 172 ! Clefs Outputs 173 call read_cosp_output_nl(cosp_output_nl,cfg) 184 ! Clefs Outputs initialisation 185 call cosp_outputkeys_init(cfg) 186 !!! call cosp_outputkeys_test(cfg) 187 print*,' Cles des differents simulateurs cosp a itap :',itap 188 print*,'Lradar_sim,Llidar_sim,Lisccp_sim,Lmisr_sim,Lmodis_sim,Lrttov_sim,Lstats', & 189 cfg%Lradar_sim,cfg%Llidar_sim,cfg%Lisccp_sim,cfg%Lmisr_sim,cfg%Lmodis_sim, & 190 cfg%Lrttov_sim,cfg%Lstats 174 191 175 192 if (overlaplmdz.ne.overlap) then … … 178 195 print*,'Fin lecture Namelists, debut_cosp =',debut_cosp 179 196 180 print*,' Cles des differents simulateurs cosp :'181 print*,'Lradar_sim,Llidar_sim,Lisccp_sim,Lmisr_sim,Lmodis_sim,Lrttov_sim', &182 cfg%Lradar_sim,cfg%Llidar_sim,cfg%Lisccp_sim,cfg%Lmisr_sim,cfg%Lmodis_sim,cfg%Lrttov_sim183 184 197 endif ! debut_cosp 198 199 !!! Ici on modifie les cles logiques pour les outputs selon les champs actives dans les .xml 200 if ((itap.gt.1).and.(first_write))then 201 #ifdef CPP_XIOS 202 call read_xiosfieldactive(cfg) 203 #else 204 call read_cosp_output_nl(itap,cosp_output_nl,cfg) 205 #endif 206 first_write=.false. 207 208 print*,' Cles des differents simulateurs cosp a itap :',itap 209 print*,'Lradar_sim,Llidar_sim,Lisccp_sim,Lmisr_sim,Lmodis_sim,Lrttov_sim,Lstats', & 210 cfg%Lradar_sim,cfg%Llidar_sim,cfg%Lisccp_sim,cfg%Lmisr_sim,cfg%Lmodis_sim, & 211 cfg%Lrttov_sim,cfg%Lstats 212 endif 185 213 186 214 time_bnds(1) = dtime-dtime/2. 187 215 time_bnds(2) = dtime+dtime/2. 188 216 189 ! print*,'Debut phys_cosp itap,dtime,freq_cosp,ecrit_mth,ecrit_day,ecrit_hf ', & 190 ! itap,dtime,freq_cosp,ecrit_mth,ecrit_day,ecrit_hf 217 d_time_bnds=time_bnds 218 d_dtime=dtime 219 191 220 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 192 221 ! Allocate memory for gridbox type … … 195 224 ! print *, 'Allocating memory for gridbox type...' 196 225 197 !! AI198 ! call construct_cosp_gridbox(dble(itap),radar_freq,surface_radar,use_mie_tables,use_gas_abs,do_ray,melt_lay,k2, &199 ! Npoints,Nlevels,Ncolumns,N_HYDRO,Nprmts_max_hydro,Naero,Nprmts_max_aero,Npoints_it, &200 ! lidar_ice_type,isccp_topheight,isccp_topheight_direction,overlap,emsfc_lw, &201 ! use_precipitation_fluxes,use_reff, &202 ! Platform,Satellite,Instrument,Nchannels,ZenAng, &203 ! channels(1:Nchannels),surfem(1:Nchannels),co2,ch4,n2o,co,gbx)204 226 ! Surafce emissivity 205 227 emsfc_lw = 1. 206 228 207 call construct_cosp_gridbox(d time,time_bnds,radar_freq,surface_radar,use_mie_tables,use_gas_abs, &229 call construct_cosp_gridbox(d_dtime,d_time_bnds,radar_freq,surface_radar,use_mie_tables,use_gas_abs, & 208 230 do_ray,melt_lay,k2, & 209 231 Npoints,Nlevels,Ncolumns,N_HYDRO,Nprmts_max_hydro,Naero,Nprmts_max_aero,Npoints_it, & … … 321 343 322 344 !+++++++++++++ Open output files and define output files axis !+++++++++++++ 323 345 ! if (debut_cosp) then 324 346 325 347 !$OMP MASTER 326 print *, ' Open outpts files and define axis'348 ! print *, ' Open outpts files and define axis' 327 349 call cosp_output_open(Nlevlmdz, Ncolumns, presnivs, dtime, freq_cosp, & 328 350 ok_mensuelCOSP, ok_journeCOSP, ok_hfCOSP, ok_all_xml, & … … 331 353 !$OMP BARRIER 332 354 debut_cosp=.false. 333 endif ! debut_cosp 355 ! endif ! debut_cosp 356 ! else 334 357 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 335 358 ! Call simulator … … 344 367 !#endif 345 368 !! 346 347 369 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 348 370 … … 353 375 cfg, gbx, vgrid, sglidar, sgradar, stlidar, stradar, & 354 376 isccp, misr, modis) 355 377 ! endif !debut_cosp 356 378 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 357 379 ! Deallocate memory in derived types 358 380 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 359 !print *, 'Deallocating memory...'381 print *, 'Deallocating memory...' 360 382 call free_cosp_gridbox(gbx) 361 383 call free_cosp_subgrid(sgx)
Note: See TracChangeset
for help on using the changeset viewer.