hist_empty_htapes = true prevents restarting CAM

raeder

Member
If the CLM (not CAM) namelist variable hist_empty_htapes is set to TRUE,then the CLM *restart* file ends up with a variable ntapes = 0.But CLM is expecting a different value when CAM is restarted, so the restart fails.This is true in CESM1_1_1, and has been true for some time.
Kevin
 
Hi Kevin,Here's a patch for this.  I emailed this directly to a few folks in SEWG in March, but I thought I'd post it here to test out this new cesm forums. Mark  Index: models/lnd/clm/src/clm4_0/main/histFileMod.F90
===================================================================
--- models/lnd/clm/src/clm4_0/main/histFileMod.F90      (revision 44888)
+++ models/lnd/clm/src/clm4_0/main/histFileMod.F90      (working copy)
@@ -3372,8 +3374,10 @@
     !================================================

    call ncd_inqdlen(ncid,dimid,ntapes,   name='ntapes')
-       call ncd_io('locfnh',  locfnh(1:ntapes),  'read', ncid )
-       call ncd_io('locfnhr', locrest(1:ntapes), 'read', ncid )
+       if (ntapes>0) then
+          call ncd_io('locfnh',  locfnh(1:ntapes),  'read', ncid )
+          call ncd_io('locfnhr', locrest(1:ntapes), 'read', ncid )
+       endif
    do t = 1,ntapes
           call strip_null(locrest(t))
           call strip_null(locfnh(t))
 
Back
Top