Changeset 1318 for LMDZ4/branches
- Timestamp:
- Feb 23, 2010, 9:12:08 PM (15 years ago)
- Location:
- LMDZ4/branches/LMDZ4V5.0-dev
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/branches/LMDZ4V5.0-dev/bld.cfg
r1288 r1318 22 22 %LD_FLAGS %BASE_LD %PARA_LD 23 23 24 src::dyn %SRC_PATH/%DYN25 src::phys %SRC_PATH/%PHYS24 src::dyn %SRC_PATH/%DYN 25 src::phys %SRC_PATH/%PHYS 26 26 src::grid %SRC_PATH/grid 27 27 src::filtrez %SRC_PATH/filtrez 28 28 src::bibio %SRC_PATH/bibio 29 src::cosp %SRC_PATH/%COSP29 src::cosp %COSP 30 30 31 31 bld::lib::dyn %DYN … … 34 34 bld::lib::filtrez filtrez 35 35 bld::lib::bibio bibio 36 bld::lib::cosp %COSP36 bld::lib::cosp cosp 37 37 38 38 39 39 bld::outfile_ext::exe %SUFF_NAME.e 40 bld::target lib%{DYN}.a lib%{PHYS}.a libgrid.a libfiltrez.a libbibio.a 40 bld::target lib%{DYN}.a lib%{PHYS}.a libgrid.a libfiltrez.a libbibio.a libcosp.a 41 41 bld::target %EXEC%SUFF_NAME.e 42 bld::exe_dep %{DYN} %{PHYS} grid filtrez bibio %{COSP}42 bld::exe_dep %{DYN} %{PHYS} grid filtrez bibio cosp 43 43 44 44 -
LMDZ4/branches/LMDZ4V5.0-dev/libf/cosp/cosp.F90
r1279 r1318 26 26 USE MOD_COSP_TYPES 27 27 USE MOD_COSP_SIMULATOR 28 USE mod_phys_lmdz_para 29 USE mod_grid_phy_lmdz 28 30 IMPLICIT NONE 29 31 … … 61 63 real :: minv,maxv 62 64 real :: maxp,minp 63 integer,dimension(:), allocatable :: & ! Dimensions nPoints65 integer,dimension(:),save, allocatable :: & ! Dimensions nPoints 64 66 seed ! It is recommended that the seed is set to a different value for each model 65 67 ! gridbox it is called on, as it is possible that the choice of the same 66 68 ! seed value every time may introduce some statistical bias in the results, 67 69 ! particularly for low values of NCOL. 70 !$OMP THREADPRIVATE(seed) 71 real,dimension(:),allocatable :: rseed ! It is recommended that the seed is set to a different value for each model 68 72 ! Types used in one iteration 69 73 type(cosp_gridbox) :: gbx_it … … 76 80 type(cosp_radarstats) :: stradar_it 77 81 type(cosp_lidarstats) :: stlidar_it 82 83 logical,save :: first_cosp=.TRUE. 84 !$OMP THREADPRIVATE(first_cosp) 78 85 79 86 !++++++++++ Dimensions ++++++++++++ … … 162 169 endif 163 170 164 171 if (first_cosp) then 165 172 ! We base the seed in the decimal part of the surface pressure. 166 allocate(seed(Npoints)) 167 seed = int(gbx%psfc) ! This is to avoid division by zero when Npoints = 1 173 allocate(seed(Npoints)) 174 175 allocate(rseed(klon_glo)) 176 CALL gather(gbx%psfc,rseed) 177 call bcast(rseed) 178 ! seed = int(gbx%psfc) ! This is to avoid division by zero when Npoints = 1 168 179 ! Roj Oct/2008 ... Note: seed value of 0 caused me some problems + I want to 169 180 ! randomize for each call to COSP even when Npoints ==1 170 minp = minval(gbx%psfc) 171 maxp = maxval(gbx%psfc) 172 if (Npoints .gt. 1) seed=int((gbx%psfc-minp)/(maxp-minp)*100000) + 1 173 174 181 minp = minval(rseed) 182 maxp = maxval(rseed) 183 184 if (Npoints .gt. 1) THEN 185 seed=int((gbx%psfc-minp)/(maxp-minp)*100000) + 1 186 else 187 seed=int(gbx%psfc-minp) 188 endif 189 190 deallocate(rseed) 191 first_cosp=.false. 192 endif 193 175 194 if (gbx%Npoints_it >= gbx%Npoints) then ! One iteration gbx%Npoints 176 195 call cosp_iter(overlap,seed,cfg,vgrid,gbx,sgx,sgradar,sglidar,isccp,misr,stradar,stlidar) … … 273 292 call free_cosp_lidarstats(stlidar_it) 274 293 endif 275 deallocate(seed)276 294 277 295 … … 305 323 integer :: i,j,k 306 324 real,dimension(:,:),pointer :: column_frac_out ! Array with one column of frac_out 307 integer :: scops_debug=0 ! set to non-zero value to print out inputs for debugging in SCOPS 325 integer,parameter :: scops_debug=0 ! set to non-zero value to print out inputs for debugging in SCOPS 326 308 327 real,dimension(:, :),allocatable :: cca_scops,ls_p_rate,cv_p_rate, & 309 328 tca_scops ! Cloud cover in each model level (HORIZONTAL gridbox fraction) of total cloud. -
LMDZ4/branches/LMDZ4V5.0-dev/libf/cosp/ini_histdayCOSP.h
r1279 r1318 5 5 ! sorties par jour 6 6 ! 7 !$OMP MASTER 7 8 zstoday = ecrit_day 8 9 zout = freq_COSP … … 191 192 192 193 CALL histend(nid_day_cosp) 194 !$OMP END MASTER 195 !$OMP BARRIER -
LMDZ4/branches/LMDZ4V5.0-dev/libf/cosp/ini_histhfCOSP.h
r1279 r1318 5 5 ! sorties par jour 6 6 ! 7 !$OMP MASTER 7 8 zstohf = ecrit_hf 8 9 zout = freq_COSP … … 191 192 192 193 CALL histend(nid_hf_cosp) 194 !$OMP END MASTER 195 !$OMP BARRIER -
LMDZ4/branches/LMDZ4V5.0-dev/libf/cosp/ini_histmthCOSP.h
r1279 r1318 5 5 ! sorties par jour 6 6 ! 7 !$OMP MASTER 7 8 zstomth = ecrit_mth 8 9 zout = freq_COSP … … 189 190 190 191 CALL histend(nid_mth_cosp) 192 !$OMP END MASTER 193 !$OMP BARRIER -
LMDZ4/branches/LMDZ4V5.0-dev/libf/cosp/phys_cosp.F90
r1293 r1318 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 ' … … 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 -
LMDZ4/branches/LMDZ4V5.0-dev/libf/cosp/radar_simulator_types.F90
r1279 r1318 42 42 end type mie 43 43 44 real*8, dimension(:), allocatable :: &44 real*8, dimension(:), save, allocatable :: & 45 45 mt_ttl, & ! liquid temperatures (C) 46 46 mt_tti, & ! ice temperatures (C) 47 47 mt_qext, mt_qbsca ! extincion/backscatter efficiency 48 !$OMP THREADPRIVATE(mt_ttl,mt_tti,mt_qext, mt_qbsca) 48 49 49 integer*4 :: &50 integer*4,save :: & 50 51 cnt_liq, & ! liquid temperature count 51 52 cnt_ice ! ice temperature count 53 !$OMP THREADPRIVATE(cnt_liq,cnt_ice) 52 54 53 55 end module radar_simulator_types -
LMDZ4/branches/LMDZ4V5.0-dev/libf/cosp/read_cosp_output_nl.F90
r1279 r1318 5 5 USE MOD_COSP_CONSTANTS 6 6 USE MOD_COSP_TYPES 7 USE mod_phys_lmdz_para 7 8 character(len=*),intent(in) :: cosp_nl 8 9 type(cosp_config),intent(out) :: cfg … … 16 17 Llongitude,Llatitude,Lparasol_refl,LclMISR,Lmeantbisccp,Lmeantbclrisccp, & 17 18 Lfrac_out,Lbeta_mol532,Ltbrttov 19 18 20 namelist/COSP_OUTPUT/Lradar_sim,Llidar_sim,Lisccp_sim,Lmisr_sim,Lrttov_sim, & 19 21 Lalbisccp,Latb532,Lboxptopisccp,Lboxtauisccp,Lcfad_dbze94, & … … 26 28 cfg%out_list(i)='' 27 29 enddo 28 open(10,file=cosp_nl,status='old') 29 read(10,nml=cosp_output) 30 close(10) 30 31 IF (is_master) THEN 32 open(10,file=cosp_nl,status='old') 33 read(10,nml=cosp_output) 34 close(10) 35 ENDIF 36 37 CALL bcast(Lradar_sim) 38 CALL bcast(Llidar_sim) 39 CALL bcast(Lisccp_sim) 40 CALL bcast(Lmisr_sim) 41 CALL bcast(Lrttov_sim) 42 CALL bcast(Lalbisccp) 43 CALL bcast(Latb532) 44 CALL bcast(Lboxptopisccp) 45 CALL bcast(Lboxtauisccp) 46 CALL bcast(Lcfad_dbze94) 47 CALL bcast(Lcfad_lidarsr532) 48 CALL bcast(Lclcalipso2) 49 CALL bcast(Lclcalipso) 50 CALL bcast(Lclhcalipso) 51 CALL bcast(Lclisccp2) 52 CALL bcast(Lcllcalipso) 53 CALL bcast(Lclmcalipso) 54 CALL bcast(Lcltcalipso) 55 CALL bcast(Lcltlidarradar) 56 CALL bcast(Lctpisccp) 57 CALL bcast(Ldbze94) 58 CALL bcast(Ltauisccp) 59 CALL bcast(Ltclisccp) 60 CALL bcast(Llongitude) 61 CALL bcast(Llatitude) 62 CALL bcast(Lparasol_refl) 63 CALL bcast(LclMISR) 64 CALL bcast(Lmeantbisccp) 65 CALL bcast(Lmeantbclrisccp) 66 CALL bcast(Lfrac_out) 67 CALL bcast(Lbeta_mol532) 68 CALL bcast(Ltbrttov) 69 !$OMP BARRIER 31 70 32 71 ! print*,' Cles sorties cosp :' -
LMDZ4/branches/LMDZ4V5.0-dev/libf/cosp/scops.F
r1279 r1318 39 39 ! *****************************COPYRIGHT******************************* 40 40 41 USE mod_phys_lmdz_para 42 USE mod_grid_phy_lmdz 43 41 44 implicit none 42 45 … … 175 178 ELSE 176 179 DO ibox=1,ncol 177 include 'congvec.h' 180 ! include 'congvec_para.h' 181 include 'congvec.h' 178 182 ! select random pixels from the non-convective 179 183 ! part the gridbox ( some will be converted into -
LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/mod_phys_lmdz_para.F90
r1001 r1318 10 10 LOGICAL,SAVE :: is_sequential 11 11 LOGICAL,SAVE :: is_parallel 12 LOGICAL,SAVE :: is_master 12 13 13 !$OMP THREADPRIVATE(klon_loc )14 !$OMP THREADPRIVATE(klon_loc,is_master) 14 15 15 16 CONTAINS … … 26 27 CALL Init_phys_lmdz_omp_data(klon_mpi) 27 28 klon_loc=klon_omp 29 IF (is_mpi_root .AND. is_omp_root) THEN 30 is_master=.TRUE. 31 ELSE 32 is_master=.FALSE. 33 ENDIF 28 34 CALL Test_transfert 29 35 !$OMP END PARALLEL … … 35 41 is_parallel=.FALSE. 36 42 ENDIF 37 43 38 44 END SUBROUTINE Init_phys_lmdz_para 39 45 -
LMDZ4/branches/LMDZ4V5.0-dev/makelmdz_fcm
r1288 r1318 33 33 LIBOGCM=$LMDGCM/libo 34 34 LIBFGCM=$LMDGCM/libf 35 COSP_PATH=$LMDGCM/.void_dir 35 36 36 37 ######################################################################## … … 168 169 rm -f .void_file 169 170 echo > .void_file 171 rm -rf .void_dir 172 mkdir .void_dir 170 173 rm -f arch.path 171 174 ln -s arch/arch-${arch}.path ./arch.path … … 248 251 then 249 252 CPP_KEY="$CPP_KEY CPP_COSP" 250 INCLUDE="$INCLUDE -I$(LIBFGCM)/cosp"253 COSP_PATH="$LIBFGCM/cosp" 251 254 # LIB="${LIB} -l${LIBPREFIX}cosp" 252 255 fi … … 380 383 echo "%DYN $DYN" >> $config_fcm 381 384 echo "%PHYS phy${physique}" >> $config_fcm 382 if [[ $cosp == "true" ]] 383 then 384 echo "%COSP cosp" >> $config_fcm 385 fi 385 echo "%COSP $COSP_PATH" >> $config_fcm 386 386 echo "%CPP_KEY $CPP_KEY" >> $config_fcm 387 387 echo "%EXEC $code" >> $config_fcm
Note: See TracChangeset
for help on using the changeset viewer.