# Could not extract MET\_CRO\_3D file

**URL:** <https://forum.cmascenter.org/t/could-not-extract-met-cro-3d-file/3250>\
**Category:** CMAQ\
**Created:** [May 16, 2022, 2:23pm UTC](https://forum.cmascenter.org/t/could-not-extract-met-cro-3d-file/3250 "2022-05-16T14:23:08Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![rrezaei83](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@rrezaei83](https://forum.cmascenter.org/u/rrezaei83)\
**Post date:** [May 16, 2022, 2:23pm UTC](https://forum.cmascenter.org/t/could-not-extract-met-cro-3d-file/3250/1 "2022-05-16T14:23:08Z")

</div>

After running the CCTM, I got this error message in the log file. Could you please help me in resolving the issue?

Thank you in advance for any help you can provide,  
Reza

 ![cctm_error](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/6/6a722a06f2ec61d3e615d0f9e5df4444d80b9009.png)

---

<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:** [May 16, 2022, 2:38pm UTC](https://forum.cmascenter.org/t/could-not-extract-met-cro-3d-file/3250/2 "2022-05-16T14:38:22Z")

</div>

This says that date&time 2012154:010000 is not a TFLAG-pair in the file (which then says that this date&time was never successfully written to the file).

First, check the log-output from `OPEN3` to make sure environment-variable `MET_CRO_3D` refers to the file you think it does; then do the command

> _ncdump -v TFLAG $MET\_CRO\_3D_

and see whether the pair 2012154:010000 occurs. If not, then either (a) this is not the right `MET_CRO_3D` file; or else (b) this was not a correctly-generated `MET_CRO_3D` file (and where did it come from, by the way?); or (c) there is some problem outside my scope of expertise with subroutine `retrieve_time_de` or its callees.

---

<div class="post-metadata">

**Author:** ![rrezaei83](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@rrezaei83](https://forum.cmascenter.org/u/rrezaei83)\
**Post date:** [May 16, 2022, 4:01pm UTC](https://forum.cmascenter.org/t/could-not-extract-met-cro-3d-file/3250/3 "2022-05-16T16:01:23Z")

</div>

Thank you for the suggestion. I did the command and get this result:  
 ![tflag](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/a/a7ee99a15f5e28d128fcdd520645463fda16f9f4.png)

---

<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:** [May 16, 2022, 4:27pm UTC](https://forum.cmascenter.org/t/could-not-extract-met-cro-3d-file/3250/4 "2022-05-16T16:27:44Z")

</div>

So where did this file come from? Not _MCIP_ (which is supposed to be how you produce MET\_CRO\_3D files), I’m sure…

---

<div class="post-metadata">

**Author:** ![rrezaei83](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@rrezaei83](https://forum.cmascenter.org/u/rrezaei83)\
**Post date:** [May 16, 2022, 4:30pm UTC](https://forum.cmascenter.org/t/could-not-extract-met-cro-3d-file/3250/5 "2022-05-16T16:30:21Z")

</div>

Actually, these files come from MCIP process. I passed MCIP without the error message.

---

<div class="post-metadata">

**Author:** ![rrezaei83](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@rrezaei83](https://forum.cmascenter.org/u/rrezaei83)\
**Post date:** [May 17, 2022, 9:12am UTC](https://forum.cmascenter.org/t/could-not-extract-met-cro-3d-file/3250/6 "2022-05-17T09:12:40Z")

</div>

@tlspero  
Hello Ms. Tanya,  
If you remember, you helped me to solve the problem with MCIP outputs a week ago. There is no error message in MCIP log files and the message “NORMAL TERMINATION” does exist. Nevertheless, I get following error message during the CCTM step:

 ![cctm_error](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/8/83a778705c20f268f8fa8ac95036950b87723e8b.png)

---

<div class="post-metadata">

**Author:** ![tlspero](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@tlspero](https://forum.cmascenter.org/u/tlspero)\
**Post date:** [May 17, 2022, 6:48pm UTC](https://forum.cmascenter.org/t/could-not-extract-met-cro-3d-file/3250/7 "2022-05-17T18:48:15Z")

</div>

@rrezaei83 –

As noted by @cjcoats, the error message indicates that the requested time period is not found in the METCRO3D file. If the METCRO3D file was created by MCIP, then the TFLAG should reflect actual times. What I suspect has happened is that you have accidentally linked your GRIDCRO2D file to the environment variable for $MET\_CRO\_3D in your script. Please double-check your script to ensure that you have the correct file linked to $MET\_CRO\_3D.

–Tanya

---

<div class="post-metadata">

**Author:** ![rrezaei83](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@rrezaei83](https://forum.cmascenter.org/u/rrezaei83)\
**Post date:** [May 17, 2022, 8:05pm UTC](https://forum.cmascenter.org/t/could-not-extract-met-cro-3d-file/3250/8 "2022-05-17T20:05:57Z")

</div>

Thank you for responding. I double-checked the environmental variables and found no issues with the script. I repeated the MCIP process, and then looked at the _TFLG_ of the _MET\_CRO\_3D_ files. . The result has changed as follows (the beginning and end of FLAG):

 ![tflag1](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/3/3687895d85659e41a78d12ac4b01ab4a044e4f4e.png)

 ![tflag2](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/1/13049bbccfb460b9e075f9e5bf414dbdba69f1ae.png)

However, I get the same error message in the CCTM log.  
 ![cctm_error](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/e/ee4a4fdafcf6c9e80662449dfdcff3e385b8e1f5.png)

---

<div class="post-metadata">

**Author:** ![tlspero](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@tlspero](https://forum.cmascenter.org/u/tlspero)\
**Post date:** [May 17, 2022, 8:21pm UTC](https://forum.cmascenter.org/t/could-not-extract-met-cro-3d-file/3250/9 "2022-05-17T20:21:38Z")

</div>

@rrezaei83 –

The error message is slightly different now, and it applies to the next day. The environment variable for MET\_CRO\_3D needs to be updated to include the data for 01 UTC 3 Jun 2012. (The original error applied to 01 UTC 2 Jun 2012.) I suggest this is likely a scripting issue, but you’re on the right track.

–Tanya

---

<div class="post-metadata">

**Author:** ![rrezaei83](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@rrezaei83](https://forum.cmascenter.org/u/rrezaei83)\
**Post date:** [May 17, 2022, 9:12pm UTC](https://forum.cmascenter.org/t/could-not-extract-met-cro-3d-file/3250/10 "2022-05-17T21:12:16Z")

</div>

Thank you, Ms. Tanya. I’ll make the necessary changes.

---

<div class="post-metadata">

**Author:** ![rrezaei83](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@rrezaei83](https://forum.cmascenter.org/u/rrezaei83)\
**Post date:** [May 18, 2022, 6:05pm UTC](https://forum.cmascenter.org/t/could-not-extract-met-cro-3d-file/3250/11 "2022-05-18T18:05:28Z")

</div>

@tlspero  
Hi Ms. Tanya,  
I have another question about the aforementioned problem. To my understanding, the MCIP process produces daily meteorological outputs, with each file containing data from 00:00:00 of the current day to 00:00:00 of the following day (25-hours data). So, why does the CCTM try to read the MCIP data associated with the time 01:00:00 of the next day in my case?

---

<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:** [May 18, 2022, 6:23pm UTC](https://forum.cmascenter.org/t/could-not-extract-met-cro-3d-file/3250/12 "2022-05-18T18:23:23Z")

</div>

In your CCTM run script, what are the settings of CTM\_STDATE, CTM\_STTIME, CTM\_RUNLEN, and CTM\_TSTEP? These values determine which range of dates and times the CCTM will attempt to read from the MCIP files.

---

<div class="post-metadata">

**Author:** ![rrezaei83](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@rrezaei83](https://forum.cmascenter.org/u/rrezaei83)\
**Post date:** [May 18, 2022, 6:45pm UTC](https://forum.cmascenter.org/t/could-not-extract-met-cro-3d-file/3250/13 "2022-05-18T18:45:39Z")

</div>

@hogrefe.christian  
Thank you for your reply.  
CTM\_STDATE is the first day of the month, however, the MCIP outputs of the last day of the previous month are given.  
CTM\_STTIME is 00:00:00.  
CTM\_RUNLEN is 30 days, and CTM\_TSTEP is 1-hour.

---

<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:** [May 18, 2022, 7:08pm UTC](https://forum.cmascenter.org/t/could-not-extract-met-cro-3d-file/3250/14 "2022-05-18T19:08:59Z")

</div>

> [@rrezaei83](#):
>
> CTM\_RUNLEN is 30 days, and CTM\_TSTEP is 25-hours.

That is the problem. In this setup, the CCTM will try to perform a single run for an entire month, with individual time steps in the output files spaced by 25 hours (i.e. the files would have a first output time step hour 0 of day 1, a second output time step hour 1 of day 2, etc.). If that’s what you actually wanted, all your input files (including MCIP and emissions) would have to contain the required data to cover such a month-long run.

Assuming that you really want to run day-by-day and would like to have hourly values in your daily output files, you would want to set CTM\_RUNLEN to 240000 (24 hours, 0 minutes, 0 seconds) and CTM\_TSTEP to 10000 (1 hour, 0 minutes, 0 seconds). For the first day when CTM\_STDATE is the first day of the month, this would give you CCTM output for that first day. When looping over days to run CMAQ for the other days in your month, you would then increment CTM\_STDATE by one day at a time.

---

<div class="post-metadata">

**Author:** ![rrezaei83](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@rrezaei83](https://forum.cmascenter.org/u/rrezaei83)\
**Post date:** [May 18, 2022, 7:17pm UTC](https://forum.cmascenter.org/t/could-not-extract-met-cro-3d-file/3250/15 "2022-05-18T19:17:20Z")

</div>

By “CTM\_TSTEP = 25-hours” I mean there are 25-time steps in each MCIP file. As you mentioned, the MCIP data are hourly. The TSTEP of CCTM is 1-hour, also.

---

<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:** [May 18, 2022, 7:24pm UTC](https://forum.cmascenter.org/t/could-not-extract-met-cro-3d-file/3250/16 "2022-05-18T19:24:26Z")

</div>

O.k., so it sounds like you set CTM\_TSTEP to 10000 which would be correct. But if you set CTM\_RUNLEN to 7200000 (you wrote 30 days, but didn’t show the actual CTM\_RUNLEN setting in your script), your CCTM simulation would try to run for the entire month at once, so with your current input files that contain only 25 hours of data, it would crash at the beginning of the second day which appears to be what’s happening.

The solution is to change CTM\_RUNLEN to 240000 and then use a loop in the run script to change CTM\_STDATE and perform individual 24 hour CCTM simulations for each day.

---

<div class="post-metadata">

**Author:** ![rrezaei83](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@rrezaei83](https://forum.cmascenter.org/u/rrezaei83)\
**Post date:** [May 18, 2022, 7:37pm UTC](https://forum.cmascenter.org/t/could-not-extract-met-cro-3d-file/3250/17 "2022-05-18T19:37:13Z")

</div>

I apologize for any misunderstandings. I may use some terms incorrectly because I am new to the field.

I run MCIP and CCTM processes monthly in a loop. Each file contains 25-hours of data. Actually, the MCIP process generates daily (25-hours) data. Moreover, there is no error message in the MCIP log file. But, I get an error in the CCTM process, however, the process generates the outputs.

---

<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:** [May 18, 2022, 7:53pm UTC](https://forum.cmascenter.org/t/could-not-extract-met-cro-3d-file/3250/18 "2022-05-18T19:53:37Z")

</div>

Could you please post your CCTM run script and full run script log file so we can have a closer look at your settings? Thanks!

---

<div class="post-metadata">

**Author:** ![rrezaei83](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@rrezaei83](https://forum.cmascenter.org/u/rrezaei83)\
**Post date:** [May 20, 2022, 2:06pm UTC](https://forum.cmascenter.org/t/could-not-extract-met-cro-3d-file/3250/19 "2022-05-20T14:06:26Z")

</div>

@hogrefe.christian

Dear Christian, your suggestion worked. After setting NSTEPS = 240000, the error was resolved. I appreciate your help.
