# Tshift issue about concentration file

**URL:** <https://forum.cmascenter.org/t/tshift-issue-about-concentration-file/3322>\
**Category:** I/O API\
**Created:** [June 11, 2022, 12:02pm UTC](https://forum.cmascenter.org/t/tshift-issue-about-concentration-file/3322 "2022-06-11T12:02:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bandaoshutiao](https://avatars.discourse-cdn.com/v4/letter/b/9fc348/32.png) [@bandaoshutiao](https://forum.cmascenter.org/u/bandaoshutiao)\
**Post date:** [June 11, 2022, 12:02pm UTC](https://forum.cmascenter.org/t/tshift-issue-about-concentration-file/3322/1 "2022-06-11T12:02:21Z")

</div>

I try to timeshift the combine concentration files, but I get an error.

```auto
>>--->> WARNING in subroutine M3TSHIFT
     Read failure: file INFILE
     M3WARN: DTBUF 12:00:00 Aug. 29, 2020 (2020242:120000)
     
     >>--->> WARNING in subroutine RDTFLAG
     Time step not available in file INFILE for variable precip
     M3WARN: DTBUF 13:00:00 Aug. 29, 2020 (2020242:130000)

```

![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/9/961fdd314aa60f640763841d5f19920a4a9a366d.png)

I noticed some empty values in my file, is it because of this? How can I fix this?

---

<div class="post-metadata">

**Author:** ![cjcoats](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@cjcoats](https://forum.cmascenter.org/u/cjcoats)\
**Post date:** [June 11, 2022, 12:10pm UTC](https://forum.cmascenter.org/t/tshift-issue-about-concentration-file/3322/2 "2022-06-11T12:10:40Z")

</div>

These gaps are caused by some variable not having been written to the file (the timeste-flags are subscripted by both variable and time-step).

Is the variable `precip` (with that spelling, all in lower-case) actually in the file (what does _ncdump -h_ say?)?

To fix it, you need to do a “good” re-run of whatever created `INFILE`.

---

<div class="post-metadata">

**Author:** ![bandaoshutiao](https://avatars.discourse-cdn.com/v4/letter/b/9fc348/32.png) [@bandaoshutiao](https://forum.cmascenter.org/u/bandaoshutiao)\
**Post date:** [June 11, 2022, 12:18pm UTC](https://forum.cmascenter.org/t/tshift-issue-about-concentration-file/3322/3 "2022-06-11T12:18:20Z")

</div>

![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/f/f78d5d22475a8a3880f147f3e4fdf88bc009db77.png)  
This variable appears to be taken from the MET\_CRO\_2D file.

---

<div class="post-metadata">

**Author:** ![bandaoshutiao](https://avatars.discourse-cdn.com/v4/letter/b/9fc348/32.png) [@bandaoshutiao](https://forum.cmascenter.org/u/bandaoshutiao)\
**Post date:** [June 11, 2022, 12:23pm UTC](https://forum.cmascenter.org/t/tshift-issue-about-concentration-file/3322/4 "2022-06-11T12:23:08Z")

</div>

In my MET file, because there is no `precip` variable, I commented it out in the spec file to combine. But it seems that the merged file still has this variable, it’s just a null value. What should I do?

---

<div class="post-metadata">

**Author:** ![bandaoshutiao](https://avatars.discourse-cdn.com/v4/letter/b/9fc348/32.png) [@bandaoshutiao](https://forum.cmascenter.org/u/bandaoshutiao)\
**Post date:** [June 11, 2022, 12:27pm UTC](https://forum.cmascenter.org/t/tshift-issue-about-concentration-file/3322/5 "2022-06-11T12:27:28Z")

</div>

It seems that just commenting out (I used “!”) in spec\_def\_files is not an option. I deleted the `precip` variable completely and the combine file doesn’t seem to have nulls anymore. thank you~

---

<div class="post-metadata">

**Author:** ![hogrefe.christian](https://avatars.discourse-cdn.com/v4/letter/h/74df32/32.png) [@hogrefe.christian](https://forum.cmascenter.org/u/hogrefe.christian)\
**Post date:** [June 11, 2022, 2:08pm UTC](https://forum.cmascenter.org/t/tshift-issue-about-concentration-file/3322/6 "2022-06-11T14:08:50Z")

</div>

Commenting out a variable definition in your `combine` SpecDef file with a “!” should have the same effect as deleting the line altogether.

My guess is that after you had the failed `combine` run which crashed because ‘precip’ couldn’t be computed from your input files, you commented out the ‘precip’ definition and reran `combine` successfully but did not delete the output file initially created by the crashed run. Therefore, the ‘precip’ variable was still one of the variables defined in that output file (without any actual values) because `combine` opens output files in ‘FSUNKN3’ mode, and the new run with the commented-out ‘precip’ line of course did not fill in any values for ‘precip’, either.  
On the other hand, when you did your final run with the deleted ‘precip’ line, you probably deleted the existing output file so everything now worked fine.

---

<div class="post-metadata">

**Author:** ![bandaoshutiao](https://avatars.discourse-cdn.com/v4/letter/b/9fc348/32.png) [@bandaoshutiao](https://forum.cmascenter.org/u/bandaoshutiao)\
**Post date:** [June 11, 2022, 2:58pm UTC](https://forum.cmascenter.org/t/tshift-issue-about-concentration-file/3322/7 "2022-06-11T14:58:43Z")

</div>

It is true, you are too professional.
