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

CICE: Floe size distribution #382

Merged
merged 77 commits into from
Dec 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
ae18a79
machine files for loft laptop
eclare108213 Mar 4, 2019
f3aac67
adding fsd tracer infrastructure
eclare108213 Mar 4, 2019
367f32e
fsd allocation, initialization, lateral melt, diags
eclare108213 Mar 5, 2019
a19151f
correct diagnostic, reduce number of fsd arrays
eclare108213 Mar 5, 2019
d224190
fsd lateral melt
eclare108213 Mar 6, 2019
2ce0c57
fsd add_new_ice
eclare108213 Mar 7, 2019
a580fac
wave_spec namelist
eclare108213 Mar 7, 2019
f0500d8
history except io_
eclare108213 Mar 11, 2019
dc6b4e3
allocate fsd arrays
eclare108213 Mar 11, 2019
048e278
fix history indexing; call fsd accum; write binary fsd and bgc; netcd…
eclare108213 Mar 13, 2019
675d740
fix a3Df initialization
eclare108213 Mar 13, 2019
555b63b
fsd netcdf history
eclare108213 Mar 13, 2019
87d171c
fsd namelist option file
eclare108213 Mar 14, 2019
d381a50
initialization fixes, fsd diagnostics
eclare108213 Mar 18, 2019
eb773a7
fix divzero
eclare108213 Mar 18, 2019
e0eadf1
refactor fsd initialization
eclare108213 Mar 19, 2019
d5ac76a
refactor fsd initialization
eclare108213 Mar 19, 2019
ef9b1ac
cleanup_fsd, refactor fsd initialization
eclare108213 Mar 20, 2019
f681494
fix index array size
eclare108213 Mar 20, 2019
ba76f13
tr_fsd cleanup
eclare108213 Mar 20, 2019
6841e89
fsd 5-day smoke test
eclare108213 Mar 20, 2019
cb24834
Merge branch 'master' of https://github.com/CICE-Consortium/CICE into…
Mar 21, 2019
b4e67e0
fixing restarts (only netcdf, binary)
eclare108213 Apr 5, 2019
1bd27f4
Merge branch 'fsd1' of https://github.com/lettie-roach/CICE into fsd1
eclare108213 Apr 5, 2019
69e7665
Merge branch 'master' of https://github.com/cice-consortium/CICE into…
eclare108213 Apr 19, 2019
7e422eb
waves for fsd
eclare108213 Apr 23, 2019
fbf8e02
Testing waves
May 3, 2019
927c8eb
Testing waves
May 9, 2019
3d66fd1
Update sg_tracers.rst
lettie-roach Jun 8, 2019
2f70a11
Update ug_case_settings.rst
lettie-roach Jun 8, 2019
07f7bec
Merge branch 'master' of https://github.com/cice-consortium/CICE into…
eclare108213 Aug 5, 2019
6dc28e8
Read gx3 forcing data for wave spectrum - not tested
eclare108213 Aug 13, 2019
c0ac261
Working on reading in waves
Aug 15, 2019
caf64af
Moving calculation of wave_sig_ht to ice_step_mod
Aug 19, 2019
6bf6655
Modifications read in wave spectra
Sep 4, 2019
7643449
Add dummy wave spectrum file
Sep 4, 2019
f8e7367
Working on wave fracture
Sep 7, 2019
cde26ce
Tidy up
Sep 23, 2019
938a20f
Removed concentration limit on wave fracture
Oct 24, 2019
1ea4e98
Tidying up
lettie-roach Oct 28, 2019
959bedd
wave_spec modifications; documentation updates
eclare108213 Nov 1, 2019
52cc9c1
resolving conflicts
eclare108213 Nov 1, 2019
fbb3fd0
updating to Consortium master EXCEPT ICEPACK
eclare108213 Nov 1, 2019
3334111
switch icepack to ifsd1 branch
eclare108213 Nov 1, 2019
aa69264
Merge pull request #1 from lettie-roach/fsd-doc
lettie-roach Nov 1, 2019
c7b2eab
Fixing bug- need to broadcast wave_spec_type to processors
lettie-roach Nov 2, 2019
20e183d
Merge branch 'fsd1' of https://github.com/lettie-roach/CICE into fsd1
lettie-roach Nov 2, 2019
49d4a86
Merge branch 'master' of https://github.com/cice-consortium/cice into…
eclare108213 Nov 22, 2019
8aed405
update to master; read wave_spectrum; add fsd timer; correct docs
eclare108213 Nov 26, 2019
2975cdb
wave_spectrum is constant in time, for now; update debug driver
eclare108213 Nov 26, 2019
71f4473
replace hardwired 25s with nfreq
apcraig Nov 27, 2019
658f3e0
fix hardwired nfreq values
eclare108213 Nov 27, 2019
3b487bd
fsd history, ww3 test case
eclare108213 Nov 27, 2019
829e4b8
update icepack to current master including ifsd1 merge
apcraig Dec 3, 2019
37dc6f4
revert PIO changes; initialize arrays; compute wave_sig_ht when tr_fsd=T
eclare108213 Dec 3, 2019
b8100d7
avoid missing values in wave forcing file
eclare108213 Dec 3, 2019
e87fa05
Merge branch 'fsd1' of https://github.com/lettie-roach/CICE into fsd1
eclare108213 Dec 3, 2019
873bf3a
add FSD representative radius to history
eclare108213 Dec 3, 2019
e451e8b
Changed units and renamed f to freq in ww3 input file
lettie-roach Dec 4, 2019
2f1c0b5
add perimeter to fsd history
eclare108213 Dec 5, 2019
58e958b
Correction to perimeter
lettie-roach Dec 5, 2019
2d2ccf0
Made representative radius and perimeter 2D fields
lettie-roach Dec 5, 2019
4a64e70
Update ug_case_settings.rst
lettie-roach Dec 5, 2019
0843e37
Update sg_fundvars.rst
lettie-roach Dec 6, 2019
70cf7ac
default fsd history flags
eclare108213 Dec 6, 2019
97fda27
cice consortium version of icepack
eclare108213 Dec 6, 2019
ca712ea
remove icepack
eclare108213 Dec 6, 2019
fe72185
switch to Consortium version of Icepack
eclare108213 Dec 6, 2019
c24d47d
update icepack version from master
eclare108213 Dec 6, 2019
a7080a4
update icepack
apcraig Dec 7, 2019
8203215
update icepack
apcraig Dec 7, 2019
6d61e61
update documentation
eclare108213 Dec 7, 2019
9a1d232
Merge branch 'fsd1' of https://github.com/lettie-roach/cice into fsd1
eclare108213 Dec 7, 2019
5726b4f
correct formatting in doc
eclare108213 Dec 7, 2019
cbdcc73
add file option to doc
eclare108213 Dec 7, 2019
a223034
update drivers with new fsd code (untested)
apcraig Dec 7, 2019
6ef4768
Merge branch 'fsd1' of https://github.com/lettie-roach/cice into fsd1
apcraig Dec 7, 2019
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
3 changes: 1 addition & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[submodule "icepack"]
path = icepack
url = https://github.com/cice-consortium/icepack.git
branch = master
url = https://github.com/cice-consortium/Icepack
124 changes: 80 additions & 44 deletions cicecore/cicedynB/analysis/ice_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module ice_diagnostics

