the CALMET code compliled with PGI dosn't work.

there’s anyone that have compliled the CALMET/CALPUFF code?
i don’t know if my modification is correct…
it stop in the JULDAY routine…
i don’t understand why?
after the second call the year,the month, and the day are all zero!!!

Hi nudols,

I helped another user about a month ago who had a similar problem (see HERE). However, I was never able to successfully run CALMET version 6.2 due to a problem with the example data set, and hence wasn’t able to reproduce the seg fault.

What would be helpful if you can detail exactly which version of CALMET you have as well as the PGI version, OS, and CPU you’re using. Also, please give a step by step description of how you configured and ran CALMET. If you can provide a dataset, that would also help.

  • Mat

thanks a lot!!!

i have modified the code for the input data…but now there is another problem…
the program doesn’t open the formatted file geo.dat

PGFIO-F-225/list-directed read/unit=8/lexical error-- unknown token type.
File name = geo1km.dat formatted, sequential access record = 13
In source file calmet.f, at line number 23591

c — read and print gridded land use data
do 20 j=ny,1,-1
23591 read(iogeo,*)(ilandu(n,j),n=1,nx)
20 continue
messag=‘Land use categories’
call out(xdum,ilandu,2,5,ldate,messag,nx,ny)

Hi nudols,

My best guess is that your running a DOS formated file on linux. Try running “dos2unix” on your data file to convert it.

  • Mat

hi Mat,
thank you for the advice,but ii am still solving my problem…
i preput that i do not know any english and fortran…
i solved the date problem in crude way…and it works,but not in perfect way…
there are two ways to insert the data:
fist :i put the start date and the hours of run and for the UTM zone i put an integer
second : you can see an example after…

anyway i want to show the code according to me it creates the problem:

this a routine that read the date:

call readin(cvdic(1,1),ivleng(1,1),ivtype(1,1),io5,io6,lecho,
2 IBTZ,IRLG,NSECDT,IRTYPE,LCALGRD,ITEST,idum,idum,idum,idum,idum,
3 idum,idum,idum,idum,idum,idum,idum,idum,idum,idum,idum,idum,
4 idum,idum,idum,idum,idum,idum,idum,idum,idum,idum,idum,idum,
5 idum,idum,idum,idum,idum,idum,idum,idum,idum,idum,idum,idum,
6 idum,idum)
where ctime
is declared how character*4 ctime(1,4)

the routine readin is :
subroutine readin(cvdic,ivleng,ivtype,ioin,ioout,lecho,
1 i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12,i13,i14,i15,i16,i17,i18,
2 i19,i20,i21,i22,i23,i24,i25,i26,i27,i28,i29,i30,i31,i32,i33,i34,
3 i35,i36,i37,i38,i39,i40,i41,i42,i43,i44,i45,i46,i47,i48,i49,i50,
4 i51,i52,i53,i54,i55,i56,i57,i58,i59,i60)

(PURPOSE: Read one input group of the free formatted control
c file – allows comments within the input file –
c ignores all text except that within delimiters
c — NOTE: All variables (real, integer, logical,
c or character) must be 4 bytes
c — NOTE: Character*4 array uses only one character
c per word – it must be dimensioned large
c enough to accommodate the number of characters
c in the variable field)

c — INPUTS di readin:
c CVDIC(mxvar) - character12 array - Variable dictionary
c containing up to “MXVAR”
c variable names
c IVLENG(mxvar) - integer array - Dimension of each variable
c (dim. of scalars = 1)
c IVTYPE(mxvar) - integer array - Type of each variable
c 1 = real,
c 2 = integer,
c 3 = logical,
c 4 = character
c IOIN - integer - Fortran unit of control file
c input
c IOOUT - integer - Fortran unit of list file
c output
c LECHO - logical - Control variable determining
c if input data are echoed to
c list file (IOOUT)
c Parameters: MXVAR, MXCOL
c I1, I2, … - integer arrays - Variables being read
c (integer array locally, but can be a real,
c integer, logical, or character4 array in
c the calling routine)
c — READIN called by: host subroutines

4 i1(),i2(),i3(),i4(),i5(),i6(),i7(),i8(),i9(),
1 i10(
2 i19(),i20(),i21(),i22(),i23(),i24(),i25(),i26(),i27(),
3 i28(
4 i37(),i38(),i39(),i40(),i41(),i42(),i43(),i44(),i45(),
5 i46(
6 i55(),i56(),i57(),i58(),i59(),i60()

if i put the date with start and end date (integer)and the UTC-zone (char):

Starting date: Year (IBYR) – No default ! IBYR= 1990 !
Month (IBMO) – No default ! IBMO= 1 !
Day (IBDY) – No default ! IBDY= 9 !
Starting time: Hour (IBHR) – No default ! IBHR = 4 !
Second (IBSEC) – No default !IBSEC = 0 !

Ending date: Year (IEYR) – No default ! IEYR = 1990 !
Month (IEMO) – No default ! IEMO = 1 !
Day (IEDY) – No default ! IEDY = 9 !
Ending time: Hour (IEHR) – No default ! IEHR = 8 !
Second (IESEC) – No default ! IESEC = 0 !

UTC time zone (ABTZ) – No default ! ABTZ= UTC-0500 !

the result is:

ERROR IN SUBR. READIN – Error in input data Array bounds exceeded – Variable: ABTZ Declared dimension = 1<-----------------------------???
Input attempted to element 8
Input line: UTC time zone (ABTZ) – No default ! ABTZ= UTC-0500 !

i don’t understand why?

redhat PGI

Hi nudols,

The error looks like it’s coming from CALMET, but I’m not sure from where or what causes it. Perhaps the authors of the code can help?

  • Mat


A very ugly solution is to comment out line 1652 in “calutils.for” that checks for the correct length of input variables in the control file.
That means that one needs to be careful with the input but the model runs which was my main objective :)

El Gus