Skip to content

Inventory file reading error when using ELM-FATES initialization for a gridded simulation #1391

@danielletijerina

Description

@danielletijerina

Describe the changes

I have been informed by Marcos Longo that some code in ED2 exists that “has calls MPI-library subroutines to prevent multiple nodes accessing the same FATES inventory text file at the same time: https://github.com/EDmodel/ED2/blob/396cd575c9e39acc222c640070953888e7eeff16/ED/src/init/ed_init.F90#L374-L484” however, as I understand, ED2 is a standalone model, which is different from FATES, which requires the host land model.

Is this code that prevents the file being opened simultaneously by different parts of the code (nodes) something that would be possible to employ in ELM-FATES?

Additionally, is there a protocol or workflow for executing a multi-site initialization where I can use one set of inventory files per grid cell (the second bullet point above)? We are interested in being able to run spatially explicit vegetation (e.g. different vegetation types) for each grid cell, but there doesn't seem to be much or any documentation on how this would be done (and the runs I tried with this methodology were unsuccessful… this could merit another github issue).

Is your request related to a problem?

I am testing an ELM-FATES simulation in a small catchment with gridcell size of 100m and with dimensions of 150x170. I have been using different, but spatially homogeneous initialization scenarios, and am running into an error that appears to occur when the initialization file is being open, read, and then closed by different parts of the code simultaneously (not sure if these are grid cells or nodes... I also ran on a single node and the error still occurred).

This results in the model error:
1: The inventory list file is open but should not be. 1: Aborting. 1: ENDRUN:ERROR in /pscratch/sd/d/dtk/ELM_FATES_tree_density_runs/PLN2_2020inventory_Daily_WY2012_modParamFile.IELMFATES.pm-cpu.gnu..2025-04-03/SourceMods/src.elm/FatesInventoryInitMod.F90 at line 177 1: ERROR: Unknown error submitted to shr_abort_abort.

With the lines in the FatesInventoryInitMod.F90 from 167-177:
inquire(file=trim(hlm_inventory_ctrl_file),exist=lexist,opened=lopen) if( .not.lexist ) then ! The inventory file list DNE write(fates_log(), *) 'An inventory Initialization was requested.' write(fates_log(), *) 'However the inventory file: ',trim(hlm_inventory_ctrl_file),' DNE' write(fates_log(), *) 'Aborting' call endrun(msg=errMsg(sourcefile, __LINE__)) end if if( lopen ) then ! The inventory file should not be open write(fates_log(), *) 'The inventory list file is open but should not be.' write(fates_log(), *) 'Aborting.' call endrun(msg=errMsg(sourcefile, __LINE__)) end if

Things I have tried to rectify this, which were unsuccessful:

  1. Run on a single node
  2. Create unique sets of inventory files (one .pss and one .css) for each grid cell and add individual lines to the inventory control file that specifies the lat/long of each grid cell

Alternative options

No response

Additional context

e3sm.log.37461220.250404-092906-inventoryOpen.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    ❕Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions