Hi, I am trying to calculate opacities of CO2 from CDSD-4000, and when I use ./hitran -M 02 -in cdsd command to generate .param files and binary files, it fails. I found in hitran.cpp it has an upper limit (which is 100000000 rows)reading linelists that ./hitran cannot deal with very larger linelist.
We get rid of this issue by changing the loop conditions:
diff --git a/hitran.cpp b/hitran.cpp
index dae8649..e596981 100644
--- a/hitran.cpp
+++ b/hitran.cpp
@@ -279,7 +279,7 @@ int main(int argc, char *argv[]){
char skip[161];
-
for(int i = 0; i < 100000000; ++i){
-
for(unsigned long int i = 0;; ++i){
if(fgets(c1, 3, dataFile) == NULL){
int nnu;
@@ -289,7 +289,7 @@ int main(int argc, char *argv[]){
else{
nnu = range1;
}
-
printf("end %d %g %g %d %d\n", i, nu, nuOld, count, nnu);
-
printf("end %lu %g %g %d %d\n", i, nu, nuOld, count, nnu);
filesCount[nFiles] = count;
filesRange[nFiles] = nnu;
++nFiles;
Hi, I am trying to calculate opacities of CO2 from CDSD-4000, and when I use
./hitran -M 02 -in cdsdcommand to generate .param files and binary files, it fails. I found in hitran.cpp it has an upper limit (which is 100000000 rows)reading linelists that ./hitran cannot deal with very larger linelist.We get rid of this issue by changing the loop conditions:
diff --git a/hitran.cpp b/hitran.cpp
index dae8649..e596981 100644
--- a/hitran.cpp
+++ b/hitran.cpp
@@ -279,7 +279,7 @@ int main(int argc, char *argv[]){
char skip[161];
@@ -289,7 +289,7 @@ int main(int argc, char *argv[]){
else{
nnu = range1;
}