RXCROPMATURITYSKIPGEN test can fail for file length of fsurdat beyond 255
- Dominant language
- Fortran
- Stars
- 352
- Forks
- 361
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 7
Description
### Brief summary of bug
RXCROPMATURITYSKIPGEN_Ld1097.f10_f10_mg37.IHistClm60BgcCrop.derecho_intel.clm-cropMonthOutput
fails because the fsurdat file it creates for the case is too long. The filename it creates include the testname which is long, a filename which is fairly long, the test-id, and then the path to scratch. This failed for me with a testid that was using the temporary branch tag name which is longer than a standard CTSM tag name.
One way to remove this possibility is to increase the character length for files. We are using 255 right now because there was a limitation in the past. And currently we have the code with lots of len=256 for filenames.
### General bug information
**CTSM version you are using:** branch_tags/tmp-241219.n01.ctsm5.3.016-23-g1224d97a7
**Does this bug cause significantly incorrect results in the model's science?** no
**Configurations affected:** Tests with too long of a filename for fsurdfat
Fails in the build-namelist step
### Important output or errors that show the problem
Dies in build-namelist with:
```
2025-01-10 10:23:17: ERROR: Command /glade/work/erik/ctsm_worktrees/newbranch/bld/build-namelist failed rc=255
out=
err=ERROR : CLM build-namelist::CLMBuildNamelist::process_namelist_infile() : Invalid namelist variable in '-infile' /glade/derecho/scratch/erik/tests_tmp241219n1ctsm5316erikb4bacl/RXCROPMATURITYSKIPGEN_Ld1097.f10_f10_mg37.IHistClm60BgcCrop.derecho_intel.clm-cropMonthOutput.GC.tmp241219n1ctsm5316erikb4bacl_int.gddgen/Buildconf/clmconf/namelist.
ERROR: in validate_variable_value (package Build::Namelist): Variable name fsurdat has a string element that is too long: '/glade/derecho/scratch/erik/tests_tmp241219n1ctsm5316erikb4bacl/RXCROPMATURITYSKIPGEN_Ld1097.f10_f10_mg37.IHistClm60BgcCrop.derecho_intel.clm-cropMonthOutput.GC.tmp241219n1ctsm5316erikb4bacl_int.gddgen/surfdata_10x15_hist_1850_78pfts_c240908.all_crops_everywhere.nc'
```
Contributor guide
Assessment
This issue has not been assessed yet.