NOAA-OWP / cfe

CFE is a conceptual rainfall-runoff model with an implementation of the Basic Model Interface.
Other
21 stars 23 forks source link

Error related to {ice_fraction_xinanjiang} while running compiled ngen #99

Closed joshdayberry closed 1 year ago

joshdayberry commented 1 year ago

Short description explaining the high-level reason for the new issue.

Current behavior

Getting error (see below) while trying to run simulation after compiling the model.

Expected behavior

No error :)

Steps to replicate behavior (include URLs)

  1. Compile following these instructions

    cmake_build/ngen /ngen/ngen/data/config/catchments.geojson "" /ngen/ngen/data/config/nexus.geojson "" /ngen/ngen/data/config/awi_simplified_realization.json /ngen/ngen/partitions_2.json

  2. Extract download data and extract partisions_2.sjon file from container described here.

Screenshots

NGen Framework 0.1.0 Building Nexus collection file read success file_path: /ngen/ngen/partitions_2.json

root_tree: 1 Building Catchment collection Config file details - Line Count: 27 | Max Line Length 46 Config Value - Param: 'forcing_file' | Value: 'BMI' | Units: '(null)' Config Value - Param: 'surface_partitioning_scheme' | Value: 'Schaake' | Units: '(null)' Config Value - Param: 'soil_params.depth' | Value: '2.0' | Units: 'm' Config Value - Param: 'soil_params.b' | Value: '8.93396282196045' | Units: '' Config Value - Param: 'soil_params.satdk' | Value: '3.19069084890877e-05' | Units: 'm s-1' Config Value - Param: 'soil_params.satpsi' | Value: '3.98730560956446' | Units: 'm' Config Value - Param: 'soil_params.slop' | Value: '0.057029859113015' | Units: 'm/m' Config Value - Param: 'soil_params.smcmax' | Value: '0.401686143900526' | Units: 'm/m' Config Value - Param: 'soil_params.wltsmc' | Value: '0.048334490431746' | Units: 'm/m' Config Value - Param: 'soil_params.expon' | Value: '1.0' | Units: '' Config Value - Param: 'soil_params.expon_secondary' | Value: '1.0' | Units: '' Config Value - Param: 'refkdt' | Value: '3.72730851635058' | Units: '(null)' Config Value - Param: 'max_gw_storage' | Value: '0.016' | Units: 'm' Config Value - Param: 'Cgw' | Value: '0.0018' | Units: 'm h-1' Config Value - Param: 'expon' | Value: '6.0' | Units: '' Config Value - Param: 'gw_storage' | Value: '0.05' | Units: 'm/m' Config Value - Param: 'alpha_fc' | Value: '0.33' | Units: '(null)' Config Value - Param: 'soil_storage' | Value: '0.05' | Units: 'm/m' Config Value - Param: 'K_nash' | Value: '0.03' | Units: '' Config Value - Param: 'K_lf' | Value: '0.01' | Units: '' Config Value - Param: 'nash_storage' | Value: '0.0,0.0' | Units: '(null)' Config Value - Param: 'num_timesteps' | Value: '1' | Units: '(null)' Config Value - Param: 'verbosity' | Value: '1' | Units: '(null)' Config Value - Param: 'DEBUG' | Value: '0' | Units: '(null)' Config Value - Param: 'giuh_ordinates' | Value: '1.00,0.00' | Units: '(null)' Found configured GIUH ordinate values ('1.00,0.00') Config Value - Param: '' | Value: '(null)' | Units: '(null)' Config Value - Param: '' | Value: '(null)' | Units: '(null)' Schaake Magic Constant calculated All CFE config params present GIUH ordinates string value found in config ('1.00,0.00') Counted number of GIUH ordinates (2) Finished function parsing CFE config At declaration of smc_profile size, soil_reservoir.n_soil_layers = 0 terminate called after throwing an instance of 'realization::ConfigurationException' what(): Multi BMI formulation cannot be created from config: cannot find available data provider to satisfy set of deferred provisions for nested module at index 0: {ice_fraction_xinanjiang} [centos:297247] Process received signal [centos:297247] Signal: Aborted (6) [centos:297247] Signal code: (-6) [centos:297247] [ 0] /lib64/libpthread.so.0(+0x12cf0)[0x7efe81c79cf0] [centos:297247] [ 1] /lib64/libc.so.6(gsignal+0x10f)[0x7efe80a28acf] [centos:297247] [ 2] /lib64/libc.so.6(abort+0x127)[0x7efe809fbea5] [centos:297247] [ 3] /lib64/libstdc++.so.6(+0x9009b)[0x7efe813c909b] [centos:297247] [ 4] /lib64/libstdc++.so.6(+0x9654c)[0x7efe813cf54c] [centos:297247] [ 5] /lib64/libstdc++.so.6(+0x965a7)[0x7efe813cf5a7] [centos:297247] [ 6] /lib64/libstdc++.so.6(+0x96808)[0x7efe813cf808] [centos:297247] [ 7] build/ngen[0x5e7654] [centos:297247] [ 8] build/ngen[0x5df056] [centos:297247] [ 9] build/ngen[0x5e5420] [centos:297247] [10] build/ngen[0x43b183] [centos:297247] [11] build/ngen[0x438eeb] [centos:297247] [12] build/ngen[0x416ebf] [centos:297247] [13] /lib64/libc.so.6(__libc_start_main+0xe5)[0x7efe80a14d85] [centos:297247] [14] build/ngen[0x40f6fe] [centos:297247] End of error message Aborted (core dumped)

