cryotools / cosipy

Coupled snowpack and ice surface energy and mass balance model in Python
GNU General Public License v3.0
51 stars 29 forks source link

IndexError: list index out of range #40

Open Sar1hak opened 3 years ago

Sar1hak commented 3 years ago

I am trying to run cosipy using my own NetCDF file but while executing I am getting this error:

*Traceback (most recent call last): ] | 0% Completed | 0.1s File "e:/Code/GITHUB/main/GUI.py", line 1199, in run_Code CosipyOutput(date_start= self.StartDate_edit.dateTime().toPyDateTime(), File "e:\Code\GITHUB\main\CosipyEvaluation.py", line 338, in CosipyOutput run_cosipy(cluster, IO, DATA, RESULT, RESTART, futures) File "e:\Code\GITHUB\main\COSIPY.py", line 165, in run_cosipy LAYER_IRREDUCIBLE_WATER,LAYER_REFREEZE,stake_names,stat,df_eval = future.result() File "C:\Users\Sarthak\anaconda3\envs\dissertation\lib\site-packages\distributed\client.py", line 220, in result raise exc.with_traceback(tb) File "e:\Code\GITHUB\main\cosipy\cpkernel\cosipy_core.py", line 280, in cosipy_core lwc_from_melted_layers = GRID.remove_melt_weq(melt - sublimation - deposition) File "e:\Code\GITHUB\main\cosipy\cpkernel\grid.py", line 513, in remove_melt_weq SWE = self.get_node_height(idx) (self.get_node_density(idx)/water_density) File "e:\Code\GITHUB\main\cosipy\cpkernel\grid.py", line 705, in get_node_height return self.grid[idx].get_layer_height() IndexError: list index out of range**

AnsArn commented 3 years ago

I think some of your glacier gird points are melted away. Please try to start with a thicker initial glacier height in constants.py (initial_glacier_height).

Sar1hak commented 3 years ago

Okay I understand what you mean. I had another question, is radiation correction valid for a certain range of latitude?? because the while calling the radCor.py the length variable unable to be executed as the value in cos inverse is coming out of the range of [-1,1]

On Sat, 3 Jul 2021, 3:57 pm Anselm Arndt, @.***> wrote:

I think some of your glacier gird points are melted away. Please try to start with a thicker initial glacier height in constants.py (initial_glacier_height).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cryotools/cosipy/issues/40#issuecomment-873383944, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKGKIFMWVY7TKS72LAW6XXDTV3QXDANCNFSM47WTU2TQ .

AnsArn commented 3 years ago

Could you tell me the exact line number in the code? And what is your latitude range?

Sar1hak commented 3 years ago

Hi Anselm Sorry for the late reply, by mistake instead of sending the message I saved it in the draft. Below -65 degrees the radCor was showing irregularities. I have another doubt, I am trying to evaluate using COSIPY for a duration of 1 hours but I seem to not be going forward after Starting clients and submitting jobs. It would really help me if you could tell me what exactly is the LocalCluster not able to perform and would it help if I use SLURMCLuster (I haven't worked much on SLURM), and also does this imply my inputFile is corrupt? PFA Screenshot for the same.

On Wed, Jul 21, 2021 at 1:05 AM Anselm Arndt @.***> wrote:

Could you tell me the exact line number in the code? And which is your latitude range?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cryotools/cosipy/issues/40#issuecomment-883643159, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKGKIFNESCZOPCNIGYCANDTTYXFWFANCNFSM47WTU2TQ .

AnsArn commented 3 years ago

Ok. Can you tell me the line number in the radCor module?

The LocalCluster is for simulations on your local computer or laptop, the SLURMCluster for high performance computing clusters.

Can you run the Zhadang example? https://cosipy.readthedocs.io/en/latest/Documentation.html

Sar1hak commented 3 years ago

radCor.py line 29

On Tue, Aug 31, 2021 at 10:56 PM Anselm Arndt @.***> wrote:

Ok. Can you tell me the line number in the radCor module?

The LocalCluster is for simulations on your local computer or laptop, the SLURMCluster for high performance computing clusters.

Can you run the Zhadang example? https://cosipy.readthedocs.io/en/latest/Documentation.html

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cryotools/cosipy/issues/40#issuecomment-909340780, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKGKIFP4S2TYTSWOIHKQPPLT7TYATANCNFSM47WTU2TQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.