# Model exited with error code 139

**URL:** <https://forum.access-hive.org.au/t/model-exited-with-error-code-139/3976>\
**Category:** Earth System Model\
**Tags:** help, access-esm\
**Created:** [8 December 2024 21:43 UTC](https://forum.access-hive.org.au/t/model-exited-with-error-code-139/3976 "2024-12-08T21:43:30Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![HIMADRI\_SAINI](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/himadri_saini/32/515_2.png) [@HIMADRI\_SAINI](https://forum.access-hive.org.au/u/HIMADRI_SAINI)\
**Post date:** [8 December 2024 21:43 UTC](https://forum.access-hive.org.au/t/model-exited-with-error-code-139/3976/1 "2024-12-08T21:43:30Z")

</div>

Hello, I need help with the code 139 error mentioned in this [post](https://forum.access-hive.org.au/t/need-help-finding-and-interpreting-access-esm1-5-errors/2300). Apologies, but I couldn’t figure out how to reply directly to that post.

Unfortunately, neither payu sweep nor perturbing the model is resolving the issue. I made some changes to vegetation types in this run, such as removing tundra and adding ice.

The run directory is located at: `/home/561/hs2549/access-esm1.5/lgm`."

Thanks.

---

<div class="post-metadata">

**Author:** ![dkhutch](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/dkhutch/32/510_2.png) [@dkhutch](https://forum.access-hive.org.au/u/dkhutch)\
**Post date:** [8 December 2024 22:08 UTC](https://forum.access-hive.org.au/t/model-exited-with-error-code-139/3976/2 "2024-12-08T22:08:03Z")

</div>

Hi Himadri,  
I see that you are continuing from a run that got up to 11 years of output. What has changed since the last successful run?  
Regards,  
David

---

<div class="post-metadata">

**Author:** ![HIMADRI\_SAINI](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/himadri_saini/32/515_2.png) [@HIMADRI\_SAINI](https://forum.access-hive.org.au/u/HIMADRI_SAINI)\
**Post date:** [8 December 2024 22:32 UTC](https://forum.access-hive.org.au/t/model-exited-with-error-code-139/3976/3 "2024-12-08T22:32:30Z")

</div>

Hi David,

I have made the vegetation changes. My target restart file, after running the `update_cable_vegfrac.py` script (from /g/data/y99/hs2549/access-esm/scripts/), is located at `archive/restart010/atmosphere/test2.astart`.

This file differs from `restart_dump.astart` in the same folder because I have run the perturbation script on it after applying the vegetation updates.

Cheers,  
Himadri

---

<div class="post-metadata">

**Author:** ![dkhutch](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/dkhutch/32/510_2.png) [@dkhutch](https://forum.access-hive.org.au/u/dkhutch)\
**Post date:** [8 December 2024 23:08 UTC](https://forum.access-hive.org.au/t/model-exited-with-error-code-139/3976/4 "2024-12-08T23:08:49Z")

</div>

Thanks Himadri,  
My guess is that the greatly expanded ice PFT type requires some other land surface variables to be changed in combination to make it stable. I guess the script above worked for the 49 ka case and also the Last Interglacial?

Not exactly sure why it worked in those cases and not this one, but it’s definitely a problem in the Miocene case if I just change the PFT (especially for ice I think), without also changing other land surface variables to be ‘in sync’ with it.

I had a conversation with @mlipson about this… he mentioned that ice gets treated very differently to other PFTs in CABLE. Maybe he could elaborate on this a bit more?

In any case, I think the easiest solution is to remap all of the land surface variables from a working analogue… so that ice PFT cells have corresponding land surface restart variables that have already been working. I can help set that up.

---

<div class="post-metadata">

**Author:** ![dkhutch](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/dkhutch/32/510_2.png) [@dkhutch](https://forum.access-hive.org.au/u/dkhutch)\
**Post date:** [8 December 2024 23:31 UTC](https://forum.access-hive.org.au/t/model-exited-with-error-code-139/3976/5 "2024-12-08T23:31:05Z")

</div>

Hi again @HIMADRI_SAINI,  
Just looking at your old restart file vs your new restart file. In your restart folder:  
`/home/561/hs2549/access-esm1.5/lgm/archive/restart010/atmosphere`  
There are files:  
`restart_dump.astart.bak`  
`restart_dump.astart`

I looked at the PFT variable in each of these files, and it appears that the land-sea mask has changed slightly. The new restart file has more NaNs in the PFT variable around the edge of Australia and New Guinea.

I made netcdfs of these in this folder:  
`/g/data/y99/dkh157/access_esm/LGM/veg_pert`

The files `old_restart.pft.nc` and `new_restart.pft.nc` are the PFTs in your restart dir, and:  
`mask_diff.nc`  
Is a difference of the two masks. This difference files shows a smattering of non-zeros, so I think in the first instance the run is crashing because there are NaNs in the PFT restart variable.

---

<div class="post-metadata">

**Author:** ![HIMADRI\_SAINI](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/himadri_saini/32/515_2.png) [@HIMADRI\_SAINI](https://forum.access-hive.org.au/u/HIMADRI_SAINI)\
**Post date:** [8 December 2024 23:54 UTC](https://forum.access-hive.org.au/t/model-exited-with-error-code-139/3976/6 "2024-12-08T23:54:32Z")

</div>

Thanks, David. I’m not sure what could have changed the land-sea mask, but I am looking into this.

---

<div class="post-metadata">

**Author:** ![HIMADRI\_SAINI](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/himadri_saini/32/515_2.png) [@HIMADRI\_SAINI](https://forum.access-hive.org.au/u/HIMADRI_SAINI)\
**Post date:** [9 December 2024 02:36 UTC](https://forum.access-hive.org.au/t/model-exited-with-error-code-139/3976/7 "2024-12-09T02:36:06Z")

</div>

Hi David,

Update: I have kept the land-sea mask in my new restart consistent with the old one, but I am still encountering the same error. I would be happy to try your earlier suggestion of remapping all the land surface variables.

Thanks,  
Himadri

---

<div class="post-metadata">

**Author:** ![spencerwong](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/spencerwong/32/1894_2.png) [@spencerwong](https://forum.access-hive.org.au/u/spencerwong)\
**Post date:** [16 December 2024 22:34 UTC](https://forum.access-hive.org.au/t/model-exited-with-error-code-139/3976/8 "2024-12-16T22:34:21Z")

</div>

Hi @HIMADRI_SAINI, just wanted to check in to see whether you are still running into these issues with your ESM1.5 simulation.

Cheers,  
Spencer

---

<div class="post-metadata">

**Author:** ![HIMADRI\_SAINI](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/himadri_saini/32/515_2.png) [@HIMADRI\_SAINI](https://forum.access-hive.org.au/u/HIMADRI_SAINI)\
**Post date:** [16 December 2024 23:39 UTC](https://forum.access-hive.org.au/t/model-exited-with-error-code-139/3976/9 "2024-12-16T23:39:29Z")

</div>

Hi @spencerwong thanks for checking in. No, I am not running into this issue anymore. In my simulation, large extent of the Laurentide ice sheet was leading to a strong decrease in salinity near Greenland, which led to the model crashing after a few months. This has been resolved by adjusting the runoff to match my modified topography.

Cheers,  
Himadri

---

<div class="post-metadata">

**Author:** ![spencerwong](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/spencerwong/32/1894_2.png) [@spencerwong](https://forum.access-hive.org.au/u/spencerwong)\
**Post date:** [17 December 2024 04:08 UTC](https://forum.access-hive.org.au/t/model-exited-with-error-code-139/3976/10 "2024-12-17T04:08:04Z")

</div>

Thanks @HIMADRI_SAINI! Are you happy for me to close this topic?

---

<div class="post-metadata">

**Author:** ![spencerwong](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/spencerwong/32/1894_2.png) [@spencerwong](https://forum.access-hive.org.au/u/spencerwong)\
**Post date:** [17 December 2024 04:27 UTC](https://forum.access-hive.org.au/t/model-exited-with-error-code-139/3976/11 "2024-12-17T04:27:38Z")

</div>


