ufs-community / ccpp-physics

UFS fork for CCPP
Other
3 stars 32 forks source link

Convert GFS DDTs from blocked data structures to contiguous arrays (aka update GFS_debug.F90) #183

Open climbfuji opened 4 months ago

climbfuji commented 4 months ago

Description

In the UFS atmospheric component fv3atm and submodules, convert internal GFS DDTs from blocked data structures to contiguous arrays. This excludes the (external) GFS_extdiag and GFS_restart DDTs. Also remove the GFS_Data super DDT and use the individual DDTs directly.

For ccpp-physics, this only affects the (apparently unused) GFS_debug.{f90,meta} files. We could consider removing them entirely instead of updating them, since they don't get used?

Testing

See https://github.com/ufs-community/ufs-weather-model/pull/2183

Associated PRs:

https://github.com/NOAA-GFDL/GFDL_atmos_cubed_sphere/pull/330 https://github.com/ufs-community/ccpp-physics/pull/183 https://github.com/NOAA-EMC/fv3atm/pull/798 https://github.com/ufs-community/ufs-weather-model/pull/2183

grantfirl commented 2 months ago

@climbfuji I'd like to keep these in the repo since they can be useful. You've already done the work, so why not?

climbfuji commented 2 months ago

@climbfuji I'd like to keep these in the repo since they can be useful. You've already done the work, so why not?

Fine with me. We should have a regression test though to make sure they are still working

climbfuji commented 1 month ago

This PR is now ready for review

climbfuji commented 1 month ago

@dusanjovic-noaa @dustinswales @grantfirl I just pushed commit https://github.com/ufs-community/ccpp-physics/pull/183/commits/afa2bc0632bd1e8a14740da484a431eadc56ec68 (and corresponding submodule pointer updates all the way up to ufs-weather-model).

I was able to build a spack-stack environment "somewhat similar" to that on WCOSS2 on S4 using intel@19.0.5. WIth that environment, I ran into issues (segfaults, memory corruption) in clm_lake.f90 around the lakeini routine. That's probably the same part of the code that the WCOSS2 runs had problems with.

With the changes I made in commit afa2bc0, the runs went through on S4 (with the -check nopointer flag removed). Could you give this a try, please?