Hi, there.
I am recently reading some codes in Icepack, and get a little confusion,
The Icepack I used is version 1.2.3, which is the latest version till now.
The confusion I have is in icepack_therm_mushy.F90, Line 3149,
To my understanding, "wlimit" is used as a limit condition for "w", since "wlimit" is obtained from "phi_min" (Line 3146), and "phi_min" is the minimum porosity in the mush,
I suggest "wlimit" is the minimum value of "w". To tesify my guess, I ran the standalone Icepack for one year using the test data downloaded from CICE-Consortium/Icepack, then I got the standard value for w (about 3.0E-4) and the standard valur for wlimit (about 1.0E-7), as you can see, "wlimit" always smaller than "w", which testify my suggestion about "wlimit" (used as the minimum value for w).
Meanwhile, In Line 3149, there are two conditions of "w", if "wlimit" > "w", we get "w" as final output, if "wlimit" < "w", we get "wlimit" as final output, In this line, we can suggest "wlimit" serves as a maximum value for "w", which conficts with our previous consumption.
Is this a coding mistake in Line 3149 ? Should we change the line 3149 from w = w * max( min ( abs ( wlimit / w), c1), c0 ) to w = w * max( max ( abs ( wlimit / w), c1), c0 ) ?
Thank you.
I am recently reading some codes in Icepack, and get a little confusion,
The Icepack I used is version 1.2.3, which is the latest version till now.
The confusion I have is in icepack_therm_mushy.F90, Line 3149,
To my understanding, "wlimit" is used as a limit condition for "w", since "wlimit" is obtained from "phi_min" (Line 3146), and "phi_min" is the minimum porosity in the mush,
I suggest "wlimit" is the minimum value of "w". To tesify my guess, I ran the standalone Icepack for one year using the test data downloaded from CICE-Consortium/Icepack, then I got the standard value for w (about 3.0E-4) and the standard valur for wlimit (about 1.0E-7), as you can see, "wlimit" always smaller than "w", which testify my suggestion about "wlimit" (used as the minimum value for w).
Meanwhile, In Line 3149, there are two conditions of "w", if "wlimit" > "w", we get "w" as final output, if "wlimit" < "w", we get "wlimit" as final output, In this line, we can suggest "wlimit" serves as a maximum value for "w", which conficts with our previous consumption.
Is this a coding mistake in Line 3149 ? Should we change the line 3149 from w = w * max( min ( abs ( wlimit / w), c1), c0 ) to w = w * max( max ( abs ( wlimit / w), c1), c0 ) ?
Thank you.