Commit d3b1691b authored by Ralf Greve's avatar Ralf Greve
Browse files

New parameter CHECK_RES_IMAX_JMAX introduced.

If 1 or undefined, compatibility check between horizontal resolution
and number of grid points carried out as before.
If 0, compatibility check not carried out.
parent 2fefdc23
......@@ -5,7 +5,7 @@
!
#define MODEL_SICOPOLIS
#define VERSION '5-dev'
#define DATE '2022-05-20'
#define DATE '2022-05-30'
!
!> @mainpage
!!
......
......@@ -306,6 +306,8 @@ call error(errormsg)
#if !defined(ALLOW_OPENAD) /* Normal */
#if (!defined(CHECK_RES_IMAX_JMAX) || CHECK_RES_IMAX_JMAX==1)
#if (GRID==0 || GRID==1)
if (approx_equal(DX, 64.0_dp, eps_sp_dp)) then
......@@ -368,6 +370,15 @@ call error(errormsg)
#endif
#else /* CHECK_RES_IMAX_JMAX==0 */
write(6, fmt='(a)') ' >>> sico_init: CHECK_RES_IMAX_JMAX==0'
write(6, fmt='(a)') ' -> compatibility check between horizontal resolution'
write(6, fmt='(a)') ' and number of grid points not performed.'
write(6, fmt='(a)') ' '
#endif /* CHECK_RES_IMAX_JMAX */
#else /* OpenAD */
print *, ' >>> sico_init: not using compare_float for adjoint applications!'
......@@ -758,6 +769,11 @@ call error(errormsg)
#endif
write(10, fmt=trim(fmt1)) ' '
#if (defined(CHECK_RES_IMAX_JMAX))
write(10, fmt=trim(fmt2)) 'CHECK_RES_IMAX_JMAX = ', CHECK_RES_IMAX_JMAX
write(10, fmt=trim(fmt1)) ' '
#endif
write(10, fmt=trim(fmt3)) 'year_zero =', year_zero
write(10, fmt=trim(fmt3)) 'time_init =', time_init0
write(10, fmt=trim(fmt3)) 'time_end =', time_end0
......
......@@ -246,6 +246,8 @@ call error(errormsg)
!-------- Compatibility check of the horizontal resolution with the
! number of grid points --------
#if (!defined(CHECK_RES_IMAX_JMAX) || CHECK_RES_IMAX_JMAX==1)
#if (GRID==0 || GRID==1)
if (approx_equal(DX, 4.0_dp, eps_sp_dp)) then
......@@ -283,6 +285,15 @@ call error(errormsg)
#endif
#else /* CHECK_RES_IMAX_JMAX==0 */
write(6, fmt='(a)') ' >>> sico_init: CHECK_RES_IMAX_JMAX==0'
write(6, fmt='(a)') ' -> compatibility check between horizontal resolution'
write(6, fmt='(a)') ' and number of grid points not performed.'
write(6, fmt='(a)') ' '
#endif /* CHECK_RES_IMAX_JMAX */
!-------- Compatibility check of the thermodynamics mode
! (cold vs. polythermal vs. enthalpy method)
! and the number of grid points in the lower (kt) ice domain --------
......@@ -609,6 +620,11 @@ call error(errormsg)
#endif
write(10, fmt=trim(fmt1)) ' '
#if (defined(CHECK_RES_IMAX_JMAX))
write(10, fmt=trim(fmt2)) 'CHECK_RES_IMAX_JMAX = ', CHECK_RES_IMAX_JMAX
write(10, fmt=trim(fmt1)) ' '
#endif
write(10, fmt=trim(fmt3)) 'year_zero =', year_zero
write(10, fmt=trim(fmt3)) 'time_init =', time_init0
write(10, fmt=trim(fmt3)) 'time_end =', time_end0
......
......@@ -262,6 +262,8 @@ call error(errormsg)
!-------- Compatibility check of the horizontal resolution with the
! number of grid points --------
#if (!defined(CHECK_RES_IMAX_JMAX) || CHECK_RES_IMAX_JMAX==1)
#if (GRID==0)
if (approx_equal(DX, 5.0_dp, eps_sp_dp)) then
......@@ -323,6 +325,15 @@ call error(errormsg)
#endif
#else /* CHECK_RES_IMAX_JMAX==0 */
write(6, fmt='(a)') ' >>> sico_init: CHECK_RES_IMAX_JMAX==0'
write(6, fmt='(a)') ' -> compatibility check between horizontal resolution'
write(6, fmt='(a)') ' and number of grid points not performed.'
write(6, fmt='(a)') ' '
#endif /* CHECK_RES_IMAX_JMAX */
!-------- Compatibility check of the thermodynamics mode
! (cold vs. polythermal vs. enthalpy method)
! and the number of grid points in the lower (kt) ice domain --------
......@@ -622,6 +633,11 @@ write(10, fmt=trim(fmt3)) 'dphi =', DPHI
#endif
write(10, fmt=trim(fmt1)) ' '
#if (defined(CHECK_RES_IMAX_JMAX))
write(10, fmt=trim(fmt2)) 'CHECK_RES_IMAX_JMAX = ', CHECK_RES_IMAX_JMAX
write(10, fmt=trim(fmt1)) ' '
#endif
write(10, fmt=trim(fmt3)) 'year_zero =', year_zero
write(10, fmt=trim(fmt3)) 'time_init =', time_init0
write(10, fmt=trim(fmt3)) 'time_end =', time_end0
......
......@@ -300,6 +300,8 @@ call error(errormsg)
#if !defined(ALLOW_OPENAD) /* Normal */
#if (!defined(CHECK_RES_IMAX_JMAX) || CHECK_RES_IMAX_JMAX==1)
#if (GRID==0 || GRID==1)
if (approx_equal(DX, 40.0_dp, eps_sp_dp)) then
......@@ -363,6 +365,15 @@ call error(errormsg)
#endif
#else /* CHECK_RES_IMAX_JMAX==0 */
write(6, fmt='(a)') ' >>> sico_init: CHECK_RES_IMAX_JMAX==0'
write(6, fmt='(a)') ' -> compatibility check between horizontal resolution'
write(6, fmt='(a)') ' and number of grid points not performed.'
write(6, fmt='(a)') ' '
#endif /* CHECK_RES_IMAX_JMAX */
#else /* OpenAD */
print *, ' >>> sico_init: grid compatibility check not performed'
......@@ -752,6 +763,11 @@ call error(errormsg)
#endif
write(10, fmt=trim(fmt1)) ' '
#if (defined(CHECK_RES_IMAX_JMAX))
write(10, fmt=trim(fmt2)) 'CHECK_RES_IMAX_JMAX = ', CHECK_RES_IMAX_JMAX
write(10, fmt=trim(fmt1)) ' '
#endif
write(10, fmt=trim(fmt3)) 'year_zero =', year_zero
write(10, fmt=trim(fmt3)) 'time_init =', time_init0
write(10, fmt=trim(fmt3)) 'time_end =', time_end0
......
......@@ -242,6 +242,8 @@ call error(errormsg)
!-------- Compatibility check of the horizontal resolution with the
! number of grid points --------
#if (!defined(CHECK_RES_IMAX_JMAX) || CHECK_RES_IMAX_JMAX==1)
#if (GRID==0 || GRID==1)
if (approx_equal(DX, 80.0_dp, eps_sp_dp)) then
......@@ -280,6 +282,15 @@ end if
#endif
#else /* CHECK_RES_IMAX_JMAX==0 */
write(6, fmt='(a)') ' >>> sico_init: CHECK_RES_IMAX_JMAX==0'
write(6, fmt='(a)') ' -> compatibility check between horizontal resolution'
write(6, fmt='(a)') ' and number of grid points not performed.'
write(6, fmt='(a)') ' '
#endif /* CHECK_RES_IMAX_JMAX */
!-------- Compatibility check of the thermodynamics mode
! (cold vs. polythermal vs. enthalpy method)
! and the number of grid points in the lower (kt) ice domain --------
......@@ -606,6 +617,11 @@ call error(errormsg)
#endif
write(10, fmt=trim(fmt1)) ' '
#if (defined(CHECK_RES_IMAX_JMAX))
write(10, fmt=trim(fmt2)) 'CHECK_RES_IMAX_JMAX = ', CHECK_RES_IMAX_JMAX
write(10, fmt=trim(fmt1)) ' '
#endif
write(10, fmt=trim(fmt3)) 'year_zero =', year_zero
write(10, fmt=trim(fmt3)) 'time_init =', time_init0
write(10, fmt=trim(fmt3)) 'time_end =', time_end0
......
......@@ -247,6 +247,8 @@ call error(errormsg)
!-------- Compatibility check of the horizontal resolution with the
! number of grid points --------
#if (!defined(CHECK_RES_IMAX_JMAX) || CHECK_RES_IMAX_JMAX==1)
#if (GRID==0 || GRID==1)
if (approx_equal(DX, 20.0_dp, eps_sp_dp)) then
......@@ -284,6 +286,15 @@ call error(errormsg)
#endif
#else /* CHECK_RES_IMAX_JMAX==0 */
write(6, fmt='(a)') ' >>> sico_init: CHECK_RES_IMAX_JMAX==0'
write(6, fmt='(a)') ' -> compatibility check between horizontal resolution'
write(6, fmt='(a)') ' and number of grid points not performed.'
write(6, fmt='(a)') ' '
#endif /* CHECK_RES_IMAX_JMAX */
!-------- Compatibility check of the thermodynamics mode
! (cold vs. polythermal vs. enthalpy method)
! and the number of grid points in the lower (kt) ice domain --------
......@@ -586,6 +597,11 @@ write(10, fmt=trim(fmt3)) 'y0 =', Y0
write(10, fmt=trim(fmt3)) 'dx =', DX
write(10, fmt=trim(fmt1)) ' '
#if (defined(CHECK_RES_IMAX_JMAX))
write(10, fmt=trim(fmt2)) 'CHECK_RES_IMAX_JMAX = ', CHECK_RES_IMAX_JMAX
write(10, fmt=trim(fmt1)) ' '
#endif
write(10, fmt=trim(fmt3)) 'year_zero =', year_zero
write(10, fmt=trim(fmt3)) 'time_init =', time_init0
write(10, fmt=trim(fmt3)) 'time_end =', time_end0
......
......@@ -242,6 +242,8 @@ call error(errormsg)
!-------- Compatibility check of the horizontal resolution with the
! number of grid points --------
#if (!defined(CHECK_RES_IMAX_JMAX) || CHECK_RES_IMAX_JMAX==1)
#if (GRID==0 || GRID==1)
if (approx_equal(DX, 40.0_dp, eps_sp_dp)) then
......@@ -280,6 +282,15 @@ end if
#endif
#else /* CHECK_RES_IMAX_JMAX==0 */
write(6, fmt='(a)') ' >>> sico_init: CHECK_RES_IMAX_JMAX==0'
write(6, fmt='(a)') ' -> compatibility check between horizontal resolution'
write(6, fmt='(a)') ' and number of grid points not performed.'
write(6, fmt='(a)') ' '
#endif /* CHECK_RES_IMAX_JMAX */
!-------- Compatibility check of the thermodynamics mode
! (cold vs. polythermal vs. enthalpy method)
! and the number of grid points in the lower (kt) ice domain --------
......@@ -606,6 +617,11 @@ call error(errormsg)
#endif
write(10, fmt=trim(fmt1)) ' '
#if (defined(CHECK_RES_IMAX_JMAX))
write(10, fmt=trim(fmt2)) 'CHECK_RES_IMAX_JMAX = ', CHECK_RES_IMAX_JMAX
write(10, fmt=trim(fmt1)) ' '
#endif
write(10, fmt=trim(fmt3)) 'year_zero =', year_zero
write(10, fmt=trim(fmt3)) 'time_init =', time_init0
write(10, fmt=trim(fmt3)) 'time_end =', time_end0
......
......@@ -247,6 +247,8 @@ call error(errormsg)
!-------- Compatibility check of the horizontal resolution with the
! number of grid points --------
#if (!defined(CHECK_RES_IMAX_JMAX) || CHECK_RES_IMAX_JMAX==1)
#if (GRID==0 || GRID==1)
if (approx_equal(DX, 20.0_dp, eps_sp_dp)) then
......@@ -284,6 +286,15 @@ call error(errormsg)
#endif
#else /* CHECK_RES_IMAX_JMAX==0 */
write(6, fmt='(a)') ' >>> sico_init: CHECK_RES_IMAX_JMAX==0'
write(6, fmt='(a)') ' -> compatibility check between horizontal resolution'
write(6, fmt='(a)') ' and number of grid points not performed.'
write(6, fmt='(a)') ' '
#endif /* CHECK_RES_IMAX_JMAX */
!-------- Compatibility check of the thermodynamics mode
! (cold vs. polythermal vs. enthalpy method)
! and the number of grid points in the lower (kt) ice domain --------
......@@ -586,6 +597,11 @@ write(10, fmt=trim(fmt3)) 'y0 =', Y0
write(10, fmt=trim(fmt3)) 'dx =', DX
write(10, fmt=trim(fmt1)) ' '
#if (defined(CHECK_RES_IMAX_JMAX))
write(10, fmt=trim(fmt2)) 'CHECK_RES_IMAX_JMAX = ', CHECK_RES_IMAX_JMAX
write(10, fmt=trim(fmt1)) ' '
#endif
write(10, fmt=trim(fmt3)) 'year_zero =', year_zero
write(10, fmt=trim(fmt3)) 'time_init =', time_init0
write(10, fmt=trim(fmt3)) 'time_end =', time_end0
......
......@@ -242,6 +242,8 @@ call error(errormsg)
!-------- Compatibility check of the horizontal resolution with the
! number of grid points --------
#if (!defined(CHECK_RES_IMAX_JMAX) || CHECK_RES_IMAX_JMAX==1)
#if (GRID==0 || GRID==1)
errormsg = ' >>> sico_init: ' &
......@@ -284,6 +286,15 @@ end if
#endif
#else /* CHECK_RES_IMAX_JMAX==0 */
write(6, fmt='(a)') ' >>> sico_init: CHECK_RES_IMAX_JMAX==0'
write(6, fmt='(a)') ' -> compatibility check between horizontal resolution'
write(6, fmt='(a)') ' and number of grid points not performed.'
write(6, fmt='(a)') ' '
#endif /* CHECK_RES_IMAX_JMAX */
!-------- Compatibility check of the thermodynamics mode
! (cold vs. polythermal vs. enthalpy method)
! and the number of grid points in the lower (kt) ice domain --------
......@@ -611,6 +622,11 @@ write(10, fmt=trim(fmt3)) 'dphi =', DPHI
#endif
write(10, fmt=trim(fmt1)) ' '
#if (defined(CHECK_RES_IMAX_JMAX))
write(10, fmt=trim(fmt2)) 'CHECK_RES_IMAX_JMAX = ', CHECK_RES_IMAX_JMAX
write(10, fmt=trim(fmt1)) ' '
#endif
write(10, fmt=trim(fmt3)) 'year_zero =', year_zero
write(10, fmt=trim(fmt3)) 'time_init =', time_init0
write(10, fmt=trim(fmt3)) 'time_end =', time_end0
......
......@@ -247,6 +247,8 @@ call error(errormsg)
!-------- Compatibility check of the horizontal resolution with the
! number of grid points --------
#if (!defined(CHECK_RES_IMAX_JMAX) || CHECK_RES_IMAX_JMAX==1)
#if (GRID==0)
if (approx_equal(DX, 50.0_dp, eps_sp_dp)) then
......@@ -282,6 +284,15 @@ call error(errormsg)
#endif
#else /* CHECK_RES_IMAX_JMAX==0 */
write(6, fmt='(a)') ' >>> sico_init: CHECK_RES_IMAX_JMAX==0'
write(6, fmt='(a)') ' -> compatibility check between horizontal resolution'
write(6, fmt='(a)') ' and number of grid points not performed.'
write(6, fmt='(a)') ' '
#endif /* CHECK_RES_IMAX_JMAX */
!-------- Compatibility check of the thermodynamics mode
! (cold vs. polythermal vs. enthalpy method)
! and the number of grid points in the lower (kt) ice domain --------
......@@ -581,6 +592,11 @@ write(10, fmt=trim(fmt3)) 'dphi =', DPHI
#endif
write(10, fmt=trim(fmt1)) ' '
#if (defined(CHECK_RES_IMAX_JMAX))
write(10, fmt=trim(fmt2)) 'CHECK_RES_IMAX_JMAX = ', CHECK_RES_IMAX_JMAX
write(10, fmt=trim(fmt1)) ' '
#endif
write(10, fmt=trim(fmt3)) 'year_zero =', year_zero
write(10, fmt=trim(fmt3)) 'time_init =', time_init0
write(10, fmt=trim(fmt3)) 'time_end =', time_end0
......
......@@ -382,6 +382,8 @@ call error(errormsg)
!-------- Compatibility check of the horizontal resolution with the
! number of grid points and the position of the origin point --------
#if (!defined(CHECK_RES_IMAX_JMAX) || CHECK_RES_IMAX_JMAX==1)
#if (GRID==0)
if (approx_equal(DX, 0.2_dp, eps_sp_dp)) then
......@@ -445,6 +447,15 @@ call error(errormsg)
#endif
#else /* CHECK_RES_IMAX_JMAX==0 */
write(6, fmt='(a)') ' >>> sico_init: CHECK_RES_IMAX_JMAX==0'
write(6, fmt='(a)') ' -> compatibility check between horizontal resolution'
write(6, fmt='(a)') ' and number of grid points not performed.'
write(6, fmt='(a)') ' '
#endif /* CHECK_RES_IMAX_JMAX */
!-------- Compatibility check of the thermodynamics mode
! (cold vs. polythermal vs. enthalpy method)
! and the number of grid points in the lower (kt) ice domain --------
......@@ -744,6 +755,11 @@ write(10, fmt=trim(fmt3)) 'dphi =', DPHI
#endif
write(10, fmt=trim(fmt1)) ' '
#if (defined(CHECK_RES_IMAX_JMAX))
write(10, fmt=trim(fmt2)) 'CHECK_RES_IMAX_JMAX = ', CHECK_RES_IMAX_JMAX
write(10, fmt=trim(fmt1)) ' '
#endif
write(10, fmt=trim(fmt3)) 'year_zero =', year_zero
write(10, fmt=trim(fmt3)) 'time_init =', time_init0
write(10, fmt=trim(fmt3)) 'time_end =', time_end0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment