Page 1 of 1

con2grad issue of mismatched datafile records and descriptor file

Posted: March 24th, 2023, 4:05 am
by x.sun
I got the issue of mismatched concen.grd and concen.ctl when my cdump has two species & two levels including the ground level 0. It seems by commenting out the first if branch around line 190 in con2grad.f can fix this problem:
...
!if(depos)then
!write(30,'(a,i2,a,10i6)') 'zdef ',nlvl-1,' levels ',(height(k),k=2,nlvl)
!write(30,'(a,i3,a,i2.2,a1,i2.2,a3,2i4,a)') &
! 'tdef ',ntim,' linear ',ihrg,'z',idag,months(imog),kyear,kdel,'hr'
!write(30,'(a,i3)')'vars ',ntyp+1
!write(30,'(a7,i3,a)')ident(1)//'dep',0,' 99 deposition'
!do k=1,ntyp
! write(30,'(a7,i3,a)')ident(k)//'con',nlvl-1,' 99 concentration'
!end do
!else
write(30,'(a,i2,a,10i6)') 'zdef ',nlvl,' levels ',(height(k),k=1,nlvl)
write(30,'(a,i3,a,i2.2,a1,i2.2,a3,2i4,a)') &
'tdef ',ntim,' linear ',ihrg,'z',idag,months(imog),kyear,kdel,'hr'
write(30,'(a,i3)')'vars ',ntyp
do k=1,ntyp
!write(30,'(a7,i3,a)')ident(k)//'con',nlvl,' 99 concentration'
write(30,'(a7,i3,a)')ident(k),nlvl,' 99 concentration'
end do
!end if
...