-
Notifications
You must be signed in to change notification settings - Fork 396
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
Add Transition Rules for EMS @CpAirFnWTdb to @CpAirFnW #7801
Conversation
@Myoldmopar While it's not an IDD change, this should go in before I/O Freeze. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs an entry in the input rules doc as well.
END SUBROUTINE SortUnique | ||
|
||
SUBROUTINE UpdateEMSFunctionName(InOutArg, OldName, NewName, NoDiffArg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow - this got overly complicated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Getting paid by the line over here!
I'm happy to make changes, though, but I might need some suggestions from a Fortran expert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it ain't broke . . . I'll test it shortly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Built locally and got good results on four example files with this function. Comparing the 9.2 versions of the files with the newly transitioned versions, and grepping to only see the CpAir diffs:
|
|
||
IF (CurArgs .GE. 2) THEN | ||
DO I = 2, CurArgs, 1 | ||
CALL UpdateEMSFunctionName(OutArgs(I), EMSOldName, EMSNewName, NoDiff) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job capturing this in a separate utility function.
|
||
PARAMETER(N=20) | ||
CHARACTER*20 ARRAY(N) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this will allow up to 20 tokens to come back?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just a guess at a conservative number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I mean given the line length limit that was put on IDFs, this seems reasonable.
NewInOutArg(IDXStart:IDXEnd) = ARRAY(J) | ||
IDXStart = IDXEnd + 2 | ||
END DO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is gross. Why not just ' '.join(newArray)
?
Looks good. 🙃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make it happen!
@mitchute @Nigusse If you run 1ZoneDataCenterCRAC_wApproachTemp (transitioned up from 9.2 without this new rule) with the old function, the error message is a bit confusing:
Seems the EMS input should trap |
@mjwitte Good catch. I'll make a note to clean that up. |
Hmm, testing this on Windows with 1ZoneDataCenterCRAC_wApproachTemp, I get:
|
May need a TRIM() somewhere. |
LenToken = LEN_TRIM(ADJUSTL(ARRAY(J))) | ||
IDXEnd = LenToken + IDXStart - 1 | ||
NewInOutArg(IDXStart:IDXEnd) = ARRAY(J) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this may need to be TRIM(ADJUSTL(ARRAY(J)))
?. I'm not sure. I know different platforms might initialize data differently, but I'm surprised this specific thing would work on a platform and not the other.
I was able to reproduce the problem on Windows, and I was able to find the solution and properly transition on Windows. I am going to merge this. |
This adds transition rules for changing the EMS function
@CpAirFnWTdb
to@CpAirFnW
.EMS Program/Subroutine Usage Summary
Previous:
SET cp_air = @CpAirFnWTdb HumRate TempDB
Current:
SET cp_air = @CpAirFnW HumRate
Previous PRs which are completed but related to this transition are #7479 and #7755.
Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Reviewer
This will not be exhaustively relevant to every PR.