[1262] | 1 | ! Ecriture des fichiers de sorties COSP |
---|
| 2 | ! Sorties journalierres |
---|
| 3 | ! Abderrahmane Idelkadi Septembre 2009 |
---|
| 4 | |
---|
| 5 | IF (MOD(itap,NINT(freq_COSP/dtime)).EQ.0) THEN |
---|
| 6 | |
---|
| 7 | itau_wcosp = itau_phy + itap |
---|
| 8 | |
---|
| 9 | ! Sorties LIDAR |
---|
| 10 | if (cfg%Llidar_sim) then |
---|
| 11 | if (cfg%Lcllcalipso) then |
---|
[1535] | 12 | CALL histwrite_phy(nid_hf_cosp,lCOSP,"cllcalipso", & |
---|
| 13 | itau_wcosp,stlidar%cldlayer(:,1)) |
---|
[1262] | 14 | endif |
---|
| 15 | if (cfg%Lclhcalipso) then |
---|
[1535] | 16 | CALL histwrite_phy(nid_hf_cosp,lCOSP,"clhcalipso", & |
---|
| 17 | itau_wcosp,stlidar%cldlayer(:,3)) |
---|
[1262] | 18 | endif |
---|
| 19 | if (cfg%Lclmcalipso) then |
---|
[1535] | 20 | CALL histwrite_phy(nid_hf_cosp,lCOSP,"clmcalipso", & |
---|
| 21 | itau_wcosp,stlidar%cldlayer(:,2)) |
---|
[1262] | 22 | endif |
---|
| 23 | if (cfg%Lcltcalipso) then |
---|
[1535] | 24 | CALL histwrite_phy(nid_hf_cosp,lCOSP,"cltcalipso", & |
---|
| 25 | itau_wcosp,stlidar%cldlayer(:,4)) |
---|
[1262] | 26 | endif |
---|
| 27 | if (cfg%Lclcalipso) then |
---|
[1535] | 28 | CALL histwrite_phy(nid_hf_cosp,lCOSP,"clcalipso", & |
---|
| 29 | itau_wcosp,stlidar%lidarcld) |
---|
[1262] | 30 | endif |
---|
| 31 | if (cfg%Lcfad_lidarsr532) then |
---|
| 32 | do ii=1,SR_BINS |
---|
[1535] | 33 | CALL histwrite_phy(nid_hf_cosp,lCOSP, & |
---|
| 34 | "cfad_lidarsr532_"//chcol(ii),itau_wcosp,stlidar%cfad_sr(:,ii,:)) |
---|
[1262] | 35 | enddo |
---|
| 36 | endif |
---|
| 37 | if (cfg%Lparasol_refl) then |
---|
[1535] | 38 | CALL histwrite_phy(nid_hf_cosp,lCOSP,"parasol_refl", & |
---|
| 39 | itau_wcosp,stlidar%parasolrefl) |
---|
[1928] | 40 | CALL histwrite_phy(nid_hf_cosp,lCOSP,"parasol_crefl", & |
---|
| 41 | itau_wcosp,parasolcrefl) |
---|
| 42 | CALL histwrite_phy(nid_hf_cosp,lCOSP,"Ncrefl", & |
---|
| 43 | itau_wcosp,Ncref) |
---|
[1262] | 44 | endif |
---|
| 45 | if (cfg%Latb532) then |
---|
| 46 | do ii=1,Ncolumns |
---|
[1535] | 47 | CALL histwrite_phy(nid_hf_cosp,lCOSP,"atb532_"//chcol(ii), & |
---|
| 48 | itau_wcosp,sglidar%beta_tot(:,ii,:)) |
---|
[1262] | 49 | enddo |
---|
| 50 | endif |
---|
| 51 | if (cfg%Lbeta_mol532) then |
---|
[1535] | 52 | CALL histwrite_phy(nid_hf_cosp,lCOSP,"beta_mol532", & |
---|
| 53 | itau_wcosp,sglidar%beta_mol) |
---|
[1262] | 54 | endif |
---|
| 55 | endif ! Lidar |
---|
| 56 | |
---|
| 57 | ! Sorties RADAR |
---|
| 58 | !Attention A FAIRE |
---|
| 59 | ! if (cfg%Lradar_sim) then |
---|
| 60 | ! print*,'Ecriture sorties Radar' |
---|
| 61 | ! if (cfg%Lcfad_dbze94) then |
---|
| 62 | ! print*,'Ecriture de cfad_dbze94.nc ' |
---|
| 63 | ! A revoir l axe vertical Nlvgrid |
---|
| 64 | ! do ii=1,DBZE_BINS |
---|
| 65 | ! dbze_ax(ii) = CFAD_ZE_MIN + CFAD_ZE_WIDTH*(ii - 0.5) |
---|
| 66 | ! enddo |
---|
| 67 | ! call write_netcdf4d('cfad_dbze94.nc',use_vgrid,nlon,nlat,Nlevout,DBZE_BINS, & |
---|
| 68 | ! x,y,out_levs,dbze_ax,i,ndays,time,stradar%cfad_ze) |
---|
| 69 | ! endif |
---|
| 70 | ! if (cfg%Lclcalipso2) then |
---|
| 71 | ! call write_netcdf3d('clcalipso2.nc',use_vgrid,'clcalipso2', & |
---|
| 72 | ! nlon,nlat,Nlevout,x,y,out_levs,i,ndays,time,stradar%lidar_only_freq_cloud) |
---|
| 73 | ! endif |
---|
| 74 | ! if (cfg%Ldbze94) then |
---|
| 75 | ! do ii=1,Ncolumns |
---|
| 76 | ! xcol(ii)=float(i) |
---|
| 77 | ! enddo |
---|
| 78 | ! call write_netcdf4d('dbze94.nc',use_vgrid,nlon,nlat,Nlevout,Ncolumns, & |
---|
| 79 | ! x,y,out_levs,xcol,i,ndays,time,sgradar%Ze_tot) |
---|
| 80 | ! endif |
---|
| 81 | ! if (cfg%Lcltlidarradar) then |
---|
| 82 | ! call write_netcdf2d('cltlidarradar.nc','cltlidarradar', & |
---|
| 83 | ! nlon,nlat,x,y,i,ndays,time,stradar%radar_lidar_tcc) |
---|
| 84 | ! endif |
---|
| 85 | ! endif ! Radar |
---|
| 86 | |
---|
| 87 | ! Sorties MISR |
---|
| 88 | !Attention A FAIRE |
---|
| 89 | ! if (cfg%Lmisr_sim) then |
---|
| 90 | ! print*,'Ecriture sorties Misr' |
---|
| 91 | ! call write_netcdf4d('clMISR.nc',use_vgrid,nlon,nlat,MISR_N_CTH,7, & |
---|
| 92 | ! x,y,MISR_CTH,ISCCP_TAU,i,ndays,time,misr%fq_MISR) |
---|
| 93 | ! endif |
---|
| 94 | |
---|
| 95 | ! Sorties ISCCP |
---|
| 96 | if (cfg%Lisccp_sim) then |
---|
[1928] | 97 | |
---|
| 98 | CALL histwrite_phy(nid_hf_cosp,lCOSP,"sunlit", & |
---|
| 99 | itau_wcosp,gbx%sunlit) |
---|
[1262] | 100 | if (cfg%Lclisccp2) then |
---|
| 101 | do ii=1,7 |
---|
[1535] | 102 | CALL histwrite_phy(nid_hf_cosp,lCOSP, & |
---|
| 103 | "clisccp2_"//chcol(ii),itau_wcosp,isccp%fq_isccp(:,ii,:)) |
---|
[1262] | 104 | enddo |
---|
| 105 | endif |
---|
| 106 | if (cfg%Lboxtauisccp) then |
---|
[1535] | 107 | CALL histwrite_phy(nid_hf_cosp,lCOSP,"boxtauisccp", & |
---|
| 108 | itau_wcosp,isccp%boxtau) |
---|
[1262] | 109 | endif |
---|
| 110 | if (cfg%Lboxptopisccp) then |
---|
[1535] | 111 | CALL histwrite_phy(nid_hf_cosp,lCOSP,"boxptopisccp", & |
---|
| 112 | itau_wcosp,isccp%boxptop) |
---|
[1262] | 113 | endif |
---|
| 114 | if (cfg%Ltclisccp) then |
---|
[1535] | 115 | CALL histwrite_phy(nid_hf_cosp,lCOSP,"tclisccp", & |
---|
| 116 | itau_wcosp,isccp%totalcldarea) |
---|
[1262] | 117 | endif |
---|
| 118 | if (cfg%Lctpisccp) then |
---|
[1535] | 119 | CALL histwrite_phy(nid_hf_cosp,lCOSP,"ctpisccp", & |
---|
| 120 | itau_wcosp,isccp%meanptop) |
---|
[1262] | 121 | |
---|
| 122 | endif |
---|
| 123 | if (cfg%Ltauisccp) then |
---|
[1535] | 124 | CALL histwrite_phy(nid_hf_cosp,lCOSP,"tauisccp", & |
---|
| 125 | itau_wcosp,isccp%meantaucld) |
---|
[1262] | 126 | endif |
---|
| 127 | if (cfg%Lalbisccp) then |
---|
[1535] | 128 | CALL histwrite_phy(nid_hf_cosp,lCOSP,"albisccp", & |
---|
| 129 | itau_wcosp,isccp%meanalbedocld) |
---|
[1262] | 130 | endif |
---|
| 131 | if (cfg%Lmeantbisccp) then |
---|
[1535] | 132 | CALL histwrite_phy(nid_hf_cosp,lCOSP,"meantbisccp", & |
---|
| 133 | itau_wcosp,isccp%meantb) |
---|
[1262] | 134 | endif |
---|
| 135 | if (cfg%Lmeantbclrisccp) then |
---|
[1535] | 136 | CALL histwrite_phy(nid_hf_cosp,lCOSP,"meantbclrisccp", & |
---|
| 137 | itau_wcosp,isccp%meantbclr) |
---|
[1262] | 138 | endif |
---|
| 139 | endif ! Isccp |
---|
| 140 | |
---|
| 141 | ! if (ok_sync) then |
---|
| 142 | !$OMP MASTER |
---|
| 143 | call histsync(nid_hf_cosp) |
---|
| 144 | !$OMP END MASTER |
---|
| 145 | ! endif |
---|
| 146 | |
---|
| 147 | ENDIF ! if freq_COSP |
---|