  With current and future leading systems adopting heterogeneous architectures,
adapting existing models for heterogeneous supercomputers is of urgent need for
improving model resolution and reducing modeling uncertainty. This paper
presents our three-week effort on porting a complex earth system model, CESM
2.2, to a 40-million-core Sunway supercomputer. Taking a non-intrusive approach
that tries to minimizes manual code modifications, our project tries to achieve
both improvement of performance and consistency of the model code. By using a
hierarchical grid system and an OpenMP-based offloading toolkit, our porting
and parallelization effort covers over 80% of the code, and achieves a
simulation speed of 340 SDPD (simulated days per day) for 5-km atmosphere, 265
SDPD for 3-km ocean, and 222 SDPD for a coupled model, thus making multi-year
or even multi-decadal experiments at such high resolution possible.
