Run CCTM with fake ocean file

Good afternoon CMAQ user:

I used m3fake to create an ocean file that has the same coordinate as my input, but with 0, since my study area is inland. The error messages shows:

 >>--->> WARNING in subroutine INIT_MET:INTERPX
 Variable "OPEN" not of type REAL/DOUBLE in file OCEAN_1
 M3WARN:  DTBUF 0:00:00   July 13, 2016 (2016195:000000)


 *** ERROR ABORT in subroutine INIT_MET on PE 000        
  Error interpolating variable OPEN from OCEAN_1
 Date and time 0:00:00   July 13, 2016  (2016195:000000)

Does anyone has ideas how to deal with it?

Best
Huan

Don’t know the fix, but a workaround is to just comment out the M3EXIT calls on lines 837 & 845 of ASX_DATA_MOD.F and add the lines: Grid_Data%OCEAN (:,:slight_smile: = 0. and Grid_Data%SZONE (:,:slight_smile: = 0. afterwards, then recompile.

clearly not smiley faces, but ( : , : )

Emm…
It still shows the same result. May I ensure how shall I do to recompile it after I modify AXS_DATA_MOD.F?

Huan

Just to ensure, below is the sections with M3EXIT comment out and Grid_Data%OCEAN add on. Could you have a look when you have time?

Best
Huan

     VNAME = 'OPEN'
     If ( .Not. INTERPX( OCEAN_1, VNAME, PNAME,
 &                       STRTCOL_O1,ENDCOL_O1, STRTROW_O1,ENDROW_O1,
 &                       1,1,JDATE, JTIME, Grid_Data%OCEAN ) ) Then
        XMSG = MSG1 // TRIM( VNAME ) // ' from ' // OCEAN_1
        !Call M3EXIT( PNAME, JDATE, JTIME, XMSG, XSTAT1 )
        Grid_Data%OCEAN (:,:)=0
     End If

     VNAME = 'SURF'
     If ( .Not. INTERPX( OCEAN_1, VNAME, PNAME,
 &                       STRTCOL_O1,ENDCOL_O1, STRTROW_O1,ENDROW_O1,
 &                       1,1,JDATE, JTIME, Grid_Data%SZONE ) ) Then
        XMSG = MSG1 // TRIM( VNAME ) // ' from ' // OCEAN_1
        Grid_Data%SZONE (:,:)=0
        !Call M3EXIT( PNAME, JDATE, JTIME, XMSG, XSTAT1 )
     End If

Yes that looks correct

ok…
So I have to explore another method to deal with this issue then.
Thank you for help anyway

Huan

Did you recompile? Also make sure these edits are on the file that the build script points to.

Yes, I just made sure that ASX_DATA_MOD.F under CMAQ-5.2.1/CCTM/scripts/BLD_CCTM_v521_intel was modified in this form

Huan

Ok, I don’t think you recompiled. Try this:

make a copy of your source code in CMAQ_REPO

cd CMAQ-5.2.1/CMAQ_REPO/CCTM

cp -r src src_ocean_zeros

make the modifications to ASX_DATA_MOD.F in that new src code

go to your bldit_cctm script

edit “CCTM_SRC” to point to your newly updated source code

optional edit “Bld” to create a unique build (i.e., so as not to overwrite your old one)

run the bldit script

use the new executable under your new Bld

still the same errors…
Maybe it is due to the build-up environment, I will contact my local IT stuff to double check

Huan

Hmm, if it is aborting, then you haven’t successfully recompiled because even if it can’t read the ocean file, it won’t abort because you’ve commented out the M3EXIT

Hi Huan,

It looks like I also edited hrdriver.F

Comment lines 247 and 256 (the M3EXITS)

add

OPEN_ZONE ( : , : ) = 0.
SURF_ZONE ( : , : ) = 0.

Hi Huan,

the underlying problem is that the ocean file you created with m3fake defined the OPEN and SURF variables as integer, not real.

I’m guessing that you followed the CMAQ tutorial on how to create a dummy OCEAN file using m3fake. In the script included in that tutorial, there was indeed an error that caused the definition of OPEN and SURF as integer by selecting “3” instead of “1” at the m3fake prompt for “Enter TYPE for variable”. We have now corrected this error, you can access the updated tutorial and script by clicking here.

Thanks for helping us to correct this error.

2 Likes

it works now, thank you!

Huan

1 Like