Rangeland production Model

Hello friends.
I have a problem running the RPM model with the data samples presented. This problem can be seen in 3 versions as shown below. Thanks for the tips

ValueError: Could not open D:\Keshtkar\rpm\sample_inputs_RPM_0.1.2\precipitation as a gdal.OF_RASTER

Hi @mostafa.keshtkar,

It looks like you’re using version 0.1.2. I’m not too familiar with the RPM model, but I recommend you try the most recent release and sample data: Release v0.1.6 · natcap/rangeland_production · GitHub

If that doesn’t help:

  1. Double check that the path to your precipitation raster is correct
  2. Can you open it in QGIS or ArcGIS?
1 Like

Hi @esoth
I also tried V1.3 and 1.6. And I even checked the sample data of each version with different V of RPM. But the error did not go away. I even created new data, but all versions had this error. Layers were a bit difficult in V1.2, but opened in other versions in ArcGIS.

Hi @mostafa.keshtkar, if this is still an issue, could you upload the full logfile from your run of RPM? There’s usually some extra helpful information in the logfile that might point us in the right direction.

Hi @jdouglass. Of course, I’m still running this model. The file you want will be sent. I wish you help me with the thigh of this model because I need it so much.
InVEST-Rangeland-Production-log-2021-01-06–13_24_36.txt (8.1 KB) InVEST-Rangeland-Production-log-2021-01-06–13_25_53.txt (8.2 KB)

Thanks for your logfiles, @mostafa.keshtkar. While the problem is not immediately clear from these, I see that you’re running RPM version 0.1.2. The latest version is 0.2.0, and includes a few bugfixes related to precipitation inputs. Could you try this latest version and see if that corrects the issue for you? If it still isn’t working, please do write back to us and let us know so we can help figure it out from there.

James

Hi and Thanks for your guide @jdouglass and @GingerK. But unfortunately, I got a new error in V0.2.0. And I could not run the model to see if the previous error was fixed.
: _ (

Error_PFT1

Hi @mostafa.keshtkar , my apologies, the key that I gave you above contained a mistake. Please see this sample input key below, and note that the value you should supply for the “Plant Functional Type Fractional Cover Pattern” input contains the string “<PFT>”. Also, the issue that you were experiencing with previous versions of RPM was related to the format of the input expected for the precipitation data. The inputs can be a bit tricky. If you pay close attention to this sample input key and the inputs section in p. 8-11 of the model documentation, the sample inputs should work just fine for you.

However, we’ve just discovered a bug in v0.2.0 that may prevent the model from running. I’ll let you know here as soon as a bugfix is released.

RPM UI field Sample input value
Number of Months 2
Starting Year 2016
Starting month 1
Area of Interest (Vector) *\sample_inputs\soums_monitoring_area_diss.shp
Proportion Legume (Raster) *\sample_inputs\prop_legume.tif
Proportion Clay (Raster) *\sample_inputs\soil\clay.tif
Proportion Silt (Raster) *\sample_inputs\soil\silt.tif
Proportion Sand (Raster) *\sample_inputs\soil\sand.tif
Bulk Density (Raster) *\sample_inputs\soil\bulkd.tif
Soil pH (Raster) *\sample_inputs\soil\pH.tif
Monthly Precipitation Directory *\sample_inputs\precipitation
Monthly Minimum Temperature Directory *\sample_inputs\temperature_min
Monthly Maximum Temperature Directory *\sample_inputs\temperature_max
Site Spatial Index (Raster) *\sample_inputs\site_index.tif
Plant Functional Type Fractional Cover Pattern *\sample_inputs\pft<PFT>.tif
Animal Grazing Areas (Vector) *\sample_inputs\sfu_per_soum.shp
Site Parameter Table (CSV) *\sample_inputs\site_parameters.csv
Plant Functional Type Parameter Table (CSV) *\sample_inputs\pft_trait.csv
Animal Parameter Table (CSV) *\sample_inputs\animal_parameters.csv
Initial Conditions Table: Site State Variables *\sample_inputs\site_initial_table.csv
Initial Conditions Table: PFT State Variables *\sample_inputs\pft_initial_table.csv

Hi @GingerK. That’s all right. Thank you for helping me. But as you said, I got a new error. This error is shown below. I have tried different directories and every time I encounter this error.
thanks

Yes that’s the bug! I’ll let you know here as soon as it is addressed. Thanks for your patience.

Dear @mostafa.keshtkar , version 0.2.1 has just been released. Please give this version a try and let us know how it goes.

1 Like

Hi @jdouglass I have this error and i use version 0 2 1
Rangeland-Production-Model-log-2022-02-26–15_11_29.txt (121.7 KB)

hi @GingerK , I have the same error " worspace directory must be empty" in 0 2 0 version, and tried many directories end they was empty

@Said the “workspace directory must be empty” error exists because the model expects to run with a workspace that has never been used. I’d recommend that you either:

  1. Delete the prior workspace in its entirety or
  2. Select a different workspace directory

that will get you past this error anyways,

I see that you posted this other error message elsewhere, so let’s try to resolve the issue there.

Thanks,
James

hi @jdouglass I get this error “base_raster_path_band_const_list` is empty and should have at least one value”,in the last version of rangland production.could you help me with it

Let’s continue discussing that error over in the other thread (Rangland production model value error).

Closing this thread since we now have several separate issues all in the same thread. If anyone has further issues with the Rangeland Production Model, please create a new topic. Thanks!