use ice_kinds_mod
use ice_communicate, only: my_task, master_task
use ice_constants, only: c0
use ice_constants, only: c0, c1
use ice_calendar, only: istep1
use ice_fileunits, only: nu_diag
use ice_fileunits, only: flush_fileunit
Expand Down Expand Up @@ -89,8 +89,8 @@ module ice_diagnostics
integer (kind=int_kind), parameter, public :: &
check_step = 999999999, & ! begin printing at istep1=check_step
iblkp = 1, & ! block number
ip = 3, & ! i index
jp = 5, & ! j index
ip = 2, & ! i index
jp = 11, & ! j index
mtask = 0 ! my_task

!=======================================================================
Expand All @@ -107,12 +107,13 @@ module ice_diagnostics

subroutine runtime_diags (dt)

use ice_arrays_column, only: floe_rad_c
use ice_blocks, only: nx_block, ny_block
use ice_broadcast, only: broadcast_scalar
use ice_constants, only: c1, c1000, c2, p001, p5, &
field_loc_center, m2_to_km2
use ice_domain, only: distrb_info, nblocks
use ice_domain_size, only: ncat, n_aero, max_blocks
use ice_domain_size, only: ncat, n_aero, max_blocks, nfsd
use ice_flux, only: alvdr, alidr, alvdf, alidf, evap, fsnow, frazil, &
fswabs, fswthru, flw, flwout, fsens, fsurf, flat, frzmlt_init, frain, fpond, &
fhocn_ai, fsalt_ai, fresh_ai, frazil_diag, &
Expand All @@ -135,12 +136,12 @@ subroutine runtime_diags (dt)
! local variables

