Skip to content

Commit

Permalink
Update CICE with CMIP changes. (CICE-Consortium#191)
Browse files Browse the repository at this point in the history
* Remove some dummy arguments and unused variables.

* Dummy variable cleanup

* Cleanup

* Remove icepack from commit

* Reset icepack master

* Fix

* Fix

* Update icepack

* fix

* Fix flush ifdef logic

* Uninitialized variables.

* Additional initialization

* Update dummy

* more dummy fixes

* More hobart changes

* Update Hobart Intel settings

* Additional Hobart Intel changes

* Update icepack

* Some tweaks to dummy variables

* Remove some initialization code.

* Initialization needed for CICE

* Add gravit to ice_dyn_shared.F90

* CMIP history changes

* CMIP changes

* Update icepack

* Redo istat changes

* Update icepack to CMIP
  • Loading branch information
dabail10 authored and apcraig committed Sep 27, 2018
1 parent 6a95822 commit 3c99e10
Show file tree
Hide file tree
Showing 11 changed files with 2,123 additions and 187 deletions.
2,057 changes: 1,909 additions & 148 deletions cicecore/cicedynB/analysis/ice_history.F90

Large diffs are not rendered by default.

155 changes: 155 additions & 0 deletions cicecore/cicedynB/analysis/ice_history_shared.F90
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,58 @@ module ice_history_shared
f_mlt_onset = 'm', f_frz_onset = 'm', &
f_iage = 'm', f_FY = 'm', &
f_hisnap = 'm', f_aisnap = 'm', &
f_CMIP = 'x', &
f_sithick = 'x', f_sisnthick = 'x', &
f_siage = 'x', &
f_sitemptop = 'x', f_sitempsnic = 'x', &
f_sitempbot = 'x', f_sispeed = 'x', &
f_siu = 'x', f_siv = 'x', &
f_sidmasstranx = 'x', f_sidmasstrany = 'x', &
f_sistrxdtop = 'x', f_sistrydtop = 'x', &
f_sistrxubot = 'x', f_sistryubot = 'x', &
f_sicompstren = 'x', &
f_sialb = 'x', &
f_sihc = 'x', f_sisnhc = 'x', &
f_sidconcth = 'x', f_sidconcdyn = 'x', &
f_sidmassth = 'x', f_sidmassdyn = 'x', &
f_sidmassgrowthwat = 'x', &
f_sidmassgrowthbot = 'x', &
f_sidmasssi = 'x', &
f_sidmassevapsubl = 'x', &
f_sndmasssubl = 'x', &
f_sidmassmelttop = 'x', &
f_sidmassmeltbot = 'x', &
f_sidmasslat = 'x', &
f_sndmasssnf = 'x', &
f_sndmassmelt = 'x', &
f_siflswdtop = 'x', &
f_siflswutop = 'x', &
f_siflswdbot = 'x', &
f_sifllwdtop = 'x', &
f_sifllwutop = 'x', &
f_siflsenstop = 'x', &
f_siflsensupbot = 'x', &
f_sifllatstop = 'x', &
f_siflcondtop = 'x', &
f_siflcondbot = 'x', &
f_sipr = 'x', &
f_sifb = 'x', &
f_siflsaltbot = 'x', &
f_siflfwbot = 'x', &
f_siflfwdrain = 'x', &
f_siforcetiltx = 'x', &
f_siforcetilty = 'x', &
f_siforcecoriolx = 'x', &
f_siforcecorioly = 'x', &
f_siforceintstrx = 'x', &
f_siforceintstry = 'x', &
f_siitdconc = 'x', &
f_siitdthick = 'x', &
f_siitdsnthick = 'x', &
f_sidragtop = 'x', &
f_sirdgthick = 'x', &
f_sistreave = 'x', &
f_sistremax = 'x', &
f_aicen = 'x', f_vicen = 'x', &
f_vsnon = 'x', &
f_trsig = 'm', f_icepresent = 'm', &
Expand Down Expand Up @@ -323,6 +375,58 @@ module ice_history_shared
f_mlt_onset, f_frz_onset, &
f_iage, f_FY , &
f_hisnap, f_aisnap , &
f_CMIP, &
f_sithick, f_sisnthick, &
f_siage, &
f_sitemptop, f_sitempsnic,&
f_sitempbot, f_sispeed, &
f_siu, f_siv, &
f_sidmasstranx, f_sidmasstrany, &
f_sistrxdtop, f_sistrydtop, &
f_sistrxubot, f_sistryubot, &
f_sicompstren, &
f_sialb, &
f_sihc, f_sisnhc, &
f_sidconcth, f_sidconcdyn,&
f_sidmassth, f_sidmassdyn,&
f_sidmassgrowthwat, &
f_sidmassgrowthbot, &
f_sidmasssi, &
f_sidmassevapsubl, &
f_sndmasssubl, &
f_sidmassmelttop, &
f_sidmassmeltbot, &
f_sidmasslat, &
f_sndmasssnf, &
f_sndmassmelt, &
f_siflswdtop, &
f_siflswutop, &
f_siflswdbot, &
f_sifllwdtop, &
f_sifllwutop, &
f_siflsenstop, &
f_siflsensupbot, &
f_sifllatstop, &
f_siflcondtop, &
f_siflcondbot, &
f_sipr, &
f_sifb, &
f_siflsaltbot, &
f_siflfwbot, &
f_siflfwdrain, &
f_siforcetiltx, &
f_siforcetilty, &
f_siforcecoriolx, &
f_siforcecorioly, &
f_siforceintstrx, &
f_siforceintstry, &
f_siitdconc, &
f_siitdthick, &
f_siitdsnthick, &
f_sidragtop, &
f_sirdgthick, &
f_sistreave, &
f_sistremax, &
f_aicen, f_vicen , &
f_vsnon, &
f_trsig, f_icepresent,&
Expand Down Expand Up @@ -428,6 +532,57 @@ module ice_history_shared
n_dagedtt , n_dagedtd , &
n_mlt_onset , n_frz_onset , &
n_hisnap , n_aisnap , &
n_sithick , n_sisnthick , &
n_siage, &
n_sitemptop , n_sitempsnic , &
n_sitempbot , n_sispeed, &
n_siu, n_siv, &
n_sidmasstranx, n_sidmasstrany, &
n_sistrxdtop, n_sistrydtop, &
n_sistrxubot, n_sistryubot, &
n_sicompstren, &
n_sialb, &
n_sihc , n_sisnhc, &
n_sidconcth , n_sidconcdyn, &
n_sidmassth , n_sidmassdyn, &
n_sidmassgrowthwat, &
n_sidmassgrowthbot, &
n_sidmasssi, &
n_sidmassevapsubl, &
n_sndmasssubl, &
n_sidmassmelttop, &
n_sidmassmeltbot, &
n_sidmasslat, &
n_sndmasssnf, &
n_sndmassmelt, &
n_siflswdtop, &
n_siflswutop, &
n_siflswdbot, &
n_sifllwdtop, &
n_sifllwutop, &
n_siflsenstop, &
n_siflsensupbot, &
n_sifllatstop, &
n_siflcondtop, &
n_siflcondbot, &
n_sipr, &
n_sifb, &
n_siflsaltbot, &
n_siflfwbot, &
n_siflfwdrain, &
n_siforcetiltx, &
n_siforcetilty, &
n_siforcecoriolx, &
n_siforcecorioly, &
n_siforceintstrx, &
n_siforceintstry, &
n_siitdconc, &
n_siitdthick, &
n_siitdsnthick, &
n_sidragtop, &
n_sirdgthick, &
n_sistreave, &
n_sistremax, &
n_trsig , n_icepresent , &
n_iage , n_FY , &
n_fsurf_ai , &
Expand Down
11 changes: 11 additions & 0 deletions cicecore/cicedynB/dynamics/ice_dyn_shared.F90
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,10 @@ subroutine dyn_prep2 (nx_block, ny_block, &
integer (kind=int_kind) :: &
i, j, ij

#ifdef coupled
real (kind=dbl_kind) :: gravit
#endif

logical (kind=log_kind), dimension(nx_block,ny_block) :: &
iceumask_old ! old-time iceumask

Expand Down Expand Up @@ -586,6 +590,13 @@ subroutine dyn_prep2 (nx_block, ny_block, &
! Define variables for momentum equation
!-----------------------------------------------------------------

#ifdef coupled
call icepack_query_parameters(gravit_out=gravit)
call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
file=__FILE__, line=__LINE__)
#endif

do ij = 1, icellu
i = indxui(ij)
j = indxuj(ij)
Expand Down
31 changes: 20 additions & 11 deletions cicecore/cicedynB/general/ice_flux.F90
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ module ice_flux
Tref , & ! 2m atm reference temperature (K)
Qref , & ! 2m atm reference spec humidity (kg/kg)
Uref , & ! 10m atm reference wind speed (m/s)
evap ! evaporative water flux (kg/m^2/s)
evap , & ! evaporative water flux (kg/m^2/s)
evaps , & ! evaporative water flux over snow (kg/m^2/s)
evapi ! evaporative water flux over ice (kg/m^2/s)

! albedos aggregated over categories (if calc_Tsfc)
real (kind=dbl_kind), dimension(nx_block,ny_block,max_blocks), public :: &
Expand Down Expand Up @@ -218,7 +220,6 @@ module ice_flux

real (kind=dbl_kind), &
dimension (nx_block,ny_block,max_blocks), public :: &
fswfac , & ! for history
scale_factor! scaling factor for shortwave components

logical (kind=log_kind), public :: &
Expand Down Expand Up @@ -259,7 +260,10 @@ module ice_flux
real (kind=dbl_kind), dimension (nx_block,ny_block,max_blocks), public :: &
fsurf , & ! net surface heat flux (excluding fcondtop)(W/m^2)
fcondtop,&! top surface conductive flux (W/m^2)
fcondbot,&! bottom surface conductive flux (W/m^2)
fbot, & ! heat flux at bottom surface of ice (excluding excess) (W/m^2)
Tbot, & ! temperature at bottom surface of ice (deg C)
Tsnice, & ! temperature at snow ice interface (deg C)
congel, & ! basal ice growth (m/step-->cm/day)
frazil, & ! frazil ice growth (m/step-->cm/day)
snoice, & ! snow-ice formation (m/step-->cm/day)
Expand All @@ -279,6 +283,7 @@ module ice_flux
dimension (nx_block,ny_block,ncat,max_blocks), public :: &
fsurfn, & ! category fsurf
fcondtopn,& ! category fcondtop
fcondbotn,& ! category fcondbot
fsensn, & ! category sensible heat flux
flatn ! category latent heat flux

Expand Down Expand Up @@ -443,7 +448,7 @@ subroutine init_coupler_flux
uocn (:,:,:) = c0 ! surface ocean currents (m/s)
vocn (:,:,:) = c0
frzmlt(:,:,:) = c0 ! freezing/melting potential (W/m^2)
! frzmlt_init(:,:,:) = c0 ! freezing/melting potential (W/m^2)
frzmlt_init(:,:,:) = c0 ! freezing/melting potential (W/m^2)
sss (:,:,:) = 34.0_dbl_kind ! sea surface salinity (ppt)

do iblk = 1, size(Tf,3)
Expand Down Expand Up @@ -472,10 +477,12 @@ subroutine init_coupler_flux
fsens (:,:,:) = c0
flat (:,:,:) = c0
fswabs (:,:,:) = c0
! fswint_ai(:,:,:) = c0
fswint_ai(:,:,:) = c0
flwout (:,:,:) = -stefan_boltzmann*Tffresh**4
! in case atm model diagnoses Tsfc from flwout
evap (:,:,:) = c0
evaps (:,:,:) = c0
evapi (:,:,:) = c0
Tref (:,:,:) = c0
Qref (:,:,:) = c0
Uref (:,:,:) = c0
Expand All @@ -492,7 +499,7 @@ subroutine init_coupler_flux
strocnyT(:,:,:) = c0 ! ice-ocean stress, y-direction (T-cell)
fresh (:,:,:) = c0
fsalt (:,:,:) = c0
! fpiond (:,:,:) = c0
fpond (:,:,:) = c0
fhocn (:,:,:) = c0
fswthru (:,:,:) = c0
fresh_da(:,:,:) = c0 ! data assimilation
Expand Down Expand Up @@ -581,7 +588,7 @@ subroutine init_flux_ocn

fresh (:,:,:) = c0
fsalt (:,:,:) = c0
! fpond (:,:,:) = c0
fpond (:,:,:) = c0
fhocn (:,:,:) = c0
fswthru (:,:,:) = c0
faero_ocn(:,:,:,:) = c0
Expand Down Expand Up @@ -630,8 +637,11 @@ subroutine init_history_therm

fsurf (:,:,:) = c0
fcondtop(:,:,:)= c0
fcondbot(:,:,:)= c0
congel (:,:,:) = c0
! fbot (:,:,:) = c0
fbot (:,:,:) = c0
Tbot (:,:,:) = c0
Tsnice (:,:,:) = c0
frazil (:,:,:) = c0
snoice (:,:,:) = c0
dsnow (:,:,:) = c0
Expand All @@ -648,9 +658,9 @@ subroutine init_history_therm
endif
fsurfn (:,:,:,:) = c0
fcondtopn (:,:,:,:) = c0
fcondbotn (:,:,:,:) = c0
flatn (:,:,:,:) = c0
fsensn (:,:,:,:) = c0
fpond (:,:,:) = c0
fresh_ai (:,:,:) = c0
fsalt_ai (:,:,:) = c0
fhocn_ai (:,:,:) = c0
Expand All @@ -667,11 +677,10 @@ subroutine init_history_therm
Cdn_ocn(:,:,:) = dragio
Cdn_atm(:,:,:) = (vonkar/log(zref/iceruf)) &
* (vonkar/log(zref/iceruf)) ! atmo drag for RASM
! Cdn_atm_ratio(:,:,:)= c0
Cdn_atm_ratio(:,:,:)= c0

if (formdrag) then
Cdn_atm_rdg (:,:,:) = c0
Cdn_atm_ratio(:,:,:)= c0
Cdn_atm_floe(:,:,:) = c0
Cdn_atm_pond(:,:,:) = c0
Cdn_atm_skin(:,:,:) = c0
Expand Down Expand Up @@ -719,7 +728,7 @@ subroutine init_history_dyn
sig2 (:,:,:) = c0
taubx (:,:,:) = c0
tauby (:,:,:) = c0
! strength (:,:,:) = c0
strength (:,:,:) = c0
strocnx (:,:,:) = c0
strocny (:,:,:) = c0
strairx (:,:,:) = c0
Expand Down
Loading

0 comments on commit 3c99e10

Please sign in to comment.