Known Bugs in CLM4.0    		                          Dec/08/2011

====================================================================================
Bug Number: 1405
Seg-fault with irrigation on with intel compiler

Works when OMP is turned off, although it still fails if OMP_NUM_THREADS is
explicitly set to 1.

STATUS OF CLM TESTING UNDER JOB 29636;  scheduled to run 1 tests from:
tlist

 on machine: mirage5

001 smGp4 TSM.sh _scnv_ds clm_irrig 20000101:1800 1.9x2.5 gx1v6 -6 startup
......................FAIL! rc= 4
stopping on first failure
152 mirage5:erik% cat td.30641.status 
STATUS OF CLM TESTING UNDER JOB 30641;  scheduled to run 1 tests from:
tlist

 on machine: mirage5

001 smGp4 TSM.sh _scnv_ds clm_irrig 20000101:1800 1.9x2.5 gx1v6 -6 startup
......................PASS

====================================================================================
Bug Number: 1404
Inconsistent domain and fatmlndfrc files

there are still some domain files that are used in the latest clm/datm in cesm1_0_3
from the bad mkdatadomain.  This makes for inconsistent domain and fatmlndfrc files:

T85_T85
T42_T42
T31_T31
f10_f10
f45_45
f19_f19
f09_f09
f05_f05
f02_f02

and the pt1_pt1 datasets: 1x1_tropicAtl_test, 1x1_camdenNJ_navy, and
1x1_asphaltjungleNJ_navy

these would only affect I cases for the above resolutions. Since, standard
simulations are done with ocean land/mask. And simulations with datm for other
components would be with a ocean mask as well (T31_gx3v7, f19_gx1v6,
f09_gx1v6).

Here are the updated filenames to use in the datm template in models/atm/datm7/bld:

[yong:atm/datm/bld] erik% svn diff datm.cpl7.template 
Index: datm.cpl7.template
===================================================================
--- datm.cpl7.template	(revision 36)
+++ datm.cpl7.template	(working copy)
@@ -35,11 +35,11 @@
 
 if ( $ATM_GRID =~ $OCN_GRID ) then
    if ( $ATM_GRID =~ 10x15     ) then
-                                 set DOMAINFILE = 'domain.lnd.fv10x15_USGS.090106.nc'
+                                 set DOMAINFILE = 'domain.lnd.fv10x15_USGS.110713.nc'
                                  set DOMAINPATH = \$DIN_LOC_ROOT/atm/datm7/domain.clm
    endif
    if ( $ATM_GRID =~ 4x5       ) then
-                                 set DOMAINFILE = 'domain.lnd.fv4x5_USGS.090106.nc'
+                                 set DOMAINFILE = 'domain.lnd.fv4x5_USGS.110713.nc'
                                  set DOMAINPATH = \$DIN_LOC_ROOT/atm/datm7/domain.clm
    endif
    if ( $ATM_GRID =~ 2.65x3.33 ) then
@@ -51,40 +51,40 @@
                                  set DOMAINPATH = \$DIN_LOC_ROOT/atm/datm7
    endif
    if ( $ATM_GRID =~ 1.9x2.5   ) then
-                                 set DOMAINFILE = 'domain.lnd.fv1.9x2.5_USGS.090106.nc'
+                                 set DOMAINFILE = 'domain.lnd.fv1.9x2.5_USGS.110713.nc'
                                  set DOMAINPATH = \$DIN_LOC_ROOT/atm/datm7/domain.clm
    endif
    if ( $ATM_GRID =~ 0.9x1.25  ) then
-                                 set DOMAINFILE = 'domain.lnd.fv0.9x1.25_USGS.090106.nc'
+                                 set DOMAINFILE = 'domain.lnd.fv0.9x1.25_USGS.110713.nc'
                                  set DOMAINPATH = \$DIN_LOC_ROOT/atm/datm7/domain.clm
    endif
    if ( $ATM_GRID =~ 0.47x0.63 ) then
-                                 set DOMAINFILE =
                                  'domain.lnd.fv0.47x0.63_USGS.090106.nc'
+                                 set DOMAINFILE =
'domain.lnd.fv0.47x0.63_USGS.111004.nc'
                                  set DOMAINPATH = \$DIN_LOC_ROOT/atm/datm7/domain.clm
    endif
    if ( $ATM_GRID =~ 0.23x0.31 ) then
-                                 set DOMAINFILE =
                                  'domain.lnd.fv0.23x0.31_USGS.090106.nc'
+                                 set DOMAINFILE =
'domain.lnd.fv0.23x0.31_USGS.111004.nc'
                                  set DOMAINPATH = \$DIN_LOC_ROOT/atm/datm7/domain.clm
    endif
 
    if ( $ATM_GRID =~ 8x16      ) then
-                                 set DOMAINFILE = 'domain.lnd.T5_USGS.090106.nc'
+                                 set DOMAINFILE = 'domain.lnd.T5_USGS.111004.nc'
                                  set DOMAINPATH = \$DIN_LOC_ROOT/atm/datm7/domain.clm
    endif
    if ( $ATM_GRID =~ 32x64     ) then
-                                 set DOMAINFILE = 'domain.lnd.T21_USGS.090106.nc'
+                                 set DOMAINFILE = 'domain.lnd.T21_USGS.111004.nc'
                                  set DOMAINPATH = \$DIN_LOC_ROOT/atm/datm7/domain.clm
    endif
    if ( $ATM_GRID =~ 48x96     ) then