integer (kind=int_kind) :: &
i, j, n, iblk, &
i, j, k, n, iblk, nc, &
ktherm, &
nt_tsfc, nt_aero, nt_fbri, nt_apnd, nt_hpnd
nt_tsfc, nt_aero, nt_fbri, nt_apnd, nt_hpnd, nt_fsd

logical (kind=log_kind) :: &
tr_pond_topo, tr_brine, tr_aero, calc_Tsfc
tr_pond_topo, tr_brine, tr_aero, calc_Tsfc, tr_fsd

real (kind=dbl_kind) :: &
rhow, rhos, rhoi, puny, awtvdr, awtidr, awtvdf, awtidf, &
Expand Down Expand Up @@ -177,7 +178,7 @@ subroutine runtime_diags (dt)
paice, pTair, pQa, pfsnow, pfrain, pfsw, pflw, &
pTsfc, pevap, pfswabs, pflwout, pflat, pfsens, &
pfsurf, pfcondtop, psst, psss, pTf, hiavg, hsavg, hbravg, &
pfhocn, psalt, &
pfhocn, psalt, fsdavg, &
pmeltt, pmeltb, pmeltl, psnoice, pdsnow, pfrazil, pcongel

real (kind=dbl_kind), dimension (nx_block,ny_block,max_blocks) :: &
Expand All @@ -187,9 +188,10 @@ subroutine runtime_diags (dt)

