Problem creating BCON file from Conc file using polar stereographic projection

BCON_log_Domain02.txt (6.7 KB) ncdump_CCTM_CON.txt (64.6 KB) run_bconSOUTHTRAC_D02_0815.csh (5.2 KB)
I am trying to create the boundary conditions for domain 02 (36 km) from the previous CCTM run in domain 01 (108 km) using Polar Stereographic projection in the Southern Hemisphere using CMAQv5.3
I attached the BCON script I used, the log file and the ncdump info in the CONC file.
I never used the regrid option in the BCON module for polar stereographic projection. I tried with lambert projection in other domains and worked fine.

If you can help me I will appreciate a lot.ncdump_CCTM_CON.txt (64.6 KB) run_bconSOUTHTRAC_D02_0815.csh (5.2 KB)

Hello Ernesto,

thank you for posting.

The error message suggests that one of the projection parameters defined for your 108 km polar stereographic projection in the southern hemisphere (P_ALP = -1, P_BET = -80.401, P_GAM = -65.523, XCENT = -65.523, and YCENT = -90), specifically the P_BET value of -80.401, is not within the range expected by I/O API function SETPOL. Looking at I/O API code lambert.f that contains SETPOL, it appears the error originates from the following check on lines 962 - 965:

    ELSE IF ( B .LT.  0.0 ) THEN
        WRITE( MESG, 94020 ) 'Bad secant latitude B =', B
        SETPOL = .FALSE.

@cjcoats would have to weigh in whether this check should be changed to `( B .LT. -90.0 ) to support applications in the southern hemisphere or if there are other considerations to be aware of before making such a code change.

Aside from this projection issue, there also appear to be two problems in your run script and setup that would likely create problems even without the issue discussed above:

  1. MET_CRO_3D_CRS needs to be set to the METCRO3D file for your coarse (108 km domain), not your fine D02 domain

  2. Your CTM_CONC_1 file needs to be 3D in order to support the generation of boundary conditions, but the file you’re currently using ( only has a single layer.

Thanks, Christian for your commentaries. You´re right about my mistake on METCRO3d and CCTM_CONC files in the script (BCON). But, unfortunately, that modification did not change the initial error. I think there’s a problem with Southern Hemisphere. I don´t know if any other user has applied nested domain using polar stereographic projection in SH.

We’ll need @cjcoats to comment on the SETPOL error check for P_BET < 0.

As a brute force test, you could try changing line 962 of lambert.f in your I/O API source directory from ELSE IF ( B .LT. 0.0 ) THEN to ELSE IF ( B .LT. -90.0 ) THEN and then recompile I/O API and BCON to see if this gets you past the current error message. But again, I do not know if this is an appropriate code change to make.

FWIW, this family of routines was originally mostly-used in SMOKE, and the OAQPS people wanted a Northern-hemisphere constraint (other modeling software used double-precision full-strength GCTP() calls).