Open MIsmlAhmed opened 2 months ago
Here is a sample file for parameters.nc. You need to use the same order as the drainage database subbasins, and you can create any parameter in the parameter file as a function of subbasin order. The names have to match the recognized parameter names. If you already have a file, like a CSV, that associates the parameters with subbasin COMIDs, you can use the MESH preprocessing NetCDF writer library to write the parameter files. I will need to prepare example based on the file you have. MESH_parameters.zip
Thanks, Fuad!
I can create a similar file for my case.
I think I need to add the following to the run options file
INPUTPARAMSFORMFLAG nc
, right?
That is right!
@MIsmlAhmed Hi Mohamed, Can you confirm what version of code you're using.
I am using 1860
Thanks Mohamed. It's r1860 and not r1860_ME or r1860_ME_ZT?
I was trying to create the MESH_parameters.nc
file through Python with no success as MESH keeps giving me errors related lon
and lat
precision and units (even though I used them directly from the drainage file).
Anyway, I decided to switch to the regular text format. Here's my MESH_parameters.txt
file (I want to define CMAX
per subbasin
):
! MESH parameter file per subbasin
!FIELD_NAME id Value1 Value2 ... ValueN
CMAX subbasin 0.337708667 0.384617949 0.375435287 0.23428485 0.372925428 0.54666046 0.320213062 0.329418945 0.339572708 0.296278104 0.337803913 0 0.278200079
However, MESH gives me the following warning:
READING: MESH_parameters.txt
WARNING: 'CMAX' is not recognized.
Active parameters in file: 0
This means that it didn't recognize the parameter and the values will not be used in the simulation.
That shouldn't happen, given that CMAX
is an actual parameter inside MESH.
Any idea what's going on?
it's r1860
I was trying to create the
MESH_parameters.nc
file through Python with no success as MESH keeps giving me errors relatedlon
andlat
precision and units (even though I used them directly from the drainage file).Anyway, I decided to switch to the regular text format. Here's my
MESH_parameters.txt
file (I want to defineCMAX
persubbasin
):! MESH parameter file per subbasin !FIELD_NAME id Value1 Value2 ... ValueN CMAX subbasin 0.337708667 0.384617949 0.375435287 0.23428485 0.372925428 0.54666046 0.320213062 0.329418945 0.339572708 0.296278104 0.337803913 0 0.278200079
However, MESH gives me the following warning:
READING: MESH_parameters.txt WARNING: 'CMAX' is not recognized. Active parameters in file: 0
This means that it didn't recognize the parameter and the values will not be used in the simulation. That shouldn't happen, given that
CMAX
is an actual parameter inside MESH. Any idea what's going on?
Yes, the variables have to be exposed to the format. You will observe the same using the NetCDF format file. I've made a development branch and will work with @fuadyassin to address the issue.
Thanks, Dan! I am not sure what do you mean by
Yes, the variables have to be exposed to the format.
Can you please clarify?
Also, is the text file in the right format (to do what needs to be done)?
It means the parameters I initially assumed would be recognized, but I just learned that PDMROF parameters have a different implementation and are not currently part of the recognized gridded parameters. Adjustments to the version you are using will be implemented with the help of @dprincz , and the parameters will be exposed to different input types. Once that's done, they will be recognized in the modified branch version.
Excellent! Thanks!
That's what I suspected, PDMROF parameters are not recognizable as gridded but this can be implemented, soon I hope.
I want to define
PDMROF
parameters (e.g.,CMAX
andB
) per subbasin instead of per tile/gru, which the current default method.I am aware that this can be done using the
MESH_parameters.nc
file, but cannot find a template or documentation to create it.I am using nc drainage file (vector MESH).