call icepack_query_parameters(ktherm_out=ktherm, calc_Tsfc_out=calc_Tsfc)
call icepack_query_tracer_flags(tr_brine_out=tr_brine, tr_aero_out=tr_aero, &
tr_pond_topo_out=tr_pond_topo)
tr_pond_topo_out=tr_pond_topo, tr_fsd_out=tr_fsd)
call icepack_query_tracer_indices(nt_fbri_out=nt_fbri, nt_Tsfc_out=nt_Tsfc, &
nt_aero_out=nt_aero, nt_apnd_out=nt_apnd, nt_hpnd_out=nt_hpnd)
nt_aero_out=nt_aero, nt_apnd_out=nt_apnd, nt_hpnd_out=nt_hpnd, &
nt_fsd_out=nt_fsd)
call icepack_query_parameters(Tffresh_out=Tffresh, rhos_out=rhos, &
rhow_out=rhow, rhoi_out=rhoi, puny_out=puny, &
awtvdr_out=awtvdr, awtidr_out=awtidr, awtvdf_out=awtvdf, awtidf_out=awtidf, &
Expand Down Expand Up @@ -502,7 +504,7 @@ subroutine runtime_diags (dt)
work1(i,j,iblk) = &
(fswabs(i,j,iblk) - fswthru(i,j,iblk) &
+ fsens (i,j,iblk) + flwout (i,j,iblk)) &
* aice (i,j,iblk) &
* aice (i,j,iblk) &
+ flw (i,j,iblk) * aice_init (i,j,iblk)
enddo
enddo
Expand Down Expand Up @@ -748,13 +750,30 @@ subroutine runtime_diags (dt)
pflw(n) = flw(i,j,iblk) ! longwave radiation
paice(n) = aice(i,j,iblk) ! ice area

fsdavg(n) = c0 ! avg floe effective radius
hiavg(n) = c0 ! avg snow/ice thickness
hsavg(n) = c0
hbravg(n) = c0 ! avg brine thickness
if (paice(n) /= c0) then
hiavg(n) = vice(i,j,iblk)/paice(n)
hsavg(n) = vsno(i,j,iblk)/paice(n)
if (tr_brine) hbravg(n) = trcr(i,j,nt_fbri,iblk)* hiavg(n)
if (tr_fsd) then
! not sure why this does not work
! do k = 1, nfsd
! fsdavg(n) = fsdavg(n) &
! + trcr(i,j,nt_fsd+k-1,iblk) * floe_rad_c(k) &
! / trcr(i,j,nt_fsd+k-1,iblk)
! enddo
! this works
do nc = 1, ncat
do k = 1, nfsd
fsdavg(n) = fsdavg(n) &
+ trcrn(i,j,nt_fsd+k-1,nc,iblk) * floe_rad_c(k) &
* aicen(i,j,nc,iblk) / paice(n)
enddo
enddo
endif
endif
if (vice(i,j,iblk) /= c0) psalt(n) = work2(i,j,iblk)/vice(i,j,iblk)
pTsfc(n) = trcr(i,j,nt_Tsfc,iblk) ! ice/snow sfc temperature
Expand Down Expand Up @@ -782,38 +801,39 @@ subroutine runtime_diags (dt)

endif ! my_task = pmloc

call broadcast_scalar(pTair (n), pmloc(n))
call broadcast_scalar(pQa (n), pmloc(n))
call broadcast_scalar(pfsnow (n), pmloc(n))
call broadcast_scalar(pfrain (n), pmloc(n))
call broadcast_scalar(pfsw (n), pmloc(n))
call broadcast_scalar(pflw (n), pmloc(n))
call broadcast_scalar(paice (n), pmloc(n))
call broadcast_scalar(hsavg (n), pmloc(n))
call broadcast_scalar(hiavg (n), pmloc(n))
call broadcast_scalar(pTair (n), pmloc(n))
call broadcast_scalar(pQa (n), pmloc(n))
call broadcast_scalar(pfsnow (n), pmloc(n))
call broadcast_scalar(pfrain (n), pmloc(n))
call broadcast_scalar(pfsw (n), pmloc(n))
call broadcast_scalar(pflw (n), pmloc(n))
call broadcast_scalar(paice (n), pmloc(n))
call broadcast_scalar(hsavg (n), pmloc(n))
call broadcast_scalar(hiavg (n), pmloc(n))
call broadcast_scalar(fsdavg (n), pmloc(n))
call broadcast_scalar(psalt (n), pmloc(n))
call broadcast_scalar(hbravg (n), pmloc(n))
call broadcast_scalar(pTsfc (n), pmloc(n))
call broadcast_scalar(pevap (n), pmloc(n))
call broadcast_scalar(pfswabs (n), pmloc(n))
call broadcast_scalar(pflwout (n), pmloc(n))
call broadcast_scalar(pflat (n), pmloc(n))
call broadcast_scalar(pfsens (n), pmloc(n))
call broadcast_scalar(pfsurf (n), pmloc(n))
call broadcast_scalar(pfcondtop(n), pmloc(n))
call broadcast_scalar(pmeltt (n), pmloc(n))
call broadcast_scalar(pmeltb (n), pmloc(n))
call broadcast_scalar(pmeltl (n), pmloc(n))
call broadcast_scalar(psnoice (n), pmloc(n))
call broadcast_scalar(pdsnow (n), pmloc(n))
call broadcast_scalar(pfrazil (n), pmloc(n))
call broadcast_scalar(pcongel (n), pmloc(n))
call broadcast_scalar(pdhi (n), pmloc(n))
call broadcast_scalar(pdhs (n), pmloc(n))
call broadcast_scalar(pde (n), pmloc(n))
call broadcast_scalar(psst (n), pmloc(n))
call broadcast_scalar(psss (n), pmloc(n))
call broadcast_scalar(pTf (n), pmloc(n))
call broadcast_scalar(pTsfc (n), pmloc(n))
call broadcast_scalar(pevap (n), pmloc(n))
call broadcast_scalar(pfswabs (n), pmloc(n))
call broadcast_scalar(pflwout (n), pmloc(n))
call broadcast_scalar(pflat (n), pmloc(n))
call broadcast_scalar(pfsens (n), pmloc(n))
call broadcast_scalar(pfsurf (n), pmloc(n))
call broadcast_scalar(pfcondtop(n), pmloc(n))
call broadcast_scalar(pmeltt (n), pmloc(n))
call broadcast_scalar(pmeltb (n), pmloc(n))
call broadcast_scalar(pmeltl (n), pmloc(n))
call broadcast_scalar(psnoice (n), pmloc(n))
call broadcast_scalar(pdsnow (n), pmloc(n))
call broadcast_scalar(pfrazil (n), pmloc(n))
call broadcast_scalar(pcongel (n), pmloc(n))
call broadcast_scalar(pdhi (n), pmloc(n))
call broadcast_scalar(pdhs (n), pmloc(n))
call broadcast_scalar(pde (n), pmloc(n))
call broadcast_scalar(psst (n), pmloc(n))
call broadcast_scalar(psss (n), pmloc(n))
call broadcast_scalar(pTf (n), pmloc(n))
call broadcast_scalar(pfhocn (n), pmloc(n))

enddo ! npnt
Expand Down Expand Up @@ -947,6 +967,8 @@ subroutine runtime_diags (dt)
write(nu_diag,900) 'avg snow depth (m) = ',hsavg(1),hsavg(2)
write(nu_diag,900) 'avg salinity (ppt) = ',psalt(1),psalt(2)
write(nu_diag,900) 'avg brine thickness (m)= ',hbravg(1),hbravg(2)
if (tr_fsd) &
write(nu_diag,900) 'avg fsd rep radius (m) = ',fsdavg(1),fsdavg(2)

if (calc_Tsfc) then
write(nu_diag,900) 'surface temperature(C) = ',pTsfc(1),pTsfc(2)
Expand Down Expand Up @@ -1439,7 +1461,7 @@ subroutine print_state(plabel,i,j,iblk)

use ice_blocks, only: block, get_block
use ice_domain, only: blocks_ice
use ice_domain_size, only: ncat, nilyr, nslyr
use ice_domain_size, only: ncat, nilyr, nslyr, nfsd
use ice_state, only: aice0, aicen, vicen, vsnon, uvel, vvel, trcrn
use ice_flux, only: uatm, vatm, potT, Tair, Qa, flw, frain, fsnow, &
fsens, flat, evap, flwout, swvdr, swvdf, swidr, swidf, rhoa, &
Expand All @@ -1458,15 +1480,18 @@ subroutine print_state(plabel,i,j,iblk)
qi, qs, Tsnow, &
rad_to_deg, puny, rhoi, lfresh, rhos, cp_ice

integer (kind=int_kind) :: n, k, nt_Tsfc, nt_qice, nt_qsno
integer (kind=int_kind) :: n, k, nt_Tsfc, nt_qice, nt_qsno, nt_fsd

logical (kind=log_kind) :: tr_fsd

type (block) :: &
this_block ! block information for current block

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

call icepack_query_tracer_flags(tr_fsd_out=tr_fsd)
call icepack_query_tracer_indices(nt_Tsfc_out=nt_Tsfc, nt_qice_out=nt_qice, &
nt_qsno_out=nt_qsno)
nt_qsno_out=nt_qsno, nt_fsd_out=nt_fsd)
call icepack_query_parameters( &
rad_to_deg_out=rad_to_deg, puny_out=puny, rhoi_out=rhoi, lfresh_out=lfresh, &
rhos_out=rhos, cp_ice_out=cp_ice)
Expand Down Expand Up @@ -1495,9 +1520,20 @@ subroutine print_state(plabel,i,j,iblk)
write(nu_diag,*) 'hsn', vsnon(i,j,n,iblk)/aicen(i,j,n,iblk)
endif
write(nu_diag,*) 'Tsfcn',trcrn(i,j,nt_Tsfc,n,iblk)
if (tr_fsd) write(nu_diag,*) 'afsdn',trcrn(i,j,nt_fsd,n,iblk) ! fsd cat 1
write(nu_diag,*) ' '

! dynamics (transport and/or ridging) causes the floe size distribution to become non-normal
! if (tr_fsd) then
! if (abs(sum(trcrn(i,j,nt_fsd:nt_fsd+nfsd-1,n,iblk))-c1) > puny) &
! print*,'afsdn not normal', &
! sum(trcrn(i,j,nt_fsd:nt_fsd+nfsd-1,n,iblk)), &
! trcrn(i,j,nt_fsd:nt_fsd+nfsd-1,n,iblk)
! endif

enddo ! n


eidebug = c0
do n = 1,ncat
do k = 1,nilyr
Expand Down
Loading