hellkite500 commented 1 year ago

This is actually a NGEN specific error, not directly a CFE issue. The problem is that CFE requires the ice fraction input, but your NGEN realization doesn't include a module which can provide that input to CFE. You can take a look at this realization to get an idea of how to use sloth to provide that input in a multi-bmi formulation with CFE.

SnowHydrology commented 1 year ago

Thanks @hellkite500!

joshdayberry commented 1 year ago

Wow that is a heck of a response time! Thanks for your help. I don't understand exactly what these realization files do, but the one I'm working with was taken from the container mentioned above and seems to be working in that context. Doesn't that support the idea that the realization is properly formatted?

awi_simplified_realization.json

hellkite500 commented 12 months ago

@joshdayberry A slightly more delayed response time, haha. Some additional guidance that might help out:

There may have been some updates to the module since that realization was created/worked. It looks like the realization you have referenced is referring to

"ice_fraction_xinan": "sloth_ice_fraction_xinan",

on line 29, but CFE has a required input of

ice_fraction_xinanjiang

So you might try changing line 29 to be:

"ice_fraction_xinanjiang": "sloth_ice_fraction_xinan",

and see if that clears things up.

joshdayberry commented 11 months ago

Awesome! That got me past where I was stuck. Thanks so much for your help!

Joshua J. Dayberry, JD

Phone/Text US: +1-317-674-6302 @. @.>*

Follow Me On: LinkedIn http://www.linkedin.com/in/joshuadayberry

CONFIDENTIALITY NOTICE: This e-mail transmission may contain confidential information belonging to the sender which is protected by the attorney-client privilege.

On Tue, Nov 21, 2023 at 6:15 PM Nels @.***> wrote:

@joshdayberry https://github.com/joshdayberry A slightly more delayed response time, haha. Some additional guidance that might help out:

There may have been some updates to the module since that realization was created/worked. It looks like the realization you have referenced is referring to

"ice_fraction_xinan": "sloth_ice_fraction_xinan",

on line 29, but CFE has a required input of

ice_fraction_xinanjiang

So you might try changing line 29 to be:

"ice_fraction_xinanjiang": "sloth_ice_fraction_xinan",

and see if that clears things up.

— Reply to this email directly, view it on GitHub https://github.com/NOAA-OWP/cfe/issues/99#issuecomment-1821845843, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALECED3BVZDHM2FIISENK3YFUYZRAVCNFSM6AAAAAA7MZGFQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRRHA2DKOBUGM . You are receiving this because you were mentioned.Message ID: @.***>