-                                 set DOMAINFILE = 'domain.lnd.T31_USGS.090106.nc'
+                                 set DOMAINFILE = 'domain.lnd.T31_USGS.110713.nc'
                                  set DOMAINPATH = \$DIN_LOC_ROOT/atm/datm7/domain.clm
    endif
    if ( $ATM_GRID =~ 64x128    ) then
-                                 set DOMAINFILE = 'domain.lnd.T42_USGS.090106.nc'
+                                 set DOMAINFILE = 'domain.lnd.T42_USGS.111004.nc'
                                  set DOMAINPATH = \$DIN_LOC_ROOT/atm/datm7/domain.clm
    endif
    if ( $ATM_GRID =~ 128x256   ) then
-                                 set DOMAINFILE = 'domain.lnd.T85_USGS.090106.nc'
+                                 set DOMAINFILE = 'domain.lnd.T85_USGS.111004.nc'
                                  set DOMAINPATH = \$DIN_LOC_ROOT/atm/datm7/domain.clm
    endif
 endif
@@ -93,9 +93,9 @@
 
    set DOMAINPATH = \$DIN_LOC_ROOT/atm/datm7/domain.clm
    if ( $CLM_PT1_NAME =~ 1x1_brazil          ) set DOMAINFILE =
'domain.lnd.1x1pt-brazil_navy.090715.nc'
-   if ( $CLM_PT1_NAME =~ 1x1_camdenNJ        ) set DOMAINFILE =
    'domain.lnd.1x1pt-camdenNJ_navy.071220.nc'
-   if ( $CLM_PT1_NAME =~ 1x1_tropicAtl       ) set DOMAINFILE =
    'domain.lnd.1x1pt-tropicAtl_test.071010.nc'
-   if ( $CLM_PT1_NAME =~ 1x1_asphaltjungleNJ ) set DOMAINFILE =
    'domain.lnd.1x1pt-camdenNJ_navy.071220.nc'
+   if ( $CLM_PT1_NAME =~ 1x1_camdenNJ        ) set DOMAINFILE =
'domain.lnd.1x1pt-camdenNJ_navy.111004.nc'
+   if ( $CLM_PT1_NAME =~ 1x1_tropicAtl       ) set DOMAINFILE =
'domain.lnd.1x1pt-tropicAtl_test.111004.nc'
+   if ( $CLM_PT1_NAME =~ 1x1_asphaltjungleNJ ) set DOMAINFILE =
'domain.lnd.1x1pt-camdenNJ_navy.111004.nc'
    if ( $CLM_PT1_NAME =~ 1x1_mexicocityMEX   ) set DOMAINFILE =
'domain.lnd.1x1pt-mexicocityMEX_navy.090715.nc'
    if ( $CLM_PT1_NAME =~ 1x1_vancouverCAN    ) set DOMAINFILE =
'domain.lnd.1x1pt-vancouverCAN_navy.090715.nc'
    if ( $CLM_PT1_NAME =~ 1x1_urbanc_alpha    ) set DOMAINFILE =
'domain.lnd.1x1pt-urbanc_alpha_test.110201.nc'

====================================================================================
Bug Number: 1397
c2l_scale_type not specified for many history fields 

Bill Sacks reports the following problem...

Many history fields do not have a c2l_scale_type parameter (in histFldsMod),
but it seems they should. For example, there is a set of water flux variables,
starting with QFLX_RAIN_GRND and ending with QFLX_DEW_SNOW, most of which do
not have a c2l_scale_type. From talking with Keith Oleson, it seems that at
least some and maybe all of these should have c2l_scale_type='urbanf', by
analogy with similar fluxes that do have a c2l_scale_type specified.

From talking with Keith Oleson: it sounds like most fluxes should have
c2l_scale_type='urbanf', but this isn't necessarily always true. So this will
require more investigation to determine the appropriate scale type for each
history field. 

Most (all?) of the fields that do not have a c2l_scale_type are ones that were
added after the urban model came in - for example, fields that were added when
the CN code came in. So my guess is that whoever added these fields didn't
realize that a c2l_scale_type was required.

After these fields are fixed, perhaps scale_type_c2l should be made a required
argument to hist_addfld1d and hist_addfld2d to prevent this problem from
arising again in the future.

====================================================================================
Bug Number: 1393
Error when running gregorian calendar as input

With an input file that has a Gregorian calendar, for the US-UMB site, Keith
Oleson found the following error...


20110811 154401.626948 INFO     PET0 Running with ESMF Version 5.2.0
20110811 154403.041866 ERROR    PET0 ESMCI_Calendar.C 1004
ESMCI::Calendar::convertToTime() Input argument out of range ; Gregorian
0/0/0 (1-12/>=1/>=-4800).
20110811 154403.041883 ERROR    PET0 ESMCI_Time.C 292 ESMCI::Time::set() Input
argument out of range Internal subroutine call return
ed Error
20110811 154403.041889 ERROR    PET0 ESMF_Time.F90 1278 ESMF_TimeSet() Input
argument out of range - Internal subroutine call return
ed Error

No other error information in any other log file.

Atmospheric forcing file time information looks like:

        double time(time) ;
                time:long_name = "observation time" ;
                time:units = "days since 1999-01-01 00:00:00" ;
                time:calendar = "gregorian" ;

This is with...

USE_ESMF_LIB is set to TRUE
ESMF_LIBDIR is set to /contrib/esmf_5_2_0-64-0-mpiuni/lib/  (so that I can run
with USE_MPISERIAL = TRUE)

This error happens both for CALENDAR=NO_LEAP and CALENDAR=GREGORIAN.

