phil-blain / CICE

Development repository for the CICE sea-ice model
Other
0 stars 0 forks source link

Re-read the whole code, check everything #31

Closed phil-blain closed 4 years ago

phil-blain commented 4 years ago
phil-blain commented 4 years ago

I compiled with ice_dyn_vp.o: FFLAGS += -Wall added to Macros.conda_macos. This activates the -Wall flag only for the ice_dyn_vp.o target, i.e. when compiling ice_dyn_vp.F90.

This flag found

See 083b611, 71eba9e, 2a5f4b7, 7a8951a, 4931ac2

phil-blain commented 4 years ago

I fixed trailing whitespace issues, using git diff $(git empty-tree) cicecore/cicedynB/dynamics/ice_dyn_vp.F90 : 0d527f6

phil-blain commented 4 years ago

I fixed more whitespace issues, and uniformized whitespace for subroutine arguments and intents: 0179edf 7d46f1d 9b6c2bf b32bdfe

phil-blain commented 4 years ago

I did some more code cleanup in 8218e82 and eadcfa6

phil-blain commented 4 years ago

I re-read every code comment in ice_dyn_vp and cleaned up a lot of them, also clarified others in 5ff03ab.

phil-blain commented 4 years ago

Still need to :

phil-blain commented 4 years ago

I did more variable naming clean up in 1416a7e

phil-blain commented 4 years ago

I renamed ww to orig_basis in 9267229

phil-blain commented 4 years ago

I removed the conv and r0 arguments; they were unused. If we change the implementation in the future and we need them, we'll just re-add them.

phil-blain commented 4 years ago

there are no !phb comments anymore. I changed some of them to TODO.

phil-blain commented 4 years ago

I went through the code and there is a lot of repetitions (copy-paste) between different computations regarding rheology. Here is a list of the computations by subroutines:

calc_zeta_dPr (ice_dyn_vp)

stress_vp (ice_dyn_vp)

matvec (ice_dyn_vp)

formDiag_step1 (ice_dyn_vp)

formDiag_step2 (ice_dyn_vp)

stress (ice_dyn_evp)

stress_eap (ice_dyn_eap)

We will refactor the code to unify these computations, but in a second step (after the Picard PR).

See https://github.com/phil-blain/CICE/issues/36