Changeset 3411 for LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cosp
- Timestamp:
- Nov 5, 2018, 3:24:59 PM (6 years ago)
- Location:
- LMDZ6/branches/DYNAMICO-conv
- Files:
-
- 17 deleted
- 6 edited
- 17 copied
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/DYNAMICO-conv
- Property svn:mergeinfo changed
/LMDZ6/trunk removed
- Property svn:mergeinfo changed
-
LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cosp/cosp_output_mod.F90
r3356 r3411 12 12 numMODISReffLiqBins, reffLIQ_binCenters 13 13 14 IMPLICIT NONE15 14 ! cosp_output_mod 16 15 INTEGER, PRIVATE :: i … … 255 254 real :: zjulian,zjulian_start 256 255 real,dimension(Ncolumns) :: column_ax 256 real,dimension(2,SR_BINS) :: sratio_bounds 257 real,dimension(SR_BINS) :: sratio_ax 257 258 real,dimension(DBZE_BINS) :: dbze_ax 258 259 CHARACTER(LEN=20), DIMENSION(3) :: chfreq = (/ '1day', '1d ', '3h ' /) 259 real,parameter,dimension(SR_BINS) :: sratio_ax = (/0.005, &260 0.605,2.09,4.,6., &261 8.5,12.5,17.5,22.5,27.5,35.,45.,55.,70.,50040./)262 260 263 261 !!! Variables d'entree … … 284 282 enddo 285 283 284 285 sratio_bounds(2,:)=stlidar%srbval(:) ! srbval contains the upper 286 ! limits from lmd_ipsl_stats.f90 287 sratio_bounds(1,2:SR_BINS) = stlidar%srbval(1:SR_BINS-1) 288 sratio_bounds(1,1) = 0.0 289 sratio_bounds(2,SR_BINS) = 1.e5 ! This matches with Chepfer et al., JGR, 290 ! ! 2009. However, it is not consistent 291 ! with the upper limit in 292 ! lmd_ipsl_stats.f90, which is 293 ! LIDAR_UNDEF-1=998.999 294 sratio_ax(:) = (sratio_bounds(1,:)+sratio_bounds(2,:))/2.0 295 286 296 cosp_outfilenames(1) = 'histmthCOSP' 287 297 cosp_outfilenames(2) = 'histdayCOSP' … … 342 352 ! AI nov 2015 343 353 CALL wxios_add_vaxis("temp", LIDAR_NTEMP, LIDAR_PHASE_TEMP) 344 CALL wxios_add_vaxis("cth ", MISR_N_CTH, MISR_CTH)354 CALL wxios_add_vaxis("cth16", MISR_N_CTH, MISR_CTH) 345 355 CALL wxios_add_vaxis("dbze", DBZE_BINS, dbze_ax) 346 356 CALL wxios_add_vaxis("scatratio", SR_BINS, sratio_ax) … … 390 400 CALL histvert(cosp_nidfiles(iff),"temp","temperature","C",LIDAR_NTEMP,LIDAR_PHASE_TEMP,nverttemp(iff)) 391 401 392 CALL histvert(cosp_nidfiles(iff),"cth ","altitude","m",MISR_N_CTH,MISR_CTH,nvertmisr(iff))402 CALL histvert(cosp_nidfiles(iff),"cth16","altitude","m",MISR_N_CTH,MISR_CTH,nvertmisr(iff)) 393 403 394 404 CALL histvert(cosp_nidfiles(iff),"ReffIce","Effective_particle_size_Ice","microns",numMODISReffIceBins, reffICE_binCenters, & -
LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cosp/cosp_output_write_mod.F90
r3356 r3411 6 6 USE cosp_output_mod 7 7 8 IMPLICIT NONE9 10 8 INTEGER, SAVE :: itau_iocosp 11 9 !$OMP THREADPRIVATE(itau_iocosp) … … 29 27 #ifdef CPP_XIOS 30 28 USE wxios, only: wxios_closedef 31 USE xios, only: xios_update_calendar , xios_field_is_active32 #endif 33 IMPLICIT NONE 29 USE xios, only: xios_update_calendar 30 #endif 31 34 32 !!! Variables d'entree 35 33 integer :: itap, Nlevlmdz, Ncolumns, Npoints … … 47 45 48 46 !!! Variables locales 49 integer :: icl ,k,ip47 integer :: icl 50 48 logical :: ok_sync 51 integer :: itau_wcosp , iff49 integer :: itau_wcosp 52 50 real, dimension(Npoints,PARASOL_NREFL) :: parasolcrefl, Ncref 53 51 54 ! Variables locals intermidiaires pour inverser les axes des champs 4D55 ! Compatibilite avec sorties CMIP56 real, dimension(Npoints,Nlevout,SR_BINS) :: tmp_fi4da_cfadL57 real, dimension(Npoints,Nlevout,DBZE_BINS) :: tmp_fi4da_cfadR58 real, dimension(Npoints,MISR_N_CTH,7) :: tmp_fi4da_misr59 52 60 53 #ifdef CPP_XIOS … … 86 79 ! On n'ecrit pas quand itap=1 (cosp) 87 80 88 !if (prt_level >= 10) then89 !WRITE(lunout,*)'DO iinit=1, iinitend ',iinitend90 !endif91 92 ! !#ifdef CPP_XIOS81 if (prt_level >= 10) then 82 WRITE(lunout,*)'DO iinit=1, iinitend ',iinitend 83 endif 84 85 !#ifdef CPP_XIOS 93 86 ! !$OMP MASTER 94 87 !IF (cosp_varsdefined) THEN … … 101 94 ! !$OMP END MASTER 102 95 ! !$OMP BARRIER 103 !!#endif 104 105 !!!! Sorties Calipso 96 !#endif 97 106 98 if (cfg%Llidar_sim) then 107 !!! AI 02 2018 108 ! Traitement missing_val 109 where(stlidar%lidarcld == R_UNDEF) stlidar%lidarcld = missing_val 110 where(stlidar%proftemp == R_UNDEF) stlidar%proftemp = missing_val !TIBO 111 where(stlidar%profSR == R_UNDEF) stlidar%profSR = missing_val !TIBO2 112 where(sglidar%beta_mol == R_UNDEF) sglidar%beta_mol = missing_val 113 where(sglidar%beta_tot == R_UNDEF) sglidar%beta_tot = missing_val 114 where(stlidar%cldlayer == R_UNDEF) stlidar%cldlayer = missing_val 115 where(stlidar%cldtype == R_UNDEF) stlidar%cldtype = missing_val !OPAQ 116 where(stlidar%cfad_sr == R_UNDEF) stlidar%cfad_sr = missing_val 99 ! Pb des valeurs indefinies, on les met a 0 100 ! A refaire proprement 101 do k = 1,Nlevout 102 do ip = 1,Npoints 103 if(stlidar%lidarcld(ip,k).eq.R_UNDEF)then 104 stlidar%lidarcld(ip,k)=missing_val 105 endif 106 if(stlidar%proftemp(ip,k).eq.R_UNDEF)then !TIBO 107 stlidar%proftemp(ip,k)=missing_val !TIBO 108 endif !TIBO 109 enddo 110 111 do ii= 1,SR_BINS 112 do ip = 1,Npoints 113 if(stlidar%cfad_sr(ip,ii,k).eq.R_UNDEF)then 114 stlidar%cfad_sr(ip,ii,k)=missing_val 115 endif 116 enddo 117 enddo 118 119 do ii= 1,Ncolumns !TIBO 120 do ip = 1,Npoints !TIBO 121 ! if(stlidar%profSR(ip,ii,k).eq.R_UNDEF)then !TIBO 122 ! stlidar%profSR(ip,ii,k)=missing_val !TIBO 123 if(stlidar%profSR(ip,k,ii).eq.R_UNDEF)then !TIBO2 124 stlidar%profSR(ip,k,ii)=missing_val !TIBO2 125 endif !TIBO 126 enddo !TIBO 127 enddo !TIBO 128 enddo 129 130 do ip = 1,Npoints 131 do k = 1,Nlevlmdz 132 if(sglidar%beta_mol(ip,k).eq.R_UNDEF)then 133 sglidar%beta_mol(ip,k)=missing_val 134 endif 135 136 do ii= 1,Ncolumns 137 if(sglidar%beta_tot(ip,ii,k).eq.R_UNDEF)then 138 sglidar%beta_tot(ip,ii,k)=missing_val 139 endif 140 enddo 141 142 enddo !k = 1,Nlevlmdz 143 enddo !ip = 1,Npoints 144 145 do k = 1,LIDAR_NCAT 146 do ip = 1,Npoints 147 if(stlidar%cldlayer(ip,k).eq.R_UNDEF)then 148 stlidar%cldlayer(ip,k)=missing_val 149 endif 150 enddo 151 enddo 152 153 do k = 1,LIDAR_NTYPE !OPAQ 154 do ip = 1,Npoints !OPAQ 155 if(stlidar%cldtype(ip,k).eq.R_UNDEF)then !OPAQ 156 stlidar%cldtype(ip,k)=missing_val !OPAQ 157 endif !OPAQ 158 enddo !OPAQ 159 enddo !OPAQ 160 117 161 ! AI 11 / 2015 162 118 163 where(stlidar%parasolrefl == R_UNDEF) stlidar%parasolrefl = missing_val 119 164 where(stlidar%lidarcldtmp == R_UNDEF) stlidar%lidarcldtmp = missing_val … … 122 167 where(stlidar%lidarcldtype == R_UNDEF) stlidar%lidarcldtype = missing_val !OPAQ 123 168 where(stlidar%lidarcldtmp == R_UNDEF) stlidar%lidarcldtmp = missing_val 124 125 ! print*,'Appel histwrite2d_cosp' 126 if (cfg%Lcllcalipso) CALL histwrite2d_cosp(o_cllcalipso,stlidar%cldlayer(:,1)) 127 if (cfg%Lclhcalipso) CALL histwrite2d_cosp(o_clhcalipso,stlidar%cldlayer(:,3)) 128 if (cfg%Lclmcalipso) CALL histwrite2d_cosp(o_clmcalipso,stlidar%cldlayer(:,2)) 129 if (cfg%Lcltcalipso) CALL histwrite2d_cosp(o_cltcalipso,stlidar%cldlayer(:,4)) 130 if (cfg%Lclcalipso) CALL histwrite3d_cosp(o_clcalipso,stlidar%lidarcld,nvert) 131 if (cfg%Lclcalipsotmp) CALL histwrite3d_cosp(o_clcalipsotmp,stlidar%lidarcldtmp(:,:,1),nverttemp) 132 133 if (cfg%Lcllcalipsoice) CALL histwrite2d_cosp(o_cllcalipsoice,stlidar%cldlayerphase(:,1,1)) 134 if (cfg%Lclhcalipsoice) CALL histwrite2d_cosp(o_clhcalipsoice,stlidar%cldlayerphase(:,3,1)) 135 if (cfg%Lclmcalipsoice) CALL histwrite2d_cosp(o_clmcalipsoice,stlidar%cldlayerphase(:,2,1)) 136 if (cfg%Lcltcalipsoice) CALL histwrite2d_cosp(o_cltcalipsoice,stlidar%cldlayerphase(:,4,1)) 137 if (cfg%Lclcalipsoice) CALL histwrite3d_cosp(o_clcalipsoice,stlidar%lidarcldphase(:,:,1),nvert) 138 if (cfg%Lclcalipsotmpice) CALL histwrite3d_cosp(o_clcalipsotmpice,stlidar%lidarcldtmp(:,:,2),nverttemp) 139 140 if (cfg%Lcllcalipsoliq) CALL histwrite2d_cosp(o_cllcalipsoliq,stlidar%cldlayerphase(:,1,2)) 141 if (cfg%Lclhcalipsoliq) CALL histwrite2d_cosp(o_clhcalipsoliq,stlidar%cldlayerphase(:,3,2)) 142 if (cfg%Lclmcalipsoliq) CALL histwrite2d_cosp(o_clmcalipsoliq,stlidar%cldlayerphase(:,2,2)) 143 if (cfg%Lcltcalipsoliq) CALL histwrite2d_cosp(o_cltcalipsoliq,stlidar%cldlayerphase(:,4,2)) 144 if (cfg%Lclcalipsoliq) CALL histwrite3d_cosp(o_clcalipsoliq,stlidar%lidarcldphase(:,:,2),nvert) 145 if (cfg%Lclcalipsotmpliq) CALL histwrite3d_cosp(o_clcalipsotmpliq,stlidar%lidarcldtmp(:,:,3),nverttemp) 146 147 if (cfg%Lcllcalipsoun) CALL histwrite2d_cosp(o_cllcalipsoun,stlidar%cldlayerphase(:,1,3)) 148 if (cfg%Lclhcalipsoun) CALL histwrite2d_cosp(o_clhcalipsoun,stlidar%cldlayerphase(:,3,3)) 149 if (cfg%Lclmcalipsoun) CALL histwrite2d_cosp(o_clmcalipsoun,stlidar%cldlayerphase(:,2,3)) 150 if (cfg%Lcltcalipsoun) CALL histwrite2d_cosp(o_cltcalipsoun,stlidar%cldlayerphase(:,4,3)) 151 if (cfg%Lclcalipsoun) CALL histwrite3d_cosp(o_clcalipsoun,stlidar%lidarcldphase(:,:,3),nvert) 152 if (cfg%Lclcalipsotmpun) CALL histwrite3d_cosp(o_clcalipsotmpun,stlidar%lidarcldtmp(:,:,4),nverttemp) 153 154 if (cfg%Lclopaquecalipso) CALL histwrite2d_cosp(o_clopaquecalipso,stlidar%cldtype(:,1)) !OPAQ 155 if (cfg%Lclthincalipso) CALL histwrite2d_cosp(o_clthincalipso,stlidar%cldtype(:,2)) !OPAQ 156 if (cfg%Lclzopaquecalipso) CALL histwrite2d_cosp(o_clzopaquecalipso,stlidar%cldtype(:,3)) !OPAQ 157 158 if (cfg%Lclcalipsoopaque) CALL histwrite3d_cosp(o_clcalipsoopaque,stlidar%lidarcldtype(:,:,1),nvert) !OPAQ 159 if (cfg%Lclcalipsothin) CALL histwrite3d_cosp(o_clcalipsothin,stlidar%lidarcldtype(:,:,2),nvert) !OPAQ 160 if (cfg%Lclcalipsozopaque) CALL histwrite3d_cosp(o_clcalipsozopaque,stlidar%lidarcldtype(:,:,3),nvert) !OPAQ 161 if (cfg%Lclcalipsoopacity) CALL histwrite3d_cosp(o_clcalipsoopacity,stlidar%lidarcldtype(:,:,4),nvert) !OPAQ 162 163 if (cfg%Lproftemp) CALL histwrite3d_cosp(o_proftemp,stlidar%proftemp,nvert) !TIBO 164 165 #ifdef CPP_XIOS 169 170 171 print*,'Appel histwrite2d_cosp' 172 CALL histwrite2d_cosp(o_cllcalipso,stlidar%cldlayer(:,1)) 173 CALL histwrite2d_cosp(o_clhcalipso,stlidar%cldlayer(:,3)) 174 CALL histwrite2d_cosp(o_clmcalipso,stlidar%cldlayer(:,2)) 175 CALL histwrite2d_cosp(o_cltcalipso,stlidar%cldlayer(:,4)) 176 CALL histwrite3d_cosp(o_clcalipso,stlidar%lidarcld,nvert) 177 CALL histwrite3d_cosp(o_clcalipsotmp,stlidar%lidarcldtmp(:,:,1),nverttemp) 178 179 CALL histwrite2d_cosp(o_cllcalipsoice,stlidar%cldlayerphase(:,1,1)) 180 CALL histwrite2d_cosp(o_clhcalipsoice,stlidar%cldlayerphase(:,3,1)) 181 CALL histwrite2d_cosp(o_clmcalipsoice,stlidar%cldlayerphase(:,2,1)) 182 CALL histwrite2d_cosp(o_cltcalipsoice,stlidar%cldlayerphase(:,4,1)) 183 CALL histwrite3d_cosp(o_clcalipsoice,stlidar%lidarcldphase(:,:,1),nvert) 184 CALL histwrite3d_cosp(o_clcalipsotmpice,stlidar%lidarcldtmp(:,:,2),nverttemp) 185 186 CALL histwrite2d_cosp(o_cllcalipsoliq,stlidar%cldlayerphase(:,1,2)) 187 CALL histwrite2d_cosp(o_clhcalipsoliq,stlidar%cldlayerphase(:,3,2)) 188 CALL histwrite2d_cosp(o_clmcalipsoliq,stlidar%cldlayerphase(:,2,2)) 189 CALL histwrite2d_cosp(o_cltcalipsoliq,stlidar%cldlayerphase(:,4,2)) 190 CALL histwrite3d_cosp(o_clcalipsoliq,stlidar%lidarcldphase(:,:,2),nvert) 191 CALL histwrite3d_cosp(o_clcalipsotmpliq,stlidar%lidarcldtmp(:,:,3),nverttemp) 192 193 CALL histwrite2d_cosp(o_cllcalipsoun,stlidar%cldlayerphase(:,1,3)) 194 CALL histwrite2d_cosp(o_clhcalipsoun,stlidar%cldlayerphase(:,3,3)) 195 CALL histwrite2d_cosp(o_clmcalipsoun,stlidar%cldlayerphase(:,2,3)) 196 CALL histwrite2d_cosp(o_cltcalipsoun,stlidar%cldlayerphase(:,4,3)) 197 CALL histwrite3d_cosp(o_clcalipsoun,stlidar%lidarcldphase(:,:,3),nvert) 198 CALL histwrite3d_cosp(o_clcalipsotmpun,stlidar%lidarcldtmp(:,:,4),nverttemp) 199 200 CALL histwrite2d_cosp(o_clopaquecalipso,stlidar%cldtype(:,1)) !OPAQ 201 CALL histwrite2d_cosp(o_clthincalipso,stlidar%cldtype(:,2)) !OPAQ 202 CALL histwrite2d_cosp(o_clzopaquecalipso,stlidar%cldtype(:,3)) !OPAQ 203 204 CALL histwrite3d_cosp(o_clcalipsoopaque,stlidar%lidarcldtype(:,:,1),nvert) !OPAQ 205 CALL histwrite3d_cosp(o_clcalipsothin,stlidar%lidarcldtype(:,:,2),nvert) !OPAQ 206 CALL histwrite3d_cosp(o_clcalipsozopaque,stlidar%lidarcldtype(:,:,3),nvert) !OPAQ 207 CALL histwrite3d_cosp(o_clcalipsoopacity,stlidar%lidarcldtype(:,:,4),nvert) !OPAQ 208 209 CALL histwrite3d_cosp(o_proftemp,stlidar%proftemp,nvert) !TIBO 210 211 #ifdef CPP_XIOS 212 CALL histwrite4d_cosp(o_cfad_lidarsr532,stlidar%cfad_sr) 213 CALL histwrite4d_cosp(o_profSR,stlidar%profSR) !TIBO 214 #else 166 215 do icl=1,SR_BINS 167 tmp_fi4da_cfadL(:,:,icl)=stlidar%cfad_sr(:,icl,:) 168 enddo 169 ! if (cfg%LcfadLidarsr532) CALL histwrite4d_cosp(o_cfad_lidarsr532,stlidar%cfad_sr) 170 if (cfg%LcfadLidarsr532) CALL histwrite4d_cosp(o_cfad_lidarsr532,tmp_fi4da_cfadL) 171 if (cfg%LprofSR) CALL histwrite4d_cosp(o_profSR,stlidar%profSR) !TIBO 216 CALL histwrite3d_cosp(o_cfad_lidarsr532,stlidar%cfad_sr(:,icl,:),nvert,icl) 217 enddo 218 do icl=1,Ncolumns !TIBO 219 CALL histwrite3d_cosp(o_profSR,stlidar%profSR(:,icl,:),nvert,icl) !TIBO 220 enddo !TIBO 221 CALL histwrite3d_cosp(o_parasol_refl,stlidar%parasolrefl,nvertp) 222 #endif 223 224 do k=1,PARASOL_NREFL 225 do ip=1, Npoints 226 if (stlidar%cldlayer(ip,4).gt.0.01.and.stlidar%parasolrefl(ip,k).ne.missing_val) then 227 parasolcrefl(ip,k)=(stlidar%parasolrefl(ip,k)-0.03*(1.-stlidar%cldlayer(ip,4)))/ & 228 stlidar%cldlayer(ip,4) 229 Ncref(ip,k) = 1. 230 else 231 parasolcrefl(ip,k)=missing_val 232 Ncref(ip,k) = 0. 233 endif 234 enddo 235 236 enddo 237 CALL histwrite3d_cosp(o_Ncrefl,Ncref,nvertp) 238 CALL histwrite3d_cosp(o_parasol_crefl,parasolcrefl,nvertp) 239 240 #ifdef CPP_XIOS 241 CALL histwrite4d_cosp(o_atb532,sglidar%beta_tot) 172 242 #else 173 if (cfg%LcfadLidarsr532) then 174 do icl=1,SR_BINS 175 CALL histwrite3d_cosp(o_cfad_lidarsr532,stlidar%cfad_sr(:,icl,:),nvert,icl) 176 enddo 177 endif 178 if (cfg%LprofSR) then 179 do icl=1,Ncolumns !TIBO 180 CALL histwrite3d_cosp(o_profSR,stlidar%profSR(:,icl,:),nvert,icl) !TIBO 181 enddo !TIBO 182 endif 183 #endif 184 if (cfg%LparasolRefl) CALL histwrite3d_cosp(o_parasol_refl,stlidar%parasolrefl,nvertp) 185 186 if (cfg%LparasolRefl) then 187 do k=1,PARASOL_NREFL 188 do ip=1, Npoints 189 if (stlidar%cldlayer(ip,4).gt.0.01.and.stlidar%parasolrefl(ip,k).ne.missing_val) then 190 parasolcrefl(ip,k)=(stlidar%parasolrefl(ip,k)-0.03*(1.-stlidar%cldlayer(ip,4)))/ & 191 stlidar%cldlayer(ip,4) 192 Ncref(ip,k) = 1. 193 else 194 parasolcrefl(ip,k)=missing_val 195 Ncref(ip,k) = 0. 196 endif 197 enddo 198 enddo 199 CALL histwrite3d_cosp(o_Ncrefl,Ncref,nvertp) 200 CALL histwrite3d_cosp(o_parasol_crefl,parasolcrefl,nvertp) 201 endif 202 203 #ifdef CPP_XIOS 204 if (cfg%Latb532) CALL histwrite4d_cosp(o_atb532,sglidar%beta_tot) 243 do icl=1,Ncolumns 244 CALL histwrite3d_cosp(o_atb532,sglidar%beta_tot(:,icl,:),nvertmcosp,icl) 245 enddo 246 #endif 247 248 CALL histwrite3d_cosp(o_beta_mol532,sglidar%beta_mol,nvertmcosp) 249 endif !Lidar 250 251 if (cfg%Lradar_sim) then 252 253 #ifdef CPP_XIOS 254 CALL histwrite4d_cosp(o_dbze94,sgradar%Ze_tot) 255 CALL histwrite4d_cosp(o_cfadDbze94,stradar%cfad_ze) 205 256 #else 206 if (cfg%Latb532) then 207 do icl=1,Ncolumns 208 CALL histwrite3d_cosp(o_atb532,sglidar%beta_tot(:,icl,:),nvertmcosp,icl) 209 enddo 210 endif 211 #endif 212 213 if (cfg%LlidarBetaMol532) CALL histwrite3d_cosp(o_beta_mol532,sglidar%beta_mol,nvertmcosp) 214 215 endif !Lidar 216 217 !!! Sorties Cloudsat 218 if (cfg%Lradar_sim) then 219 220 where(stradar%cfad_ze == R_UNDEF) stradar%cfad_ze = missing_val 221 #ifdef CPP_XIOS 257 do icl=1,Ncolumns 258 CALL histwrite3d_cosp(o_dbze94,sgradar%Ze_tot(:,icl,:),nvertmcosp,icl) 259 enddo 222 260 do icl=1,DBZE_BINS 223 tmp_fi4da_cfadR(:,:,icl)=stradar%cfad_ze(:,icl,:)224 enddo225 if (cfg%Ldbze94) CALL histwrite4d_cosp(o_dbze94,sgradar%Ze_tot)226 ! if (cfg%LcfadDbze94) CALL histwrite4d_cosp(o_cfadDbze94,stradar%cfad_ze)227 if (cfg%LcfadDbze94) CALL histwrite4d_cosp(o_cfadDbze94,tmp_fi4da_cfadR)228 #else229 if (cfg%Ldbze94) then230 do icl=1,Ncolumns231 CALL histwrite3d_cosp(o_dbze94,sgradar%Ze_tot(:,icl,:),nvert,icl)232 enddo233 endif234 if (cfg%LcfadDbze94) then235 do icl=1,DBZE_BINS236 261 CALL histwrite3d_cosp(o_cfadDbze94,stradar%cfad_ze(:,icl,:),nvert,icl) 237 enddo 238 endif 262 enddo 239 263 #endif 240 264 endif 241 ! endif pour radar 242 243 !!! Sorties combinees Cloudsat et Calipso 265 244 266 if (cfg%Llidar_sim .and. cfg%Lradar_sim) then 245 267 where(stradar%lidar_only_freq_cloud == R_UNDEF) & 246 268 stradar%lidar_only_freq_cloud = missing_val 247 if (cfg%Lclcalipso)CALL histwrite3d_cosp(o_clcalipso2,stradar%lidar_only_freq_cloud,nvert)269 CALL histwrite3d_cosp(o_clcalipso2,stradar%lidar_only_freq_cloud,nvert) 248 270 where(stradar%radar_lidar_tcc == R_UNDEF) & 249 271 stradar%radar_lidar_tcc = missing_val 250 if (cfg%Lcltlidarradar)CALL histwrite2d_cosp(o_cltlidarradar,stradar%radar_lidar_tcc)272 CALL histwrite2d_cosp(o_cltlidarradar,stradar%radar_lidar_tcc) 251 273 endif 252 274 253 !!! Sorties Isccp254 275 if (cfg%Lisccp_sim) then 255 where(isccp%totalcldarea == R_UNDEF) isccp%totalcldarea = missing_val 256 where(isccp%meanptop == R_UNDEF) isccp%meanptop = missing_val 257 where(isccp%meantaucld == R_UNDEF) isccp%meantaucld = missing_val 258 where(isccp%meanalbedocld == R_UNDEF) isccp%meanalbedocld = missing_val 259 where(isccp%meantb == R_UNDEF) isccp%meantb = missing_val 260 where(isccp%meantbclr == R_UNDEF) isccp%meantbclr = missing_val 261 where(isccp%fq_isccp == R_UNDEF) isccp%fq_isccp = missing_val 262 where(isccp%boxtau == R_UNDEF) isccp%boxtau = missing_val 263 where(isccp%boxptop == R_UNDEF) isccp%boxptop = missing_val 276 277 ! Traitement des valeurs indefinies 278 do ip = 1,Npoints 279 if(isccp%totalcldarea(ip).eq.R_UNDEF)then 280 isccp%totalcldarea(ip)=missing_val 281 endif 282 if(isccp%meanptop(ip).eq.R_UNDEF)then 283 isccp%meanptop(ip)=missing_val 284 endif 285 if(isccp%meantaucld(ip).eq.R_UNDEF)then 286 isccp%meantaucld(ip)=missing_val 287 endif 288 if(isccp%meanalbedocld(ip).eq.R_UNDEF)then 289 isccp%meanalbedocld(ip)=missing_val 290 endif 291 if(isccp%meantb(ip).eq.R_UNDEF)then 292 isccp%meantb(ip)=missing_val 293 endif 294 if(isccp%meantbclr(ip).eq.R_UNDEF)then 295 isccp%meantbclr(ip)=missing_val 296 endif 297 298 do k=1,7 299 do ii=1,7 300 if(isccp%fq_isccp(ip,ii,k).eq.R_UNDEF)then 301 isccp%fq_isccp(ip,ii,k)=missing_val 302 endif 303 enddo 304 enddo 305 306 do ii=1,Ncolumns 307 if(isccp%boxtau(ip,ii).eq.R_UNDEF)then 308 isccp%boxtau(ip,ii)=missing_val 309 endif 310 enddo 311 312 do ii=1,Ncolumns 313 if(isccp%boxptop(ip,ii).eq.R_UNDEF)then 314 isccp%boxptop(ip,ii)=missing_val 315 endif 316 enddo 317 enddo 264 318 265 319 CALL histwrite2d_cosp(o_sunlit,gbx%sunlit) 266 320 #ifdef CPP_XIOS 267 if (cfg%Lclisccp)CALL histwrite4d_cosp(o_clisccp2,isccp%fq_isccp)321 CALL histwrite4d_cosp(o_clisccp2,isccp%fq_isccp) 268 322 #else 269 if (cfg%Lclisccp) then 270 do icl=1,7 271 CALL histwrite3d_cosp(o_clisccp2,isccp%fq_isccp(:,icl,:),nvertisccp,icl) 323 do icl=1,7 324 CALL histwrite3d_cosp(o_clisccp2,isccp%fq_isccp(:,icl,:),nvertisccp,icl) 325 enddo 326 #endif 327 CALL histwrite3d_cosp(o_boxtauisccp,isccp%boxtau,nvertcol) 328 CALL histwrite3d_cosp(o_boxptopisccp,isccp%boxptop,nvertcol) 329 CALL histwrite2d_cosp(o_tclisccp,isccp%totalcldarea) 330 CALL histwrite2d_cosp(o_ctpisccp,isccp%meanptop) 331 CALL histwrite2d_cosp(o_tauisccp,isccp%meantaucld) 332 CALL histwrite2d_cosp(o_albisccp,isccp%meanalbedocld) 333 CALL histwrite2d_cosp(o_meantbisccp,isccp%meantb) 334 CALL histwrite2d_cosp(o_meantbclrisccp,isccp%meantbclr) 335 endif ! Isccp 336 337 ! MISR simulator 338 if (cfg%Lmisr_sim) then 339 do ip=1,Npoints 340 do ii=1,7 341 do k=1,MISR_N_CTH 342 if(misr%fq_MISR(ip,ii,k).eq.R_UNDEF)then 343 misr%fq_MISR(ip,ii,k)=missing_val 344 endif 345 enddo 272 346 enddo 273 endif 274 #endif 275 276 if (cfg%Lboxtauisccp) CALL histwrite3d_cosp(o_boxtauisccp,isccp%boxtau,nvertcol) 277 if (cfg%Lboxptopisccp) CALL histwrite3d_cosp(o_boxptopisccp,isccp%boxptop,nvertcol) 278 if (cfg%Lcltisccp) CALL histwrite2d_cosp(o_tclisccp,isccp%totalcldarea) 279 if (cfg%Lpctisccp) CALL histwrite2d_cosp(o_ctpisccp,isccp%meanptop) 280 if (cfg%Ltauisccp) CALL histwrite2d_cosp(o_tauisccp,isccp%meantaucld) 281 if (cfg%Lalbisccp) CALL histwrite2d_cosp(o_albisccp,isccp%meanalbedocld) 282 if (cfg%Lmeantbisccp) CALL histwrite2d_cosp(o_meantbisccp,isccp%meantb) 283 if (cfg%Lmeantbclrisccp) CALL histwrite2d_cosp(o_meantbclrisccp,isccp%meantbclr) 284 endif ! Isccp 285 286 !!! MISR simulator 287 if (cfg%Lmisr_sim) then 288 where(misr%fq_MISR == R_UNDEF) misr%fq_MISR = missing_val 289 290 #ifdef CPP_XIOS 291 do icl=1,MISR_N_CTH 292 tmp_fi4da_misr(:,icl,:)=misr%fq_MISR(:,:,icl) 293 enddo 294 ! if (cfg%LclMISR) CALL histwrite4d_cosp(o_clMISR,misr%fq_MISR) 295 if (cfg%LclMISR) CALL histwrite4d_cosp(o_clMISR,tmp_fi4da_misr) 347 enddo 348 349 #ifdef CPP_XIOS 350 CALL histwrite4d_cosp(o_clMISR,misr%fq_MISR) 296 351 #else 297 if (cfg%LclMISR) then 298 do icl=1,7 352 do icl=1,7 299 353 CALL histwrite3d_cosp(o_clMISR,misr%fq_MISR(:,icl,:),nvertmisr,icl) 300 enddo 301 endif 354 enddo 302 355 #endif 303 356 endif 304 ! endif pour Misr 305 306 !!! Modis simulator 357 358 ! Modis simulator 307 359 if (cfg%Lmodis_sim) then 308 where(modis%Cloud_Fraction_Low_Mean == R_UNDEF) & 309 modis%Cloud_Fraction_Low_Mean = missing_val 310 where(modis%Cloud_Fraction_High_Mean == R_UNDEF) & 311 modis%Cloud_Fraction_High_Mean = missing_val 312 where(modis%Cloud_Fraction_Mid_Mean == R_UNDEF) & 313 modis%Cloud_Fraction_Mid_Mean = missing_val 314 where(modis%Cloud_Fraction_Total_Mean == R_UNDEF) & 315 modis%Cloud_Fraction_Total_Mean = missing_val 316 where(modis%Cloud_Fraction_Water_Mean == R_UNDEF) & 317 modis%Cloud_Fraction_Water_Mean = missing_val 318 where(modis%Cloud_Fraction_Ice_Mean == R_UNDEF) & 319 modis%Cloud_Fraction_Ice_Mean = missing_val 320 where(modis%Optical_Thickness_Total_Mean == R_UNDEF) & 321 modis%Optical_Thickness_Total_Mean = missing_val 322 where(modis%Optical_Thickness_Water_Mean == R_UNDEF) & 323 modis%Optical_Thickness_Water_Mean = missing_val 324 where(modis%Optical_Thickness_Ice_Mean == R_UNDEF) & 325 modis%Optical_Thickness_Ice_Mean = missing_val 326 where(modis%Cloud_Particle_Size_Water_Mean == R_UNDEF) & 327 modis%Cloud_Particle_Size_Water_Mean = missing_val 328 where(modis%Cloud_Particle_Size_Ice_Mean == R_UNDEF) & 329 modis%Cloud_Particle_Size_Ice_Mean = missing_val 330 where(modis%Cloud_Top_Pressure_Total_Mean == R_UNDEF) & 331 modis%Cloud_Top_Pressure_Total_Mean = missing_val 332 where(modis%Liquid_Water_Path_Mean == R_UNDEF) & 333 modis%Liquid_Water_Path_Mean = missing_val 334 where(modis%Ice_Water_Path_Mean == R_UNDEF) & 335 modis%Ice_Water_Path_Mean = missing_val 336 337 where(modis%Optical_Thickness_Total_LogMean == R_UNDEF) & 360 361 do ip=1,Npoints 362 if(modis%Cloud_Fraction_Low_Mean(ip).eq.R_UNDEF)then 363 modis%Cloud_Fraction_Low_Mean(ip)=missing_val 364 endif 365 if(modis%Cloud_Fraction_High_Mean(ip).eq.R_UNDEF)then 366 modis%Cloud_Fraction_High_Mean(ip)=missing_val 367 endif 368 if(modis%Cloud_Fraction_Mid_Mean(ip).eq.R_UNDEF)then 369 modis%Cloud_Fraction_Mid_Mean(ip)=missing_val 370 endif 371 if(modis%Cloud_Fraction_Total_Mean(ip).eq.R_UNDEF)then 372 modis%Cloud_Fraction_Total_Mean(ip)=missing_val 373 endif 374 if(modis%Cloud_Fraction_Water_Mean(ip).eq.R_UNDEF)then 375 modis%Cloud_Fraction_Water_Mean(ip)=missing_val 376 endif 377 if(modis%Cloud_Fraction_Ice_Mean(ip).eq.R_UNDEF)then 378 modis%Cloud_Fraction_Ice_Mean(ip)=missing_val 379 endif 380 if(modis%Optical_Thickness_Total_Mean(ip).eq.R_UNDEF)then 381 modis%Optical_Thickness_Total_Mean(ip)=missing_val 382 endif 383 if(modis%Optical_Thickness_Water_Mean(ip).eq.R_UNDEF)then 384 modis%Optical_Thickness_Water_Mean(ip)=missing_val 385 endif 386 if(modis%Optical_Thickness_Ice_Mean(ip).eq.R_UNDEF)then 387 modis%Optical_Thickness_Ice_Mean(ip)=missing_val 388 endif 389 if(modis%Cloud_Particle_Size_Water_Mean(ip).eq.R_UNDEF)then 390 modis%Cloud_Particle_Size_Water_Mean(ip)=missing_val 391 endif 392 if(modis%Cloud_Particle_Size_Ice_Mean(ip).eq.R_UNDEF)then 393 modis%Cloud_Particle_Size_Ice_Mean(ip)=missing_val 394 endif 395 if(modis%Cloud_Top_Pressure_Total_Mean(ip).eq.R_UNDEF)then 396 modis%Cloud_Top_Pressure_Total_Mean(ip)=missing_val 397 endif 398 if(modis%Liquid_Water_Path_Mean(ip).eq.R_UNDEF)then 399 modis%Liquid_Water_Path_Mean(ip)=missing_val 400 endif 401 if(modis%Ice_Water_Path_Mean(ip).eq.R_UNDEF)then 402 modis%Ice_Water_Path_Mean(ip)=missing_val 403 endif 404 405 enddo 406 407 where(modis%Optical_Thickness_Total_LogMean == R_UNDEF) & 338 408 modis%Optical_Thickness_Total_LogMean = missing_val 339 409 340 where(modis%Optical_Thickness_Water_LogMean == R_UNDEF) & 410 411 where(modis%Optical_Thickness_Water_LogMean == R_UNDEF) & 341 412 modis%Optical_Thickness_Water_LogMean = missing_val 342 413 343 where(modis%Optical_Thickness_Ice_LogMean == R_UNDEF) &414 where(modis%Optical_Thickness_Ice_LogMean == R_UNDEF) & 344 415 modis%Optical_Thickness_Ice_LogMean = missing_val 345 416 346 if (cfg%Lcllmodis) CALL histwrite2d_cosp(o_cllmodis,modis%Cloud_Fraction_Low_Mean) 347 if (cfg%Lclhmodis) CALL histwrite2d_cosp(o_clhmodis,modis%Cloud_Fraction_High_Mean) 348 if (cfg%Lclmmodis) CALL histwrite2d_cosp(o_clmmodis,modis%Cloud_Fraction_Mid_Mean) 349 if (cfg%Lcltmodis) CALL histwrite2d_cosp(o_cltmodis,modis%Cloud_Fraction_Total_Mean) 350 if (cfg%Lclwmodis) CALL histwrite2d_cosp(o_clwmodis,modis%Cloud_Fraction_Water_Mean) 351 if (cfg%Lclimodis) CALL histwrite2d_cosp(o_climodis,modis%Cloud_Fraction_Ice_Mean) 352 if (cfg%Ltautmodis) CALL histwrite2d_cosp(o_tautmodis,modis%Optical_Thickness_Total_Mean) 353 if (cfg%Ltauwmodis) CALL histwrite2d_cosp(o_tauwmodis,modis%Optical_Thickness_Water_Mean) 354 if (cfg%Ltauimodis) CALL histwrite2d_cosp(o_tauimodis,modis%Optical_Thickness_Ice_Mean) 355 if (cfg%Ltautlogmodis) CALL histwrite2d_cosp(o_tautlogmodis,modis%Optical_Thickness_Total_LogMean) 356 if (cfg%Ltauwlogmodis) CALL histwrite2d_cosp(o_tauwlogmodis,modis%Optical_Thickness_Water_LogMean) 357 if (cfg%Ltauilogmodis) CALL histwrite2d_cosp(o_tauilogmodis,modis%Optical_Thickness_Ice_LogMean) 358 if (cfg%Lreffclwmodis) CALL histwrite2d_cosp(o_reffclwmodis,modis%Cloud_Particle_Size_Water_Mean) 359 if (cfg%Lreffclimodis) CALL histwrite2d_cosp(o_reffclimodis,modis%Cloud_Particle_Size_Ice_Mean) 360 if (cfg%Lpctmodis) CALL histwrite2d_cosp(o_pctmodis,modis%Cloud_Top_Pressure_Total_Mean) 361 if (cfg%Llwpmodis) CALL histwrite2d_cosp(o_lwpmodis,modis%Liquid_Water_Path_Mean) 362 if (cfg%Liwpmodis) CALL histwrite2d_cosp(o_iwpmodis,modis%Ice_Water_Path_Mean) 363 364 where(modis%Optical_Thickness_vs_Cloud_Top_Pressure == R_UNDEF) & 365 modis%Optical_Thickness_vs_Cloud_Top_Pressure = missing_val 366 367 #ifdef CPP_XIOS 368 if (cfg%Lclmodis) CALL histwrite4d_cosp(o_clmodis,modis%Optical_Thickness_vs_Cloud_Top_Pressure) 417 CALL histwrite2d_cosp(o_cllmodis,modis%Cloud_Fraction_Low_Mean) 418 CALL histwrite2d_cosp(o_clhmodis,modis%Cloud_Fraction_High_Mean) 419 CALL histwrite2d_cosp(o_clmmodis,modis%Cloud_Fraction_Mid_Mean) 420 CALL histwrite2d_cosp(o_cltmodis,modis%Cloud_Fraction_Total_Mean) 421 CALL histwrite2d_cosp(o_clwmodis,modis%Cloud_Fraction_Water_Mean) 422 CALL histwrite2d_cosp(o_climodis,modis%Cloud_Fraction_Ice_Mean) 423 CALL histwrite2d_cosp(o_tautmodis,modis%Optical_Thickness_Total_Mean) 424 CALL histwrite2d_cosp(o_tauwmodis,modis%Optical_Thickness_Water_Mean) 425 CALL histwrite2d_cosp(o_tauimodis,modis%Optical_Thickness_Ice_Mean) 426 CALL histwrite2d_cosp(o_tautlogmodis,modis%Optical_Thickness_Total_LogMean) 427 CALL histwrite2d_cosp(o_tauwlogmodis,modis%Optical_Thickness_Water_LogMean) 428 CALL histwrite2d_cosp(o_tauilogmodis,modis%Optical_Thickness_Ice_LogMean) 429 CALL histwrite2d_cosp(o_reffclwmodis,modis%Cloud_Particle_Size_Water_Mean) 430 CALL histwrite2d_cosp(o_reffclimodis,modis%Cloud_Particle_Size_Ice_Mean) 431 CALL histwrite2d_cosp(o_pctmodis,modis%Cloud_Top_Pressure_Total_Mean) 432 CALL histwrite2d_cosp(o_lwpmodis,modis%Liquid_Water_Path_Mean) 433 CALL histwrite2d_cosp(o_iwpmodis,modis%Ice_Water_Path_Mean) 434 435 do ip=1,Npoints 436 do ii=1,7 437 do k=1,7 438 if(modis%Optical_Thickness_vs_Cloud_Top_Pressure(ip,ii,k).eq.R_UNDEF)then 439 modis%Optical_Thickness_vs_Cloud_Top_Pressure(ip,ii,k)=missing_val 440 endif 441 enddo 442 enddo 443 enddo 444 445 #ifdef CPP_XIOS 446 CALL histwrite4d_cosp(o_clmodis,modis%Optical_Thickness_vs_Cloud_Top_Pressure) 369 447 #else 370 if (cfg%Lclmodis) then371 448 do icl=1,7 372 449 CALL histwrite3d_cosp(o_clmodis, & 373 450 modis%Optical_Thickness_vs_Cloud_Top_Pressure(:,icl,:),nvertisccp,icl) 374 451 enddo 375 endif376 452 #endif 377 453 … … 383 459 384 460 #ifdef CPP_XIOS 385 if (cfg%Lcrimodis) CALL histwrite4d_cosp(o_crimodis,modis%Optical_Thickness_vs_ReffIce) 386 if (cfg%Lcrlmodis) CALL histwrite4d_cosp(o_crlmodis,modis%Optical_Thickness_vs_ReffLiq) 461 ! print*,'dimension de crimodis=',size(modis%Optical_Thickness_vs_ReffIce,2),& 462 ! size(modis%Optical_Thickness_vs_ReffIce,3) 463 CALL histwrite4d_cosp(o_crimodis,modis%Optical_Thickness_vs_ReffIce) 464 CALL histwrite4d_cosp(o_crlmodis,modis%Optical_Thickness_vs_ReffLiq) 387 465 #else 388 if (cfg%Lcrimodis) then389 466 do icl=1,7 390 CALL histwrite3d_cosp(o_crimodis, & 391 modis%Optical_Thickness_vs_ReffIce(:,icl,:),nvertReffIce,icl) 467 CALL histwrite3d_cosp(o_crimodis, & 468 modis%Optical_Thickness_vs_ReffIce(:,icl,:),nvertReffIce,icl) 469 CALL histwrite3d_cosp(o_crlmodis, & 470 modis%Optical_Thickness_vs_ReffLiq(:,icl,:),nvertReffLiq,icl) 392 471 enddo 393 endif 394 if (cfg%Lcrlmodis) then 395 do icl=1,7 396 CALL histwrite3d_cosp(o_crlmodis, & 397 modis%Optical_Thickness_vs_ReffLiq(:,icl,:),nvertReffLiq,icl) 398 enddo 399 endif 400 #endif 401 endif !modis 472 #endif 473 endif 402 474 403 475 IF(.NOT.cosp_varsdefined) THEN … … 843 915 844 916 #ifdef CPP_XIOS 845 !IF (ok_all_xml) THEN917 IF (ok_all_xml) THEN 846 918 CALL xios_send_field(var%name, Field4d(:,:,1:nlev,1:nlev2)) 847 919 IF (prt_level >= 1) WRITE(lunout,*)'xios_send_field ',var%name 848 !ENDIF920 ENDIF 849 921 #endif 850 922 -
LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cosp/lidar_simulator.F90
r3356 r3411 121 121 !--------------------------------------------------------------------------------- 122 122 123 USE MOD_COSP_CONSTANTS, only : ok_debug_cosp124 123 IMPLICIT NONE 125 124 REAL :: SRsat … … 202 201 REAL pnorm_perp_liq(npoints,nlev) ! perpendicular lidar backscattered signal power for liq 203 202 204 REAL :: seuil205 206 203 ! Output variable 207 204 REAL pnorm_perp_tot (npoints,nlev) ! perpendicular lidar backscattered signal power … … 238 235 Gamma = 0.009 239 236 240 if (ok_debug_cosp) then241 seuil=1.e-18242 else243 seuil=0.0244 endif245 237 !------------------------------------------------------------ 246 238 !---- 1. Preliminary definitions and calculations : … … 502 494 503 495 DO k= nlev, 1, -1 504 505 496 pnorm_perp_ice(:,k) = Alpha * pnorm_ice(:,k) ! Ice particles 497 pnorm_perp_liq(:,k) = 1000*Beta * pnorm_liq(:,k)**2 + Gamma * pnorm_liq(:,k) ! Liquid particles 506 498 ENDDO 507 499 … … 531 523 tautot_lay_liq(:) = tautot_liq(:,k)-tautot_liq(:,k+1) 532 524 WHERE (tautot_lay_liq(:).GT.0.) 533 beta_perp_liq(:,k) = pnorm_perp_liq(:,k)/ max(seuil,EXP(-2.0*tautot_liq(:,k+1))) &534 & * (2.*tautot_lay_liq(:))/ (1.-exp(-2.0*tautot_lay_liq(:)))525 beta_perp_liq(:,k) = pnorm_perp_liq(:,k)/ EXP(-2.0*tautot_liq(:,k+1)) * (2.*tautot_lay_liq(:)) & 526 & / (1.-exp(-2.0*tautot_lay_liq(:))) 535 527 536 528 ELSEWHERE -
LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cosp/phys_cosp.F90
r3356 r3411 84 84 use cosp_output_write_mod 85 85 ! use MOD_COSP_Modis_Simulator, only : cosp_modis 86 #ifdef CPP_XIOS87 USE xios, ONLY: xios_field_is_active88 #endif89 use cosp_read_otputkeys90 86 91 87 IMPLICIT NONE … … 140 136 !$OMP THREADPRIVATE(debut_cosp) 141 137 142 logical, save :: first_write=.true.143 !$OMP THREADPRIVATE(first_write)144 145 138 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Input variables from LMDZ-GCM 146 139 integer :: overlaplmdz ! overlap type: 1=max, 2=rand, 3=max/rand ! cosp input (output lmdz) … … 154 147 real :: dtime,freq_cosp 155 148 real,dimension(2) :: time_bnds 156 157 double precision :: d_dtime158 double precision,dimension(2) :: d_time_bnds159 149 160 real,dimension(2,SR_BINS) :: sratio_bounds161 real,dimension(SR_BINS) :: sratio_ax162 163 150 namelist/COSP_INPUT/overlap,isccp_topheight,isccp_topheight_direction, & 164 151 npoints_it,ncolumns,use_vgrid,nlr,csat_vgrid, & … … 170 157 171 158 !---------------- End of declaration of variables -------------- 159 172 160 173 161 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ … … 182 170 CALL read_cosp_input 183 171 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 172 ! Clefs Outputs 173 call read_cosp_output_nl(cosp_output_nl,cfg) 191 174 192 175 if (overlaplmdz.ne.overlap) then … … 195 178 print*,'Fin lecture Namelists, debut_cosp =',debut_cosp 196 179 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_sim 183 197 184 endif ! debut_cosp 198 199 !!! Ici on modifie les cles logiques pour les outputs selon les champs actives dans les .xml200 if ((itap.gt.1).and.(first_write))then201 #ifdef CPP_XIOS202 call read_xiosfieldactive(cfg)203 #else204 call read_cosp_output_nl(itap,cosp_output_nl,cfg)205 #endif206 first_write=.false.207 208 print*,' Cles des differents simulateurs cosp a itap :',itap209 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%Lstats212 endif213 185 214 186 time_bnds(1) = dtime-dtime/2. 215 187 time_bnds(2) = dtime+dtime/2. 216 188 217 d_time_bnds=time_bnds 218 d_dtime=dtime 219 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 220 191 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 221 192 ! Allocate memory for gridbox type … … 224 195 ! print *, 'Allocating memory for gridbox type...' 225 196 197 !! AI 198 ! 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) 226 204 ! Surafce emissivity 227 205 emsfc_lw = 1. 228 206 229 call construct_cosp_gridbox(d _dtime,d_time_bnds,radar_freq,surface_radar,use_mie_tables,use_gas_abs, &207 call construct_cosp_gridbox(dtime,time_bnds,radar_freq,surface_radar,use_mie_tables,use_gas_abs, & 230 208 do_ray,melt_lay,k2, & 231 209 Npoints,Nlevels,Ncolumns,N_HYDRO,Nprmts_max_hydro,Naero,Nprmts_max_aero,Npoints_it, & … … 343 321 344 322 !+++++++++++++ Open output files and define output files axis !+++++++++++++ 345 !if (debut_cosp) then323 if (debut_cosp) then 346 324 347 325 !$OMP MASTER 348 !print *, ' Open outpts files and define axis'326 print *, ' Open outpts files and define axis' 349 327 call cosp_output_open(Nlevlmdz, Ncolumns, presnivs, dtime, freq_cosp, & 350 328 ok_mensuelCOSP, ok_journeCOSP, ok_hfCOSP, ok_all_xml, & … … 353 331 !$OMP BARRIER 354 332 debut_cosp=.false. 355 ! endif ! debut_cosp 356 ! else 333 endif ! debut_cosp 357 334 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 358 335 ! Call simulator … … 367 344 !#endif 368 345 !! 346 369 347 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 370 348 … … 375 353 cfg, gbx, vgrid, sglidar, sgradar, stlidar, stradar, & 376 354 isccp, misr, modis) 377 ! endif !debut_cosp 355 378 356 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 379 357 ! Deallocate memory in derived types 380 358 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 381 print *, 'Deallocating memory...'359 ! print *, 'Deallocating memory...' 382 360 call free_cosp_gridbox(gbx) 383 361 call free_cosp_subgrid(sgx) -
LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cosp/radar_simulator_types.F90
r3356 r3411 4 4 ! Part of QuickBeam v1.03 by John Haynes 5 5 ! Updated by Roj Marchand June 2010 6 implicit none 6 7 7 integer, parameter :: & 8 8 maxhclass = 20 ,& ! max number of hydrometeor classes
Note: See TracChangeset
for help on using the changeset viewer.