The following allows the model to run and it looks like the Feb 29th day of the
atmospheric forcing files are being read in gregorian calendar mode.  The model
flux output also seems to line up well with the observed fluxes which have leap
days.

In shr_cal_mod.F90, Replaced this line:

-      call
ESMF_TimeSet(ltime,d=eday,s=0,calendarType=ESMF_CAL_GREGORIAN,rc=rc)

with this:

+      call
ESMF_TimeSet(ltime,d=eday,s=0,calendarType=ESMF_CAL_JULIANDAY,rc=rc)
+      call ESMF_TimeSet(ltime,calendarType=ESMF_CAL_GREGORIAN,rc=rc)

It looked to me like ESMF_TimeSet needs to be called first with the Julianday
calendar to get a base time and then called again to convert to the gregorian.

====================================================================================
Bug Number: 1392
US-UMB site has some incorrect data

Soil data for the US-UMB site is backwards and slightly off.

it is...

US-UMB,-999,1,-999,0.6,92.8

Index: PTCLM_sitedata/EXAMPLE_soildata.txt
===================================================================
--- PTCLM_sitedata/EXAMPLE_soildata.txt    (revision 29431)
+++ PTCLM_sitedata/EXAMPLE_soildata.txt    (working copy)
@@ -1,2 +1,2 @@
 site_code,soil_depth,n_layers,layer_depth,layer_sand%,layer_clay%
-US-UMB,-999,1,-999,0.6,92.8
+US-UMB,-999,1,-999,92.6,0.6

Also the US-UMB site has a "noleap" calendar, but actually has 366 days for
leap years. This makes the calendar screwy (but see bug 1393 above).

Keith Oleson noticed this.

====================================================================================
Bug Number: 1379
All spinup tests fail for PTCLM testcases.csh

All of the spinup tests fail for PTCLM on: jaguar, edinburgh, bluefire, and
yong.

Creating
/glade/proj2/fis/cgd/home/erik/PTCLM_trunk/myPTCLMtests.1491722/PTCLM.1491722_US-UMB_ICN_ad_spinup

Locking file
/glade/proj2/fis/cgd/home/erik/PTCLM_trunk/myPTCLMtests.1491722/PTCLM.1491722_US-UMB_ICN_ad_spinup/env_case.xml
Successfully created the case for bluefire
Write
/glade/proj2/fis/cgd/home/erik/PTCLM_trunk/myPTCLMtests.1491722/PTCLM.1491722_US-UMB_ICN_ad_spinup/README.PTCLM
with command line
Number of simulation nyears to run:                             600
WARNING: nopointdata option was selected.  Model will crash if the site level
data have not been created

Run command: ./xmlchange -file env_conf.xml -id CLM_PT1_NAME -val 1x1pt_US-UMB
Run command: ./xmlchange -file env_conf.xml -id CLM_USRDAT_NAME -val
1x1pt_US-UMB
Run command: ./xmlchange -file env_conf.xml -id DATM_MODE -val CLM1PT
Run command: ./xmlchange -file env_conf.xml -id DATM_CLMNCEP_YR_START -val 1999
Run command: ./xmlchange -file env_conf.xml -id DATM_CLMNCEP_YR_END -val 2006
Run command: ./xmlchange -file env_conf.xml -id CLM_BLDNML_OPTS -val '-mask
navy'
Run command: ./xmlchange -file env_conf.xml -id USE_MPISERIAL -val TRUE
Run command: ./xmlchange -file env_conf.xml -id CLM_CONFIG_OPTS -val '-bgc cn
-ad_spinup on'
Run command: ./xmlchange -file env_conf.xml -id CLM_FORCE_COLDSTART -val 'on'
Run command: ./xmlchange -file env_run.xml -id STOP_DATE -val 06010101
Run command: ./xmlchange -file env_run.xml -id STOP_N -val 600
Run command: ./xmlchange -file env_run.xml -id STOP_OPTION -val nyears
Run command: ./xmlchange -file env_run.xml -id REST_OPTION -val nyears
Run command: ./xmlchange -file env_run.xml -id REST_N -val 120
Run command: ./xmlchange -file env_run.xml -id DIN_LOC_ROOT_CSMDATA -val
/blhome/erik/inputdata
&clm_inparm
 hist_nhtfrq = -8760
 hist_mfilt  = 100
 fpftcon =
'/blhome/erik/inputdata/lnd/clm2/pftdata/pft-physiology.c110425.US-UMB.nc'
/
Scripts created successfully

cd
/glade/proj2/fis/cgd/home/erik/PTCLM_trunk/myPTCLMtests.1491722/PTCLM.1491722_US-UMB_ICN_ad_spinup
and then...
Configure, build and run your case as normal

