From c43bc233597c7c9d29b4ea7e2a7f8a96ac58a697 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunke Date: Wed, 25 Apr 2018 19:44:54 -0600 Subject: [PATCH 1/3] bug fix for reading kcatbound --- columnphysics/icepack_atmo.F90 | 12 ------------ configuration/driver/icedrv_init.F90 | 7 +++++++ configuration/scripts/icepack_in | 2 +- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/columnphysics/icepack_atmo.F90 b/columnphysics/icepack_atmo.F90 index c39d46d2a..ed3930912 100644 --- a/columnphysics/icepack_atmo.F90 +++ b/columnphysics/icepack_atmo.F90 @@ -585,8 +585,6 @@ subroutine neutral_drag_coeffs (apnd, hpnd, & real (kind=dbl_kind) :: & apond , & ! melt pond fraction of grid cell - vpond , & ! mean melt pond depth over grid cell - ipond , & ! mean melt pond ice depth over grid cell ardg , & ! ridged ice area fraction of grid cell vrdg ! ridged ice mean thickness @@ -639,20 +637,10 @@ subroutine neutral_drag_coeffs (apnd, hpnd, & ! ponds apond = c0 - vpond = c0 - ipond = c0 if (tr_pond) then do n = 1,ncat ! area of pond per unit area of grid cell apond = apond+apnd(n)*aicen(n) - ! volume of pond per unit area of grid cell - vpond = vpond+apnd(n)*hpnd(n)*aicen(n) - enddo - endif - if (tr_pond_lvl .and. tr_pond_topo) then - do n = 1,ncat - ! volume of lid per unit area of grid cell - ipond = ipond+apnd(n)*ipnd(n)*aicen(n) enddo endif diff --git a/configuration/driver/icedrv_init.F90 b/configuration/driver/icedrv_init.F90 index 146d7a681..8a319e6e5 100644 --- a/configuration/driver/icedrv_init.F90 +++ b/configuration/driver/icedrv_init.F90 @@ -255,6 +255,10 @@ subroutine input_data read(nu_nml, nml=setup_nml,iostat=nml_error) if (nml_error /= 0) exit + print*,'Reading grid_nml' + read(nu_nml, nml=grid_nml,iostat=nml_error) + if (nml_error /= 0) exit + print*,'Reading tracer_nml' read(nu_nml, nml=tracer_nml,iostat=nml_error) if (nml_error /= 0) exit @@ -530,6 +534,9 @@ subroutine input_data write(nu_diag,*) ' bgc_data_type = ', & trim(bgc_data_type) + if (trim(atm_data_type)=='default') & + write(nu_diag,*) ' default_season = ', trim(default_season) + write(nu_diag,1010) ' update_ocn_f = ', update_ocn_f write(nu_diag,1010) ' l_mpond_fresh = ', l_mpond_fresh write(nu_diag,1005) ' ustar_min = ', ustar_min diff --git a/configuration/scripts/icepack_in b/configuration/scripts/icepack_in index 609d9aa4f..ef699fbf0 100644 --- a/configuration/scripts/icepack_in +++ b/configuration/scripts/icepack_in @@ -16,7 +16,7 @@ / &grid_nml - kcatbound = 0 + kcatbound = 1 / &tracer_nml From 2783b1e9d257991b4f5c8b6d85a6bcb2e8da151f Mon Sep 17 00:00:00 2001 From: Elizabeth Hunke Date: Wed, 25 Apr 2018 20:31:14 -0600 Subject: [PATCH 2/3] new test configurations --- configuration/scripts/options/set_env.alt02 | 2 ++ configuration/scripts/options/set_env.alt03 | 2 ++ configuration/scripts/options/set_nml.alt02 | 10 ++++++++++ configuration/scripts/options/set_nml.alt03 | 11 +++++++++++ configuration/scripts/options/set_nml.alt04 | 19 +++++++++++++++++++ 5 files changed, 44 insertions(+) create mode 100644 configuration/scripts/options/set_env.alt02 create mode 100644 configuration/scripts/options/set_env.alt03 create mode 100644 configuration/scripts/options/set_nml.alt02 create mode 100644 configuration/scripts/options/set_nml.alt03 create mode 100644 configuration/scripts/options/set_nml.alt04 diff --git a/configuration/scripts/options/set_env.alt02 b/configuration/scripts/options/set_env.alt02 new file mode 100644 index 000000000..014aea9e2 --- /dev/null +++ b/configuration/scripts/options/set_env.alt02 @@ -0,0 +1,2 @@ +setenv NICELYR 1 # number of vertical layers in the snow +setenv NICECAT 1 # number of ice thickness categories diff --git a/configuration/scripts/options/set_env.alt03 b/configuration/scripts/options/set_env.alt03 new file mode 100644 index 000000000..82bf9857c --- /dev/null +++ b/configuration/scripts/options/set_env.alt03 @@ -0,0 +1,2 @@ +setenv NSNWLYR 5 # number of vertical layers in the snow + diff --git a/configuration/scripts/options/set_nml.alt02 b/configuration/scripts/options/set_nml.alt02 new file mode 100644 index 000000000..3e66a9af4 --- /dev/null +++ b/configuration/scripts/options/set_nml.alt02 @@ -0,0 +1,10 @@ + kcatbound = -1 + kitd = 0 + tr_pond_lvl = .false. + tr_pond_topo = .false. + tr_pond_cesm = .false. + ktherm = 0 + tfrz_option = linear_salt + conduct = 'bubbly' + default_season = 'winter' + atm_data_type = 'default' diff --git a/configuration/scripts/options/set_nml.alt03 b/configuration/scripts/options/set_nml.alt03 new file mode 100644 index 000000000..4954ce9e6 --- /dev/null +++ b/configuration/scripts/options/set_nml.alt03 @@ -0,0 +1,11 @@ + kcatbound = 2 + tr_pond_lvl = .false. + tr_pond_topo = .true. + tr_pond_cesm = .false. + ktherm = 1 + tfrz_option = 'linear_salt' + conduct = 'bubbly' + restore_ocn = .true. + trestore = 0 + atm_data_type = 'default' + default_season = 'summer' diff --git a/configuration/scripts/options/set_nml.alt04 b/configuration/scripts/options/set_nml.alt04 new file mode 100644 index 000000000..98936884e --- /dev/null +++ b/configuration/scripts/options/set_nml.alt04 @@ -0,0 +1,19 @@ + days_per_year = 360 + dumpfreq = 'd' + kcatbound = 3 + tr_pond_lvl = .true. + tr_pond_topo = .false. + tr_pond_cesm = .false. + frzpnd = 'cesm' + ktherm = 1 + tfrz_option = 'linear_salt' + conduct = 'bubbly' + krdg_partic = 0 + krdg_redist = 0 + calc_Tsfc = .true. + highfreq = .true. + update_ocn_f = .true. + l_mpond_fresh = .true. + restore_ocn = .false. + trestore = 0 + atm_data_type = 'CFS' From 7113a5d5e147ef64c3674ce6ec19242a5e2a1403 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunke Date: Tue, 1 May 2018 20:37:26 -0600 Subject: [PATCH 3/3] add new tests to base_suite --- configuration/driver/icedrv_init.F90 | 10 ++++++++-- configuration/scripts/options/set_nml.alt04 | 2 +- configuration/scripts/tests/base_suite.ts | 6 ++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/configuration/driver/icedrv_init.F90 b/configuration/driver/icedrv_init.F90 index 8a319e6e5..fdecc0a57 100644 --- a/configuration/driver/icedrv_init.F90 +++ b/configuration/driver/icedrv_init.F90 @@ -1107,8 +1107,14 @@ subroutine set_state_var (nx, & !----------------------------------------------------------------- i = 2 ! 2-m slab, no snow - ainit(3) = c1 ! assumes we are using the default ITD boundaries - hinit(3) = c2 + if (3 <= ncat) then + n = 3 + ainit(n) = c1 ! assumes we are using the default ITD boundaries + hinit(n) = c2 + else + ainit(ncat) = c1 + hinit(ncat) = c2 + endif do n = 1, ncat ! ice volume, snow volume aicen(i,n) = ainit(n) diff --git a/configuration/scripts/options/set_nml.alt04 b/configuration/scripts/options/set_nml.alt04 index 98936884e..63e4a51d3 100644 --- a/configuration/scripts/options/set_nml.alt04 +++ b/configuration/scripts/options/set_nml.alt04 @@ -14,6 +14,6 @@ highfreq = .true. update_ocn_f = .true. l_mpond_fresh = .true. - restore_ocn = .false. + restore_ocn = .true. trestore = 0 atm_data_type = 'CFS' diff --git a/configuration/scripts/tests/base_suite.ts b/configuration/scripts/tests/base_suite.ts index 05f6d24bb..cff218b0d 100644 --- a/configuration/scripts/tests/base_suite.ts +++ b/configuration/scripts/tests/base_suite.ts @@ -6,6 +6,9 @@ smoke col 1x1 debug,bgcNICE smoke col 1x1 debug,run1year,thermo1 smoke col 1x1 debug,run1year,swccsm3 smoke col 1x1 debug,run1year,alt01 +smoke col 1x1 debug,run1year,alt02 +smoke col 1x1 debug,run1year,alt03 +smoke col 1x1 debug,run1year,alt04 smoke col 1x1 debug,run1year,leap,dt30min smoke col 1x1 debug,run1year,dyn restart col 1x1 debug @@ -18,4 +21,7 @@ restart col 1x1 bgcNICE restart col 1x1 thermo1 restart col 1x1 swccsm3 restart col 1x1 alt01 +restart col 1x1 alt02 +#restart col 1x1 alt03 +#restart col 1x1 alt04 restart col 1x1 dyn