MOM6 icon indicating copy to clipboard operation
MOM6 copied to clipboard

Inconsistent default parameter values

Open mnlevy1981 opened this issue 1 year ago • 0 comments

In MOM_state_initialization.F90:MOM_temp_salt_initialize_from_Z(), the default value for Z_INIT_ALE_REMAPPING is .false. and the default value of Z_INIT_REMAPPING_SCHEME is PPM_IH4:

https://github.com/mom-ocean/MOM6/blob/b57ff027567a445e9038637841c600204f2668cd/src/initialization/MOM_state_initialization.F90#L2561-L2566

For the MARBL driver, I am calling MOM_tracer_initialization_from_Z.F90:MOM_initialize_tracer_from_Z(), where the default values of those two parameters are .true. and PLM, respectively:

https://github.com/mom-ocean/MOM6/blob/b57ff027567a445e9038637841c600204f2668cd/src/initialization/MOM_tracer_initialization_from_Z.F90#L112-L117

We are setting Z_INIT_ALE_REMAPPING=True in MOM_override, but I am still seeing the following warning from every call to MOM_initialize_tracer_from_Z():

WARNING: Previous msg:Z_INIT_ALE_REMAPPING = True     !   [Boolean] default = False
WARNING: New message :Z_INIT_ALE_REMAPPING = True     !   [Boolean] default = True
WARNING: Encountered inconsistent documentation line for parameter Z_INIT_ALE_REMAPPING!
WARNING: Previous msg:Z_INIT_REMAPPING_SCHEME = "PPM_IH4" ! default = "PPM_IH4"
WARNING: New message :Z_INIT_REMAPPING_SCHEME = "PLM" ! default = "PLM"
WARNING: Encountered inconsistent documentation line for parameter Z_INIT_REMAPPING_SCHEME!

I think the fix is to change the default values in MOM_tracer_initialization_from_Z.F90 to match those in MOM_state_initialization.F90:

  call get_param(PF, mdl, "Z_INIT_ALE_REMAPPING", useALE, &
                 "If True, then remap straight to model coordinate from file.",&
-                 default=.true.)
+                 default=.false.)
  call get_param(PF, mdl, "Z_INIT_REMAPPING_SCHEME", remapScheme, &
                 "The remapping scheme to use if using Z_INIT_ALE_REMAPPING is True.", &
-                 default="PLM")
+                 default="PPM_IH4")

Presuming my read of the situation is correct and this is a bug, the proposed change will be coming in via my MARBL driver branch eventually. If someone else wants to get it onto mom-ocean/main faster, or propose a different fix, that would be fine by me.

mnlevy1981 avatar Mar 22 '23 20:03 mnlevy1981