Skip to content
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

LIMA Refactoring #61

Open
wants to merge 41 commits into
base: master
Choose a base branch
from
Open

LIMA Refactoring #61

wants to merge 41 commits into from

Conversation

BenoitVie
Copy link
Contributor

Solves several items from issue #57

bit-repro until commit f1f0bc7 (compared to commit dc0be8a). lima_adjust results changed when switching PSIGQSAT to an array.

commit f1f0bc7 tested in Meso-NH -> OK (Quentin)

Remaining items to be addressed :

  • setup doesn't work with NVFORTRAN (deactivated in lima and lima_adjust testprogs with OPENACC)
  • use interp_micro.func.h instead of ZVEC/IVEC?
  • ALLOCATABLE arrays must be removed
  • reactivate lima and lima_adjust calls with OPENACC in the testprogs
  • code still uses 3 time steps whereas the third time step has been removed from other parametrisations (I don't understand this one)
  • there is an asymmetry between C et I (PCIT/PCIS vs PCCT/PCCS), is it OK? (I did some testing a few years ago. To be done properly again in 0D ?)

Copy link
Collaborator

@SebastienRietteMTO SebastienRietteMTO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard work, thank you Benoît.
A few things to change.

REAL, DIMENSION(MERGE(D%NIJT,0,OMFCONV), &
MERGE(D%NKT,0,OMFCONV)), INTENT(IN) :: PMFCONV !
REAL, DIMENSION(D%NIJT, D%NKT), INTENT(IN) :: PPABST ! Absolute Pressure at t
REAL, DIMENSION(D%NIJT, D%NKT), INTENT(IN) :: PPABSTT ! Absolute Pressure at t+dt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is why I said "code still uses 3 time steps whereas the third time step has been removed from other parametrisations". I haven't checked all the code to see if there are others, perhaps it's the last variable at t+dt.

END WHERE
WHERE(ZT(:)<=263.15)
ZLBDS(:) = MAX(MIN(XLBDAS_MAX, 10**(6.226-0.0106*ZT(:))),XLBDAS_MIN)
ZLBDS(:) = MAX(MIN(LIMAC%XLBDAS_MAX, 10**(6.226-0.0106*ZT(:))),LIMAC%XLBDAS_MIN)
END WHERE
END WHERE
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nested where are dangerous and do not necessarily do what is expected on some compilers.

@@ -175,7 +180,7 @@ SUBROUTINE GETDATA_LIMA_ADJUST (NPROMA, NGPBLKS, NFLEVG, KRR, KSV, &
READ (IFILE) KLON, KDUM, KLEV
READ (IFILE) KRR, KSV
READ (IFILE) CCONDENS, CLAMBDA3
READ (IFILE) OSUBG_COND, OSIGMAS, PTSTEP, PSIGQSAT
READ (IFILE) OSUBG_COND, OSIGMAS, PTSTEP
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid having to generate the files again, we should keep the same reading, even if it means doing nothing with this variable. Alternatively, it can be used to fill the ZSIGQSAT_B array.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seem to be some forgotten prints.
The refversion variable cannot be hard-coded, it would break other usages.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why those modifications?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants