Skip to content

Commit 4891e98

Browse files
Update coupled names (#40)
* update names of ice fractions, ice thickness, and snow thickness for coupling * remove references to ice discharge scheme * remove (half) deleted subroutine * flux name changes * change icepack to head of access-cm3-Icepack-1.5.1
1 parent 7af4e95 commit 4891e98

File tree

1 file changed

+23
-116
lines changed

1 file changed

+23
-116
lines changed

cicecore/drivers/access/cmeps/ice_import_export.F90

Lines changed: 23 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ subroutine ice_advertise_fields(gcomp, importState, exportState, flds_scalar_nam
128128
rc = ESMF_SUCCESS
129129
if (io_dbug > 5) call ESMF_LogWrite(subname//' called', ESMF_LOGMSG_INFO)
130130

131-
! call get_lice_discharge_masks_or_iceberg('lice_discharge_masks_iceberg.nc')
132-
133131
! Determine if ice sends multiple ice category info back to mediator
134132
send_i2x_per_cat = .false.
135133
call NUOPC_CompAttributeGet(gcomp, name='flds_i2o_per_cat', value=cvalue, &
@@ -590,10 +588,10 @@ subroutine ice_import( importState, rc )
590588

591589
! now fill in the ice internal data types
592590
do i=1,ncat
593-
call state_getimport(importState, 'sublim', output=flatn_f, index=i, ungridded_index=i, rc=rc)
594-
call state_getimport(importState, 'botmelt', output=fcondtopn_f, index=i, ungridded_index=i, rc=rc)
595-
call state_getimport(importState, 'topmelt', output=fsurfn_f, index=i, ungridded_index=i, rc=rc)
596-
call state_getimport(importState, 'tstar_sice', output=trcrn(:,:,nt_Tsfc,:,:), index=i, ungridded_index=i, rc=rc)
591+
call state_getimport(importState, 'Faxa_sublim_n', output=flatn_f, index=i, ungridded_index=i, rc=rc)
592+
call state_getimport(importState, 'Faxa_condtop_n', output=fcondtopn_f, index=i, ungridded_index=i, rc=rc)
593+
call state_getimport(importState, 'Faxa_melthtop_n', output=fsurfn_f, index=i, ungridded_index=i, rc=rc)
594+
call state_getimport(importState, 'Sa_tskn_n', output=trcrn(:,:,nt_Tsfc,:,:), index=i, ungridded_index=i, rc=rc)
597595
end do
598596

599597
!$OMP PARALLEL DO PRIVATE(iblk,i,j)
@@ -2107,13 +2105,11 @@ subroutine ice_advertise_fields_access_import(gcomp, importState, exportState, f
21072105

21082106
character(len=100) :: tmpString
21092107

2110-
call fldlist_add(fldsToIce_num, fldsToIce, 'um_icenth')
2111-
call fldlist_add(fldsToIce_num, fldsToIce, 'um_icesth')
2112-
call fldlist_add(fldsToIce_num, fldsToIce, 'pen_rad', ungridded_lbound=1, ungridded_ubound=ncat)
2113-
call fldlist_add(fldsToIce_num, fldsToIce, 'topmelt', ungridded_lbound=1, ungridded_ubound=ncat)
2114-
call fldlist_add(fldsToIce_num, fldsToIce, 'botmelt', ungridded_lbound=1, ungridded_ubound=ncat)
2115-
call fldlist_add(fldsToIce_num, fldsToIce, 'tstar_sice', ungridded_lbound=1, ungridded_ubound=ncat)
2116-
call fldlist_add(fldsToIce_num, fldsToIce, 'sublim', ungridded_lbound=1, ungridded_ubound=ncat)
2108+
call fldlist_add(fldsToIce_num, fldsToIce, 'Faxa_swpen_n', ungridded_lbound=1, ungridded_ubound=ncat)
2109+
call fldlist_add(fldsToIce_num, fldsToIce, 'Faxa_melthtop_n', ungridded_lbound=1, ungridded_ubound=ncat)
2110+
call fldlist_add(fldsToIce_num, fldsToIce, 'Faxa_condtop_n', ungridded_lbound=1, ungridded_ubound=ncat)
2111+
call fldlist_add(fldsToIce_num, fldsToIce, 'Sa_tskn_n', ungridded_lbound=1, ungridded_ubound=ncat)
2112+
call fldlist_add(fldsToIce_num, fldsToIce, 'Faxa_sublim_n', ungridded_lbound=1, ungridded_ubound=ncat)
21172113

21182114
write (tmpString, *) ncat
21192115
call ESMF_LogWrite("CICE number of ice categories: " // trim(tmpString))
@@ -2131,14 +2127,14 @@ subroutine ice_advertise_fields_access_export(gcomp, importState, exportState, f
21312127

21322128
character(len=100) :: tmpString
21332129

2134-
call fldlist_add(fldsFrIce_num , fldsFrIce, 'ia_aicen', ungridded_lbound=1, ungridded_ubound=ncat) ! from ice_state field: aicen
2135-
call fldlist_add(fldsFrIce_num , fldsFrIce, 'ia_snown', ungridded_lbound=1, ungridded_ubound=ncat) ! from ice_state field: vsnon
2136-
call fldlist_add(fldsFrIce_num , fldsFrIce, 'ia_thikn', ungridded_lbound=1, ungridded_ubound=ncat) ! from ice_state field: vicen
2130+
call fldlist_add(fldsFrIce_num , fldsFrIce, 'Si_ifrac_n', ungridded_lbound=1, ungridded_ubound=ncat) ! from ice_state field: aicen
2131+
call fldlist_add(fldsFrIce_num , fldsFrIce, 'Si_vsno_n', ungridded_lbound=1, ungridded_ubound=ncat) ! from ice_state field: vsnon
2132+
call fldlist_add(fldsFrIce_num , fldsFrIce, 'Si_vice_n', ungridded_lbound=1, ungridded_ubound=ncat) ! from ice_state field: vicen
21372133

2138-
call fldlist_add(fldsFrIce_num , fldsFrIce, 'ia_itopt', ungridded_lbound=1, ungridded_ubound=ncat) ! from ice flux: Tn_top
2139-
call fldlist_add(fldsFrIce_num , fldsFrIce, 'ia_itopk', ungridded_lbound=1, ungridded_ubound=ncat) ! from ice flux: keffn_top
2140-
call fldlist_add(fldsFrIce_num , fldsFrIce, 'ia_pndfn', ungridded_lbound=1, ungridded_ubound=ncat) ! from icepack_shorwave: apeffn
2141-
call fldlist_add(fldsFrIce_num , fldsFrIce, 'ia_pndtn', ungridded_lbound=1, ungridded_ubound=ncat) ! from ice state field: trcrn
2134+
call fldlist_add(fldsFrIce_num , fldsFrIce, 'Si_topt', ungridded_lbound=1, ungridded_ubound=ncat) ! from ice flux: Tn_top
2135+
call fldlist_add(fldsFrIce_num , fldsFrIce, 'Si_topk', ungridded_lbound=1, ungridded_ubound=ncat) ! from ice flux: keffn_top
2136+
call fldlist_add(fldsFrIce_num , fldsFrIce, 'Si_pndf_n', ungridded_lbound=1, ungridded_ubound=ncat) ! from icepack_shorwave: apeffn
2137+
call fldlist_add(fldsFrIce_num , fldsFrIce, 'Si_pndt_n', ungridded_lbound=1, ungridded_ubound=ncat) ! from ice state field: trcrn
21422138
call fldlist_add(fldsFrIce_num , fldsFrIce, 'sstfrz')
21432139

21442140
write (tmpString, *) ncat
@@ -2192,9 +2188,9 @@ subroutine ice_export_access(importState, exportState, ailohi, cpl_dt, rc)
21922188
allocate(pndtn_scaled(nx_block,ny_block,ncat,nblocks))
21932189

21942190
do n = 1, ncat
2195-
call state_setexport(exportState, 'ia_aicen', input=aicen , lmask=tmask, ifrac=ailohi, rc=rc, index=n, ungridded_index=n)
2196-
call state_setexport(exportState, 'ia_snown', input=vsnon , lmask=tmask, ifrac=ailohi, rc=rc, index=n, ungridded_index=n)
2197-
call state_setexport(exportState, 'ia_thikn', input=vicen , lmask=tmask, ifrac=ailohi, rc=rc, index=n, ungridded_index=n)
2191+
call state_setexport(exportState, 'Si_ifrac_n', input=aicen , lmask=tmask, ifrac=ailohi, rc=rc, index=n, ungridded_index=n)
2192+
call state_setexport(exportState, 'Si_vsno_n', input=vsnon , lmask=tmask, ifrac=ailohi, rc=rc, index=n, ungridded_index=n)
2193+
call state_setexport(exportState, 'Si_vice_n', input=vicen , lmask=tmask, ifrac=ailohi, rc=rc, index=n, ungridded_index=n)
21982194
end do
21992195

22002196
call state_setexport(exportState, 'sstfrz', input=Tf , lmask=tmask, ifrac=ailohi, rc=rc)
@@ -2206,8 +2202,8 @@ subroutine ice_export_access(importState, exportState, ailohi, cpl_dt, rc)
22062202
pndtn_scaled(:,:,:,:) = trcrn(:,:,nt_hpnd,:,:) * apeffn(:,:,:,:) * aicen(:,:,:,:)
22072203

22082204
do n = 1, ncat
2209-
call state_setexport(exportState, 'ia_pndfn', input=pndfn_scaled, lmask=tmask, ifrac=ailohi, rc=rc, index=n, ungridded_index=n)
2210-
call state_setexport(exportState, 'ia_pndtn', input=pndtn_scaled, lmask=tmask, ifrac=ailohi, rc=rc, index=n, ungridded_index=n)
2205+
call state_setexport(exportState, 'Si_pndf_n', input=pndfn_scaled, lmask=tmask, ifrac=ailohi, rc=rc, index=n, ungridded_index=n)
2206+
call state_setexport(exportState, 'Si_pndt_n', input=pndtn_scaled, lmask=tmask, ifrac=ailohi, rc=rc, index=n, ungridded_index=n)
22112207
end do
22122208

22132209
rnslyr = real(nslyr,kind=dbl_kind)
@@ -2252,60 +2248,12 @@ subroutine ice_export_access(importState, exportState, ailohi, cpl_dt, rc)
22522248
end do
22532249
end do
22542250
end do
2255-
call state_setexport(exportState, 'ia_itopt', input=tempfld, lmask=tmask, ifrac=ailohi, rc=rc, ungridded_index=n)
2256-
call state_setexport(exportState, 'ia_itopk', input=tempfld1, lmask=tmask, ifrac=ailohi, rc=rc, ungridded_index=n)
2251+
call state_setexport(exportState, 'Si_topt', input=tempfld, lmask=tmask, ifrac=ailohi, rc=rc, ungridded_index=n)
2252+
call state_setexport(exportState, 'Si_topk', input=tempfld1, lmask=tmask, ifrac=ailohi, rc=rc, ungridded_index=n)
22572253
end do
2258-
2259-
call state_getfldptr(importState, 'um_icenth', um_icenth, rc)
2260-
call state_getfldptr(importState, 'um_icesth', um_icesth, rc)
22612254

22622255
call state_getfldptr(exportState, 'Fioi_melth', fhocn_ptr, rc)
22632256
call state_getfldptr(exportState, 'Fioi_meltw', fresh_ptr, rc)
2264-
2265-
! n = 0
2266-
! do iblk = 1, nblocks
2267-
! this_block = get_block(blocks_ice(iblk),iblk)
2268-
! ilo = this_block%ilo
2269-
! ihi = this_block%ihi
2270-
! jlo = this_block%jlo
2271-
! jhi = this_block%jhi
2272-
! do j = jlo, jhi
2273-
! do i = ilo, ihi
2274-
! n = n + 1
2275-
2276-
! if (tmask(i,j,iblk)) then
2277-
2278-
! if (lice_nth(i,j,iblk) == 0.0) then
2279-
! lice_nth(i,j,iblk) = um_icenth(n)
2280-
! end if
2281-
2282-
! if (lice_sth(i,j,iblk) == 0.0) then
2283-
! lice_sth(i,j,iblk) = um_icesth(n)
2284-
! end if
2285-
2286-
! if (amsk_nth(i,j,iblk) > 0.0) then
2287-
! licefw = max(0.0, um_icenth(n) - lice_nth(i,j,iblk)) * msk_nth(i,j,iblk) / amsk_nth(i,j,iblk)
2288-
! else if (amsk_sth(i,j,iblk) > 0.0) then
2289-
! licefw = max(0.0, um_icesth(n) - lice_sth(i,j,iblk)) * msk_sth(i,j,iblk) / amsk_sth(i,j,iblk)
2290-
! else
2291-
! licefw = 0.0
2292-
! end if
2293-
2294-
! licefw = licefw / cpl_dt
2295-
2296-
! liceht = -licefw * Lfresh
2297-
2298-
! ! fresh_ptr(n) = fresh_ptr(n) + licefw
2299-
! ! fhocn_ptr(n) = fhocn_ptr(n) + liceht
2300-
2301-
! lice_nth(i,j,iblk) = um_icenth(n)
2302-
! lice_sth(i,j,iblk) = um_icesth(n)
2303-
2304-
! end if
2305-
2306-
! end do
2307-
! end do
2308-
! end do
23092257

23102258
end subroutine ice_export_access
23112259

@@ -2350,45 +2298,4 @@ function calculate_ki_from_Tin (Tink, salink) &
23502298

23512299
end function calculate_ki_from_Tin
23522300

2353-
subroutine get_lice_discharge_masks_or_iceberg(fname)
2354-
2355-
! Called at beginning of each run trunk to read in land ice discharge mask or iceberg
2356-
! (off Antarctica and Greenland).
2357-
2358-
implicit none
2359-
2360-
character(len=*), intent(in) :: fname
2361-
character*80 :: myvar = 'ficeberg'
2362-
integer(kind=int_kind) :: ncid_i2o, im, k
2363-
logical :: dbug
2364-
!!!
2365-
!character(:), allocatable :: fname_trim
2366-
!!!
2367-
2368-
allocate (lice_nth(nx_block,ny_block,max_blocks)); lice_nth(:,:,:) = 0
2369-
allocate (lice_sth(nx_block,ny_block,max_blocks)); lice_sth(:,:,:) = 0
2370-
allocate (msk_nth(nx_block,ny_block,max_blocks)); msk_nth(:,:,:) = 0
2371-
allocate (msk_sth(nx_block,ny_block,max_blocks)); msk_sth(:,:,:) = 0
2372-
allocate (amsk_nth(nx_block,ny_block,max_blocks)); amsk_nth(:,:,:) = 0
2373-
allocate (amsk_sth(nx_block,ny_block,max_blocks)); amsk_sth(:,:,:) = 0
2374-
2375-
dbug = .true.
2376-
2377-
!!!
2378-
!fname_trim = trim(fname)
2379-
!!!
2380-
if (my_task == 0) write(*,'(a,a)'),'BBB1: opening file ',fname
2381-
if (my_task == 0) write(*,'(a,a)'),'BBB2: opening file ',trim(fname)
2382-
2383-
call ice_open_nc(trim(fname), ncid_i2o)
2384-
2385-
call ice_read_nc(ncid_i2o, 1, 'msk_nth', msk_nth, dbug)
2386-
call ice_read_nc(ncid_i2o, 1, 'msk_sth', msk_sth, dbug)
2387-
call ice_read_nc(ncid_i2o, 1, 'amsk_nth', amsk_nth, dbug)
2388-
call ice_read_nc(ncid_i2o, 1, 'amsk_sth', amsk_sth, dbug)
2389-
2390-
2391-
return
2392-
end subroutine get_lice_discharge_masks_or_iceberg
2393-
23942301
end module ice_import_export

0 commit comments

Comments
 (0)