ESCOMP / CAM

Community Atmosphere Model
74 stars 136 forks source link

ndep changes are causing failures in CESM testing #790

Closed cacraigucar closed 1 year ago

cacraigucar commented 1 year ago

What happened?

According to @fischer-ncar the following two tests failed regression testing:

FAIL IRT_C3_Ld7.f19_g17.BHIST.cheyenne_intel.allactive-defaultio RUN time=7225
1152:  ERROR finding ndep_stream_nl namelistERROR in atm_stream_ndep.F90 at line 95
1152:Image          PC            Routine        Line    Source        
1152:cesm.exe       0000000003A4EA96  Unknown           Unknown  Unknown
1152:cesm.exe       000000000367B540  shr_abort_mod_mp_     114  shr_abort_mod.F90
1152:cesm.exe       000000000058BF44  atm_stream_ndep_m      95  atm_stream_ndep.F90
1152:cesm.exe       0000000000589C0F  atm_import_export    1078  atm_import_export.F90
1152:cesm.exe       0000000000577D87  atm_comp_nuopc_mp     754  atm_comp_nuopc.F90

FAIL SMS_C2_Ln9_Vnuopc.f19_f19_mg17.FXHIST.cheyenne_intel.cam-outfrq9s RUN time=1820
144: ERROR:
144:  ERROR finding ndep_stream_nl namelistERROR in atm_stream_ndep.F90 at line 95
144:Image          PC            Routine        Line    Source        
144:cesm.exe       000000000398F5A6  Unknown           Unknown  Unknown
144:cesm.exe       00000000035D0697  shr_abort_mod_mp_     114  shr_abort_mod.F90
144:cesm.exe       0000000000586565  atm_stream_ndep_m      95  atm_stream_ndep.F90
144:cesm.exe       000000000058420F  atm_import_export    1078  atm_import_export.F90
144:cesm.exe       00000000005725E3  atm_comp_nuopc_mp     754  atm_comp_nuopc.F90

The fix according to @jedwards4b:

The issue is at line 87 of file atm_stream_ndep.F90
      open( newunit=nu_nml, file='atm_in', status='old', iostat=nml_error )

should be
       filein = "atm_in" // trim(inst_suffix)
      open( newunit=nu_nml, file=filein, status='old', iostat=nml_error )

Where inst_suffix is from:
 use cam_instance,     only: inst_suffix

@brian-eaton suggested the following check: While we're at it we should check the iostat return from the open command. That would have immediately pointed Chris to the culprit.

What are the steps to reproduce the bug?

Run the reported regression test

What CAM tag were you using?

cam6_3_106

What machine were you running CAM on?

CISL machine (e.g. cheyenne)

What compiler were you using?

Intel

Path to a case directory, if applicable

No response

Will you be addressing this bug yourself?

Any CAM SE can do this

Extra info

No response

jtruesdal commented 1 year ago

I will add the fix to PR #761. modified code:

   use cam_instance     , only: inst_suffix
    ...
   filein = "atm_in" // trim(inst_suffix)
   open( newunit=nu_nml, file=filein, status='old', iostat=nml_error )
   if (nml_error /= 0) then
      call endrun(subName': ERROR opening '//trim(filein)//errMsg(sourcefile, __LINE__))
   end if
jedwards4b commented 1 year ago

Looks good, thank you.