Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snicar-ad port to Icepack from MPAS-SI #7

Merged
Show file tree
Hide file tree
Changes from 52 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
604d0ad
initial implementation of SNICAR-AD in Icepack, not tested but BFB in…
eclare108213 Aug 4, 2022
60fc58d
adding use_snicar flag (true if shortwave=dEdd_snicar)
eclare108213 Aug 4, 2022
e264065
initializing use_snicar based on shortwave namelist value
eclare108213 Aug 4, 2022
8109ebf
adding a few more arguments to the calling tree
eclare108213 Aug 5, 2022
49d1294
Merge branch 'main' of https://github.com/cice-consortium/icepack int…
eclare108213 Aug 22, 2022
3c65376
remove repeat ridging warnings for niter=1
eclare108213 Aug 22, 2022
2bd3504
use 5-band wghtns for snicar
eclare108213 Aug 22, 2022
56a2ccd
basic initialization for snicar tables
eclare108213 Aug 23, 2022
d2f3870
clean up trailing blanks
apcraig Aug 24, 2022
f03e228
Merge pull request #4 from apcraig/snicar-clean01
eclare108213 Aug 24, 2022
cd31ec2
interim commit with some snicar initialization, unconnected and not t…
eclare108213 Aug 25, 2022
a2bbd1d
Add data_dEdd_3band to icepack_init_radiation
apcraig Aug 24, 2022
d2ea5ed
Add ability to set SNICAR SSP data via icepack_parameters
apcraig Aug 24, 2022
4bf19c6
Add reading of SNICAR SSP file in Icepack driver including
apcraig Aug 25, 2022
8cb547a
rebase, update, and test
apcraig Aug 25, 2022
258f623
Merge pull request #5 from apcraig/snwtable
eclare108213 Aug 25, 2022
4e2d90b
Update ssp output
apcraig Aug 25, 2022
e569c4c
Reorder SNICAR SSP test data arrays to be consistent with source code
apcraig Aug 26, 2022
1d6eaa6
Merge pull request #6 from apcraig/sspoutput
eclare108213 Aug 26, 2022
f88b03c
move 5band data to subroutine; enable snicar testing on 1 no-ice grid…
eclare108213 Aug 26, 2022
6d68ee9
move more data to 3- and 5-band initialization routines, use module d…
eclare108213 Aug 26, 2022
b3ca79c
change snicar coefficient names and use module data for them
eclare108213 Aug 26, 2022
8ad73dd
cleaning up argument lists
eclare108213 Aug 26, 2022
89e0d9a
Add additional SNICAR SSP fields
apcraig Aug 27, 2022
93f9f3c
Merge pull request #7 from apcraig/moresspio
eclare108213 Aug 29, 2022
ef37585
set tmask=0 only for land cell
eclare108213 Aug 31, 2022
3e636b2
interim compute_dEdd_5bd subroutine (runs)
eclare108213 Sep 1, 2022
914130b
separate 3-band and 5-band compute_dEdd routines
eclare108213 Sep 1, 2022
0fabd24
Fix errors in calls to compute_dEdd. Some cleanup.
eclare108213 Sep 1, 2022
20d7e03
Remove duplicate Iabs calculation. More cleanup.
eclare108213 Sep 1, 2022
fe21d1f
- Add icepack_shortwave_data
apcraig Sep 1, 2022
a0f0e49
- Add USE_SNICARHC (snicar ssp hard coded tables) to reduce compile time
apcraig Sep 2, 2022
247a8ce
- Remove ssp_bcerad, ssp_bcgrerad from implementation
apcraig Sep 2, 2022
147201a
remove trailing blanks
apcraig Sep 2, 2022
2274b8e
Merge pull request #9 from apcraig/swdata
eclare108213 Sep 6, 2022
f270c73
Cleanup icepack_shortwave_data
apcraig Sep 6, 2022
631816e
update test suite and icepack_in
apcraig Sep 6, 2022
1395476
update scripts if md5sum not available
apcraig Sep 6, 2022
9766cff
Merge pull request #10 from apcraig/swdata1
eclare108213 Sep 6, 2022
0a9d6e7
Clean up shortwave data variable names
apcraig Sep 7, 2022
8f74768
Merge pull request #11 from apcraig/swaero
eclare108213 Sep 7, 2022
045e353
Clean up icepack_shortwave
apcraig Sep 7, 2022
69ed788
- Remove ncat, nilyr, nslyr, nblyr from interface arguments
apcraig Sep 8, 2022
6a46237
Merge pull request #12 from apcraig/swclean
eclare108213 Sep 8, 2022
44d377b
Update implementation of g(k), w0(k) in icepack_shortwave
apcraig Sep 11, 2022
6f8f21b
Get rid of use_snicar flag, redundant with shortwave setting
apcraig Sep 12, 2022
4256d9b
update documentation
eclare108213 Sep 18, 2022
34e5555
updating documentation
eclare108213 Sep 18, 2022
95fb567
use module data rather than hardcoded rhoi
eclare108213 Sep 18, 2022
9178ede
cleanup
apcraig Sep 18, 2022
e0b3292
update namelist and settings documentation
eclare108213 Sep 18, 2022
ee97eab
Merge pull request #13 from apcraig/aerclean
eclare108213 Sep 18, 2022
1a089e8
make icepack_warnings_getall public, snw_ssp_table=unknown, update us…
eclare108213 Sep 23, 2022
b7d7c16
add icepack_warnings_getall to interface module
eclare108213 Sep 23, 2022
64ab4a1
Major cleanup of dEdd module, mainly white space and standard alignme…
eclare108213 Sep 24, 2022
9ae618c
bug fixes for ice/snow layer reciprocal, missing lines as in consorti…
eclare108213 Sep 24, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions columnphysics/icepack_intfc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ module icepack_intfc
use icepack_tracers, only: icepack_max_iso => max_iso
use icepack_tracers, only: icepack_nmodal1 => nmodal1
use icepack_tracers, only: icepack_nmodal2 => nmodal2
use icepack_parameters, only: icepack_nspint => nspint

