-
Notifications
You must be signed in to change notification settings - Fork 318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve mechanism for determining where to allocate memory for urban when running with dynamic urban #1572
Comments
Thanks for opening this PR.
|
I can't remember why this was made a double precision variable. @Ivanderkelen do you remember if there was a reason for this or if it was an arbitrary choice? The only thing I can think of is that it is similar to the PCT_CFT_MAX, PCT_CROP_MAX and other variables, which are also double precision. I think @lawrencepj1 created those. If it's useful to have the actual max value for any reason, then it makes sense to have these double precision, but if all we need is a 1/0 flag, then I agree that an int is fine (or a byte, for that matter, though I'm not sure if we have the correct routines to read byte values into CTSM right now).
I'm about to basically approve that branch, so it could come to master soon. But if you want to get started on this, then it is perfectly acceptable & good practice to start a branch off of a branch like this. Then, once #1546 is merged, you can merge that version of master into your branch, which git will handle cleanly. |
@billsacks : I think the double precision for HASLAKE was arbitrary, as it is only a boolean flag. I agree with the reasoning setting it to int would be ok. |
Reviewing the changes in #1579 , I'm thinking it might be best to use We would then also want to make a similar change in #1073 - changing HASLAKE to |
Also updated variable name from HASURBAN to PCT_URBAN_MAX (ESCOMP#1572 (comment)).
(Moving this from some discussion in #1546 - see #1546 (review) )
In the soon-to-be-merged PR to enable dynamic urban (#1546 ), the temporary mechanism for allocating memory for urban is to set run_zero_weight_urban to .true. That seems reasonable for development, but I think what we want long-term is something similar to lake; this is less of a performance and memory hit than the current
run_zero_weight_urban
mechanism (I'm not sure if you want to keeprun_zero_weight_urban
in addition to this mechanism). (although @olyson showed in #1445 (comment) that the performance hit isn't too great for the current mechanism). Here's what I think should be done:@olyson replied to my original comment:
@olyson @fang-bowen @Face2sea @keerzhang1
This is connected with #1445
The text was updated successfully, but these errors were encountered: