Icepack stand-alone: dynamics_nml from icepack_in get overwritten by default parameters

MarekM

New Member
Hei,

I have some problems with changing the dynamics_nml parameters in Icepack stand-alone simulations. If I change them in icepack_in they get overwritten by the default parameters set in icepack as the icepack.runlog of that specific run then shows the default values. I have tested this with krdg_redist (stays always 1), kstrength (stays always 1) and Cf (stays always 17). This behaviour also occurs for me in the code where I didn't do any changes (icepack version 1.5.3). I'm running icepack on MacOS with the conda environment. If I change the default value, for example krdg_redist = 0, in the code and recompile then the output is different and the switch works.

Any ideas what I am missing or what is going wrong?

Thanks for any help.
Cheers,
Marek
 
Solution
I found the problem and fixed it in my version. Other users of Icepack 1.5.3 (and potentially earlier versions) as stand-alone should also have the same problem.

The dynamics_nml is defined, but never loaded in "icedrv_init.F90". Between L343 and L470 other namelists are loaded, but dynamics_nml is missing. But adding this bit of code around L470 (before close(nu_nml)) fixes the problem.

write(nu_diag,*) subname,' Reading dynamics_nml'
rewind(unit=nu_nml, iostat=nml_error)
if (nml_error /= 0) then
call icedrv_system_abort(string=subname//'ERROR: dynamics_nml rewind ', &
file=__FILE__, line=__LINE__)
endif
nml_error =...

MarekM

New Member
I found the problem and fixed it in my version. Other users of Icepack 1.5.3 (and potentially earlier versions) as stand-alone should also have the same problem.

The dynamics_nml is defined, but never loaded in "icedrv_init.F90". Between L343 and L470 other namelists are loaded, but dynamics_nml is missing. But adding this bit of code around L470 (before close(nu_nml)) fixes the problem.

write(nu_diag,*) subname,' Reading dynamics_nml'
rewind(unit=nu_nml, iostat=nml_error)
if (nml_error /= 0) then
call icedrv_system_abort(string=subname//'ERROR: dynamics_nml rewind ', &
file=__FILE__, line=__LINE__)
endif
nml_error = 1
do while (nml_error > 0)
read(nu_nml, nml=dynamics_nml,iostat=nml_error)
end do
if (nml_error /= 0) then
call icedrv_system_abort(string=subname//'ERROR: dynamics_nml reading ', &
file=__FILE__, line=__LINE__)
endif

I will also submit it to git, so that it can be included in future versions.
 
Vote Upvote 0 Downvote
Solution
Back
Top