use icepack_shortwave_data, only: icepack_nspint_3bd => nspint_3bd
use icepack_shortwave_data, only: icepack_nspint_5bd => nspint_5bd

use icepack_parameters, only: icepack_init_parameters
use icepack_parameters, only: icepack_query_parameters
use icepack_parameters, only: icepack_write_parameters
use icepack_parameters, only: icepack_recompute_constants
use icepack_parameters, only: nspint, secday, spval_const
use icepack_parameters, only: secday, spval_const
use icepack_parameters, only: c0, c1, c1p5, c2, c3, c4, c5, c6, c8
use icepack_parameters, only: c10, c15, c16, c20, c25, c100, c1000
use icepack_parameters, only: p001, p01, p1, p2, p4, p5, p6, p05
Expand Down Expand Up @@ -85,6 +87,7 @@ module icepack_intfc
use icepack_snow, only: icepack_init_snow
use icepack_snow, only: icepack_step_snow

use icepack_shortwave, only: icepack_init_radiation
use icepack_shortwave, only: icepack_prep_radiation
use icepack_shortwave, only: icepack_step_radiation

Expand Down
6 changes: 4 additions & 2 deletions columnphysics/icepack_mechred.F90
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,10 @@ subroutine ridge_ice (dt, ndtd, &
!-----------------------------------------------------------------

if (iterate_ridging) then
write(warnstr,*) subname, 'Repeat ridging, niter =', niter
call icepack_warnings_add(warnstr)
if (niter > 1) then
write(warnstr,*) subname, 'Repeat ridging, niter =', niter
call icepack_warnings_add(warnstr)
endif
else
exit rdg_iteration
endif
Expand Down
61 changes: 36 additions & 25 deletions columnphysics/icepack_parameters.F90
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ module icepack_parameters
! parameter constants
!-----------------------------------------------------------------

integer (kind=int_kind), parameter, public :: &
nspint = 3 ! number of solar spectral intervals

real (kind=dbl_kind), parameter, public :: &
c0 = 0.0_dbl_kind, &
c1 = 1.0_dbl_kind, &
Expand Down Expand Up @@ -217,10 +214,22 @@ module icepack_parameters
awtidf = 0.36218_dbl_kind ! near IR, diffuse

character (len=char_len), public :: &
shortwave = 'dEdd', & ! shortwave method, 'ccsm3' or 'dEdd'
shortwave = 'dEdd', & ! shortwave method, 'ccsm3' or 'dEdd' or 'dEdd_snicar_ad'
albedo_type = 'ccsm3' ! albedo parameterization, 'ccsm3' or 'constant'
! shortwave='dEdd' overrides this parameter

! Parameters for shortwave redistribution
logical (kind=log_kind), public :: &
sw_redist = .false.

real (kind=dbl_kind), public :: &
sw_frac = 0.9_dbl_kind , & ! Fraction of internal shortwave moved to surface
sw_dtemp = 0.02_dbl_kind ! temperature difference from melting

! Parameters for dEdd_snicar_ad
character (len=char_len), public :: &
snw_ssp_table = 'test' ! lookup table: 'snicar' or 'test'

!-----------------------------------------------------------------------
! Parameters for dynamics, including ridging and strength
!-----------------------------------------------------------------------
Expand Down Expand Up @@ -419,18 +428,6 @@ module icepack_parameters
t_sk_conv = 3.0_dbl_kind , & ! Stefels conversion time (d)
t_sk_ox = 10.0_dbl_kind ! DMS oxidation time (d)


!-----------------------------------------------------------------------
! Parameters for shortwave redistribution
!-----------------------------------------------------------------------

logical (kind=log_kind), public :: &
sw_redist = .false.

real (kind=dbl_kind), public :: &
sw_frac = 0.9_dbl_kind , & ! Fraction of internal shortwave moved to surface
sw_dtemp = 0.02_dbl_kind ! temperature difference from melting

!=======================================================================

contains
Expand Down Expand Up @@ -491,7 +488,7 @@ subroutine icepack_init_parameters( &
snwlvlfac_in, isnw_T_in, isnw_Tgrd_in, isnw_rhos_in, &
snowage_rhos_in, snowage_Tgrd_in, snowage_T_in, &
snowage_tau_in, snowage_kappa_in, snowage_drdt0_in, &
snw_aging_table_in)
snw_aging_table_in, snw_ssp_table_in )

