Changeset 1327 for LMDZ4/trunk/libf/cosp/phys_cosp.F90
- Timestamp:
- Mar 16, 2010, 11:23:17 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/trunk/libf/cosp/phys_cosp.F90
r1279 r1327 70 70 USE MOD_COSP 71 71 USE mod_phys_lmdz_para 72 USE mod_grid_phy_lmdz 72 73 use ioipsl 73 74 use iophy … … 76 77 77 78 ! Local variables 78 character(len=64) :: cosp_input_nl='cosp_input_nl.txt'79 character(len=64) :: cosp_output_nl='cosp_output_nl.txt'79 character(len=64),PARAMETER :: cosp_input_nl='cosp_input_nl.txt' 80 character(len=64),PARAMETER :: cosp_output_nl='cosp_output_nl.txt' 80 81 character(len=512), save :: finput ! Input file name 81 82 character(len=512), save :: cmor_nl … … 84 85 integer,parameter :: Ncollmdz=20 85 86 integer, save :: Npoints ! Number of gridpoints 87 !$OMP THREADPRIVATE(Npoints) 86 88 integer, save :: Nlevels ! Number of levels 87 89 Integer :: Nptslmdz,Nlevlmdz ! Nb de points issus de physiq.F … … 90 92 integer :: i 91 93 type(cosp_config),save :: cfg ! Configuration options 94 !$OMP THREADPRIVATE(cfg) 92 95 type(cosp_gridbox) :: gbx ! Gridbox information. Input for COSP 93 96 type(cosp_subgrid) :: sgx ! Subgrid outputs … … 103 106 integer :: Nlon,Nlat,geomode 104 107 real,save :: radar_freq,k2,ZenAng,co2,ch4,n2o,co,emsfc_lw 108 !$OMP THREADPRIVATE(emsfc_lw) 105 109 integer,dimension(RTTOV_MAX_CHANNELS),save :: Channels 106 110 real,dimension(RTTOV_MAX_CHANNELS),save :: Surfem … … 115 119 integer :: nhori,nvert,nvertp,nvertisccp,nvertm,nvertcol 116 120 integer, save :: nid_day_cosp,nid_mth_cosp,nid_hf_cosp 121 !$OMP THREADPRIVATE(nid_day_cosp,nid_mth_cosp,nid_hf_cosp) 117 122 logical, save :: debut_cosp=.true. 123 !$OMP THREADPRIVATE(debut_cosp) 118 124 integer :: itau_wcosp 119 character(len=10),dimension(Ncollmdz) :: chcol=(/'c01','c02','c03','c04','c05','c06','c07','c08','c09','c10', &125 character(len=10),dimension(Ncollmdz),parameter :: chcol=(/'c01','c02','c03','c04','c05','c06','c07','c08','c09','c10', & 120 126 'c11','c12','c13','c14','c15','c16','c17','c18','c19','c20'/) 121 127 real,dimension(Ncollmdz) :: column_ax 122 128 integer, save :: Nlevout 129 !$OMP THREADPRIVATE(Nlevout) 123 130 124 131 include "dimensions.h" … … 139 146 ! 140 147 namelist/COSP_INPUT/cmor_nl,overlap,isccp_topheight,isccp_topheight_direction, & 141 npoints ,npoints_it,ncolumns,nlevels,use_vgrid,nlr,csat_vgrid,finput, &148 npoints_it,ncolumns,nlevels,use_vgrid,nlr,csat_vgrid,finput, & 142 149 radar_freq,surface_radar,use_mie_tables, & 143 150 use_gas_abs,do_ray,melt_lay,k2,Nprmts_max_hydro,Naero,Nprmts_max_aero, & … … 154 161 155 162 if (debut_cosp) then 163 NPoints=Nptslmdz 156 164 ! Lecture du namelist input 157 open(10,file=cosp_input_nl,status='old') 158 read(10,nml=cosp_input) 159 close(10) 165 CALL read_cosp_input 166 160 167 ! Clefs Outputs 161 168 call read_cosp_output_nl(cosp_output_nl,cfg) 162 169 163 if ( (Ncollmdz.ne.Ncolumns).or. (Nptslmdz.ne.Npoints).or.(Nlevlmdz.ne.Nlevels) ) then170 if ( (Ncollmdz.ne.Ncolumns).or. (Nlevlmdz.ne.Nlevels) ) then 164 171 print*,'Nb points Horiz, Vert, Sub-col passes par physiq.F = ', & 165 172 Nptslmdz, Nlevlmdz, Ncollmdz … … 169 176 call abort 170 177 endif 171 178 172 179 if (overlaplmdz.ne.overlap) then 173 180 print*,'Attention overlaplmdz different de overlap lu dans namelist ' … … 194 201 print *, 'Allocating memory for gridbox type...' 195 202 196 call construct_cosp_gridbox( float(itap),radar_freq,surface_radar,use_mie_tables,use_gas_abs,do_ray,melt_lay,k2, &203 call construct_cosp_gridbox(dble(itap),radar_freq,surface_radar,use_mie_tables,use_gas_abs,do_ray,melt_lay,k2, & 197 204 Npoints,Nlevels,Ncolumns,N_HYDRO,Nprmts_max_hydro,Naero,Nprmts_max_aero,Npoints_it, & 198 205 lidar_ice_type,isccp_topheight,isccp_topheight_direction,overlap,emsfc_lw, & … … 316 323 317 324 do ii=1,Ncolumns 318 column_ax(ii) = float(ii)325 column_ax(ii) = real(ii) 319 326 enddo 320 327 … … 462 469 ! call system_clock(t1,count_rate,count_max) 463 470 ! print *,(t1-t0)*1.0/count_rate 471 472 CONTAINS 473 474 SUBROUTINE read_cosp_input 464 475 476 IF (is_master) THEN 477 OPEN(10,file=cosp_input_nl,status='old') 478 READ(10,nml=cosp_input) 479 CLOSE(10) 480 ENDIF 481 CALL bcast(cmor_nl) 482 CALL bcast(overlap) 483 CALL bcast(isccp_topheight) 484 CALL bcast(isccp_topheight_direction) 485 CALL bcast(npoints_it) 486 CALL bcast(ncolumns) 487 CALL bcast(nlevels) 488 CALL bcast(use_vgrid) 489 CALL bcast(nlr) 490 CALL bcast(csat_vgrid) 491 CALL bcast(finput) 492 CALL bcast(radar_freq) 493 CALL bcast(surface_radar) 494 CALL bcast(use_mie_tables) 495 CALL bcast(use_gas_abs) 496 CALL bcast(do_ray) 497 CALL bcast(melt_lay) 498 CALL bcast(k2) 499 CALL bcast(Nprmts_max_hydro) 500 CALL bcast(Naero) 501 CALL bcast(Nprmts_max_aero) 502 CALL bcast(lidar_ice_type) 503 CALL bcast(use_precipitation_fluxes) 504 CALL bcast(use_reff) 505 CALL bcast(platform) 506 CALL bcast(satellite) 507 CALL bcast(Instrument) 508 CALL bcast(Nchannels) 509 CALL bcast(Channels) 510 CALL bcast(Surfem) 511 CALL bcast(ZenAng) 512 CALL bcast(co2) 513 CALL bcast(ch4) 514 CALL bcast(n2o) 515 CALL bcast(co) 516 !$OMP BARRIER 517 END SUBROUTINE read_cosp_input 518 465 519 end subroutine phys_cosp
Note: See TracChangeset
for help on using the changeset viewer.