unset echo
14 PTCLM.1491722_US-UMB_ICN_ad_spinup.config\t\t\t
Generating resolved namelist, prestage, and build scripts
configure done.
adding clm user file defaults for var domainfile with val
/blhome/erik/inputdata/atm/datm7/domain.clm/domain.lnd.1x1pt_US-UMB_navy.nc
adding clm user file defaults for var fatmgrid with val
/blhome/erik/inputdata/lnd/clm2/griddata/griddata_1x1pt_US-UMB.nc
adding clm user file defaults for var fatmlndfrc with val
/blhome/erik/inputdata/lnd/clm2/griddata/fracdata_1x1pt_US-UMB_navy.nc
adding clm user file defaults for var fsurdat with val
/blhome/erik/inputdata/lnd/clm2/surfdata/surfdata_1x1pt_US-UMB_simyr2000.nc
adding clm user file defaults for var stream_fldfilename_ndep with val
/blhome/erik/inputdata/lnd/clm2/ndepdata/fndep_clm_simyr1849-2006_1x1pt_US-UMB.nc
adding use_case 2000_control defaults for var sim_year with val 2000
adding use_case 2000_control defaults for var sim_year_range with val constant
adding use_case 2000_control defaults for var stream_year_first_ndep with val
2000
adding use_case 2000_control defaults for var stream_year_last_ndep with val
2000
adding use_case 2000_control defaults for var use_case_desc with val Conditions
to simulate 2000 land-use
Successfully generated resolved namelist, prestage, and build scripts
Locking file env_conf.xml
Generating clean_build script
Generating submit script
Generating build script
Generating run script
Locking file env_mach_pes.xml
Successfully configured the case for bluefire
If an old build exists for this case, you might want to
   run the *.clean_build script before building
14 PTCLM.1491722_US-UMB_ICN_ad_spinup.build\t\t\t
-------------------------------------------------------------------------
 CCSM BUILDNML SCRIPT STARTING
 - To prestage restarts, untar a restart.tar file into
/ptmp/erik/PTCLM.1491722_US-UMB_ICN_ad_spinup/run
 - Create modelio namelist input files
 CCSM BUILDNML SCRIPT HAS FINISHED SUCCESSFULLY
-------------------------------------------------------------------------
 CCSM PRESTAGE SCRIPT STARTING
 - CCSM input data directory, DIN_LOC_ROOT_CSMDATA, is /blhome/erik/inputdata
 - Case input data directory, DIN_LOC_ROOT, is /blhome/erik/inputdata
 - Checking the existence of input datasets in DIN_LOC_ROOT
 CCSM PRESTAGE SCRIPT HAS FINISHED SUCCESSFULLY
-------------------------------------------------------------------------
 CCSM BUILDEXE SCRIPT STARTING
 - Build Libraries: mct pio csm_share
Tue Jul 26 14:14:02 MDT 2011
/ptmp/erik/PTCLM.1491722_US-UMB_ICN_ad_spinup/mct/mct.bldlog.110726-141401
Tue Jul 26 14:15:00 MDT 2011
/ptmp/erik/PTCLM.1491722_US-UMB_ICN_ad_spinup/pio/pio.bldlog.110726-141401
ERROR: pio.buildlib failed, see
/ptmp/erik/PTCLM.1491722_US-UMB_ICN_ad_spinup/pio/pio.bldlog.110726-141401
ERROR: cat
/ptmp/erik/PTCLM.1491722_US-UMB_ICN_ad_spinup/pio/pio.bldlog.110726-141401
14 PTCLM.1491722_US-UMB_ICN_ad_spinup.run\t\t\t
BUILD_COMPLETE is not TRUE
Please rebuild the model interactively via
   ./PTCLM.1491722_US-UMB_ICN_ad_spinup.bluefire.build
No match.
14 PTCLM.1491722_US-UMB_ICN_ad_spinup.file\t\t\t
CCSM PTCLM.1491722_US-UMB_ICN_ad_spinup clean_build FINISHED SUCCESSFULLY
Run PTCLM for PTCLM.1491722_US-UMB_ICN_exit_spinup options =
--caseidprefix=/glade/proj2/fis/cgd/home/erik/PTCLM_trunk/myPTCLMtests.1491722/PTCLM.1491722
--exit_spinup --verbose --aerdepgrid --ndepgrid --cesm_root
/fis/cgd/home/erik/clm_trunk/ --finidat
14 PTCLM.1491722_US-UMB_ICN_exit_spinup.PTCLM\t\t\t
./PTCLM.py -d /blhome/erik/inputdata -m bluefire -s US-UMB -c ICN --rmold
--nopointdata
--caseidprefix=/glade/proj2/fis/cgd/home/erik/PTCLM_trunk/myPTCLMtests.1491722/PTCLM.1491722
--exit_spinup --verbose --aerdepgrid --ndepgrid --cesm_root
/fis/cgd/home/erik/clm_trunk/ --finidat
Usage: PTCLM.py [options] -d inputdatadir -m machine -s sitename

PTCLM.py: error: --finidat option requires an argument
unset echo
/glade/proj2/fis/cgd/home/erik/PTCLM_trunk/myPTCLMtests.1491722/PTCLM.1491722_US-UMB_ICN_exit_spinup:
A file or directory in the path name does not exist.

====================================================================================
Bug Number: 1377
CLM1PT mode is in extend mode by default, so fails going beyond one data cycle

PLM1PT mode puts atm forcing data in extend mode so if you go beyond one data
cycle it gives screwy results. I ran the spinup series with PTCLM and since it
was running over multiple years after it ran one cycle it used the last
time-step for the future years.

Here's one way to fix this issue after a case is built...

   sed "s/'extend','cycle'/'cycle','cycle'/g" Buildconf/datm.buildnml.csh > datm.bld
   mv datm.bld Buildconf/datm.buildnml.csh

See bug 1368 below for a case where this causes a major problem with a 
simulation.

====================================================================================
Bug Number: 1372
Problem running at the same resolution as RTM / also running with 23 processors

There was a PIO issue running with 23 processors, and also the following problem...

Jim Edwards investigated this issue and found that...

"...this one is a bug in clm.   In this case the clm dimensions
(lon,lat) and the runoff dimensions (lonrof,latrof)
have the same values - but I think that the data decompositions are different 
- ncd_inqiodesc matchs them and tries
to use the same iodesc which then causes an error in pio when you try to write
the first runoff variable.   

