I’m trying to run CMAQ5.2 for a fine resolution of 1.33 km. It crashes when it gets to the ADVSTEP, complaining about non-matching grid sizes, although all my inputs have the same dimensions. Here is the exact error message:
No inconsistent header data found on input files
= = = = = = = = = = = = = = End FLCHECK = = = = = = = = = = = = = =
Value for CTM_MAXSYNC: 300
Value for CTM_MINSYNC: 60
Value for CTM_ADV_CFL: 0.95
Value for SIGMA_SYNC_TOP: 0.7
Value for ADV_HDIV_LIM not defined; returning default : 0.9
Maximum horiz. div. limit for adv step adjustment
Top layer thru which sync step determined: 18
*** ERROR ABORT in subroutine ADVSTEP on PE 000
File grid sizes do not match CTM domain definition
This is a result of a serious standards-violation by the authors of ADVSTEP: REAL quantities ALWAYS have uncertainty due to both round-off issues (including in the compiler!) and quality-of-implementation issues. And these can be more subtle than many people realize…
The relevant Models-3 coding standard states that variables of REAL type should NEVER be tested for absolute equality.
That’s the reason for the carefully-tuned DBLERR() tests in the I/O API GRDCHK3 routine (which is what ADVSTEP should be using instead of its own hard-coded-and-unreliable test). Borrow the DBLERR code from ioapi/grdchk3.f and modify ADVSTEP to use that.