Changeset c0884a8 in flexpart.git
- Timestamp:
- Jul 20, 2018, 2:40:39 PM (6 years ago)
- Branches:
- univie
- Children:
- 7ca2ef4
- Parents:
- f251e57
- Files:
-
- 1 added
- 2 deleted
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
documentation/fluxdiagram.txt
- Property mode changed from 100755 to 100644
-
documentation/memo_verttr.ps.gz
- Property mode changed from 100755 to 100644
-
documentation/program_list.txt
- Property mode changed from 100755 to 100644
-
options/COMMAND.namelist
- Property mode changed from 100755 to 100644
-
options/COMMAND.oldformat
- Property mode changed from 100755 to 100644
-
src/FLEXPART.f90
r77778f8 rc0884a8 40 40 ! detected metdata format * 41 41 ! - Passed metdata format down to timemanager * 42 ! * 43 ! Petra Seibert, 2018-06-26: simplified version met data format detection * 44 ! * 42 45 !***************************************************************************** 43 46 ! * … … 54 57 55 58 use random_mod, only: gasdev1 56 use c lass_gribfile59 use check_gribfile_mod 57 60 58 61 #ifdef USE_NCF … … 62 65 implicit none 63 66 64 integer :: i,j,ix,jy,inest 67 integer :: i,j,ix,jy,inest,id_centre 65 68 integer :: idummy = -320 66 69 character(len=256) :: inline_options !pathfile, flexversion, arg2 67 integer :: metdata_format = GRIBFILE_CENTRE_UNKNOWN68 integer :: detectformat69 70 70 71 71 … … 190 190 ! Detect metdata format 191 191 !********************** 192 193 metdata_format = detectformat() 194 195 if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then 196 print *,'ECMWF metdata detected' 197 elseif (metdata_format.eq.GRIBFILE_CENTRE_NCEP) then 198 print *,'NCEP metdata detected' 192 193 call cg_get_centre(path(3)(1:length(3)) // trim(wfname(1)), id_centre) 194 if (id_centre.eq.icg_id_ecmwf) then 195 print *,'ECMWF met data detected' 196 elseif (id_centre.eq.icg_id_ncep) then 197 print *,'NCEP met data detected' 199 198 else 200 print *,'Unknown met data format'199 print *,'Unknown met data format' 201 200 stop 202 201 endif … … 220 219 endif 221 220 222 if ( metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then221 if (id_centre.eq.icg_id_ecmwf) then 223 222 call gridcheck_ecmwf 224 223 else … … 449 448 endif 450 449 451 call timemanager( metdata_format)450 call timemanager(id_centre) 452 451 453 452 ! NIK 16.02.2005 -
src/FLEXPART_MPI.f90
r20963b1 rc0884a8 40 40 ! detected metdata format * 41 41 ! - Passed metdata format down to timemanager * 42 ! * 43 ! Petra Seibert, 2018-06-26: simplified version met data format detection * 44 ! * 42 45 !***************************************************************************** 43 46 ! * … … 54 57 use mpi_mod 55 58 use random_mod, only: gasdev1 56 use c lass_gribfile59 use check_gribfile_mod 57 60 58 61 #ifdef USE_NCF … … 62 65 implicit none 63 66 64 integer :: i,j,ix,jy,inest 67 integer :: i,j,ix,jy,inest,id_centre 65 68 integer :: idummy = -320 66 69 character(len=256) :: inline_options !pathfile, flexversion, arg2 67 integer :: metdata_format = GRIBFILE_CENTRE_UNKNOWN68 integer :: detectformat69 70 integer(selected_int_kind(16)), dimension(maxspec) :: tot_b=0, & 70 71 & tot_i=0 … … 203 204 ! Detect metdata format 204 205 !********************** 205 206 metdata_format = detectformat() 207 208 if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then 206 call cg_get_centre(path(3)(1:length(3)) // trim(wfname(1)), id_centre) 207 if (id_centre.eq.icg_id_ecmwf) then 209 208 if (lroot) print *,'ECMWF metdata detected' 210 elseif ( metdata_format.eq.GRIBFILE_CENTRE_NCEP) then211 if (lroot) print *,'NCEP met data detected'209 elseif (id_centre.eq.icg_id_ncep) then 210 if (lroot) print *,'NCEP met data detected' 212 211 else 213 if (lroot) print *,'Unknown met data format'212 if (lroot) print *,'Unknown met data format' 214 213 stop 215 214 endif … … 233 232 endif 234 233 235 if ( metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then234 if (id_centre.eq.icg_id_ecmwf) then 236 235 call gridcheck_ecmwf 237 236 else … … 480 479 481 480 482 call timemanager( metdata_format)481 call timemanager(id_centre) 483 482 484 483 -
src/calcmatrix.f90
rd8eed02 rc0884a8 20 20 !********************************************************************** 21 21 22 subroutine calcmatrix(lconv,delt,cbmf, metdata_format)22 subroutine calcmatrix(lconv,delt,cbmf,id_centre) 23 23 ! o i o 24 24 !***************************************************************************** … … 40 40 ! - Merged calcmatrix and calcmatrix_gfs into one routine using if-then * 41 41 ! for meteo-type dependent code * 42 ! * 43 ! Petra Seibert, 2018-06-26: simplified version met data format detection * 44 ! * 42 45 !***************************************************************************** 43 46 ! * … … 45 48 ! delt time step for convection [s] * 46 49 ! cbmf cloud base mass flux * 47 ! metdata_format format of metdata (ecmwf/gfs)*50 ! id_centre format of metdata (ecmwf/gfs) * 48 51 ! * 49 52 !***************************************************************************** … … 52 55 use com_mod 53 56 use conv_mod 54 use c lass_gribfile57 use check_gribfile_mod 55 58 56 59 implicit none 57 60 58 61 real :: rlevmass,summe 59 integer :: metdata_format62 integer :: id_centre 60 63 61 64 integer :: iflag, k, kk, kuvz … … 88 91 do kuvz = 2,nuvz 89 92 k = kuvz-1 90 if ( metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then93 if (id_centre.eq.icg_id_ecmwf) then 91 94 pconv(k) = (akz(kuvz) + bkz(kuvz)*psconv) 92 95 phconv(kuvz) = (akm(kuvz) + bkm(kuvz)*psconv) -
src/calcpar.f90
r027e844 rc0884a8 20 20 !********************************************************************** 21 21 22 subroutine calcpar(n,uuh,vvh,pvh, metdata_format)22 subroutine calcpar(n,uuh,vvh,pvh,id_centre) 23 23 ! i i i o 24 24 !***************************************************************************** … … 46 46 ! - Merged calcpar and calcpar_gfs into one routine using if-then * 47 47 ! for meteo-type dependent code * 48 !***************************************************************************** 49 48 ! * 49 ! Petra Seibert, 2018-06-26: simplified version met data format detection * 50 ! * 50 51 !***************************************************************************** 51 52 ! * … … 55 56 ! vvh * 56 57 ! pvh * 57 ! metdata_format format of metdata (ecmwf/gfs) *58 ! id_centre format of metdata (ecmwf/gfs) * 58 59 ! * 59 60 ! Constants: * … … 68 69 use par_mod 69 70 use com_mod 70 use c lass_gribfile71 use check_gribfile_mod 71 72 72 73 implicit none 73 74 74 integer :: metdata_format75 integer :: id_centre 75 76 integer :: n,ix,jy,i,kz,lz,kzmin,llev,loop_start 76 77 real :: ttlev(nuvzmax),qvlev(nuvzmax),obukhov,scalev,ol,hmixplus … … 125 126 !*********************************************** 126 127 127 if ( metdata_format.eq.GRIBFILE_CENTRE_NCEP) then128 if (id_centre.eq.icg_id_ncep) then 128 129 ! NCEP version: find first level above ground 129 130 llev = 0 … … 137 138 ! calculate inverse Obukhov length scale with tth(llev) 138 139 ol=obukhov(ps(ix,jy,1,n),tt2(ix,jy,1,n),td2(ix,jy,1,n), & 139 tth(ix,jy,llev,n),ustar(ix,jy,1,n),sshf(ix,jy,1,n),akm,bkm,akz(llev),metdata_format) 140 tth(ix,jy,llev,n),ustar(ix,jy,1,n),sshf(ix,jy,1,n), & 141 akm,bkm,akz(llev),id_centre) 140 142 else 141 143 llev=0 142 144 ol=obukhov(ps(ix,jy,1,n),tt2(ix,jy,1,n),td2(ix,jy,1,n), & 143 tth(ix,jy,2,n),ustar(ix,jy,1,n),sshf(ix,jy,1,n),akm,bkm,akzdummy,metdata_format) 145 tth(ix,jy,2,n),ustar(ix,jy,1,n),sshf(ix,jy,1,n), & 146 akm,bkm,akzdummy,id_centre) 144 147 end if 145 148 … … 161 164 end do 162 165 163 if ( metdata_format.eq.GRIBFILE_CENTRE_NCEP) then166 if (id_centre.eq.icg_id_ncep) then 164 167 ! NCEP version hmix has been read in in readwind.f, is therefore not calculated here 165 168 call richardson(ps(ix,jy,1,n),ustar(ix,jy,1,n),ttlev,qvlev, & 166 169 ulev,vlev,nuvz,akz,bkz,sshf(ix,jy,1,n),tt2(ix,jy,1,n), & 167 td2(ix,jy,1,n),hmixdummy,wstar(ix,jy,1,n),hmixplus, metdata_format)170 td2(ix,jy,1,n),hmixdummy,wstar(ix,jy,1,n),hmixplus,id_centre) 168 171 else 169 172 call richardson(ps(ix,jy,1,n),ustar(ix,jy,1,n),ttlev,qvlev, & 170 173 ulev,vlev,nuvz,akz,bkz,sshf(ix,jy,1,n),tt2(ix,jy,1,n), & 171 td2(ix,jy,1,n),hmix(ix,jy,1,n),wstar(ix,jy,1,n),hmixplus, metdata_format)174 td2(ix,jy,1,n),hmix(ix,jy,1,n),wstar(ix,jy,1,n),hmixplus,id_centre) 172 175 end if 173 176 … … 218 221 pold=ps(ix,jy,1,n) 219 222 zold=0. 220 if ( metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then223 if (id_centre.eq.icg_id_ecmwf) then 221 224 loop_start=2 222 225 else … … 242 245 !************************************************************************ 243 246 244 if ( metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then247 if (id_centre.eq.icg_id_ecmwf) then 245 248 loop_start=1 246 249 else -
src/calcpar_nests.f90
r6ecb30a rc0884a8 20 20 !********************************************************************** 21 21 22 subroutine calcpar_nests(n,uuhn,vvhn,pvhn, metdata_format)22 subroutine calcpar_nests(n,uuhn,vvhn,pvhn,id_centre) 23 23 ! i i i o 24 24 !***************************************************************************** … … 44 44 ! Unified ECMWF and GFS builds * 45 45 ! Marian Harustak, 12.5.2017 * 46 ! - Added passing of metdata_format as it was needed by called routines * 46 ! - Added passing of id_centre as it was needed by called routines * 47 ! * 48 ! Petra Seibert, 2018-06-26: simplified version met data format detection * 49 ! * 47 50 !***************************************************************************** 48 51 ! * 49 52 ! Variables: * 50 53 ! n temporal index for meteorological fields (1 to 3) * 51 ! metdata_formatformat of metdata (ecmwf/gfs) *54 ! id_centre format of metdata (ecmwf/gfs) * 52 55 ! * 53 56 ! Constants: * … … 65 68 implicit none 66 69 67 integer :: metdata_format70 integer :: id_centre 68 71 integer :: n,ix,jy,i,l,kz,lz,kzmin 69 72 real :: ttlev(nuvzmax),qvlev(nuvzmax),obukhov,scalev,ol,hmixplus,dummyakzllev … … 116 119 ol=obukhov(psn(ix,jy,1,n,l),tt2n(ix,jy,1,n,l), & 117 120 td2n(ix,jy,1,n,l),tthn(ix,jy,2,n,l),ustarn(ix,jy,1,n,l), & 118 sshfn(ix,jy,1,n,l),akm,bkm,dummyakzllev, metdata_format)121 sshfn(ix,jy,1,n,l),akm,bkm,dummyakzllev,id_centre) 119 122 if (ol.ne.0.) then 120 123 olin(ix,jy,1,n,l)=1./ol … … 137 140 qvlev,ulev,vlev,nuvz,akz,bkz,sshfn(ix,jy,1,n,l), & 138 141 tt2n(ix,jy,1,n,l),td2n(ix,jy,1,n,l),hmixn(ix,jy,1,n,l), & 139 wstarn(ix,jy,1,n,l),hmixplus, metdata_format)142 wstarn(ix,jy,1,n,l),hmixplus,id_centre) 140 143 141 144 if(lsubgrid.eq.1) then -
src/changelog.txt
rf251e57 rc0884a8 73 73 of height (array assignment where it was not intended) 74 74 3) Add back the SAVE attribute to INIT, just to be sure 75 76 77 78 * checking type (EC/GFS) of grib files PS 2018-06-26 79 =================== 80 replaced the CTBTO code by shorter & simper code with proper license 81 82 Affected files: 83 84 calcmatrix.f90 85 calcpar.f90 86 calcpar_nests.f90 87 check_gribfile_mod.f90 88 convmix.f90 89 detectformat.f90 90 FLEXPART.f90 91 FLEXPART_MPI.f90 92 getfields.f90 93 getfields_mpi.f90 94 obukhov.f90 95 richardson.f90 96 timemanager.f90 97 timemanager_mpi.f90 -
src/convmix.f90
r6ecb30a rc0884a8 20 20 !********************************************************************** 21 21 22 subroutine convmix(itime, metdata_format)22 subroutine convmix(itime,id_centre) 23 23 ! i 24 24 !************************************************************** … … 39 39 ! Unified ECMWF and GFS builds 40 40 ! Marian Harustak, 12.5.2017 41 ! - Merged convmix and convmix_gfs into one routine using if-then 41 ! - Merged convmix and convmix_gfs into one routine using if-then 42 42 ! for meteo-type dependent code 43 ! 44 ! Petra Seibert, 2018-06-26: simplified version met data format detection 45 ! 43 46 !************************************************************** 44 47 … … 47 50 use com_mod 48 51 use conv_mod 49 use c lass_gribfile52 use check_gribfile_mod 50 53 51 54 implicit none … … 55 58 integer :: jy, kpart, ktop, ngrid,kz 56 59 integer :: igrid(maxpart), ipoint(maxpart), igridn(maxpart,maxnests) 57 integer :: metdata_format60 integer :: id_centre 58 61 59 62 ! itime [s] current time … … 116 119 117 120 ngrid=0 118 if ( metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then121 if (id_centre.eq.icg_id_ecmwf) then 119 122 do j=numbnests,1,-1 120 123 if ( x.gt.xln(j)+eps .and. x.lt.xrn(j)-eps .and. & … … 189 192 td2conv=(td2(ix,jy,1,mind1)*dt2+td2(ix,jy,1,mind2)*dt1)*dtt 190 193 !!$ do kz=1,nconvlev+1 !old 191 if ( metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then194 if (id_centre.eq.icg_id_ecmwf) then 192 195 do kz=1,nuvz-1 !bugfix 193 196 tconv(kz)=(tth(ix,jy,kz+1,mind1)*dt2+ & … … 208 211 209 212 ! Calculate translocation matrix 210 call calcmatrix(lconv,delt,cbaseflux(ix,jy), metdata_format)213 call calcmatrix(lconv,delt,cbaseflux(ix,jy),id_centre) 211 214 igrold = igr 212 215 ktop = 0 … … 285 288 ! calculate translocation matrix 286 289 !******************************* 287 call calcmatrix(lconv,delt,cbasefluxn(ix,jy,inest), metdata_format)290 call calcmatrix(lconv,delt,cbasefluxn(ix,jy,inest),id_centre) 288 291 igrold = igr 289 292 ktop = 0 -
src/getfields.f90
r6ecb30a rc0884a8 20 20 !********************************************************************** 21 21 22 subroutine getfields(itime,nstop, metdata_format)22 subroutine getfields(itime,nstop,id_centre) 23 23 ! i o 24 24 !***************************************************************************** … … 44 44 ! Unified ECMWF and GFS builds * 45 45 ! Marian Harustak, 12.5.2017 * 46 ! - Added passing of metdata_format as it was needed by called routines * 46 ! - Added passing of id_centre as it was needed by called routines * 47 ! * 48 ! Petra Seibert, 2018-06-26: simplified version met data format detection * 49 ! * 47 50 !***************************************************************************** 48 51 ! * … … 62 65 ! tt(0:nxmax,0:nymax,nuvzmax,2) temperature [K] * 63 66 ! ps(0:nxmax,0:nymax,2) surface pressure [Pa] * 64 ! metdata_format format of metdata (ecmwf/gfs)*67 ! id_centre format of metdata (ecmwf/gfs) * 65 68 ! * 66 69 ! Constants: * … … 72 75 use par_mod 73 76 use com_mod 74 use c lass_gribfile77 use check_gribfile_mod 75 78 76 79 implicit none 77 80 78 81 integer :: indj,itime,nstop,memaux 79 integer :: metdata_format82 integer :: id_centre 80 83 81 84 real :: uuh(0:nxmax-1,0:nymax-1,nuvzmax) … … 132 135 do indj=indmin,numbwf-1 133 136 if (ldirect*wftime(indj+1).gt.ldirect*itime) then 134 if ( metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then137 if (id_centre.eq.icg_id_ecmwf) then 135 138 call readwind_ecmwf(indj+1,memind(2),uuh,vvh,wwh) 136 139 else … … 138 141 end if 139 142 call readwind_nests(indj+1,memind(2),uuhn,vvhn,wwhn) 140 call calcpar(memind(2),uuh,vvh,pvh, metdata_format)141 call calcpar_nests(memind(2),uuhn,vvhn,pvhn, metdata_format)142 if ( metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then143 call calcpar(memind(2),uuh,vvh,pvh,id_centre) 144 call calcpar_nests(memind(2),uuhn,vvhn,pvhn,id_centre) 145 if (id_centre.eq.icg_id_ecmwf) then 143 146 call verttransform_ecmwf(memind(2),uuh,vvh,wwh,pvh) 144 147 else … … 167 170 (ldirect*wftime(indj+1).gt.ldirect*itime)) then 168 171 memind(1)=1 169 if ( metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then172 if (id_centre.eq.icg_id_ecmwf) then 170 173 call readwind_ecmwf(indj,memind(1),uuh,vvh,wwh) 171 174 else … … 173 176 end if 174 177 call readwind_nests(indj,memind(1),uuhn,vvhn,wwhn) 175 call calcpar(memind(1),uuh,vvh,pvh, metdata_format)176 call calcpar_nests(memind(1),uuhn,vvhn,pvhn, metdata_format)177 if ( metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then178 call calcpar(memind(1),uuh,vvh,pvh,id_centre) 179 call calcpar_nests(memind(1),uuhn,vvhn,pvhn,id_centre) 180 if (id_centre.eq.icg_id_ecmwf) then 178 181 call verttransform_ecmwf(memind(1),uuh,vvh,wwh,pvh) 179 182 else … … 183 186 memtime(1)=wftime(indj) 184 187 memind(2)=2 185 if ( metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then188 if (id_centre.eq.icg_id_ecmwf) then 186 189 call readwind_ecmwf(indj+1,memind(2),uuh,vvh,wwh) 187 190 else … … 189 192 end if 190 193 call readwind_nests(indj+1,memind(2),uuhn,vvhn,wwhn) 191 call calcpar(memind(2),uuh,vvh,pvh, metdata_format)192 call calcpar_nests(memind(2),uuhn,vvhn,pvhn, metdata_format)193 if ( metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then194 call calcpar(memind(2),uuh,vvh,pvh,id_centre) 195 call calcpar_nests(memind(2),uuhn,vvhn,pvhn,id_centre) 196 if (id_centre.eq.icg_id_ecmwf) then 194 197 call verttransform_ecmwf(memind(2),uuh,vvh,wwh,pvh) 195 198 else -
src/getfields_mpi.f90
r20963b1 rc0884a8 20 20 !********************************************************************** 21 21 22 subroutine getfields(itime,nstop,memstat, metdata_format)22 subroutine getfields(itime,nstop,memstat,id_centre) 23 23 ! i o o 24 24 !***************************************************************************** … … 60 60 ! Unified ECMWF and GFS builds 61 61 ! Marian Harustak, 12.5.2017 62 ! - Added passing of metdata_format as it was needed by called routines 63 ! 64 !***************************************************************************** 62 ! - Added passing of id_centre as it was needed by called routines 63 ! 64 ! Petra Seibert, 2018-06-26: simplified version met data format detection 65 ! !***************************************************************************** 65 66 ! * 66 67 ! Variables: * … … 81 82 ! tt(0:nxmax,0:nymax,nuvzmax,numwfmem) temperature [K] * 82 83 ! ps(0:nxmax,0:nymax,numwfmem) surface pressure [Pa] * 83 ! metdata_formatformat of metdata (ecmwf/gfs) *84 ! id_centre format of metdata (ecmwf/gfs) * 84 85 ! * 85 86 ! Constants: * … … 92 93 use com_mod 93 94 use mpi_mod, only: lmpreader,lmp_use_reader,lmp_sync 94 use c lass_gribfile95 use check_gribfile_mod 95 96 96 97 implicit none 97 98 98 integer :: metdata_format99 integer :: id_centre 99 100 integer :: indj,itime,nstop,memaux,mindread 100 101 ! mindread: index of where to read 3rd field … … 211 212 if (ldirect*wftime(indj+1).gt.ldirect*itime) then 212 213 if (lmpreader.or..not. lmp_use_reader) then 213 if ( metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then214 if (id_centre.eq.icg_id_ecmwf) then 214 215 call readwind_ecmwf(indj+1,mindread,uuh,vvh,wwh) 215 216 else … … 217 218 end if 218 219 call readwind_nests(indj+1,mindread,uuhn,vvhn,wwhn) 219 call calcpar(mindread,uuh,vvh,pvh, metdata_format)220 call calcpar_nests(mindread,uuhn,vvhn,pvhn, metdata_format)221 if ( metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then220 call calcpar(mindread,uuh,vvh,pvh,id_centre) 221 call calcpar_nests(mindread,uuhn,vvhn,pvhn,id_centre) 222 if (id_centre.eq.icg_id_ecmwf) then 222 223 call verttransform_ecmwf(mindread,uuh,vvh,wwh,pvh) 223 224 else … … 249 250 memind(1)=1 250 251 if (lmpreader.or..not.lmp_use_reader) then 251 if ( metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then252 if (id_centre.eq.icg_id_ecmwf) then 252 253 call readwind_ecmwf(indj,memind(1),uuh,vvh,wwh) 253 254 else … … 255 256 end if 256 257 call readwind_nests(indj,memind(1),uuhn,vvhn,wwhn) 257 call calcpar(memind(1),uuh,vvh,pvh, metdata_format)258 call calcpar_nests(memind(1),uuhn,vvhn,pvhn, metdata_format)259 if ( metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then258 call calcpar(memind(1),uuh,vvh,pvh,id_centre) 259 call calcpar_nests(memind(1),uuhn,vvhn,pvhn,id_centre) 260 if (id_centre.eq.icg_id_ecmwf) then 260 261 call verttransform_ecmwf(memind(1),uuh,vvh,wwh,pvh) 261 262 else … … 267 268 memind(2)=2 268 269 if (lmpreader.or..not.lmp_use_reader) then 269 if ( metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then270 if (id_centre.eq.icg_id_ecmwf) then 270 271 call readwind_ecmwf(indj+1,memind(2),uuh,vvh,wwh) 271 272 else … … 273 274 end if 274 275 call readwind_nests(indj+1,memind(2),uuhn,vvhn,wwhn) 275 call calcpar(memind(2),uuh,vvh,pvh, metdata_format)276 call calcpar_nests(memind(2),uuhn,vvhn,pvhn, metdata_format)277 if ( metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then276 call calcpar(memind(2),uuh,vvh,pvh,id_centre) 277 call calcpar_nests(memind(2),uuhn,vvhn,pvhn,id_centre) 278 if (id_centre.eq.icg_id_ecmwf) then 278 279 call verttransform_ecmwf(memind(2),uuh,vvh,wwh,pvh) 279 280 else -
src/makefile
r77778f8 rc0884a8 22 22 # 23 23 # Makefile was modified to produce unified executable for both ECMWF and GFS meteo data formats 24 # gributils were included to detect format of meteo data25 24 # 26 25 # Cpp directives USE_MPIINPLACE were added to three source files. The effect of these directives … … 106 105 107 106 #FFLAGS = -I$(INCPATH1) -I$(INCPATH2) -O$(O_LEV) -cpp -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -flto=jobserver -O$(O_LEV) $(NCOPT) $(FUSER) #-Warray-bounds -fcheck=all # -march=native 108 FFLAGS = -I$(INCPATH1) -I$(INCPATH2) -O$(O_LEV) -cpp -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -flto=jobserver -O$(O_LEV) $(NCOPT) $(FUSER) # -fcheck=all -fbacktrace -march=native 107 #FFLAGS = -I$(INCPATH1) -I$(INCPATH2) -O$(O_LEV) -cpp -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -flto=jobserver -O$(O_LEV) $(NCOPT) $(FUSER) # -fcheck=all -fbacktrace -march=native 108 FFLAGS = -I$(INCPATH1) -I$(INCPATH2) -O$(O_LEV) -cpp -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -flto=jobserver -O$(O_LEV) $(NCOPT) $(FUSER) -fcheck=all -fbacktrace -march=native 109 109 110 110 # Explanation of unusual gfortran options … … 125 125 point_mod.o outg_mod.o \ 126 126 mean_mod.o random_mod.o \ 127 class_gribfile_mod.o 127 check_gribfile_mod.o 128 128 129 129 130 MPI_MODOBJS = \ … … 197 198 interpol_wind_nests.o interpol_misslev_nests.o \ 198 199 interpol_vdep_nests.o interpol_rain_nests.o \ 199 readageclasses.o detectformat.o\200 readageclasses.o \ 200 201 calcfluxes.o fluxoutput.o \ 201 202 qvsat.o skplin.o \ … … 272 273 random_mod.o 273 274 calcfluxes.o: com_mod.o flux_mod.o outg_mod.o par_mod.o 274 calcmatrix.o: c om_mod.o conv_mod.o par_mod.o class_gribfile_mod.o275 calcpar.o: com_mod.o par_mod.o c lass_gribfile_mod.o275 calcmatrix.o: check_gribfile_mod.o conv_mod.o com_mod.o par_mod.o 276 calcpar.o: com_mod.o par_mod.o check_gribfile_mod.o 276 277 calcpar_nests.o: com_mod.o par_mod.o 277 278 calcpv.o: com_mod.o par_mod.o … … 299 300 conv_mod.o: par_mod.o 300 301 convect43c.o: conv_mod.o par_mod.o 301 convmix.o: com_mod.o conv_mod.o flux_mod.o par_mod.o c lass_gribfile_mod.o302 convmix.o: com_mod.o conv_mod.o flux_mod.o par_mod.o check_gribfile_mod.o 302 303 coordtrafo.o: com_mod.o par_mod.o point_mod.o 303 detectformat.o: com_mod.o par_mod.o class_gribfile_mod.o304 304 distance.o: par_mod.o 305 305 distance2.o: par_mod.o … … 307 307 drydepokernel_nest.o: com_mod.o par_mod.o unc_mod.o 308 308 erf.o: par_mod.o 309 FLEXPART.o: com_mod.o conv_mod.o par_mod.o point_mod.o random_mod.o netcdf_output_mod.o class_gribfile_mod.o 309 FLEXPART.o: com_mod.o conv_mod.o par_mod.o point_mod.o random_mod.o netcdf_output_mod.o check_gribfile_mod.o 310 FLEXPART.o: check_gribfile_mod.o random_mod.o conv_mod.o com_mod.o par_mod.o point_mod.o 310 311 FLEXPART_MPI.o: com_mod.o conv_mod.o mpi_mod.o par_mod.o point_mod.o \ 311 random_mod.o netcdf_output_mod.o c lass_gribfile_mod.o312 random_mod.o netcdf_output_mod.o check_gribfile_mod.o 312 313 fluxoutput.o: com_mod.o flux_mod.o outg_mod.o par_mod.o 313 314 get_settling.o: com_mod.o par_mod.o 314 getfields.o: com_mod.o par_mod.o c lass_gribfile_mod.o315 getfields_mpi.o: com_mod.o par_mod.o mpi_mod.o c lass_gribfile_mod.o315 getfields.o: com_mod.o par_mod.o check_gribfile_mod.o 316 getfields_mpi.o: com_mod.o par_mod.o mpi_mod.o check_gribfile_mod.o 316 317 gethourlyOH.o: com_mod.o oh_mod.o par_mod.o 317 318 getrb.o: par_mod.o … … 354 355 mpi_mod.o: com_mod.o par_mod.o unc_mod.o 355 356 netcdf_output_mod.o: com_mod.o outg_mod.o par_mod.o point_mod.o unc_mod.o mean_mod.o 356 obukhov.o: par_mod.o c lass_gribfile_mod.o357 obukhov.o: par_mod.o check_gribfile_mod.o 357 358 ohreaction.o: com_mod.o oh_mod.o par_mod.o 358 359 openouttraj.o: com_mod.o par_mod.o point_mod.o … … 401 402 releaseparticles_mpi.o: com_mod.o mpi_mod.o par_mod.o point_mod.o \ 402 403 random_mod.o xmass_mod.o 403 richardson.o: par_mod.o c lass_gribfile_mod.o404 richardson.o: par_mod.o check_gribfile_mod.o 404 405 scalev.o: par_mod.o 405 406 shift_field.o: par_mod.o -
src/obukhov.f90
r6ecb30a rc0884a8 20 20 !********************************************************************** 21 21 22 real function obukhov(ps,tsurf,tdsurf,tlev,ustar,hf,akm,bkm,plev, metdata_format)22 real function obukhov(ps,tsurf,tdsurf,tlev,ustar,hf,akm,bkm,plev,id_centre) 23 23 24 24 !******************************************************************** … … 41 41 ! if-then for meteo-type dependent code * 42 42 ! * 43 ! * 44 ! Petra Seibert, 2018-06-26: * 45 ! simplified version met data format detection * 46 ! * 43 47 !******************************************************************** 44 48 ! * … … 54 58 ! bkm ECMWF vertical discretization parameter * 55 59 ! plev * 56 ! metdata_formatformat of metdata (ecmwf/gfs) *60 ! id_centre format of metdata (ecmwf/gfs) * 57 61 ! * 58 62 !******************************************************************** 59 63 60 64 use par_mod 61 use c lass_gribfile65 use check_gribfile_mod 62 66 63 67 implicit none 64 68 65 integer :: metdata_format69 integer :: id_centre 66 70 real :: akm(nwzmax),bkm(nwzmax) 67 71 real :: ps,tsurf,tdsurf,tlev,ustar,hf,e,ew,tv,rhoa,plev … … 72 76 tv=tsurf*(1.+0.378*e/ps) ! virtual temperature 73 77 rhoa=ps/(r_air*tv) ! air density 74 if ( metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then78 if (id_centre.eq.icg_id_ecmwf) then 75 79 ak1=(akm(1)+akm(2))/2. 76 80 bk1=(bkm(1)+bkm(2))/2. -
src/par_mod.f90
r1f55de1 rc0884a8 147 147 148 148 ! ECMWF 149 ! integer,parameter :: nxmax=361,nymax=181,nuvzmax=92,nwzmax=92,nzmax=92,nxshift=359! 1.0 degree 92 level150 integer,parameter :: nxmax=361,nymax=181,nuvzmax=138,nwzmax=138,nzmax=138,nxshift=359 ! 1.0 degree 138 level149 integer,parameter :: nxmax=721,nymax=362,nuvzmax=36,nwzmax=36,nzmax=36,nxshift=0 ! 1.0 degree 92 level 150 ! integer,parameter :: nxmax=361,nymax=181,nuvzmax=138,nwzmax=138,nzmax=138,nxshift=359 ! 1.0 degree 138 level 151 151 ! integer,parameter :: nxmax=721,nymax=361,nuvzmax=138,nwzmax=138,nzmax=138,nxshift=359 ! 0.5 degree 138 level 152 152 ! integer,parameter :: nxmax=181,nymax=91,nuvzmax=92,nwzmax=92,nzmax=92,nxshift=0 ! CERA 2.0 degree 92 level -
src/richardson.f90
r6ecb30a rc0884a8 21 21 22 22 subroutine richardson(psurf,ust,ttlev,qvlev,ulev,vlev,nuvz, & 23 akz,bkz,hf,tt2,td2,h,wst,hmixplus, metdata_format)23 akz,bkz,hf,tt2,td2,h,wst,hmixplus,id_centre) 24 24 ! i i i i i i i 25 25 ! i i i i i o o o … … 41 41 ! Meteor. 81, 245-269. * 42 42 ! * 43 ! * 44 ! Petra Seibert, 2018-06-26: simplified version met data format detection * 45 ! * 43 46 !**************************************************************************** 44 47 ! * … … 55 58 ! - Merged richardson and richardson_gfs into one routine using * 56 59 ! if-then for meteo-type dependent code * 60 ! * 61 ! * 62 ! Petra Seibert, 2018-06-26: simplified version met data format detection * 57 63 ! * 58 64 !**************************************************************************** … … 64 70 ! tv virtual temperature * 65 71 ! wst convective velocity scale * 66 ! metdata_formatformat of metdata (ecmwf/gfs) *72 ! id_centre format of metdata (ecmwf/gfs) * 67 73 ! * 68 74 ! Constants: * … … 72 78 73 79 use par_mod 74 use c lass_gribfile80 use check_gribfile_mod 75 81 76 82 implicit none 77 83 78 integer :: metdata_format84 integer :: id_centre 79 85 integer :: i,k,nuvz,iter,llev,loop_start 80 86 real :: tv,tvold,zref,z,zold,pint,pold,theta,thetaref,ri … … 89 95 iter=0 90 96 91 if ( metdata_format.eq.GRIBFILE_CENTRE_NCEP) then97 if (id_centre.eq.icg_id_ncep) then 92 98 ! NCEP version: find first model level above ground 93 99 !************************************************** … … 123 129 ! Integrate z up to one level above zt 124 130 !************************************* 125 if ( metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then131 if (id_centre.eq.icg_id_ecmwf) then 126 132 loop_start=2 127 133 else -
src/timemanager.f90
ra9cf4b1 rc0884a8 20 20 !********************************************************************** 21 21 22 subroutine timemanager( metdata_format)22 subroutine timemanager(id_centre) 23 23 24 24 !***************************************************************************** … … 52 52 ! Unified ECMWF and GFS builds * 53 53 ! Marian Harustak, 12.5.2017 * 54 ! - Added passing of metdata_format as it was needed by called routines * 54 ! - Added passing of id_centre as it was needed by called routines * 55 ! * 56 ! Petra Seibert, 2018-06-26: simplified version met data format detection * 57 ! * 55 58 !***************************************************************************** 56 59 ! * … … 86 89 ! xtra1(maxpart), ytra1(maxpart), ztra1(maxpart) = * 87 90 ! spatial positions of trajectories * 88 ! metdata_formatformat of metdata (ecmwf/gfs) *91 ! id_centre format of metdata (ecmwf/gfs) * 89 92 ! * 90 93 ! Constants: * … … 108 111 implicit none 109 112 110 integer :: metdata_format113 integer :: id_centre 111 114 integer :: j,ks,kp,l,n,itime=0,nstop,nstop1 112 115 ! integer :: ksp … … 201 204 write (*,*) 'timemanager> call convmix -- backward' 202 205 endif 203 call convmix(itime, metdata_format)206 call convmix(itime,id_centre) 204 207 if (verbosity.gt.1) then 205 208 !CALL SYSTEM_CLOCK(count_clock, count_rate, count_max) … … 214 217 write (*,*) 'timemanager> call getfields' 215 218 endif 216 call getfields(itime,nstop1, metdata_format)219 call getfields(itime,nstop1,id_centre) 217 220 if (verbosity.gt.1) then 218 221 CALL SYSTEM_CLOCK(count_clock) … … 273 276 write (*,*) 'timemanager> call convmix -- forward' 274 277 endif 275 call convmix(itime, metdata_format)278 call convmix(itime,id_centre) 276 279 endif 277 280 -
src/timemanager_mpi.f90
r20963b1 rc0884a8 20 20 !********************************************************************** 21 21 22 subroutine timemanager( metdata_format)22 subroutine timemanager(id_centre) 23 23 24 24 !***************************************************************************** … … 52 52 ! Unified ECMWF and GFS builds * 53 53 ! Marian Harustak, 12.5.2017 * 54 ! - Added passing of metdata_format as it was needed by called routines * 54 ! - Added passing of id_centre as it was needed by called routines * 55 ! * 56 ! Petra Seibert, 2018-06-26: simplified version met data format detection * 57 ! * 55 58 !***************************************************************************** 56 59 ! * … … 86 89 ! xtra1(maxpart), ytra1(maxpart), ztra1(maxpart) = * 87 90 ! spatial positions of trajectories * 88 ! metdata_formatformat of metdata (ecmwf/gfs) *91 ! id_centre format of metdata (ecmwf/gfs) * 89 92 ! * 90 93 ! Constants: * … … 109 112 implicit none 110 113 111 integer :: metdata_format114 integer :: id_centre 112 115 logical :: reqv_state=.false. ! .true. if waiting for a MPI_Irecv to complete 113 116 integer :: j,ks,kp,l,n,itime=0,nstop,nstop1,memstat=0 … … 214 217 endif 215 218 ! readwind process skips this step 216 if (.not.(lmpreader.and.lmp_use_reader)) call convmix(itime, metdata_format)219 if (.not.(lmpreader.and.lmp_use_reader)) call convmix(itime,id_centre) 217 220 endif 218 221 … … 227 230 if (mp_measure_time) call mpif_mtime('getfields',0) 228 231 229 call getfields(itime,nstop1,memstat, metdata_format)232 call getfields(itime,nstop1,memstat,id_centre) 230 233 231 234 if (mp_measure_time) call mpif_mtime('getfields',1) … … 355 358 write (*,*) 'timemanager> call convmix -- forward' 356 359 endif 357 call convmix(itime, metdata_format)360 call convmix(itime,id_centre) 358 361 endif 359 362
Note: See TracChangeset
for help on using the changeset viewer.