I think a possible solution is to change the iodesc_plus_type structure so that
instead of storing the ndims and dims(:)
you store dimids(:)  which will be different."

The changes to fix this are fairly extensive. So we won't give a fix here.


====================================================================================
Bug Number: 1368
PTCLM for US-UMB spins up with zero GPP

I ran a spinup with PTCLM (to test the procedure and to get initial conditions
for US-UMB, and be able to work the transient issue). For the final_spinup
phase GPP was identically zero.

This was fixed by setting taxmode='cycle'. See bug 1377 above.
 
====================================================================================
Bug Number: 1364
Problem running US-UMB case on Macintosh

I run into a floating point exception running the US-UMB site on Macintosh...

./PTCLM.py -m generic_darwin_intel -s US-UMB -d /fs/cgd/csm/inputdata --pftgrid
--soilgrid --scratchroot /Users/erik --run_n 2 --run_units nmonths --rmold --nopointdata 

After having configured, built, and run for time-step 124...


forrtl: severe (174): SIGSEGV, segmentation fault occurred

====================================================================================
Bug Number: 1361
Problem with transient compsets for PTCLM

When PTCLM is setup for a transient compset that has a _dynpftdata.txt file
that goes with it, it gives the wrong syntax for calling the NCL conversion
program for it.

To get this to work make the following changes...

Index: PTCLM.py
===================================================================
--- PTCLM.py    (revision 28836)
+++ PTCLM.py    (working copy)
@@ -717,9 +717,10 @@
                if plev>0: print "Transition PFT file exists, so using it for
changes in PFT"
                # Convert the file from transition years format to mksurfdata
pftdyn format
                cnv = ptclm_dir + \
-                     "/PTCLM_sitedata/cnvrt_trnsyrs2_pftdyntxtfile.pl
"+sim_year_range
+                     "/PTCLM_sitedata/cnvrt_trnsyrs2_pftdyntxtfile.pl " + \
+                     pftdyn_site_filename+" "+sim_year_range
                pftdynoutfile = mycase+"/pftdyn_"+mycasename+".txt"
-               system( cnv+pftdyn_site_filename+" > "+pftdynoutfile )
+               system( cnv+" > "+pftdynoutfile )
                dynpftopts = " -dynpft "+pftdynoutfile
             else:
                if plev>0: print "Transition PFT file did NOT exist, so
proceeding with constant PFT"

====================================================================================
Bug Number: 1360
Can't do a ncdump on the US-UMB single point data for PTCLM

I get the following error doing an ncdump on the US-UMB data...

ncdump -h 1999-01.nc 
ncdump: name begins with space or control-character: 1


I can view the file with ncks, or ncl, or ncview.

It turns out the problem is that the filename -- doesn't start with an
alphabetical letter it starts with a number. So there isn't really a way around
this other than renaming the files and changing the streams. To do a ncdump,
you can simply rename the file to something else and then do the ncdump on it.

====================================================================================
Bug Number: 1354
I1850SPINUPCN compset points to a transient case rather than a fixed 1850 case

When the I1850SPINUPCN compset is run the case that is used is:

DATM_CPL_CASE="b40.20th.track1.1deg.012"

which is a transient case rather than a fixed 1850 case.

====================================================================================
Bug Number: 1348
Restart test with crop on shows differences in landmask field

The following test is failing on edinburgh with the lahey compiler with
clm4_0_32.

006 erTZ4 TER.sh 21p_cncrpsc_ds clm_stdIgnYr^nl_crop 20020401:3600 10x15 USGS
-3+-7 cold ........FAIL! rc= 13


The difference is in landmask field where some values are set to 1.95379e+09
looks like over ocean.

====================================================================================
Bug Number: 1345
Irrigation dataset is upside down! 

The irrigation dataset used to create surface datasets by mksurfdata is upside
down (latitude goes from 90 to -90 rather) relative to other files used to
create surface datasets.

The filename is:

     $CSMDATA/lnd/clm2/rawdata/mksrf_irrig_2160x4320_simyr2000.c090320.nc

This is the same problem as in the VOC dataset in bug number 1044 below.

Even though the file looks incorrect the datasets it creates are fine.

====================================================================================
Bug Number: 1339
Limit on number of files when running with 155 years of MOAR data

In order to run with 155 years of MOAR data the file limit in shr_stream needs
to increase from 1000 to 2000 (technically 1860 would be sufficient, but might
as well bump it to 2000).

Index: shr_stream_mod.F90
===================================================================
--- shr_stream_mod.F90    (revision 28396)
+++ shr_stream_mod.F90    (working copy)
@@ -101,7 +101,7 @@
    end type shr_stream_fileType

    !--- hard-coded array dims ~ could allocate these at run time ---
-   integer(SHR_KIND_IN),parameter :: nFileMax = 1000  ! max number of files
+   integer(SHR_KIND_IN),parameter :: nFileMax = 2000  ! max number of files

    type shr_stream_streamType
       !private                                    ! no public access to internal components

We didn't put this change in as it causes a compiler error on bluefire for AIX
when compiling the dlnd component...

