ccpp-physics icon indicating copy to clipboard operation
ccpp-physics copied to clipboard

On branch jm-pr-multiple-instances-of-ccpp-physics

Open michalakes opened this issue 1 year ago • 12 comments

Changes to add an instance index to CCPP physics

Changes to be committed: modified: physics/GFS_phys_time_vary.fv3.F90 modified: physics/GFS_phys_time_vary.fv3.meta modified: physics/h2ointerp.f90 modified: physics/mp_thompson.F90 modified: physics/mp_thompson.meta modified: physics/ozinterp.f90

michalakes avatar Feb 28 '23 23:02 michalakes

@dustinswales @grantfirl We'll need to revive this PR and make sure it finds its way into the authoritative codebase. I'll work on updating it to the latest NCAR main code (a few conflicts to resolve).

climbfuji avatar May 07 '24 15:05 climbfuji

@dustinswales @grantfirl I am going to revive this PR. How do you want me to proceed, since these changes are for NCAR main? Should I simply update the PR from NCAR main and resolve the conflicts? Are you going to bring this down to the ufs fork for testing? Thanks ...

climbfuji avatar May 13 '24 22:05 climbfuji

@dustinswales I thought these changes were already incorporated into ufs/dev? Or was it just partial?

grantfirl avatar May 14 '24 15:05 grantfirl

@dustinswales I thought these changes were already incorporated into ufs/dev? Or was it just partial?

OK, it looks like https://github.com/ufs-community/ccpp-physics/pull/75 and the followup https://github.com/ufs-community/ccpp-physics/pull/150 partially contained some of these changes, at least for ozone physics.

Since those were targeted at ufs-community, I'm thinking that it might be best to rebase this off of ufs/dev and target a PR there.

grantfirl avatar May 14 '24 16:05 grantfirl

@grantfirl Correct. Only the ozone physics were updated to address Johns issues. To wrap this up we should to refactor the h2o photochemistry scheme identically to the ozone. Then the changes to mp_thompson and the GFS interstitials are trivial, we just need to move some things from module memory to interstitials OR define them with the instance dimension (I vote for the former). If this sounds good I can do the h2o changes, but probably not for a week at least.

dustinswales avatar May 14 '24 16:05 dustinswales

Sounds great, thank you both. I can help with the remaining changes after Dustin is done with h2o.

climbfuji avatar May 14 '24 17:05 climbfuji

@dustinswales and @grantfirl any updates on the multiple instance changes from @michalakes ? As I said above, I can help with the remaining changes after Dustin is done with H2O. Thanks!

climbfuji avatar Aug 29 '24 11:08 climbfuji

@climbfuji After ufs/dev #223, all that remains is to create a new interstitial for is_initialized in GFS_phys_time_vary.fv3.F90.

dustinswales avatar Aug 29 '24 14:08 dustinswales

@climbfuji After ufs/dev #223, all that remains is to create a new interstitial for is_initialized in GFS_phys_time_vary.fv3.F90.

Thanks Dustin. I had some thoughts about this. I don't think you can use an interstitial variable for this. It ought to be a scheme module variable, otherwise it needs to be allocated by the host and saved there. Interstitials don't have any memory whatsoever.

climbfuji avatar Aug 29 '24 14:08 climbfuji

@climbfuji Sorry, I meant a host interstitial that persists (GFS_control_type). That's where I put all of the module variables that were causing problems with multiples instances.

dustinswales avatar Aug 29 '24 14:08 dustinswales

@climbfuji Sorry, I meant a host interstitial that persists (GFS_control_type). That's where I put all of the module variables that were causing problems with multiples instances.

Ok, that makes sense. Different terminology ;-)

climbfuji avatar Aug 29 '24 15:08 climbfuji

@climbfuji Sorry, I have this (bad) habit of calling everything that comes into the physics an Interstitial, even though Interstitials are a diverse group.

dustinswales avatar Aug 29 '24 15:08 dustinswales