- Timestamp:
- Aug 17, 2017, 4:39:17 PM (7 years ago)
- Branches:
- master, 10.4.1_pesei, GFS_025, bugfixes+enhancements, dev, release-10, release-10.4.1, scaling-bug, univie
- Children:
- 5b34509
- Parents:
- 61e07ba
- Location:
- src
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
src/FLEXPART.f90
rc8fc724 r6ecb30a 33 33 ! * 34 34 !***************************************************************************** 35 ! Changes: * 36 ! Unified ECMWF and GFS builds * 37 ! Marian Harustak, 12.5.2017 * 38 ! - Added detection of metdata format using gributils routines * 39 ! - Distinguished calls to ecmwf/gfs gridcheck versions based on * 40 ! detected metdata format * 41 ! - Passed metdata format down to timemanager * 42 !***************************************************************************** 35 43 ! * 36 44 ! Variables: * … … 46 54 use netcdf_output_mod, only: writeheader_netcdf 47 55 use random_mod, only: gasdev1 56 use class_gribfile 48 57 49 58 implicit none … … 52 61 integer :: idummy = -320 53 62 character(len=256) :: inline_options !pathfile, flexversion, arg2 63 integer :: metdata_format = GRIBFILE_CENTRE_UNKNOWN 64 integer :: detectformat 65 54 66 55 67 … … 172 184 call readavailable 173 185 186 ! Detect metdata format 187 !********************** 188 189 metdata_format = detectformat() 190 191 if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then 192 print *,'ECMWF metdata detected' 193 elseif (metdata_format.eq.GRIBFILE_CENTRE_NCEP) then 194 print *,'NCEP metdata detected' 195 else 196 print *,'Unknown metdata format' 197 return 198 endif 199 200 201 174 202 ! If nested wind fields are used, allocate arrays 175 203 !************************************************ … … 188 216 endif 189 217 190 call gridcheck 218 if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then 219 call gridcheck_ecmwf 220 else 221 call gridcheck_gfs 222 end if 191 223 192 224 if (verbosity.gt.1) then … … 411 443 endif 412 444 413 call timemanager 445 call timemanager(metdata_format) 414 446 415 447 ! NIK 16.02.2005 -
src/FLEXPART_MPI.f90
r5184a7c r6ecb30a 33 33 ! * 34 34 !***************************************************************************** 35 ! Changes: * 36 ! Unified ECMWF and GFS builds * 37 ! Marian Harustak, 12.5.2017 * 38 ! - Added detection of metdata format using gributils routines * 39 ! - Distinguished calls to ecmwf/gfs gridcheck versions based on * 40 ! detected metdata format * 41 ! - Passed metdata format down to timemanager * 42 !***************************************************************************** 35 43 ! * 36 44 ! Variables: * … … 47 55 use netcdf_output_mod, only: writeheader_netcdf 48 56 use random_mod, only: gasdev1 57 use class_gribfile 49 58 50 59 implicit none … … 53 62 integer :: idummy = -320 54 63 character(len=256) :: inline_options !pathfile, flexversion, arg2 64 integer :: metdata_format = GRIBFILE_CENTRE_UNKNOWN 65 integer :: detectformat 66 55 67 56 68 … … 197 209 call readavailable 198 210 211 ! Detect metdata format 212 !********************** 213 214 metdata_format = detectformat() 215 216 if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then 217 print *,'ECMWF metdata detected' 218 elseif (metdata_format.eq.GRIBFILE_CENTRE_NCEP) then 219 print *,'NCEP metdata detected' 220 else 221 print *,'Unknown metdata format' 222 return 223 endif 224 225 226 199 227 ! If nested wind fields are used, allocate arrays 200 228 !************************************************ … … 213 241 endif 214 242 215 call gridcheck 243 if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then 244 call gridcheck_ecmwf 245 else 246 call gridcheck_gfs 247 end if 248 216 249 217 250 if (verbosity.gt.1 .and. lroot) then … … 456 489 457 490 458 call timemanager 491 call timemanager(metdata_format) 459 492 460 493 -
src/calcmatrix.f90
re200b7a r6ecb30a 20 20 !********************************************************************** 21 21 22 subroutine calcmatrix(lconv,delt,cbmf )22 subroutine calcmatrix(lconv,delt,cbmf,metdata_format) 23 23 ! o i o 24 24 !***************************************************************************** … … 30 30 ! Petra Seibert, Bernd C. Krueger, 2000-2001 * 31 31 ! * 32 !***************************************************************************** 33 ! Changes: * 32 34 ! changed by C. Forster, November 2003 - February 2004 * 33 35 ! array fmassfrac(nconvlevmax,nconvlevmax) represents * 34 36 ! the convective redistribution matrix for the particles * 35 37 ! * 38 ! Unified ECMWF and GFS builds * 39 ! Marian Harustak, 12.5.2017 * 40 ! - Merged calcmatrix and calcmatrix_gfs into one routine using if-then * 41 ! for meteo-type dependent code * 42 !***************************************************************************** 43 ! * 36 44 ! lconv indicates whether there is convection in this cell, or not * 37 45 ! delt time step for convection [s] * 38 46 ! cbmf cloud base mass flux * 47 ! metdata_format format of metdata (ecmwf/gfs) * 39 48 ! * 40 49 !***************************************************************************** … … 43 52 use com_mod 44 53 use conv_mod 54 use class_gribfile 45 55 46 56 implicit none 47 57 48 58 real :: rlevmass,summe 59 integer :: metdata_format 49 60 50 61 integer :: iflag, k, kk, kuvz … … 77 88 do kuvz = 2,nuvz 78 89 k = kuvz-1 90 if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then 79 91 pconv(k) = (akz(kuvz) + bkz(kuvz)*psconv) 80 92 phconv(kuvz) = (akm(kuvz) + bkm(kuvz)*psconv) 93 else 94 phconv(kuvz) = 0.5*(pconv(kuvz)+pconv(k)) 95 endif 81 96 dpr(k) = phconv(k) - phconv(kuvz) 82 97 qsconv(k) = f_qvsat( pconv(k), tconv(k) ) -
src/calcpar.f90
re200b7a r6ecb30a 20 20 !********************************************************************** 21 21 22 subroutine calcpar(n,uuh,vvh,pvh )22 subroutine calcpar(n,uuh,vvh,pvh,metdata_format) 23 23 ! i i i o 24 24 !***************************************************************************** … … 37 37 ! new variables in call to richardson * 38 38 ! * 39 !***************************************************************************** 40 ! Changes, Bernd C. Krueger, Feb. 2001: 41 ! Variables tth and qvh (on eta coordinates) in common block 39 ! CHANGE 17/11/2005 Caroline Forster NCEP GFS version * 40 ! * 41 ! Changes, Bernd C. Krueger, Feb. 2001: * 42 ! Variables tth and qvh (on eta coordinates) in common block * 43 ! * 44 ! Unified ECMWF and GFS builds * 45 ! Marian Harustak, 12.5.2017 * 46 ! - Merged calcpar and calcpar_gfs into one routine using if-then * 47 ! for meteo-type dependent code * 48 !***************************************************************************** 49 42 50 !***************************************************************************** 43 51 ! * 44 52 ! Variables: * 45 53 ! n temporal index for meteorological fields (1 to 3) * 54 ! uuh * 55 ! vvh * 56 ! pvh * 57 ! metdata_format format of metdata (ecmwf/gfs) * 46 58 ! * 47 59 ! Constants: * … … 56 68 use par_mod 57 69 use com_mod 70 use class_gribfile 58 71 59 72 implicit none 60 73 61 integer :: n,ix,jy,i,kz,lz,kzmin 74 integer :: metdata_format 75 integer :: n,ix,jy,i,kz,lz,kzmin,llev,loop_start 62 76 real :: ttlev(nuvzmax),qvlev(nuvzmax),obukhov,scalev,ol,hmixplus 63 77 real :: ulev(nuvzmax),vlev(nuvzmax),ew,rh,vd(maxspec),subsceff,ylat 64 real :: altmin,tvold,pold,zold,pint,tv,zlev(nuvzmax) 78 real :: altmin,tvold,pold,zold,pint,tv,zlev(nuvzmax),hmixdummy 65 79 real :: uuh(0:nxmax-1,0:nymax-1,nuvzmax) 66 80 real :: vvh(0:nxmax-1,0:nymax-1,nuvzmax) … … 111 125 !*********************************************** 112 126 127 if (metdata_format.eq.GRIBFILE_CENTRE_NCEP) then 128 ! NCEP version: find first level above ground 129 llev = 0 130 do i=1,nuvz 131 if (ps(ix,jy,1,n).lt.akz(i)) llev=i 132 end do 133 llev = llev+1 134 if (llev.gt.nuvz) llev = nuvz-1 135 ! NCEP version 136 137 ! calculate inverse Obukhov length scale with tth(llev) 113 138 ol=obukhov(ps(ix,jy,1,n),tt2(ix,jy,1,n),td2(ix,jy,1,n), & 114 tth(ix,jy,2,n),ustar(ix,jy,1,n),sshf(ix,jy,1,n),akm,bkm) 139 tth(ix,jy,llev,n),ustar(ix,jy,1,n),sshf(ix,jy,1,n),akm,bkm,akz(llev),metdata_format) 140 else 141 llev=0 142 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,akz(llev),metdata_format) 144 end if 145 115 146 if (ol.ne.0.) then 116 147 oli(ix,jy,1,n)=1./ol … … 130 161 end do 131 162 163 if (metdata_format.eq.GRIBFILE_CENTRE_NCEP) then 164 ! NCEP version hmix has been read in in readwind.f, is therefore not calculated here 132 165 call richardson(ps(ix,jy,1,n),ustar(ix,jy,1,n),ttlev,qvlev, & 133 166 ulev,vlev,nuvz,akz,bkz,sshf(ix,jy,1,n),tt2(ix,jy,1,n), & 134 td2(ix,jy,1,n),hmix(ix,jy,1,n),wstar(ix,jy,1,n),hmixplus) 167 td2(ix,jy,1,n),hmixdummy,wstar(ix,jy,1,n),hmixplus,metdata_format) 168 else 169 call richardson(ps(ix,jy,1,n),ustar(ix,jy,1,n),ttlev,qvlev, & 170 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) 172 end if 135 173 136 174 if(lsubgrid.eq.1) then … … 173 211 !****************************************************** 174 212 175 ! 1) Calculate altitudes of ECMWFmodel levels176 !*************************************** ******213 ! 1) Calculate altitudes of model levels 214 !*************************************** 177 215 178 216 tvold=tt2(ix,jy,1,n)*(1.+0.378*ew(td2(ix,jy,1,n))/ & … … 180 218 pold=ps(ix,jy,1,n) 181 219 zold=0. 182 do kz=2,nuvz 220 if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then 221 loop_start=2 222 else 223 loop_start=llev 224 end if 225 do kz=loop_start,nuvz 183 226 pint=akz(kz)+bkz(kz)*ps(ix,jy,1,n) ! pressure on model layers 184 227 tv=tth(ix,jy,kz,n)*(1.+0.608*qvh(ix,jy,kz,n)) … … 199 242 !************************************************************************ 200 243 201 do kz=1,nuvz 244 if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then 245 loop_start=1 246 else 247 loop_start=llev 248 end if 249 250 do kz=loop_start,nuvz 202 251 if (zlev(kz).ge.altmin) then 203 252 kzmin=kz -
src/calcpar_nests.f90
rdb712a8 r6ecb30a 20 20 !********************************************************************** 21 21 22 subroutine calcpar_nests(n,uuhn,vvhn,pvhn )22 subroutine calcpar_nests(n,uuhn,vvhn,pvhn,metdata_format) 23 23 ! i i i o 24 24 !***************************************************************************** … … 39 39 ! * 40 40 !***************************************************************************** 41 ! Changes, Bernd C. Krueger, Feb. 2001: 42 ! Variables tth and qvh (on eta coordinates) in common block 41 ! Changes, Bernd C. Krueger, Feb. 2001: * 42 ! Variables tth and qvh (on eta coordinates) in common block * 43 ! * 44 ! Unified ECMWF and GFS builds * 45 ! Marian Harustak, 12.5.2017 * 46 ! - Added passing of metdata_format as it was needed by called routines * 43 47 !***************************************************************************** 44 48 ! * 45 49 ! Variables: * 46 50 ! n temporal index for meteorological fields (1 to 3) * 51 ! metdata_format format of metdata (ecmwf/gfs) * 47 52 ! * 48 53 ! Constants: * … … 60 65 implicit none 61 66 67 integer :: metdata_format 62 68 integer :: n,ix,jy,i,l,kz,lz,kzmin 63 real :: ttlev(nuvzmax),qvlev(nuvzmax),obukhov,scalev,ol,hmixplus 69 real :: ttlev(nuvzmax),qvlev(nuvzmax),obukhov,scalev,ol,hmixplus,dummyakzllev 64 70 real :: ulev(nuvzmax),vlev(nuvzmax),ew,rh,vd(maxspec),subsceff,ylat 65 71 real :: altmin,tvold,pold,zold,pint,tv,zlev(nuvzmax) … … 110 116 ol=obukhov(psn(ix,jy,1,n,l),tt2n(ix,jy,1,n,l), & 111 117 td2n(ix,jy,1,n,l),tthn(ix,jy,2,n,l),ustarn(ix,jy,1,n,l), & 112 sshfn(ix,jy,1,n,l),akm,bkm )118 sshfn(ix,jy,1,n,l),akm,bkm,dummyakzllev,metdata_format) 113 119 if (ol.ne.0.) then 114 120 olin(ix,jy,1,n,l)=1./ol … … 131 137 qvlev,ulev,vlev,nuvz,akz,bkz,sshfn(ix,jy,1,n,l), & 132 138 tt2n(ix,jy,1,n,l),td2n(ix,jy,1,n,l),hmixn(ix,jy,1,n,l), & 133 wstarn(ix,jy,1,n,l),hmixplus )139 wstarn(ix,jy,1,n,l),hmixplus,metdata_format) 134 140 135 141 if(lsubgrid.eq.1) then -
src/convmix.f90
r8a65cb0 r6ecb30a 20 20 !********************************************************************** 21 21 22 subroutine convmix(itime )22 subroutine convmix(itime,metdata_format) 23 23 ! i 24 24 !************************************************************** … … 31 31 !CHANGES by A. Stohl: 32 32 ! various run-time optimizations - February 2005 33 ! CHANGES by C. Forster, November 2005, NCEP GFS version 34 ! in the ECMWF version convection is calculated on the 35 ! original eta-levels 36 ! in the GFS version convection is calculated on the 37 ! FLEXPART levels 38 ! 39 ! Unified ECMWF and GFS builds 40 ! Marian Harustak, 12.5.2017 41 ! - Merged convmix and convmix_gfs into one routine using if-then 42 ! for meteo-type dependent code 33 43 !************************************************************** 34 44 … … 37 47 use com_mod 38 48 use conv_mod 49 use class_gribfile 39 50 40 51 implicit none … … 44 55 integer :: jy, kpart, ktop, ngrid,kz 45 56 integer :: igrid(maxpart), ipoint(maxpart), igridn(maxpart,maxnests) 57 integer :: metdata_format 46 58 47 59 ! itime [s] current time … … 104 116 105 117 ngrid=0 118 if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then 106 119 do j=numbnests,1,-1 107 120 if ( x.gt.xln(j)+eps .and. x.lt.xrn(j)-eps .and. & … … 111 124 endif 112 125 end do 126 else 127 do j=numbnests,1,-1 128 if ( x.gt.xln(j) .and. x.lt.xrn(j) .and. & 129 y.gt.yln(j) .and. y.lt.yrn(j) ) then 130 ngrid=j 131 goto 23 132 endif 133 end do 134 endif 113 135 23 continue 114 136 … … 167 189 td2conv=(td2(ix,jy,1,mind1)*dt2+td2(ix,jy,1,mind2)*dt1)*dtt 168 190 !!$ do kz=1,nconvlev+1 !old 191 if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then 169 192 do kz=1,nuvz-1 !bugfix 170 193 tconv(kz)=(tth(ix,jy,kz+1,mind1)*dt2+ & … … 173 196 qvh(ix,jy,kz+1,mind2)*dt1)*dtt 174 197 end do 198 else 199 do kz=1,nuvz-1 !bugfix 200 pconv(kz)=(pplev(ix,jy,kz,mind1)*dt2+ & 201 pplev(ix,jy,kz,mind2)*dt1)*dtt 202 tconv(kz)=(tt(ix,jy,kz,mind1)*dt2+ & 203 tt(ix,jy,kz,mind2)*dt1)*dtt 204 qconv(kz)=(qv(ix,jy,kz,mind1)*dt2+ & 205 qv(ix,jy,kz,mind2)*dt1)*dtt 206 end do 207 end if 175 208 176 209 ! Calculate translocation matrix 177 call calcmatrix(lconv,delt,cbaseflux(ix,jy) )210 call calcmatrix(lconv,delt,cbaseflux(ix,jy),metdata_format) 178 211 igrold = igr 179 212 ktop = 0 … … 252 285 ! calculate translocation matrix 253 286 !******************************* 254 call calcmatrix(lconv,delt,cbasefluxn(ix,jy,inest) )287 call calcmatrix(lconv,delt,cbasefluxn(ix,jy,inest),metdata_format) 255 288 igrold = igr 256 289 ktop = 0 -
src/getfields.f90
rd1a8707 r6ecb30a 20 20 !********************************************************************** 21 21 22 subroutine getfields(itime,nstop )22 subroutine getfields(itime,nstop,metdata_format) 23 23 ! i o 24 24 !***************************************************************************** … … 38 38 ! * 39 39 !***************************************************************************** 40 ! Changes, Bernd C. Krueger, Feb. 2001: 41 ! Variables tth,qvh,tthn,qvhn (on eta coordinates) in common block. 42 ! Function of nstop extended. 40 ! Changes, Bernd C. Krueger, Feb. 2001: * 41 ! Variables tth,qvh,tthn,qvhn (on eta coordinates) in common block. * 42 ! Function of nstop extended. * 43 ! * 44 ! Unified ECMWF and GFS builds * 45 ! Marian Harustak, 12.5.2017 * 46 ! - Added passing of metdata_format as it was needed by called routines * 43 47 !***************************************************************************** 44 48 ! * … … 58 62 ! tt(0:nxmax,0:nymax,nuvzmax,2) temperature [K] * 59 63 ! ps(0:nxmax,0:nymax,2) surface pressure [Pa] * 64 ! metdata_format format of metdata (ecmwf/gfs) * 60 65 ! * 61 66 ! Constants: * … … 67 72 use par_mod 68 73 use com_mod 74 use class_gribfile 69 75 70 76 implicit none 71 77 72 78 integer :: indj,itime,nstop,memaux 79 integer :: metdata_format 73 80 74 81 real :: uuh(0:nxmax-1,0:nymax-1,nuvzmax) … … 125 132 do indj=indmin,numbwf-1 126 133 if (ldirect*wftime(indj+1).gt.ldirect*itime) then 127 call readwind(indj+1,memind(2),uuh,vvh,wwh) 134 if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then 135 call readwind_ecmwf(indj+1,memind(2),uuh,vvh,wwh) 136 else 137 call readwind_gfs(indj+1,memind(2),uuh,vvh,wwh) 138 end if 128 139 call readwind_nests(indj+1,memind(2),uuhn,vvhn,wwhn) 129 call calcpar(memind(2),uuh,vvh,pvh) 130 call calcpar_nests(memind(2),uuhn,vvhn,pvhn) 131 call verttransform(memind(2),uuh,vvh,wwh,pvh) 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) then 143 call verttransform_ecmwf(memind(2),uuh,vvh,wwh,pvh) 144 else 145 call verttransform_gfs(memind(2),uuh,vvh,wwh,pvh) 146 end if 132 147 call verttransform_nests(memind(2),uuhn,vvhn,wwhn,pvhn) 133 148 memtime(2)=wftime(indj+1) … … 152 167 (ldirect*wftime(indj+1).gt.ldirect*itime)) then 153 168 memind(1)=1 154 call readwind(indj,memind(1),uuh,vvh,wwh) 169 if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then 170 call readwind_ecmwf(indj,memind(1),uuh,vvh,wwh) 171 else 172 call readwind_gfs(indj,memind(1),uuh,vvh,wwh) 173 end if 155 174 call readwind_nests(indj,memind(1),uuhn,vvhn,wwhn) 156 call calcpar(memind(1),uuh,vvh,pvh) 157 call calcpar_nests(memind(1),uuhn,vvhn,pvhn) 158 call verttransform(memind(1),uuh,vvh,wwh,pvh) 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) then 178 call verttransform_ecmwf(memind(1),uuh,vvh,wwh,pvh) 179 else 180 call verttransform_gfs(memind(1),uuh,vvh,wwh,pvh) 181 end if 159 182 call verttransform_nests(memind(1),uuhn,vvhn,wwhn,pvhn) 160 183 memtime(1)=wftime(indj) 161 184 memind(2)=2 162 call readwind(indj+1,memind(2),uuh,vvh,wwh) 185 if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then 186 call readwind_ecmwf(indj+1,memind(2),uuh,vvh,wwh) 187 else 188 call readwind_gfs(indj+1,memind(2),uuh,vvh,wwh) 189 end if 163 190 call readwind_nests(indj+1,memind(2),uuhn,vvhn,wwhn) 164 call calcpar(memind(2),uuh,vvh,pvh) 165 call calcpar_nests(memind(2),uuhn,vvhn,pvhn) 166 call verttransform(memind(2),uuh,vvh,wwh,pvh) 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) then 194 call verttransform_ecmwf(memind(2),uuh,vvh,wwh,pvh) 195 else 196 call verttransform_gfs(memind(2),uuh,vvh,wwh,pvh) 197 end if 167 198 call verttransform_nests(memind(2),uuhn,vvhn,wwhn,pvhn) 168 199 memtime(2)=wftime(indj+1) -
src/getfields_mpi.f90
r78e62dc r6ecb30a 20 20 !********************************************************************** 21 21 22 subroutine getfields(itime,nstop,memstat )22 subroutine getfields(itime,nstop,memstat,metdata_format) 23 23 ! i o o 24 24 !***************************************************************************** … … 58 58 ! memstat=0: no new fields to be read 59 59 ! 60 ! Unified ECMWF and GFS builds 61 ! Marian Harustak, 12.5.2017 62 ! - Added passing of metdata_format as it was needed by called routines 63 ! 60 64 !***************************************************************************** 61 65 ! * … … 77 81 ! tt(0:nxmax,0:nymax,nuvzmax,numwfmem) temperature [K] * 78 82 ! ps(0:nxmax,0:nymax,numwfmem) surface pressure [Pa] * 83 ! metdata_format format of metdata (ecmwf/gfs) * 79 84 ! * 80 85 ! Constants: * … … 87 92 use com_mod 88 93 use mpi_mod, only: lmpreader,lmp_use_reader,lmp_sync 94 use class_gribfile 89 95 90 96 implicit none 91 97 98 integer :: metdata_format 92 99 integer :: indj,itime,nstop,memaux,mindread 93 100 ! mindread: index of where to read 3rd field … … 204 211 if (ldirect*wftime(indj+1).gt.ldirect*itime) then 205 212 if (lmpreader.or..not. lmp_use_reader) then 206 call readwind(indj+1,mindread,uuh,vvh,wwh) 213 if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then 214 call readwind_ecmwf(indj+1,mindread,uuh,vvh,wwh) 215 else 216 call readwind_gfs(indj+1,mindread,uuh,vvh,wwh) 217 end if 207 218 call readwind_nests(indj+1,mindread,uuhn,vvhn,wwhn) 208 call calcpar(mindread,uuh,vvh,pvh) 209 call calcpar_nests(mindread,uuhn,vvhn,pvhn) 210 call verttransform(mindread,uuh,vvh,wwh,pvh) 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) then 222 call verttransform_ecmwf(mindread,uuh,vvh,wwh,pvh) 223 else 224 call verttransform_gfs(mindread,uuh,vvh,wwh,pvh) 225 end if 211 226 call verttransform_nests(mindread,uuhn,vvhn,wwhn,pvhn) 212 227 end if … … 230 245 memind(1)=1 231 246 if (lmpreader.or..not.lmp_use_reader) then 232 call readwind(indj,memind(1),uuh,vvh,wwh) 247 if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then 248 call readwind_ecmwf(indj,memind(1),uuh,vvh,wwh) 249 else 250 call readwind_gfs(indj,memind(1),uuh,vvh,wwh) 251 end if 233 252 call readwind_nests(indj,memind(1),uuhn,vvhn,wwhn) 234 call calcpar(memind(1),uuh,vvh,pvh) 235 call calcpar_nests(memind(1),uuhn,vvhn,pvhn) 236 call verttransform(memind(1),uuh,vvh,wwh,pvh) 253 call calcpar(memind(1),uuh,vvh,pvh,metdata_format) 254 call calcpar_nests(memind(1),uuhn,vvhn,pvhn,metdata_format) 255 if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then 256 call verttransform_ecmwf(memind(1),uuh,vvh,wwh,pvh) 257 else 258 call verttransform_gfs(memind(1),uuh,vvh,wwh,pvh) 259 end if 237 260 call verttransform_nests(memind(1),uuhn,vvhn,wwhn,pvhn) 238 261 end if … … 240 263 memind(2)=2 241 264 if (lmpreader.or..not.lmp_use_reader) then 242 call readwind(indj+1,memind(2),uuh,vvh,wwh) 265 if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then 266 call readwind_ecmwf(indj+1,memind(2),uuh,vvh,wwh) 267 else 268 call readwind_gfs(indj+1,memind(2),uuh,vvh,wwh) 269 end if 243 270 call readwind_nests(indj+1,memind(2),uuhn,vvhn,wwhn) 244 call calcpar(memind(2),uuh,vvh,pvh) 245 call calcpar_nests(memind(2),uuhn,vvhn,pvhn) 246 call verttransform(memind(2),uuh,vvh,wwh,pvh) 271 call calcpar(memind(2),uuh,vvh,pvh,metdata_format) 272 call calcpar_nests(memind(2),uuhn,vvhn,pvhn,metdata_format) 273 if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then 274 call verttransform_ecmwf(memind(2),uuh,vvh,wwh,pvh) 275 else 276 call verttransform_gfs(memind(2),uuh,vvh,wwh,pvh) 277 end if 247 278 call verttransform_nests(memind(2),uuhn,vvhn,wwhn,pvhn) 248 279 end if -
src/gridcheck_gfs.f90
r4c64400 r6ecb30a 20 20 !********************************************************************** 21 21 22 subroutine gridcheck 22 subroutine gridcheck_gfs 23 23 24 24 !********************************************************************** … … 38 38 ! CHANGE: 03/12/2008, Harald Sodemann, update to f90 with * 39 39 ! ECMWF grib_api * 40 ! * 41 ! Unified ECMWF and GFS builds * 42 ! Marian Harustak, 12.5.2017 * 43 ! - Renamed routine from gridcheck to gridcheck_gfs * 40 44 ! * 41 45 !********************************************************************** … … 537 541 endif 538 542 539 end subroutine gridcheck 543 end subroutine gridcheck_gfs -
src/makefile
r61e07ba r6ecb30a 143 143 ew.o readreleases.o \ 144 144 readdepo.o get_vdep_prob.o \ 145 get_wetscav.o \145 get_wetscav.o readwind_gfs.o \ 146 146 psim.o outgrid_init.o \ 147 outgrid_init_nest.o \147 outgrid_init_nest.o calcmatrix.o \ 148 148 photo_O1D.o readlanduse.o \ 149 149 interpol_wind.o readoutgrid.o \ 150 150 interpol_all.o readpaths.o \ 151 getrb.o \152 getrc.o \151 getrb.o obukhov.o \ 152 getrc.o convmix.o \ 153 153 getvdep.o readspecies.o \ 154 interpol_misslev.o \155 scalev.o \156 pbl_profile.o readOHfield.o \157 juldate.o \154 interpol_misslev.o richardson.o \ 155 scalev.o verttransform_ecmwf.o \ 156 pbl_profile.o readOHfield.o \ 157 juldate.o verttransform_gfs.o \ 158 158 interpol_vdep.o interpol_rain.o \ 159 159 hanna.o wetdepokernel.o \ 160 160 calcpar.o wetdepo.o \ 161 161 hanna_short.o windalign.o \ 162 hanna1.o 163 162 hanna1.o gridcheck_ecmwf.o \ 163 gridcheck_gfs.o gridcheck_nests.o \ 164 164 readwind_nests.o calcpar_nests.o \ 165 165 verttransform_nests.o interpol_all_nests.o \ 166 166 interpol_wind_nests.o interpol_misslev_nests.o \ 167 167 interpol_vdep_nests.o interpol_rain_nests.o \ 168 readageclasses.o \168 readageclasses.o detectformat.o \ 169 169 calcfluxes.o fluxoutput.o \ 170 170 qvsat.o skplin.o \ … … 319 319 mpi_mod.o: com_mod.o par_mod.o unc_mod.o 320 320 netcdf_output_mod.o: com_mod.o outg_mod.o par_mod.o point_mod.o unc_mod.o mean_mod.o 321 obukhov.o: par_mod.o 322 obukhov_gfs.o: par_mod.o 321 obukhov.o: par_mod.o class_gribfile_mod.o 323 322 ohreaction.o: com_mod.o oh_mod.o par_mod.o 324 323 openouttraj.o: com_mod.o par_mod.o point_mod.o … … 327 326 outgrid_init.o: com_mod.o flux_mod.o oh_mod.o outg_mod.o par_mod.o unc_mod.o 328 327 outgrid_init_nest.o: com_mod.o outg_mod.o par_mod.o unc_mod.o 329 par_mod.o :330 328 part0.o: par_mod.o 331 329 partdep.o: par_mod.o -
src/mpi_mod.f90
rb5127f9 r6ecb30a 59 59 ! * 60 60 !***************************************************************************** 61 ! * 62 ! Modification by DJM, 2017-05-09 - added #ifdef USE_MPIINPLACE cpp * 63 ! directive to mpif_tm_reduce_grid() to insure that MPI_IN_PLACE is * 64 ! used in the MPI_Reduce() only if specifically compiled with that * 65 ! directive. * 66 ! * 67 !***************************************************************************** 61 68 62 69 use mpi … … 2421 2428 2422 2429 ! 2) Using in-place reduction 2430 2431 !!!-------------------------------------------------------------------- 2432 !!! DJM - 2017-05-09 change - MPI_IN_PLACE option for MPI_Reduce() causes 2433 !!! severe numerical problems in some cases. I'm guessing there are memory 2434 !!! overrun issues in this complex code, but have so far failed to identify 2435 !!! a specific problem. And/or, when one searches the Internet for this 2436 !!! issue, there is "some" hint that the implementation may be buggy. 2437 !!! 2438 !!! At this point, with the following CPP USE_MPIINPLACE directive, the 2439 !!! default behaviour will be to not use the MPI_IN_PLACE option. 2440 !!! Users will have to compile with -DUSE_MPIINPLACE if they want that option. 2441 !!! Introduction of the CPP directives also requires that the code be compiled 2442 !!! with the "-x f95-cpp-input" option. 2443 !!! 2444 !!! Modification of this section requires the addition of array gridunc0, which 2445 !!! requires an allocation in outgrid_init.f90 and initial declaration in 2446 !!! unc_mod.f90. 2447 !!!-------------------------------------------------------------------- 2448 2449 #ifdef USE_MPIINPLACE 2450 2423 2451 if (lroot) then 2424 2452 call MPI_Reduce(MPI_IN_PLACE, gridunc, grid_size3d, mp_sp, MPI_SUM, id_root, & … … 2429 2457 & mp_comm_used, mp_ierr) 2430 2458 end if 2459 2460 #else 2461 2462 call MPI_Reduce(gridunc, gridunc0, grid_size3d, mp_sp, MPI_SUM, id_root, & 2463 & mp_comm_used, mp_ierr) 2464 if (lroot) gridunc = gridunc0 2465 2466 #endif 2431 2467 2432 2468 if ((WETDEP).and.(ldirect.gt.0)) then -
src/obukhov.f90
re200b7a r6ecb30a 20 20 !********************************************************************** 21 21 22 real function obukhov(ps,tsurf,tdsurf,tlev,ustar,hf,akm,bkm )22 real function obukhov(ps,tsurf,tdsurf,tlev,ustar,hf,akm,bkm,plev,metdata_format) 23 23 24 24 !******************************************************************** … … 27 27 ! Date: 1994-06-27 * 28 28 ! * 29 ! Update: A. Stohl, 2000-09-25, avoid division by zero by*30 ! setting ustar to minimum value*29 ! This program calculates Obukhov scale height from surface * 30 ! meteorological data and sensible heat flux. * 31 31 ! * 32 32 !******************************************************************** 33 33 ! * 34 ! This program calculates Obukhov scale height from surface * 35 ! meteorological data and sensible heat flux. * 34 ! Update: A. Stohl, 2000-09-25, avoid division by zero by * 35 ! setting ustar to minimum value * 36 ! CHANGE: 17/11/2005 Caroline Forster NCEP GFS version * 37 ! * 38 ! Unified ECMWF and GFS builds * 39 ! Marian Harustak, 12.5.2017 * 40 ! - Merged obukhov and obukhov_gfs into one routine using * 41 ! if-then for meteo-type dependent code * 36 42 ! * 37 43 !******************************************************************** … … 47 53 ! akm ECMWF vertical discretization parameter * 48 54 ! bkm ECMWF vertical discretization parameter * 55 ! plev * 56 ! metdata_format format of metdata (ecmwf/gfs) * 49 57 ! * 50 58 !******************************************************************** 51 59 52 60 use par_mod 61 use class_gribfile 53 62 54 63 implicit none 55 64 65 integer :: metdata_format 56 66 real :: akm(nwzmax),bkm(nwzmax) 57 67 real :: ps,tsurf,tdsurf,tlev,ustar,hf,e,ew,tv,rhoa,plev … … 62 72 tv=tsurf*(1.+0.378*e/ps) ! virtual temperature 63 73 rhoa=ps/(r_air*tv) ! air density 74 if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then 64 75 ak1=(akm(1)+akm(2))/2. 65 76 bk1=(bkm(1)+bkm(2))/2. 66 77 plev=ak1+bk1*ps ! Pressure level 1 78 end if 67 79 theta=tlev*(100000./plev)**(r_air/cpa) ! potential temperature 68 80 if (ustar.le.0.) ustar=1.e-8 -
src/outgrid_init.f90
r6b22af9 r6ecb30a 19 19 ! along with FLEXPART. If not, see <http://www.gnu.org/licenses/>. * 20 20 !********************************************************************** 21 ! * 22 ! DJM - 2017-05-09 - added #ifdef USE_MPIINPLACE cpp directive to * 23 ! enable allocation of a gridunc0 array if required by MPI code in * 24 ! mpi_mod.f90 * 25 ! * 26 !********************************************************************** 27 21 28 22 29 subroutine outgrid_init … … 215 222 ! Extra field for totals at MPI root process 216 223 if (lroot.and.mpi_mode.gt.0) then 217 ! allocate(gridunc0(0:numxgrid-1,0:numygrid-1,numzgrid,maxspec, & 218 ! maxpointspec_act,nclassunc,maxageclass),stat=stat) 219 ! if (stat.ne.0) write(*,*)'ERROR: could not allocate gridunc0' 224 225 #ifdef USE_MPIINPLACE 226 #else 227 ! If MPI_IN_PLACE option is not used in mpi_mod.f90::mpif_tm_reduce_grid(), 228 ! then an aux array is needed for parallel grid reduction 229 allocate(gridunc0(0:numxgrid-1,0:numygrid-1,numzgrid,maxspec, & 230 maxpointspec_act,nclassunc,maxageclass),stat=stat) 231 if (stat.ne.0) write(*,*)'ERROR: could not allocate gridunc0' 232 #endif 220 233 if (ldirect.gt.0) then 221 234 allocate(wetgridunc0(0:numxgrid-1,0:numygrid-1,maxspec, & -
src/par_mod.f90
r61e07ba r6ecb30a 142 142 143 143 ! integer,parameter :: nxmax=361,nymax=181,nuvzmax=92,nwzmax=92,nzmax=92 !ECMWF new 144 integer,parameter :: nxmax=361,nymax=181,nuvzmax=138,nwzmax=138,nzmax=138 !ECMWF new 144 ! integer,parameter :: nxmax=361,nymax=181,nuvzmax=138,nwzmax=138,nzmax=138 !ECMWF new 145 146 integer,parameter :: nxmax=181,nymax=91,nuvzmax=138,nwzmax=138,nzmax=138 !ECMWF new 145 147 146 148 ! INTEGER,PARAMETER :: nxmax=361,nymax=181,nuvzmax=138,nwzmax=138,nzmax=138 !NCEP data … … 149 151 ! integer,parameter :: nxshift=0 ! for GFS 150 152 ! integer,parameter :: nxmax=15,nymax=15,nuvzmax=140,nwzmax=140,nzmax=140 151 integer,parameter :: nxshift=359 ! for ECMWF152 !integer,parameter :: nxshift=0 ! for GFS153 ! integer,parameter :: nxshift=359 ! for ECMWF 154 integer,parameter :: nxshift=0 ! for GFS 153 155 154 156 !********************************************* -
src/readwind_gfs.f90
r8a65cb0 r6ecb30a 20 20 !********************************************************************** 21 21 22 subroutine readwind (indj,n,uuh,vvh,wwh)22 subroutine readwind_gfs(indj,n,uuh,vvh,wwh) 23 23 24 24 !*********************************************************************** … … 38 38 !* CHANGE: 03/12/2008, Harald Sodemann, update to f90 with * 39 39 !* ECMWF grib_api * 40 ! * 41 ! Unified ECMWF and GFS builds * 42 ! Marian Harustak, 12.5.2017 * 43 ! - Renamed routine from readwind to readwind_gfs * 40 44 !* * 41 45 !*********************************************************************** … … 716 720 stop 'Execution terminated' 717 721 718 end subroutine readwind 722 end subroutine readwind_gfs -
src/richardson.f90
rc2162ce r6ecb30a 21 21 22 22 subroutine richardson(psurf,ust,ttlev,qvlev,ulev,vlev,nuvz, & 23 akz,bkz,hf,tt2,td2,h,wst,hmixplus )23 akz,bkz,hf,tt2,td2,h,wst,hmixplus,metdata_format) 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 ! * 43 45 ! Update: 1999-02-01 by G. Wotawa * 44 46 ! * … … 46 48 ! instead of first model level. * 47 49 ! New input variables tt2, td2 introduced. * 50 ! * 51 ! CHANGE: 17/11/2005 Caroline Forster NCEP GFS version * 52 ! * 53 ! Unified ECMWF and GFS builds * 54 ! Marian Harustak, 12.5.2017 * 55 ! - Merged richardson and richardson_gfs into one routine using * 56 ! if-then for meteo-type dependent code * 48 57 ! * 49 58 !**************************************************************************** … … 55 64 ! tv virtual temperature * 56 65 ! wst convective velocity scale * 66 ! metdata_format format of metdata (ecmwf/gfs) * 57 67 ! * 58 68 ! Constants: * … … 62 72 63 73 use par_mod 74 use class_gribfile 64 75 65 76 implicit none 66 77 67 integer :: i,k,nuvz,iter 78 integer :: metdata_format 79 integer :: i,k,nuvz,iter,llev,loop_start 68 80 real :: tv,tvold,zref,z,zold,pint,pold,theta,thetaref,ri 69 81 real :: akz(nuvz),bkz(nuvz),ulev(nuvz),vlev(nuvz),hf,wst,tt2,td2,ew … … 77 89 iter=0 78 90 91 if (metdata_format.eq.GRIBFILE_CENTRE_NCEP) then 92 ! NCEP version: find first model level above ground 93 !************************************************** 94 95 llev = 0 96 do i=1,nuvz 97 if (psurf.lt.akz(i)) llev=i 98 end do 99 llev = llev+1 100 ! sec llev should not be 1! 101 if (llev.eq.1) llev = 2 102 if (llev.gt.nuvz) llev = nuvz-1 103 ! NCEP version 104 end if 105 106 79 107 ! Compute virtual temperature and virtual potential temperature at 80 108 ! reference level (2 m) … … 95 123 ! Integrate z up to one level above zt 96 124 !************************************* 97 98 do k=2,nuvz 125 if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then 126 loop_start=2 127 else 128 loop_start=llev 129 end if 130 do k=loop_start,nuvz 99 131 pint=akz(k)+bkz(k)*psurf ! pressure on model layers 100 132 tv=ttlev(k)*(1.+0.608*qvlev(k)) -
src/timemanager.f90
ra76d954 r6ecb30a 20 20 !********************************************************************** 21 21 22 subroutine timemanager 22 subroutine timemanager(metdata_format) 23 23 24 24 !***************************************************************************** … … 50 50 ! For compatibility with MPI version, * 51 51 ! variables uap,ucp,uzp,us,vs,ws,cbt now in module com_mod * 52 ! Unified ECMWF and GFS builds * 53 ! Marian Harustak, 12.5.2017 * 54 ! - Added passing of metdata_format as it was needed by called routines * 52 55 !***************************************************************************** 53 56 ! * … … 83 86 ! xtra1(maxpart), ytra1(maxpart), ztra1(maxpart) = * 84 87 ! spatial positions of trajectories * 88 ! metdata_format format of metdata (ecmwf/gfs) * 85 89 ! * 86 90 ! Constants: * … … 102 106 implicit none 103 107 108 integer :: metdata_format 104 109 integer :: j,ks,kp,l,n,itime=0,nstop,nstop1 105 110 ! integer :: ksp … … 194 199 write (*,*) 'timemanager> call convmix -- backward' 195 200 endif 196 call convmix(itime )201 call convmix(itime,metdata_format) 197 202 if (verbosity.gt.1) then 198 203 !CALL SYSTEM_CLOCK(count_clock, count_rate, count_max) … … 207 212 write (*,*) 'timemanager> call getfields' 208 213 endif 209 call getfields(itime,nstop1 )214 call getfields(itime,nstop1,metdata_format) 210 215 if (verbosity.gt.1) then 211 216 CALL SYSTEM_CLOCK(count_clock) … … 266 271 write (*,*) 'timemanager> call convmix -- forward' 267 272 endif 268 call convmix(itime )273 call convmix(itime,metdata_format) 269 274 endif 270 275 -
src/timemanager_mpi.f90
rb5127f9 r6ecb30a 20 20 !********************************************************************** 21 21 22 subroutine timemanager 22 subroutine timemanager(metdata_format) 23 23 24 24 !***************************************************************************** … … 50 50 ! MPI version * 51 51 ! Variables uap,ucp,uzp,us,vs,ws,cbt now in module com_mod * 52 ! Unified ECMWF and GFS builds * 53 ! Marian Harustak, 12.5.2017 * 54 ! - Added passing of metdata_format as it was needed by called routines * 52 55 !***************************************************************************** 53 56 ! * … … 205 208 endif 206 209 ! readwind process skips this step 207 if (.not.(lmpreader.and.lmp_use_reader)) call convmix(itime )210 if (.not.(lmpreader.and.lmp_use_reader)) call convmix(itime,metdata_format) 208 211 endif 209 212 … … 218 221 if (mp_measure_time) call mpif_mtime('getfields',0) 219 222 220 call getfields(itime,nstop1,memstat )223 call getfields(itime,nstop1,memstat,metdata_format) 221 224 222 225 if (mp_measure_time) call mpif_mtime('getfields',1) -
src/unc_mod.f90
r4c64400 r6ecb30a 19 19 ! along with FLEXPART. If not, see <http://www.gnu.org/licenses/>. * 20 20 !********************************************************************** 21 ! * 22 ! DJM - 2017-05-09 - added #ifdef USE_MPIINPLACE cpp directive to * 23 ! enable declaration of a gridunc0 array if required by MPI code in * 24 ! mpi_mod.f90 * 25 ! * 26 !********************************************************************** 21 27 22 28 module unc_mod … … 27 33 28 34 real,allocatable, dimension (:,:,:,:,:,:,:) :: gridunc 35 #ifdef USE_MPIINPLACE 36 #else 37 ! If MPI_IN_PLACE option is not used in mpi_mod.f90::mpif_tm_reduce_grid(), 38 ! then an aux array is needed for parallel grid reduction 39 real,allocatable, dimension (:,:,:,:,:,:,:) :: gridunc0 40 #endif 29 41 real,allocatable, dimension (:,:,:,:,:,:,:) :: griduncn 30 42 real(dep_prec),allocatable, dimension (:,:,:,:,:,:) :: drygridunc -
src/verttransform_ecmwf.f90
r61e07ba r6ecb30a 144 144 145 145 146 tvold(ixm,jym)=tt2(ixm,jym,1,n)*(1.+0.378*ew *(td2(ixm,jym,1,n))/ &146 tvold(ixm,jym)=tt2(ixm,jym,1,n)*(1.+0.378*ew(td2(ixm,jym,1,n))/ & 147 147 ps(ixm,jym,1,n)) 148 148 pold(ixm,jym)=ps(ixm,jym,1,n) … … 194 194 do jy=0,nymin1 195 195 do ix=0,nxmin1 196 tvold(ix,jy)=tt2(ix,jy,1,n)*(1.+0.378*ew *(td2(ix,jy,1,n))/ &196 tvold(ix,jy)=tt2(ix,jy,1,n)*(1.+0.378*ew(td2(ix,jy,1,n))/ & 197 197 ps(ix,jy,1,n)) 198 198 enddo -
src/verttransform_gfs.f90
r4fbe7a5 r6ecb30a 20 20 !********************************************************************** 21 21 22 subroutine verttransform (n,uuh,vvh,wwh,pvh)22 subroutine verttransform_gfs(n,uuh,vvh,wwh,pvh) 23 23 ! i i i i i 24 24 !***************************************************************************** … … 47 47 ! Changes, Bernd C. Krueger, Feb. 2001: 48 48 ! Variables tth and qvh (on eta coordinates) from common block 49 ! 50 ! Unified ECMWF and GFS builds 51 ! Marian Harustak, 12.5.2017 52 ! - Renamed routine from verttransform to verttransform_gfs 53 ! 49 54 !***************************************************************************** 50 55 ! * … … 531 536 532 537 533 end subroutine verttransform 538 end subroutine verttransform_gfs -
src/writeheader.f90
rf13406c r6ecb30a 35 35 !***************************************************************************** 36 36 ! * 37 ! Modified to remove TRIM around the output of flexversion so that * 38 ! it will be a constant length (defined in com_mod.f90) in output header * 39 ! * 40 ! Don Morton, Boreal Scientific Computing * 41 ! 07 May 2017 * 42 ! * 43 !***************************************************************************** 44 ! * 37 45 ! Variables: * 38 46 ! * … … 67 75 68 76 if (ldirect.eq.1) then 69 write(unitheader) ibdate,ibtime, trim(flexversion)77 write(unitheader) ibdate,ibtime, flexversion 70 78 else 71 write(unitheader) iedate,ietime, trim(flexversion)79 write(unitheader) iedate,ietime, flexversion 72 80 endif 73 81 -
src/writeheader_nest.f90
r4fbe7a5 r6ecb30a 35 35 !***************************************************************************** 36 36 ! * 37 ! Modified to remove TRIM around the output of flexversion so that * 38 ! it will be a constant length (defined in com_mod.f90) in output header * 39 ! * 40 ! Don Morton, Boreal Scientific Computing * 41 ! 07 May 2017 * 42 ! * 43 !***************************************************************************** 44 ! * 37 45 ! Variables: * 38 46 ! * … … 67 75 68 76 if (ldirect.eq.1) then 69 write(unitheader) ibdate,ibtime, trim(flexversion)77 write(unitheader) ibdate,ibtime, flexversion 70 78 else 71 write(unitheader) iedate,ietime, trim(flexversion)79 write(unitheader) iedate,ietime, flexversion 72 80 endif 73 81 -
src/writeheader_nest_surf.f90
rf13406c r6ecb30a 35 35 !***************************************************************************** 36 36 ! * 37 ! Modified to remove TRIM around the output of flexversion so that * 38 ! it will be a constant length (defined in com_mod.f90) in output header * 39 ! * 40 ! Don Morton, Boreal Scientific Computing * 41 ! 07 May 2017 * 42 ! * 43 !***************************************************************************** 44 ! * 37 45 ! Variables: * 38 46 ! * … … 67 75 68 76 if (ldirect.eq.1) then 69 write(unitheader) ibdate,ibtime, trim(flexversion)77 write(unitheader) ibdate,ibtime,flexversion 70 78 else 71 write(unitheader) iedate,ietime, trim(flexversion)79 write(unitheader) iedate,ietime,flexversion 72 80 endif 73 81 -
src/writeheader_surf.f90
rf13406c r6ecb30a 35 35 !***************************************************************************** 36 36 ! * 37 ! Modified to remove TRIM around the output of flexversion so that * 38 ! it will be a constant length (defined in com_mod.f90) in output header * 39 ! * 40 ! Don Morton, Boreal Scientific Computing * 41 ! 07 May 2017 * 42 ! * 43 !***************************************************************************** 44 ! * 37 45 ! Variables: * 38 46 ! * … … 67 75 68 76 if (ldirect.eq.1) then 69 write(unitheader) ibdate,ibtime, trim(flexversion)77 write(unitheader) ibdate,ibtime, flexversion 70 78 else 71 write(unitheader) iedate,ietime, trim(flexversion)79 write(unitheader) iedate,ietime, flexversion 72 80 endif 73 81
Note: See TracChangeset
for help on using the changeset viewer.