/ptmp/mvertens/SMS.f45_g37.A.bluefire.rel06_d/lnd/obj/Depends
mpxlf90_r -c -I. -I/usr/include -I/usr/local/include -I/usr/local/include -I.
-I/ptmp/mvertens/SMS.f45_g37.A.bluefire.rel06_d/SourceMods/src.dlnd
-I/glade/proj3/cseg/people/mver
tens/src/cesm/cesm1_0_rel06/models/lnd/dlnd
-I/glade/proj3/cseg/people/mvertens/src/cesm/cesm1_0_rel06/models/lnd/dlnd/cpl_mct
-I/ptmp/mvertens/SMS.f45_g37.A.bluefire.rel06_d/li
b/include  -WF,-DMCT_INTERFACE -WF,-DHAVE_MPI -WF,-DAIX -WF,-DSEQ_ -WF,-DFORTRAN_SAME
-q64 -g -qfullpath -qmaxmem=-1 -qarch=auto -qsigtrap=xl__trcedump  -qsclk=micro -O2
-qstri
ct -Q -qsuffix=f=f90:cpp=F90
/glade/proj3/cseg/people/mvertens/src/cesm/cesm1_0_rel06/models/lnd/dlnd/dlnd_comp_mod.F90
touch /ptmp/mvertens/SMS.f45_g37.A.bluefire.rel06_d/lnd/obj/Filepath
    1517-009: (U) Error in compiler runtime system; compilation ended.
xlf90_r: 1501-230 (S) Internal compiler error; please contact your Service
Representative. For more information visit:
http://www.ibm.com/support/docview.wss?uid=swg21110810
1501-511  Compilation failed for file dlnd_comp_mod.F90.
gmake: *** [dlnd_comp_mod.o] Error 40

====================================================================================
Bug Number: 1326
Running with both crop AND irrigation fail with a balance check error

Running tests that have both crop AND irrigation fail with a balance check
error. This is for starting up with arbitrary initial conditions and running
with either CN and/or CNDV.

====================================================================================
Bug Number: 1325
Writing out GDDHARV cause abort when written out to history file

The variables: GDDHARV cause the model to abort when
adding it to the history file and DEBUG mode is on. It aborts in one of the
pft averaging functions in subgridAveMod with a multiply by a NaN. This is on
bluefire. The variables are initialized to spval, so I'm not sure why this
happens.

Here's what the abort looks like...

(seq_mct_drv) : Model initialization complete


  Signal received: SIGTRAP - Trace trap
    Signal generated for floating-point exception:
      FP invalid operation

  Instruction that generated the exception:
    fmul fr02,fr01,fr02
    Source Operand values:
      fr01 =                   NaNS
      fr02 =   1.00000000000000e+00

  Traceback:
    Offset 0x00002104 in procedure __subgridavemod_NMOD_p2g_1d, near line 796
in file /fis/cgd/home/erik/clm_cropbr/models/lnd/clm/src/main/subgridAveMod.F90
    Offset 0x00000540 in procedure
*__subgridavemod_NMOD_p2g_1d_stub_in___histfilemod_NMOD_hist_update_hbuf_field_1d
    Offset 0x00000670 in procedure
__histfilemod_NMOD_hist_update_hbuf_field_1d, near line 1172 in file
/fis/cgd/home/erik/clm_cropbr/models/lnd/clm/src/main/histFileMod.F90
    Offset 0x000000fc in procedure __histfilemod_NMOD_hist_update_hbuf@OL@1
    Location 0x09000000015f2d4c
    Location 0x09000000015eb758
    Offset 0x000000dc in procedure _pthread_body
    --- End of call chain ---

====================================================================================
Bug Number: 1310
Some indices are different for differing number of threads

Some of the 1d indices are different on the history files when differing number of
threads is used.

034 erL83 TER.sh _nrsc_do clm_std^nl_urb 20020115:3600 5x5_amazon navy -5+-5
arb_ic .............FAIL! rc= 13

Everything's bit-for-bit up to...

CLM_compare.sh: comparing clmrun.clm2.h1.2002-01-20-00000.nc
                with     
/ptmp/erik/test-driver.888958/TSM._nrsc_do.clm_std^nl_urb.20020115:3600.5x5_amazon.navy.-10.arb_ic/clmrun.clm2.h1.2002
-01-20-00000.nc
CLM_compare.sh: files are NOT b4b

 RMS land1d_g         7
 RMS cols1d_g         7
 RMS cols1d_l         8
 RMS pfts1d_g         7
 RMS pfts1d_l         8
 RMS pfts1d_c        12

We got around this by removing these fields from the history files.

====================================================================================
Bug Number: 1310
Problem creating T31 rcp pftdyn files

I'm having problems building the T31 rcp pftdyn files.

Rcp2.6 worked OK, rcp4.5 gives the following (even for OMP_NUM_THREADS=1).

 read_domain compute lat[ns],lon[we] from edge[nesw]
 celledge, using celledge_regional
 read_domain compute cellarea with edge[nesw]
 cellarea, using cellarea_global
 AREAINI warning: conservation check not valid for
    input  grid of  720  x  360
    output grid of  96  x  48
 AREAINI warning: conservation check not valid for
    input  grid of  720  x  360
    output grid of  96  x  48
 domain_clean: cleaning  720 360
 Successfully made harvest and grazing

 input pft dynamic dataset is 
/cgd/tss/pftlandusedyn.0.5x0.5.minicam.simyr2005-2100.c100121/mksrf_landuse_minicam2054_c100121.nc
year is  2054
 Attempting to make PFTs .....

 read_domain read lon and lat dims
 read_domain initialized domain
 read_domain read LONGXY and LATIXY fields
 read_domain read EDGE[NESW]
 read_domain read LANDMASK
 read_domain compute lat[ns],lon[we] from edge[nesw]
 celledge, using celledge_regional
 read_domain compute cellarea with edge[nesw]
 cellarea, using cellarea_global
