source: LMDZ4/branches/LMDZ4_AR5/libf/cosp/phys_cosp.F90 @ 1528

Last change on this file since 1528 was 1528, checked in by idelkadi, 13 years ago

Les modificaions concerne la partie Lidar du simulateur COSP :

  1. Correction dans phys_cosp.F90 du bug sur le calcul des altitudes aux milieux et aux interfaces des couches
  2. Rajout du teste "Lidar parfait" (iflag_testlidar=.true. dans lidar_simulator.F90)
  3. Correction d'une erreur sur la dimension du tableau frac_out dans cosp_lidar.F90
  4. Sories sur les niveaux presnivs du modele dans le cas ou l'on desactive l'interpolation sur les 40 niveaux COSP
File size: 19.5 KB
Line 
1! Simulateur COSP : Cfmip Observation Simulator Package
2
3! ISCCP, Radar (QuickBeam), Lidar et Parasol (ACTSIM), MISR, RTTOVS
4!Idelkadi Abderrahmane Aout-Septembre 2009
5
6  subroutine phys_cosp( itap,dtime,freq_cosp, &
7                        ok_mensuelCOSP,ok_journeCOSP,ok_hfCOSP, &
8                        ecrit_mth,ecrit_day,ecrit_hf, &
9                        Nptslmdz,Nlevlmdz,lon,lat, presnivs,overlaplmdz, &
10                        ref_liq,ref_ice,fracTerLic,u_wind,v_wind,phis,phi,ph,p,skt,t, &
11                        sh,rh,tca,cca,mr_lsliq,mr_lsice,fl_lsrainI,fl_lssnowI, &
12                        fl_ccrainI,fl_ccsnowI,mr_ozone,dtau_s,dem_s)
13
14!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15!!!! Inputs :
16! itap,                                 !Increment de la physiq
17! dtime,                                !Pas de temps physiq
18! overlap,                              !Overlap type in SCOPS
19! Npoints,                              !Nb de points de la grille physiq
20! Nlevels,                              !Nb de niveaux verticaux
21! Ncolumns,                             !Number of subcolumns
22! lon,lat,                              !Longitudes et latitudes de la grille LMDZ
23! ref_liq,ref_ice,                      !Rayons effectifs des particules liq et ice (en microm)
24! fracTerLic,                               !Fraction terre a convertir en masque
25! u_wind,v_wind,                        !Vents a 10m ???
26! phi,                                  !Geopotentiel
27! phis,                                  !Geopotentiel sol
28! ph,                                   !pression pour chaque inter-couche
29! p,                                    !Pression aux milieux des couches
30! skt,t,                                !Temp au sol et temp 3D
31! sh,                                   !Humidite specifique
32! rh,                                   !Humidite relatif
33! tca,                                  !Fraction nuageuse
34! cca                                   !Fraction nuageuse convective
35! mr_lsliq,                             !Liq Cloud water content
36! mr_lsice,                             !Ice Cloud water content
37! mr_ccliq,                             !Convective Cloud Liquid water content 
38! mr_ccice,                             !Cloud ice water content
39! fl_lsrain,                            !Large scale precipitation lic
40! fl_lssnow,                            !Large scale precipitation ice
41! fl_ccrain,                            !Convective precipitation lic
42! fl_ccsnow,                            !Convective precipitation ice
43! mr_ozone,                             !Concentration ozone (Kg/Kg)
44! dem_s                                 !Cloud optical emissivity
45! dtau_s                                !Cloud optical thickness
46! emsfc_lw = 1.                         !Surface emissivity dans radlwsw.F90
47
48!!! Outputs :
49! calipso2D,                            !Lidar Low/heigh/Mean/Total-level Cloud Fraction
50! calipso3D,                            !Lidar Cloud Fraction (532 nm)
51! cfadlidar,                            !Lidar Scattering Ratio CFAD (532 nm)
52! parasolrefl,                          !PARASOL-like mono-directional reflectance
53! atb,                                  !Lidar Attenuated Total Backscatter (532 nm)
54! betamol,                              !Lidar Molecular Backscatter (532 nm)
55! cfaddbze,                             !Radar Reflectivity Factor CFAD (94 GHz)
56! clcalipso2,                           !Cloud frequency of occurrence as seen by CALIPSO but not CloudSat
57! dbze,                                 !Efective_reflectivity_factor
58! cltlidarradar,                        !Lidar and Radar Total Cloud Fraction
59! clMISR,                               !Cloud Fraction as Calculated by the MISR Simulator
60! clisccp2,                             !Cloud Fraction as Calculated by the ISCCP Simulator
61! boxtauisccp,                          !Optical Depth in Each Column as Calculated by the ISCCP Simulator
62! boxptopisccp,                         !Cloud Top Pressure in Each Column as Calculated by the ISCCP Simulator
63! tclisccp,                             !Total Cloud Fraction as Calculated by the ISCCP Simulator
64! ctpisccp,                             !Mean Cloud Top Pressure as Calculated by the ISCCP Simulator
65! tauisccp,                             !Mean Optical Depth as Calculated by the ISCCP Simulator
66! albisccp,                             !Mean Cloud Albedo as Calculated by the ISCCP Simulator
67! meantbisccp,                          !Mean all-sky 10.5 micron brightness temperature as calculated by the ISCCP Simulator
68! meantbclrisccp                        !Mean clear-sky 10.5 micron brightness temperature as calculated by the ISCCP Simulator
69!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
70
71  USE MOD_COSP_CONSTANTS
72  USE MOD_COSP_TYPES
73  USE MOD_COSP
74  USE mod_phys_lmdz_para
75  USE mod_grid_phy_lmdz
76  use ioipsl
77  use iophy
78 
79  IMPLICIT NONE
80
81  ! Local variables
82  character(len=64),PARAMETER  :: cosp_input_nl='cosp_input_nl.txt'
83  character(len=64),PARAMETER  :: cosp_output_nl='cosp_output_nl.txt'
84  character(len=512), save :: finput ! Input file name
85  character(len=512), save :: cmor_nl
86  integer, save :: isccp_topheight,isccp_topheight_direction,overlap
87  integer,save  :: Ncolumns     ! Number of subcolumns in SCOPS
88!  integer,parameter :: Ncollmdz=20
89  integer,parameter :: Ncolmax=100
90  integer, save :: Npoints      ! Number of gridpoints
91!$OMP THREADPRIVATE(Npoints)
92  integer, save :: Nlevels      ! Number of levels
93  Integer :: Nptslmdz,Nlevlmdz ! Nb de points issus de physiq.F
94  integer, save :: Nlr          ! Number of levels in statistical outputs
95  integer, save :: Npoints_it   ! Max number of gridpoints to be processed in one iteration
96  integer :: i
97  type(cosp_config),save :: cfg   ! Configuration options
98!$OMP THREADPRIVATE(cfg)
99  type(cosp_gridbox) :: gbx ! Gridbox information. Input for COSP
100  type(cosp_subgrid) :: sgx     ! Subgrid outputs
101  type(cosp_sgradar) :: sgradar ! Output from radar simulator
102  type(cosp_sglidar) :: sglidar ! Output from lidar simulator
103  type(cosp_isccp)   :: isccp   ! Output from ISCCP simulator
104  type(cosp_misr)    :: misr    ! Output from MISR simulator
105  type(cosp_vgrid)   :: vgrid   ! Information on vertical grid of stats
106  type(cosp_radarstats) :: stradar ! Summary statistics from radar simulator
107  type(cosp_lidarstats) :: stlidar ! Summary statistics from lidar simulator
108
109  integer :: t0,t1,count_rate,count_max
110  integer :: Nlon,Nlat,geomode
111  real,save :: radar_freq,k2,ZenAng,co2,ch4,n2o,co,emsfc_lw
112!$OMP THREADPRIVATE(emsfc_lw)
113  integer,dimension(RTTOV_MAX_CHANNELS),save :: Channels
114  real,dimension(RTTOV_MAX_CHANNELS),save :: Surfem
115  integer, save :: surface_radar,use_mie_tables,use_gas_abs,do_ray,melt_lay
116  integer, save :: Nprmts_max_hydro,Naero,Nprmts_max_aero,lidar_ice_type
117  integer, save :: platform,satellite,Instrument,Nchannels
118  logical, save :: use_vgrid,csat_vgrid,use_precipitation_fluxes,use_reff
119
120! Declaration necessaires pour les sorties IOIPSL
121  integer :: ii,idayref
122  real    :: zjulian,zstoday,zstomth,zstohf,zout,ecrit_day,ecrit_hf,ecrit_mth
123  logical :: ok_mensuelCOSP,ok_journeCOSP,ok_hfCOSP
124  integer :: nhori,nvert,nvertp,nvertisccp,nvertm,nvertcol
125  integer, save :: nid_day_cosp,nid_mth_cosp,nid_hf_cosp
126!$OMP THREADPRIVATE(nid_day_cosp,nid_mth_cosp,nid_hf_cosp)
127  logical, save :: debut_cosp=.true.
128!$OMP THREADPRIVATE(debut_cosp)
129  integer :: itau_wcosp
130  character(len=2) :: str2
131  real,dimension(Ncolmax) :: column_ax
132  character(len=10),save,dimension(Ncolmax) :: chcol
133
134  integer, save :: Nlevout
135!$OMP THREADPRIVATE(Nlevout)
136
137  include "dimensions.h"
138  include "temps.h" 
139 
140!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Input variables from LMDZ-GCM
141  integer                         :: overlaplmdz   !  overlap type: 1=max, 2=rand, 3=max/rand ! cosp input (output lmdz)
142  real,dimension(Nptslmdz,Nlevlmdz) :: height,phi,p,ph,T,sh,rh,tca,cca,mr_lsliq,mr_lsice,mr_ccliq,mr_ccice, &
143                                     fl_lsrain,fl_lssnow,fl_ccrain,fl_ccsnow,fl_lsgrpl, &
144                                     zlev,zlev_half,mr_ozone,radliq,radice,dtau_s,dem_s,ref_liq,ref_ice
145  real,dimension(Nptslmdz,Nlevlmdz) ::  fl_lsrainI,fl_lssnowI,fl_ccrainI,fl_ccsnowI
146  real,dimension(Nptslmdz)        :: lon,lat,skt,fracTerLic,u_wind,v_wind,phis
147  real,dimension(Nlevlmdz)        :: presnivs
148  integer                         :: itap,k,ip
149  real                            :: dtime,freq_cosp
150
151!
152   namelist/COSP_INPUT/cmor_nl,overlap,isccp_topheight,isccp_topheight_direction, &
153              npoints_it,ncolumns,nlevels,use_vgrid,nlr,csat_vgrid,finput, &
154              radar_freq,surface_radar,use_mie_tables, &
155              use_gas_abs,do_ray,melt_lay,k2,Nprmts_max_hydro,Naero,Nprmts_max_aero, &
156              lidar_ice_type,use_precipitation_fluxes,use_reff, &
157              platform,satellite,Instrument,Nchannels, &
158              Channels,Surfem,ZenAng,co2,ch4,n2o,co
159
160!---------------- End of declaration of variables --------------
161   
162
163!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
164! Read namelist with COSP inputs
165!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
166
167 if (debut_cosp) then
168  NPoints=Nptslmdz
169  Nlevels=Nlevlmdz
170 
171! Lecture du namelist input
172  CALL read_cosp_input
173
174  do ii=1,Ncolumns
175    write(str2,'(i2.2)')ii
176    chcol(ii)="c"//str2
177    column_ax(ii) = real(ii)
178  enddo
179
180! Clefs Outputs
181  call read_cosp_output_nl(cosp_output_nl,cfg)
182
183    if (overlaplmdz.ne.overlap) then
184       print*,'Attention overlaplmdz different de overlap lu dans namelist '
185    endif
186   print*,'Fin lecture Namelists, debut_cosp =',debut_cosp
187
188  print*,' Cles sorties cosp :'
189  print*,' Lradar_sim,Llidar_sim,Lisccp_sim,Lmisr_sim,Lrttov_sim', &
190          cfg%Lradar_sim,cfg%Llidar_sim,cfg%Lisccp_sim,cfg%Lmisr_sim,cfg%Lrttov_sim
191
192  endif ! debut_cosp
193
194  print*,'Debut phys_cosp itap,dtime,freq_cosp,ecrit_mth,ecrit_day,ecrit_hf ', &
195          itap,dtime,freq_cosp,ecrit_mth,ecrit_day,ecrit_hf
196!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
197! Allocate local arrays
198!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
199!        call system_clock(t0,count_rate,count_max) !!! Only for testing purposes
200       
201       
202!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
203! Allocate memory for gridbox type
204!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
205        print *, 'Allocating memory for gridbox type...'
206
207        call construct_cosp_gridbox(dble(itap),radar_freq,surface_radar,use_mie_tables,use_gas_abs,do_ray,melt_lay,k2, &
208                                    Npoints,Nlevels,Ncolumns,N_HYDRO,Nprmts_max_hydro,Naero,Nprmts_max_aero,Npoints_it, &
209                                    lidar_ice_type,isccp_topheight,isccp_topheight_direction,overlap,emsfc_lw, &
210                                    use_precipitation_fluxes,use_reff, &
211                                    Platform,Satellite,Instrument,Nchannels,ZenAng, &
212                                    channels(1:Nchannels),surfem(1:Nchannels),co2,ch4,n2o,co,gbx)
213       
214!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
215! Here code to populate input structure
216!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
217
218        print *, 'Populating input structure...'
219        gbx%longitude = lon
220        gbx%latitude = lat
221
222        gbx%p = p !
223        gbx%ph = ph
224        gbx%zlev = phi/9.81
225
226        zlev_half(:,1) = phis(:)/9.81
227        do k = 2, Nlevels
228          do ip = 1, Npoints
229           zlev_half(ip,k) = phi(ip,k)/9.81 + &
230               (phi(ip,k)-phi(ip,k-1))/9.81 * (ph(ip,k)-p(ip,k)) / (p(ip,k)-p(ip,k-1))
231          enddo
232        enddo
233        gbx%zlev_half = zlev_half
234
235        gbx%T = T
236        gbx%q = rh*100.
237        gbx%sh = sh
238        gbx%cca = cca !convective_cloud_amount (1)
239        gbx%tca = tca ! total_cloud_amount (1)
240        gbx%psfc = ph(:,1) !pression de surface
241        gbx%skt  = skt !Skin temperature (K)
242
243        do ip = 1, Npoints
244          if (fracTerLic(ip).ge.0.5) then
245             gbx%land(ip) = 1.
246          else
247             gbx%land(ip) = 0.
248          endif
249        enddo
250        gbx%mr_ozone  = mr_ozone !mass_fraction_of_ozone_in_air (kg/kg)
251! A voir l equivalent LMDZ (u10m et v10m)
252        gbx%u_wind  = u_wind !eastward_wind (m s-1)
253        gbx%v_wind  = v_wind !northward_wind
254! Attention
255        gbx%sunlit  = 1
256
257! A voir l equivalent LMDZ
258  mr_ccliq = 0.0
259  mr_ccice = 0.0
260        gbx%mr_hydro(:,:,I_LSCLIQ) = mr_lsliq !mixing_ratio_large_scale_cloud_liquid (kg/kg)
261        gbx%mr_hydro(:,:,I_LSCICE) = mr_lsice !mixing_ratio_large_scale_cloud_ic
262        gbx%mr_hydro(:,:,I_CVCLIQ) = mr_ccliq !mixing_ratio_convective_cloud_liquid
263        gbx%mr_hydro(:,:,I_CVCICE) = mr_ccice !mixing_ratio_convective_cloud_ice
264! A revoir
265        fl_lsrain = fl_lsrainI + fl_ccrainI
266        fl_lssnow = fl_lssnowI + fl_ccsnowI
267        gbx%rain_ls = fl_lsrain !flux_large_scale_cloud_rain (kg m^-2 s^-1)
268        gbx%snow_ls = fl_lssnow !flux_large_scale_cloud_snow
269!  A voir l equivalent LMDZ
270        fl_lsgrpl=0.
271        fl_ccsnow = 0.
272        fl_ccrain = 0.
273        gbx%grpl_ls = fl_lsgrpl  !flux_large_scale_cloud_graupel
274        gbx%rain_cv = fl_ccrain  !flux_convective_cloud_rain
275        gbx%snow_cv = fl_ccsnow  !flux_convective_cloud_snow
276
277     gbx%Reff(:,:,I_LSCLIQ) = ref_liq*1e-6
278     gbx%Reff(:,:,I_LSCICE) = ref_ice*1e-6
279     gbx%Reff(:,:,I_CVCLIQ) = ref_liq*1e-6
280     gbx%Reff(:,:,I_CVCICE) = ref_ice*1e-6
281
282        ! ISCCP simulator
283        gbx%dtau_s   = dtau_s
284        gbx%dtau_c   = 0.
285        gbx%dem_s    = dem_s
286        gbx%dem_c    = 0.
287
288! Surafce emissivity
289       emsfc_lw = 1.
290               
291!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
292        ! Define new vertical grid
293!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
294        print *, 'Defining new vertical grid...'
295        call construct_cosp_vgrid(gbx,Nlr,use_vgrid,csat_vgrid,vgrid)
296
297 if (debut_cosp) then
298! Creer le fichier de sorie, definir les variable de sortie
299  ! Axe verticale (Pa ou Km)
300     Nlevout = vgrid%Nlvgrid
301   
302        do ii=1,Ncolumns
303          column_ax(ii) = real(ii)
304        enddo
305
306 if (ok_mensuelCOSP) then
307     include "ini_histmthCOSP.h"
308 endif
309 if (ok_journeCOSP) then
310     include "ini_histdayCOSP.h"
311 endif
312 if (ok_hfCOSP) then
313     include "ini_histhfCOSP.h"
314 endif
315
316   debut_cosp=.false.
317  endif ! debut_cosp
318
319!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
320       ! Allocate memory for other types
321!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
322        print *, 'Allocating memory for other types...'
323        call construct_cosp_subgrid(Npoints, Ncolumns, Nlevels, sgx)
324        call construct_cosp_sgradar(cfg,Npoints,Ncolumns,Nlevels,N_HYDRO,sgradar)
325        call construct_cosp_radarstats(cfg,Npoints,Ncolumns,vgrid%Nlvgrid,N_HYDRO,stradar)
326        call construct_cosp_sglidar(cfg,Npoints,Ncolumns,Nlevels,N_HYDRO,PARASOL_NREFL,sglidar)
327        call construct_cosp_lidarstats(cfg,Npoints,Ncolumns,vgrid%Nlvgrid,N_HYDRO,PARASOL_NREFL,stlidar)
328        call construct_cosp_isccp(cfg,Npoints,Ncolumns,Nlevels,isccp)
329        call construct_cosp_misr(cfg,Npoints,misr)
330!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
331        ! Call simulator
332!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
333        print *, 'Calling simulator...'
334        call cosp(overlap,Ncolumns,cfg,vgrid,gbx,sgx,sgradar,sglidar,isccp,misr,stradar,stlidar)
335!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
336        ! Write outputs to CMOR-compliant NetCDF
337!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
338
339! A traiter le cas ou l on a des valeurs indefinies
340! Attention teste
341
342! if(1.eq.0)then
343
344
345   do k = 1,Nlevout
346     do ip = 1,Npoints
347     if(stlidar%lidarcld(ip,k).eq.R_UNDEF)then
348      stlidar%lidarcld(ip,k)=0.
349     endif
350     enddo
351
352
353     do ii= 1,SR_BINS
354      do ip = 1,Npoints
355       if(stlidar%cfad_sr(ip,ii,k).eq.R_UNDEF)then
356        stlidar%cfad_sr(ip,ii,k)=0.
357       endif
358      enddo
359     enddo
360   enddo   
361   
362  do ip = 1,Npoints
363   do k = 1,Nlevlmdz
364     if(sglidar%beta_mol(ip,k).eq.R_UNDEF)then
365      sglidar%beta_mol(ip,k)=0.
366     endif
367   
368     do ii= 1,Ncolumns
369       if(sglidar%beta_tot(ip,ii,k).eq.R_UNDEF)then
370        sglidar%beta_tot(ip,ii,k)=0.
371       endif 
372     enddo
373
374    enddo    !k = 1,Nlevlmdz
375   enddo     !ip = 1,Npoints
376
377   do k = 1,LIDAR_NCAT
378    do ip = 1,Npoints
379     if(stlidar%cldlayer(ip,k).eq.R_UNDEF)then
380      stlidar%cldlayer(ip,k)=0.
381     endif
382    enddo
383   enddo
384
385! endif
386
387   do ip = 1,Npoints
388    if(isccp%totalcldarea(ip).eq.-1.E+30)then
389      isccp%totalcldarea(ip)=0.
390    endif
391    if(isccp%meanptop(ip).eq.-1.E+30)then
392      isccp%meanptop(ip)=0.
393    endif
394    if(isccp%meantaucld(ip).eq.-1.E+30)then
395      isccp%meantaucld(ip)=0.
396    endif
397    if(isccp%meanalbedocld(ip).eq.-1.E+30)then
398      isccp%meanalbedocld(ip)=0.
399    endif
400    if(isccp%meantb(ip).eq.-1.E+30)then
401      isccp%meantb(ip)=0.
402    endif
403    if(isccp%meantbclr(ip).eq.-1.E+30)then
404      isccp%meantbclr(ip)=0.
405    endif
406
407    do k=1,7
408     do ii=1,7
409     if(isccp%fq_isccp(ip,ii,k).eq.-1.E+30)then
410      isccp%fq_isccp(ip,ii,k)=0.
411     endif
412     enddo
413    enddo
414
415    do ii=1,Ncolumns
416     if(isccp%boxtau(ip,ii).eq.-1.E+30)then
417       isccp%boxtau(ip,ii)=0.
418     endif
419    enddo
420
421    do ii=1,Ncolumns
422     if(isccp%boxptop(ip,ii).eq.-1.E+30)then
423       isccp%boxptop(ip,ii)=0.
424     endif
425    enddo
426   enddo
427
428 if (ok_mensuelCOSP) then
429  include "write_histmthCOSP.h"
430 endif
431 if (ok_journeCOSP) then
432  include "write_histdayCOSP.h"
433 endif
434 if (ok_hfCOSP ) then
435  include "write_histhfCOSP.h"
436 endif
437
438!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
439        ! Deallocate memory in derived types
440!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
441        print *, 'Deallocating memory...'
442        call free_cosp_gridbox(gbx)
443        call free_cosp_subgrid(sgx)
444        call free_cosp_sgradar(sgradar)
445        call free_cosp_radarstats(stradar)
446        call free_cosp_sglidar(sglidar)
447        call free_cosp_lidarstats(stlidar)
448        call free_cosp_isccp(isccp)
449        call free_cosp_misr(misr)
450        call free_cosp_vgrid(vgrid) 
451 
452!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
453  ! Time in s. Only for testing purposes
454!  call system_clock(t1,count_rate,count_max)
455!  print *,(t1-t0)*1.0/count_rate
456 
457  CONTAINS
458 
459  SUBROUTINE read_cosp_input
460   
461    IF (is_master) THEN
462      OPEN(10,file=cosp_input_nl,status='old')
463      READ(10,nml=cosp_input)
464      CLOSE(10)
465    ENDIF
466    CALL bcast(cmor_nl)
467    CALL bcast(overlap)
468    CALL bcast(isccp_topheight)
469    CALL bcast(isccp_topheight_direction)
470    CALL bcast(npoints_it)
471    CALL bcast(ncolumns)
472    CALL bcast(nlevels)
473    CALL bcast(use_vgrid)
474    CALL bcast(nlr)
475    CALL bcast(csat_vgrid)
476    CALL bcast(finput)
477    CALL bcast(radar_freq)
478    CALL bcast(surface_radar)
479    CALL bcast(use_mie_tables)
480    CALL bcast(use_gas_abs)
481    CALL bcast(do_ray)
482    CALL bcast(melt_lay)
483    CALL bcast(k2)
484    CALL bcast(Nprmts_max_hydro)
485    CALL bcast(Naero)
486    CALL bcast(Nprmts_max_aero)
487    CALL bcast(lidar_ice_type)
488    CALL bcast(use_precipitation_fluxes)
489    CALL bcast(use_reff)
490    CALL bcast(platform)
491    CALL bcast(satellite)
492    CALL bcast(Instrument)
493    CALL bcast(Nchannels)
494    CALL bcast(Channels)
495    CALL bcast(Surfem)
496    CALL bcast(ZenAng)
497    CALL bcast(co2)
498    CALL bcast(ch4)
499    CALL bcast(n2o)
500    CALL bcast(co)
501!$OMP BARRIER 
502  END SUBROUTINE read_cosp_input
503
504end subroutine phys_cosp
Note: See TracBrowser for help on using the repository browser.