!-----------------------------------------------------------------
! control settings
Expand Down Expand Up @@ -613,7 +610,7 @@ subroutine icepack_init_parameters( &
awtidf_in ! near IR, diffuse

character (len=*), intent(in), optional :: &
shortwave_in, & ! shortwave method, 'ccsm3' or 'dEdd'
shortwave_in, & ! shortwave method, 'ccsm3' or 'dEdd' or 'dEdd_snicar_ad'
albedo_type_in ! albedo parameterization, 'ccsm3' or 'constant'
! shortwave='dEdd' overrides this parameter

Expand Down Expand Up @@ -844,8 +841,16 @@ subroutine icepack_init_parameters( &
snowage_kappa_in, &!
snowage_drdt0_in ! (10^-6 m/hr)

character (len=char_len), intent(in), optional :: &
snw_ssp_table_in ! lookup table: 'snicar' or 'test'

!autodocument_end

! local data

integer (kind=int_kind) :: &
dim1, dim2, dim3 ! array dimension sizes

character(len=*),parameter :: subname='(icepack_init_parameters)'

if (present(argcheck_in) ) argcheck = argcheck_in
Expand Down Expand Up @@ -980,6 +985,10 @@ subroutine icepack_init_parameters( &
if (present(windmin_in) ) windmin = windmin_in
if (present(drhosdwind_in) ) drhosdwind = drhosdwind_in
if (present(snwlvlfac_in) ) snwlvlfac = snwlvlfac_in

!-------------------
! SNOW table
!-------------------
if (present(isnw_T_in) ) isnw_T = isnw_T_in
if (present(isnw_Tgrd_in) ) isnw_Tgrd = isnw_Tgrd_in
if (present(isnw_rhos_in) ) isnw_rhos = isnw_rhos_in
Expand All @@ -1001,7 +1010,6 @@ subroutine icepack_init_parameters( &
endif
endif

! check array sizes and re/allocate if necessary
if (present(snowage_Tgrd_in) ) then
if (size(snowage_Tgrd_in) /= isnw_Tgrd) then
call icepack_warnings_add(subname//' incorrect size of snowage_Tgrd_in')
Expand All @@ -1018,7 +1026,6 @@ subroutine icepack_init_parameters( &
endif
endif

! check array sizes and re/allocate if necessary
if (present(snowage_T_in) ) then
if (size(snowage_T_in) /= isnw_T) then
call icepack_warnings_add(subname//' incorrect size of snowage_T_in')
Expand All @@ -1035,7 +1042,6 @@ subroutine icepack_init_parameters( &
endif
endif

! check array sizes and re/allocate if necessary
if (present(snowage_tau_in) ) then
if (size(snowage_tau_in) /= isnw_T*isnw_Tgrd*isnw_rhos) then
call icepack_warnings_add(subname//' incorrect size of snowage_tau_in')
Expand All @@ -1052,7 +1058,6 @@ subroutine icepack_init_parameters( &
endif
endif

! check array sizes and re/allocate if necessary
if (present(snowage_kappa_in) ) then
if (size(snowage_kappa_in) /= isnw_T*isnw_Tgrd*isnw_rhos) then
call icepack_warnings_add(subname//' incorrect size of snowage_kappa_in')
Expand All @@ -1069,7 +1074,6 @@ subroutine icepack_init_parameters( &
endif
endif

! check array sizes and re/allocate if necessary
if (present(snowage_drdt0_in) ) then
if (size(snowage_drdt0_in) /= isnw_T*isnw_Tgrd*isnw_rhos) then
call icepack_warnings_add(subname//' incorrect size of snowage_drdt0_in')
Expand All @@ -1086,6 +1090,7 @@ subroutine icepack_init_parameters( &
endif
endif

if (present(snw_ssp_table_in) ) snw_ssp_table = snw_ssp_table_in
if (present(bgc_flux_type_in) ) bgc_flux_type = bgc_flux_type_in
if (present(z_tracers_in) ) z_tracers = z_tracers_in
if (present(scale_bgc_in) ) scale_bgc = scale_bgc_in
Expand Down Expand Up @@ -1198,7 +1203,7 @@ subroutine icepack_query_parameters( &
snwlvlfac_out, isnw_T_out, isnw_Tgrd_out, isnw_rhos_out, &
snowage_rhos_out, snowage_Tgrd_out, snowage_T_out, &
snowage_tau_out, snowage_kappa_out, snowage_drdt0_out, &
snw_aging_table_out)
snw_aging_table_out, snw_ssp_table_out )

!-----------------------------------------------------------------
! control settings
Expand Down Expand Up @@ -1329,7 +1334,7 @@ subroutine icepack_query_parameters( &
awtidf_out ! near IR, diffuse

character (len=*), intent(out), optional :: &
shortwave_out, & ! shortwave method, 'ccsm3' or 'dEdd'
shortwave_out, & ! shortwave method, 'ccsm3' or 'dEdd' or 'dEdd_snicar_ad'
albedo_type_out ! albedo parameterization, 'ccsm3' or 'constant'
! shortwave='dEdd' overrides this parameter

Expand Down Expand Up @@ -1559,6 +1564,10 @@ subroutine icepack_query_parameters( &
snowage_tau_out, & ! (10^-6 m)
snowage_kappa_out, &!
snowage_drdt0_out ! (10^-6 m/hr)

character (len=char_len), intent(out), optional :: &
snw_ssp_table_out ! lookup table: 'snicar' or 'test'

!autodocument_end

character(len=*),parameter :: subname='(icepack_query_parameters)'
Expand Down Expand Up @@ -1741,6 +1750,7 @@ subroutine icepack_query_parameters( &
if (present(snowage_tau_out) ) snowage_tau_out = snowage_tau
if (present(snowage_kappa_out) ) snowage_kappa_out= snowage_kappa
if (present(snowage_drdt0_out) ) snowage_drdt0_out= snowage_drdt0
if (present(snw_ssp_table_out) ) snw_ssp_table_out= snw_ssp_table
if (present(bgc_flux_type_out) ) bgc_flux_type_out= bgc_flux_type
if (present(z_tracers_out) ) z_tracers_out = z_tracers
if (present(scale_bgc_out) ) scale_bgc_out = scale_bgc
Expand Down Expand Up @@ -1950,6 +1960,7 @@ subroutine icepack_write_parameters(iounit)
write(iounit,*) " snowage_tau = ", snowage_tau(1,1,1)
write(iounit,*) " snowage_kappa = ", snowage_kappa(1,1,1)
write(iounit,*) " snowage_drdt0 = ", snowage_drdt0(1,1,1)
write(iounit,*) " snw_ssp_table = ", trim(snw_ssp_table)
write(iounit,*) " bgc_flux_type = ", bgc_flux_type
write(iounit,*) " z_tracers = ", z_tracers
write(iounit,*) " scale_bgc = ", scale_bgc
Expand Down
Loading