ERROR in mksurfdata: 134

rcp 6 dies with...

    output grid of  96  x  48
 domain_clean: cleaning  720 360
 Successfully made harvest and grazing

 input pft dynamic dataset is 
/cgd/tss/pftlandusedyn.0.5x0.5.simyr1850-2005.c090630/mksrf_landuse_rc1989_c090630.nc
year is  1989
 Attempting to make PFTs .....

 read_domain read lon and lat dims
 read_domain initialized domain
 read_domain read LONGXY and LATIXY fields
 read_domain read EDGE[NESW]
 read_domain read LANDMASK
 read_domain compute lat[ns],lon[we] from edge[nesw]
 celledge, using celledge_regional
 read_domain compute cellarea with edge[nesw]
 cellarea, using cellarea_global
ERROR in mksurfdata: 134

using 1 thread rcp8.5 dies with...


 input pft dynamic dataset is 
/cgd/tss/pftlandusedyn.0.5x0.5.message.simyr2005-2100.c100121/mksrf_landuse_message2020_c100121.nc
year is  2020
 Attempting to make PFTs .....

 read_domain read lon and lat dims
 read_domain initialized domain
 read_domain read LONGXY and LATIXY fields
 read_domain read EDGE[NESW]
 read_domain read LANDMASK
 read_domain compute lat[ns],lon[we] from edge[nesw]
 celledge, using celledge_regional
 read_domain compute cellarea with edge[nesw]
 cellarea, using cellarea_global
ERROR in mksurfdata: 134


====================================================================================
Bug Number: 1289
Problem reading in single-point CO2 stream file on franklin

We verified this is a problem on franklin, but NOT other machines such as bluefire
for example.

Zack Subin

Reports on the following problem on Franklin. The problem is a subscript out of
range in a MCT subroutine being used by PIO. Hence why I've added Jim E. and
Rob J. to the list of people.

He's the running the following case documented in the CLM Users Guide.

http://www.cesm.ucar.edu/models/cesm1.0/clm/models/lnd/clm/doc/UsersGuide/x2920.html#AEN2948

I think the thing that's unique here is that the CO2 file only has one
datapoint. There might be an assumption that you are reading more datapoints
and something isn't dimensioned right in MCT, PIO or in datm? Not sure which...

I ran the same case on bluefire and it runs both with DEBUG on and off (as I
say below). But, possibly bluefire is more forgiving on this subscript overflow
than Franklin. Since Franklin is a pretty standard machine it would probably
show up on other platforms as well.

Here's Zack's message, with my previous message to him to give me some data to
file the bug report with.

I'm running I_1850-2000_CN, 1.9x2.5 deg, on Franklin with clm4_0_24.  It
is out of the box with the instructions for passing CO2 except for the
location of the forcing files and the initial conditions file, and the
number of tasks in drv_in:ccsm_pes: *_ntasks.

The end of the standard output log reads:
0: Subscript out of range for array compbuf (rearrange.F90: 300)
   subscript=1, lower bound=1, upper bound=0, dimension=1

The end of the cpl.log reads:
(seq_mct_drv) : Initialize each component: atm, lnd, ocn, and ice
(seq_mct_drv) : Initialize atm component

The end of the datm.log reads:
(shr_dmodel_readLBUB) reading file:
/global/homes/z/zmsubin/Scratch/clmdata/fco2_datm_1765-2007_c100309.nc  
  85

There is no lnd.log.  It does not produce a core file.

When I run with DEBUG off it runs normally, and the PCO2 is identical to
what I get from a run in clm4_0_16 except that the point at (1, 1) has a
nonzero PCO2 whereas it is 0 in clm4_0_16.

When I follow your instructions for setting the number of atm pio tasks
to 1, it still has the same error.

--Zack

I was able to replicate this problem on lynx:

/glade/proj2/fis/cgd/home/erik/clm4_0_24/scripts/DATM_CO2_TSERIES

 cat /ptmp/erik/DATM_CO2_TSERIES/run/ccsm.log.110225-170538

ock size conversion in bytes is          4086.02
8 MB memory   alloc in MB is             8.00
8 MB memory dealloc in MB is             0.00     
Memory block size conversion in bytes is          4086.02
8 MB memory   alloc in MB is             8.00     
8 MB memory dealloc in MB is             0.00
8 MB memory dealloc in MB is             0.00
Memory block size conversion in bytes is          4086.02
Memory block size conversion in bytes is          4086.02
.
.
.
.
0: Subscript out of range for array compbuf (rearrange.F90: 300)
    subscript=1, lower bound=1, upper bound=0, dimension=1
0: Subscript out of range for array compbuf (rearrange.F90: 300)
    subscript=1, lower bound=1, upper bound=0, dimension=1
[NID 00073] 2011-02-25 17:06:52 Apid 136614: initiated application termination
Application 136614 exit codes: 127
Application 136614 exit signals: Killed
Application 136614 resources: utime 0, stime 0

atm.log file ends with...

(shr_dmodel_readLBUB) reading file:
/glade/proj2/fis/cgd/cseg/csm/inputdata/atm/datm7/CO2/fco2_datm_1765-2007_c100614.nc
     85

====================================================================================
Bug Number: 1282
Trouble running datm8 to the last time-step for datasets with missing data

