Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Inquiry about one line of code in Icepack

wangxiong

New Member
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,
1607930026333.png
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.
 
Top