The urban single-point sites all have only a portion of a complete year of atm
forcing data. Hence, all of them abort with a dtlimit error when you try to run
until the last time-step. This is because it reads in the data for the next
time-step (thinking it needs to do a time-interpolation) and finds the
difference in time-step is large (since it's over the part of the year with
missing data). This is for the 1x1_mexicocityMEX, 1x1_vancouverCAN, and
1x1_urbanc_alpha sites, but would be the case for other datasets with missing
time-periods.

The fix is to change the datm namelist to add settings for tintalgo and dtlimit
in the datm namelist as follows...

 &shr_strdata_nml
.
.
.
   tintalgo       = 'nearest','linear'
   dtlimit        = 25000.,1.5
  /

Thus it will use the nearest point in time, and won't die with a dtlimit error,
as we are setting the dtlimit to a very high value.

====================================================================================
Bug Number: 1251
PTCLM testcases aborts in I_QIAN case...

On yong with intel, the testcases.csh aborts on this case...

./PTCLM.py -d /Users/erik/inputdata -m generic_darwin_intel -s US-Ha1 -c I
--rmold --caseidprefix=myPTCLMtests --owritesrfaer --run_units=ndays --run_n=5
--aerdepgrid --ndepgrid --useQIAN --QIAN_tower_yrs

It aborts with a seg-fault...

-----------------------------------

NODE#  NAME
(    0)  yong.local
forrtl: severe (174): SIGSEGV, segmentation fault occurred


This is after completing 24 timesteps in the land model (half-hour time-step).

====================================================================================
Bug Number: 1164
Restart trouble for CNC13 with INTEL, PGI and LAHEY compilers

017 erR53 TER.sh 17p_cnc13sc_do clm_std^nl_urb 20020115:NONE:1800 10x15
USGS@1850 10+38 cold ....FAIL! rc= 13

Answers differ and gradually diverge in time. This could be a restart issue or a
multi-processing or threading issue.

====================================================================================
Bug Number: 1163
CN finidat files have a bunch of fields with NaN's on it.

For example on:

$CSMDATA/ccsm4_init/I2000CN_f09_g16_c100503/0001-01-01/ \
I2000CN_f09_g16_c100503.clm2.r.0001-01-01-00000.nc

the fields: mlaidiff, flx_absdv, flx_absdn, flx_absiv, flx_absin, and
qflx_snofrz_lyr all have NaN's, with mlaidiff being completely full of NaN's
(since mlaidiff is only defined for CLMSP or if drydep is on).

====================================================================================
Bug Number: 1127
interpinic not tested for CNDV, yet; expected not to work 

Interpinic has not worked for the old dgvm since probably before clm3.5.
Interpinic has not been tested, yet, for CNDV. Therefore, we assume that it
does not work.

====================================================================================
Bug Number: 1124
Reported energy for grid-cell is not quite right for pftdyn

The amount of water is conserved correctly in pftdyn mode, but the energy isn't
reported quite accurately.

====================================================================================
Bug Number: 1101
suplnitro=ALL mode is over-productive

suplnitro=ALL mode is over-productive. This is because it provides unlimited
Nitrogen. Fixing it requires using fnitr from the pft-physiology file, a different 
pft-physiology file with fnitr scaled appropriately and some code modifications 
to get this all to work.

====================================================================================
Bug Number: 1063
Problems restarting for CESM spinup data mode

Exact restarts for the 1850 CN spinup compset fail on bluefire...

ERS.f09_g16.I1850SPINUPCN.bluefire

also the ERB test fails, and the ERB_D test fails with optimization set to
zero.

(note ERS for the I1850CN compset passes, it's just the SPINUP case that fails)

In the coupler log file there's a single field that is different...

The good thing is that it's a single field from the land model that's causing
trouble...

Comparing initial log file with second log file
Error:
/ptmp/erik/ERS.f09_g16.I1850SPINUPCN.bluefire.124426/run/cpl.log.091029-130401
and
/ptmp/erik/ERS.f09_g16.I1850SPINUPCN.bluefire.124426/run/cpl.log.091029-130648
are different.
>comm_diag xxx sorr   1 4.5555498624818352000E+16 recv lnd Sl_t

<comm_diag xxx sorr   1 4.5555508855413304000E+16 recv lnd Sl_t


But, there are many clm history fields that are different.

====================================================================================
Bug Number: 1044
VOC input raw data file has reverse coordinates and hence upside down LANDMASK

The file

$CSMDATA/lnd/clm2/rawdata/mksrf_vocef.c060502.nc

produces reasonable results for VOC emission fields on surfdata files. But, the
LANDMASK when viewed with ncview is upside down and shifted from what's
expected. I think this is because the latitude coordinates are reversed from
the other files (N to S instead of S to N).

====================================================================================
Bug Number: 717
Problem with lt_archiving for too-many files

We've been running into a bunch of problems with the lt_archiving when
using CLM. He can get 30 years in a 6 hour wall-clock cycle -- which means
over a thousand files -- where lt_archive.sh pukes.

Making it robust -- regardless of the number of files would be one first step.
The next problem he has is that running over just 10 years -- the job resubmits
itself before the lt_archive script is done. Then the scripts conflict and he
ends up having to run the archiving by hand. It would also help if it were
easier to submit the lt_archive.sh script as well.

====================================================================================
Bug number: 669
Y10K problem for clm

CESM can't use negative years or years > 9999. Having dates of Y10K or more
is sometimes useful for paleo simulations.
For clm to get past the Y10K barrier -- it needs the subroutines

set_hist_filename
restFile_filename
set_dgvm_filename

changed to allow 5 or 6 digit years rather than just 4-digit ones.

scripts, drv, and csm_share also have problems with Y10K as well.

====================================================================================
