<p><b>akt@lanl.gov</b> 2013-01-31 14:37:47 -0700 (Thu, 31 Jan 2013)</p><p>Ported first CICE subroutine into test module<br>
</p><hr noshade><pre><font color="gray">Modified: branches/cice_projects/initial_cice_core/src/core_cice/Makefile
===================================================================
--- branches/cice_projects/initial_cice_core/src/core_cice/Makefile        2013-01-31 19:44:06 UTC (rev 2407)
+++ branches/cice_projects/initial_cice_core/src/core_cice/Makefile        2013-01-31 21:37:47 UTC (rev 2408)
@@ -1,23 +1,35 @@
.SUFFIXES: .F .o
-OBJS =        mpas_cice_convert_to_CICE.o \
+OBJS =        mpas_cice_kinds_mod.o \
+        mpas_cice_constants.o \
+        mpas_cice_domain_size.o \
+        mpas_cice_state.o \
+        mpas_cice_test.o \
        mpas_cice_init.o \
        mpas_cice_timestep.o \
-        pas_cice_mpas_core.o
+        mpas_cice_mpas_core.o
all: core_cice
core_cice: $(OBJS)
        ar -ru libdycore.a $(OBJS)
-mpas_cice_convert_to_CICE.o:
+mpas_cice_kinds_mod.o:
-mpas_cice_init.o: mpas_cice_convert_to_CICE.o
+mpas_cice_constants.o: mpas_cice_kinds_mod.o
-mpas_cice_timestep.o: mpas_cice_convert_to_CICE.o
+mpas_cice_domain_size.o: mpas_cice_kinds_mod.o
-mpas_cice_mpas_core.o: mpas_cice_init.o mpas_cice_timestep.o
+mpas_cice_state.o: mpas_cice_kinds_mod.o mpas_cice_domain_size.o
+mpas_cice_init.o: mpas_cice_state.o
+
+mpas_cice_test.o: mpas_cice_kinds_mod.o mpas_cice_constants.o
+
+mpas_cice_timestep.o: mpas_cice_kinds_mod.o mpas_cice_test.o
+
+mpas_cice_mpas_core.o: mpas_cice_test.o mpas_cice_init.o mpas_cice_timestep.o
+
clean:
        $(RM) *.o *.mod *.f90 libdycore.a
Modified: branches/cice_projects/initial_cice_core/src/core_cice/Registry
===================================================================
--- branches/cice_projects/initial_cice_core/src/core_cice/Registry        2013-01-31 19:44:06 UTC (rev 2407)
+++ branches/cice_projects/initial_cice_core/src/core_cice/Registry        2013-01-31 21:37:47 UTC (rev 2408)
@@ -36,9 +36,9 @@
dim vertexDegree vertexDegree
dim nVertLevels nVertLevels
dim nTracers nTracers
-dim nCategories 1
-dim nIceLayers 4
-dim nSnowLayers 1
+dim nCategories nCategories
+dim nIceLayers nIceLayers
+dim nSnowLayers nSnowLayers
%
% var persistence type name_in_file ( dims ) time_levs iro- name_in_code struct super-array array_class
@@ -128,10 +128,10 @@
var persistent real snowVolumeCategory ( nCells nCategories ) 0 - snowVolumeCategory states - -
% tracers
-var persistent real iceEnthalpy ( nIceLayers nCells nCategories ) 0 - iceEnthalpy tracer iceVolumeLayerTracers tracers
-var persistent real iceSalinity ( nIceLayers nCells nCategories ) 0 - iceSalinity tracer iceVolumeLayerTracers tracers
-var persistent real snowEnthalpy ( nSnowLayers nCells nCategories ) 0 - snowEnthalpy tracer - -
-% snowVolumeLayerTracers tracers
+var persistent real iceEnthalpy ( nIceLayers nCategories nCells ) 0 - iceEnthalpy tracer iceVolumeLayerTracers tracers
+var persistent real iceSalinity ( nIceLayers nCategories nCells ) 0 - iceSalinity tracer iceVolumeLayerTracers tracers
+var persistent real snowEnthalpy ( nSnowLayers nCategories nCells ) 0 - snowEnthalpy tracer snowVolumeLayerTracers wibble
+var persistent real snowSalinity ( nSnowLayers nCategories nCells ) 0 - snowSalinity tracer snowVolumeLayerTracers wibble
% flux
var persistent real seaSurfaceTemperature ( nCells ) 0 - seaSurfaceTemperature flux - -
Added: branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_constants.F
===================================================================
--- branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_constants.F         (rev 0)
+++ branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_constants.F        2013-01-31 21:37:47 UTC (rev 2408)
@@ -0,0 +1,242 @@
+!=======================================================================
+!BOP
+!
+! !MODULE: ice_constants - sets physical constants
+!
+! !DESCRIPTION:
+!
+! This module defines a variety of physical and numerical constants
+! used throughout the ice model \\
+!
+! Code originally based on constants.F in POP
+!
+! !REVISION HISTORY:
+! SVN:$Id: ice_constants.F90 567 2013-01-07 02:57:36Z eclare $
+!
+! author Elizabeth C. Hunke, LANL
+!
+! !INTERFACE:
+
+ module cice_constants
+!
+! !USES:
+!
+ use cice_kinds_mod
+!
+!EOP
+!
+ implicit none
+ !save
+
+ !-----------------------------------------------------------------
+ ! physical constants
+ !-----------------------------------------------------------------
+
+#ifdef AOMIP
+ real (kind=dbl_kind), parameter :: &
+ rhos = 300.0_dbl_kind ,&! density of snow (kg/m^3)
+ rhoi = 900.0_dbl_kind ,&! density of ice (kg/m^3)
+ rhow = 1025.0_dbl_kind ,&! density of seawater (kg/m^3)
+ cp_air = 1004.0_dbl_kind ,&! specific heat of air (J/kg/K)
+ emissivity= 0.98_dbl_kind ,&! emissivity of snow and ice
+ cp_ice = 2090._dbl_kind ,&! specific heat of fresh ice (J/kg/K)
+ cp_brine = 4650._dbl_kind ,&! specific heat of brine (J/kg/K)
+ ! from Taylor and Feltham (2004)
+ cp_ocn = 4190._dbl_kind ,&! specific heat of ocn (J/kg/K)
+ depressT = 0.0575_dbl_kind ,&! Tf:brine salinity ratio (C/ppt)
+ dragio = 0.0055_dbl_kind ,&! ice-ocn drag coefficient
+ albocn = 0.10_dbl_kind ! ocean albedo
+#else
+! CICE default parameters
+ real (kind=dbl_kind), parameter :: &
+ rhos = 330.0_dbl_kind ,&! density of snow (kg/m^3)
+ rhoi = 917.0_dbl_kind ,&! density of ice (kg/m^3)
+ rhow = 1026.0_dbl_kind ,&! density of seawater (kg/m^3)
+ cp_air = 1005.0_dbl_kind ,&! specific heat of air (J/kg/K)
+ ! (Briegleb JGR 97 11475-11485 July 1992)
+ emissivity= 0.95_dbl_kind ,&! emissivity of snow and ice
+ cp_ice = 2106._dbl_kind ,&! specific heat of fresh ice (J/kg/K)
+ cp_ocn = 4218._dbl_kind ,&! specific heat of ocn (J/kg/K)
+ ! freshwater value needed for enthalpy
+ depressT = 0.054_dbl_kind ,&! Tf:brine salinity ratio (C/ppt)
+ dragio = 0.00536_dbl_kind ,&! ice-ocn drag coefficient
+ albocn = 0.06_dbl_kind ! ocean albedo
+#endif
+
+! UNESCO melting temperature parameters
+ real (kind=dbl_kind), parameter :: &
+ mlt_a = 0.0575_dbl_kind ,& !nonlinear melting T coefficient (oC/ppt)
+ mlt_b = 1.710523e-3_dbl_kind ,& !(oC/ppt^(3/2))
+ mlt_c = 2.154996e-4_dbl_kind !(oC/ppt^2)
+
+
+ real (kind=dbl_kind), parameter :: &
+ gravit = 9.80616_dbl_kind ,&! gravitational acceleration (m/s^2)
+ omega = 7.292e-5_dbl_kind ,&! angular velocity of earth (rad/sec)
+ radius = 6.37e6_dbl_kind ! earth radius (m)
+
+ real (kind=dbl_kind), parameter :: &
+ pi = 3.14159265358979323846_dbl_kind,&! pi
+ secday = 86400.0_dbl_kind ,&! seconds in calendar day
+ Tocnfrz = -1.8_dbl_kind ,&! freezing temp of seawater (C),
+ ! used as Tsfcn for open water
+ rhofresh = 1000.0_dbl_kind ,&! density of fresh water (kg/m^3)
+ zvir = 0.606_dbl_kind ,&! rh2o/rair - 1.0
+ vonkar = 0.4_dbl_kind ,&! von Karman constant
+ cp_wv = 1.81e3_dbl_kind ,&! specific heat of water vapor (J/kg/K)
+ stefan_boltzmann = 567.0e-10_dbl_kind,&! W/m^2/K^4
+ Tffresh = 273.15_dbl_kind ,&! freezing temp of fresh ice (K)
+ Lsub = 2.835e6_dbl_kind ,&! latent heat, sublimation freshwater (J/kg)
+ Lvap = 2.501e6_dbl_kind ,&! latent heat, vaporization freshwater (J/kg)
+ Lfresh = Lsub-Lvap ,&! latent heat of melting of fresh ice (J/kg)
+ Timelt = 0.0_dbl_kind ,&! melting temperature, ice top surface (C)
+ Tsmelt = 0.0_dbl_kind ,&! melting temperature, snow top surface (C)
+ ice_ref_salinity = 4._dbl_kind ,&! (ppt)
+! ocn_ref_salinity = 34.7_dbl_kind,&! (ppt)
+! rho_air = 1.2_dbl_kind ,&! ambient air density (kg/m^3)
+ spval_dbl = 1.0e30_dbl_kind ! special value (double precision)
+
+ real (kind=real_kind), parameter :: &
+ spval = 1.0e30_real_kind ! special value for netCDF output
+
+ real (kind=dbl_kind), parameter :: &
+ iceruf = 0.0005_dbl_kind ,&! ice surface roughness (m)
+
+ ! (Ebert, Schramm and Curry JGR 100 15965-15975 Aug 1995)
+ kappav = 1.4_dbl_kind ,&! vis extnctn coef in ice, wvlngth<700nm (1/m)
+ kappan = 17.6_dbl_kind,&! vis extnctn coef in ice, wvlngth<700nm (1/m)
+
+ kice = 2.03_dbl_kind ,&! thermal conductivity of fresh ice(W/m/deg)
+ kseaice= 2.00_dbl_kind ,&! thermal conductivity of sea ice (W/m/deg)
+ ! (used in zero layer thermodynamics option)
+ ksno = 0.30_dbl_kind ,&! thermal conductivity of snow (W/m/deg)
+ zref = 10._dbl_kind ,&! reference height for stability (m)
+ hsmin = 0.0001_dbl_kind,&! minimum allowed snow depth (m) for DE
+ snowpatch = 0.02_dbl_kind,&! parameter for fractional snow area (m)
+ salt_loss = 0.65_dbl_kind ! zbgc fraction of available salt retained (1.0 = no loss)
+
+ ! weights for albedos
+! 4 Jan 2007 BPB Following are appropriate for complete cloud
+! in a summer polar atmosphere with 1.5m bare sea ice surface:
+! .636/.364 vis/nir with only 0.5% direct for each band.
+ real (kind=dbl_kind), parameter :: & ! currently used only
+ awtvdr = 0.00318_dbl_kind, &! visible, direct ! for history and
+ awtidr = 0.00182_dbl_kind, &! near IR, direct ! diagnostics
+ awtvdf = 0.63282_dbl_kind, &! visible, diffuse
+ awtidf = 0.36218_dbl_kind ! near IR, diffuse
+
+ real (kind=dbl_kind), parameter :: &
+ qqqice = 11637800._dbl_kind ,&! for qsat over ice
+ TTTice = 5897.8_dbl_kind ,&! for qsat over ice
+ qqqocn = 627572.4_dbl_kind ,&! for qsat over ocn
+ TTTocn = 5107.4_dbl_kind ! for qsat over ocn
+
+ ! these are currently set so as to have no effect on the decomposition
+ real (kind=dbl_kind), parameter :: &
+ shlat = 30.0_dbl_kind ,&! artificial masking edge (deg)
+ nhlat = -30.0_dbl_kind ! artificial masking edge (deg)
+
+ !-----------------------------------------------------------------
+ ! numbers
+ !-----------------------------------------------------------------
+
+ real (kind=dbl_kind), parameter :: &
+ c0 = 0.0_dbl_kind, &
+ c1 = 1.0_dbl_kind, &
+ c1p5 = 1.5_dbl_kind, &
+ c2 = 2.0_dbl_kind, &
+ c3 = 3.0_dbl_kind, &
+ c4 = 4.0_dbl_kind, &
+ c5 = 5.0_dbl_kind, &
+ c6 = 6.0_dbl_kind, &
+ c8 = 8.0_dbl_kind, &
+ c9 = 9.0_dbl_kind, &
+ c10 = 10.0_dbl_kind, &
+ c12 = 12.0_dbl_kind, &
+ c15 = 15.0_dbl_kind, &
+ c16 = 16.0_dbl_kind, &
+ c20 = 20.0_dbl_kind, &
+ c25 = 25.0_dbl_kind, &
+        c30 = 30.0_dbl_kind, &
+ c100 = 100.0_dbl_kind, &
+ c180 = 180.0_dbl_kind, &
+ c360 = 360.0_dbl_kind, &
+ c365 = 365.0_dbl_kind, &
+        c400 = 400.0_dbl_kind, &
+ c3600= 3600.0_dbl_kind, &
+ c1000= 1000.0_dbl_kind, &
+ p001 = 0.001_dbl_kind, &
+ p01 = 0.01_dbl_kind, &
+ p025 = 0.025_dbl_kind, &
+ p1 = 0.1_dbl_kind, &
+ p2 = 0.2_dbl_kind, &
+ p4 = 0.4_dbl_kind, &
+ p5 = 0.5_dbl_kind, &
+ p6 = 0.6_dbl_kind, &
+ p05 = 0.05_dbl_kind, &
+ p15 = 0.15_dbl_kind, &
+ p25 = 0.25_dbl_kind, &
+ p75 = 0.75_dbl_kind, &
+ p166 = c1/c6, &
+ p333 = c1/c3, &
+ p666 = c2/c3, &
+ p111 = c1/c9, &
+ p055 = p111*p5, &
+ p027 = p055*p5, &
+ p222 = c2/c9, &
+ eps11 = 1.0e-11_dbl_kind, &
+ eps13 = 1.0e-13_dbl_kind, &
+ eps16 = 1.0e-16_dbl_kind, &
+ puny = eps11, &
+ bignum = 1.0e+30_dbl_kind, &
+ pih = p5*pi, &
+ piq = p5*pih, &
+ pi2 = c2*pi, &
+        days_per_4c = 146097.0_dbl_kind, &
+        days_per_c = 36524.0_dbl_kind, &
+        days_per_4y = 1461.0_dbl_kind, &
+        days_per_y = 365.0_dbl_kind
+
+ !-----------------------------------------------------------------
+ ! location of fields for staggered grids
+ !-----------------------------------------------------------------
+
+ integer (int_kind), parameter :: &
+ field_loc_unknown = 0, &
+ field_loc_noupdate = -1, &
+ field_loc_center = 1, &
+ field_loc_NEcorner = 2, &
+ field_loc_Nface = 3, &
+ field_loc_Eface = 4, &
+ field_loc_Wface = 5
+
+
+ !-----------------------------------------------------------------
+ ! field type attribute - necessary for handling
+ ! changes of direction across tripole boundary
+ !-----------------------------------------------------------------
+
+ integer (int_kind), parameter :: &
+ field_type_unknown = 0, &
+ field_type_noupdate = -1, &
+ field_type_scalar = 1, &
+ field_type_vector = 2, &
+ field_type_angle = 3
+
+ !-----------------------------------------------------------------
+ ! conversion factors
+ !-----------------------------------------------------------------
+
+ real (kind=dbl_kind), parameter :: &
+ cm_to_m = 0.01_dbl_kind ,&! cm to meters
+ m_to_cm = 100._dbl_kind ,&! meters to cm
+ m2_to_km2 = 1.e-6_dbl_kind ,&! m^2 to km^2
+ kg_to_g = 1000._dbl_kind ,&! kilograms to grams
+ mps_to_cmpdy = 8.64e6_dbl_kind ,&! m per s to cm per day
+ rad_to_deg = 180._dbl_kind/pi ! degree-radian conversion
+
+!=======================================================================
+
+ end module cice_constants
+
+!=======================================================================
Deleted: branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_convert_to_CICE.F
===================================================================
--- branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_convert_to_CICE.F        2013-01-31 19:44:06 UTC (rev 2407)
+++ branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_convert_to_CICE.F        2013-01-31 21:37:47 UTC (rev 2408)
@@ -1,48 +0,0 @@
-module cice_convert_to_CICE
-
- implicit none
-
- ! vertical layer numbers
- integer :: &
- nilyr , &
- nslyr
-
- ! number of tracers
- integer :: ntrcr
-
- ! tracer array start positions
- integer :: &
- nt_Tsfc , &
- nt_qice , &
- nt_qsno
-
-
-
-
-contains
-
- !-------------------------------------------------------------------------
-
- subroutine init_convert_to_CICE(domain)
-
- type (domain_type), intent(in) :: domain
-
- ! vertical layer numbers
- nilyr = domain % blocklist % mesh % nIceLayers
- nslyr = domain % blocklist % mesh % nSnowLayers
-
- ! tracer array start positions and tracer number
- nt_Tsfc = 1 ! index tracers, starting with Tsfc = 1
- ntrcr = 1 ! count tracers, starting with Tsfc = 1
-
- nt_qice = ntrcr + 1
- ntrcr = ntrcr + nilyr ! qice in nilyr layers
-
- nt_qsno = ntrcr + 1
- ntrcr = ntrcr + nslyr ! qsno in nslyr layers
-
- end subroutine init_convert_to_CICE
-
- !-------------------------------------------------------------------------
-
-end module cice_convert_to_CICE
Added: branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_domain_size.F
===================================================================
--- branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_domain_size.F         (rev 0)
+++ branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_domain_size.F        2013-01-31 21:37:47 UTC (rev 2408)
@@ -0,0 +1,102 @@
+!=======================================================================
+!BOP
+!
+! !MODULE: ice_domain_size
+!
+! !DESCRIPTION:
+!
+! Defines the global domain size and number of categories and layers.
+! Code originally based on domain_size.F in POP
+!
+! !REVISION HISTORY:
+! SVN:$Id: ice_domain_size.F90 574 2013-01-13 16:20:47Z eclare $
+!
+! author Elizabeth C. Hunke, LANL
+! 2004: Block structure and snow parameters added by William Lipscomb
+! Renamed (used to be ice_model_size)
+! 2006: Converted to free source form (F90) by Elizabeth Hunke
+! Removed hardwired sizes (NX...can now be set in compile scripts)
+!
+! !INTERFACE:
+!
+ module cice_domain_size
+!
+! !USES:
+!
+ use cice_kinds_mod
+!
+!EOP
+!=======================================================================
+
+ implicit none
+ save
+
+ ! added instead of preprocessor
+ integer (kind=int_kind), parameter :: &
+ NXGLOB = 1 , &
+ NYGLOB = 1 , &
+ NICECAT = 1 , &
+ NICELYR = 4 , &
+ NSNWLYR = 1 , &
+ NTRAERO = 0 , &
+ NBGCLYR = 1 , &
+ TRAGE = 0 , &
+ TRFY = 0 , &
+ TRLVL = 0 , &
+ TRPND = 0 , &
+ TRBRI = 0 , &
+ BLCKX = 1 , &
+ BLCKY = 1 , &
+ MXBLCKS = 1
+
+ integer (kind=int_kind), parameter :: &
+ nx_global = NXGLOB , & ! i-axis size
+ ny_global = NYGLOB , & ! j-axis size
+ ncat = NICECAT , & ! number of categories
+ nilyr = NICELYR , & ! number of ice layers per category
+ nslyr = NSNWLYR , & ! number of snow layers per category
+ max_aero = 6 , & ! maximum number of aerosols
+ n_aero = NTRAERO , & ! number of aerosols in use
+
+ nblyr = NBGCLYR , & ! number of biology layers per category
+ nblyr_hist = nblyr+2 , & ! number of ice layer plus boundary points
+ nltrcr = 6 , & ! number of layer bgc tracers
+ ! number of biology layer tracers
+ nbltrcr = 1 , & ! 4 basic bio; 1 nitrate only
+
+ ! number of tracers (defined in ice_init)
+ max_ntrcr = 1 & ! 1 = surface temperature
+ + nilyr & ! ice salinity
+ + nilyr & ! ice enthalpy
+ + nslyr & ! snow enthalpy
+ !!!!! optional tracers:
+ + TRAGE & ! age
+ + TRFY & ! first-year area
+ + TRLVL*2 & ! level/deformed ice
+ + TRPND*3 & ! ponds
+ + n_aero*4 & ! number of aerosols * 4 aero layers
+ + TRBRI & ! brine height
+ + TRBRI*nltrcr*nblyr,&! zbgc (off if TRBRI=0)
+ max_nstrm = 5 ! max number of history output streams
+
+ integer (kind=int_kind), parameter :: &
+ block_size_x = BLCKX , & ! size of block in first horiz dimension
+ block_size_y = BLCKY ! size of block in second horiz dimension
+
+ !*** The model will inform the user of the correct
+ !*** values for the parameter below. A value higher than
+ !*** necessary will not cause the code to fail, but will
+ !*** allocate more memory than is necessary. A value that
+ !*** is too low will cause the code to exit.
+ !*** A good initial guess is found using
+ !*** max_blocks = (nx_global/block_size_x)*(ny_global/block_size_y)/
+ !*** num_procs
+
+ integer (kind=int_kind), parameter :: &
+ max_blocks = MXBLCKS ! max number of blocks per processor
+
+!=======================================================================
+
+ end module cice_domain_size
+
+!=======================================================================
Modified: branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_init.F
===================================================================
--- branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_init.F        2013-01-31 19:44:06 UTC (rev 2407)
+++ branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_init.F        2013-01-31 21:37:47 UTC (rev 2408)
@@ -7,15 +7,12 @@
!-------------------------------------------------------------------------
- subroutine init_data(domain)
+ subroutine init_data()
- use cice_convert_to_CICE
+ use cice_state
- type (domain_type), intent(in) :: domain
+ call init_cice_state()
- init_convert_to_CICE(domain)
-
-
end subroutine init_data
!-------------------------------------------------------------------------
Added: branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_kinds_mod.F
===================================================================
--- branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_kinds_mod.F         (rev 0)
+++ branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_kinds_mod.F        2013-01-31 21:37:47 UTC (rev 2408)
@@ -0,0 +1,42 @@
+!=======================================================================
+!BOP
+!
+! !MODULE: ice_kinds_mod - defines variable precision
+!
+! !DESCRIPTION:
+!
+! Defines variable precision for all common data types \\
+! Code originally based on kinds_mod.F in POP
+!
+! !REVISION HISTORY:
+! SVN:$Id: ice_kinds_mod.F90 140 2008-07-25 20:15:53Z eclare $
+!
+! author: Elizabeth C. Hunke and William H. Lipscomb, LANL
+! 2006: ECH converted to free source form (F90)
+!
+! !INTERFACE:
+!
+ module cice_kinds_mod
+!
+! !USES:
+!
+!EOP
+!=======================================================================
+
+ use mpas_kind_types
+
+ implicit none
+
+ integer, parameter :: char_len = 80, &
+ char_len_long = 256, &
+ log_kind = kind(.true.), &
+ int_kind = kind(1), &
+ real_kind = RKIND, &
+ dbl_kind = RKIND, &
+ r16_kind = selected_real_kind(26)
+
+!=======================================================================
+
+ end module cice_kinds_mod
+
+!=======================================================================
Modified: branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_mpas_core.F
===================================================================
--- branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_mpas_core.F        2013-01-31 19:44:06 UTC (rev 2407)
+++ branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_mpas_core.F        2013-01-31 21:37:47 UTC (rev 2408)
@@ -47,7 +47,7 @@
current_outfile_frames = 0
! CICE init
- call init_data(domain)
+ call init_data()
end subroutine mpas_core_init
Added: branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_state.F
===================================================================
--- branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_state.F         (rev 0)
+++ branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_state.F        2013-01-31 21:37:47 UTC (rev 2408)
@@ -0,0 +1,263 @@
+!=======================================================================
+!BOP
+!
+! !MODULE: ice_state - primary state variables
+!
+! !DESCRIPTION:
+!
+! Primary state variables in various configurations
+! Note: other state variables are at the end of this...
+! The primary state variable names are:
+!-------------------------------------------------------------------
+! for each category aggregated over units
+! categories
+!-------------------------------------------------------------------
+! aicen(i,j,n) aice(i,j) ---
+! vicen(i,j,n) vice(i,j) m
+! vsnon(i,j,n) vsno(i,j) m
+! trcrn(i,j,it,n) trcr(i,j,it)
+!
+! Area is dimensionless because aice is the fractional area
+! (normalized so that the sum over all categories, including open
+! water, is 1.0). That is why vice/vsno have units of m instead of m^3.
+!
+! Variable names follow these rules:
+!
+! (1) For 3D variables (indices i,j,n), write 'ice' or 'sno' or
+! 'sfc' and put an 'n' at the end.
+! (2) For 2D variables (indices i,j) aggregated over all categories,
+! write 'ice' or 'sno' or 'sfc' without the 'n'.
+! (3) For 2D variables (indices i,j) associated with an individual
+! category, write 'i' or 's' instead of 'ice' or 'sno' and put an 'n'
+! at the end: e.g. hin, hsn. These are not declared here
+! but in individual modules (e.g., ice_therm_vertical).
+!
+! !REVISION HISTORY:
+! SVN:$Id: ice_state.F90 567 2013-01-07 02:57:36Z eclare $
+!
+! authors C. M. Bitz, UW
+! Elizabeth C. Hunke and William H. Lipscomb, LANL
+!
+! 2004: Block structure added by William Lipscomb
+! 2006: Converted to free form source (F90) by Elizabeth Hunke
+!
+! !INTERFACE:
+!
+ module cice_state
+!
+! !USES:
+!
+ use cice_kinds_mod
+ use cice_domain_size
+ !use ice_blocks
+!
+!EOP
+!
+ implicit none
+ save
+
+ !-----------------------------------------------------------------
+ ! state of the ice aggregated over all categories
+ !-----------------------------------------------------------------
+
+ !real (kind=dbl_kind), dimension(nx_block,ny_block,max_blocks) :: &
+ ! aice , & ! concentration of ice
+ ! vice , & ! volume per unit area of ice (m)
+ ! vsno ! volume per unit area of snow (m)
+
+ !real (kind=dbl_kind), &
+ ! dimension(nx_block,ny_block,max_ntrcr,max_blocks) :: &
+ ! trcr ! ice tracers
+ ! 1: surface temperature of ice/snow (C)
+
+ !-----------------------------------------------------------------
+ ! state of the ice for each category
+ !-----------------------------------------------------------------
+
+ !real (kind=dbl_kind), dimension (nx_block,ny_block,max_blocks):: &
+ ! aice0 ! concentration of open water
+
+ !real (kind=dbl_kind), &
+ ! dimension (nx_block,ny_block,ncat,max_blocks) :: &
+ ! aicen , & ! concentration of ice
+ ! vicen , & ! volume per unit area of ice (m)
+ ! vsnon ! volume per unit area of snow (m)
+
+ !real (kind=dbl_kind), &
+ ! dimension (nx_block,ny_block,max_ntrcr,ncat,max_blocks) :: &
+ ! trcrn ! tracers
+ ! 1: surface temperature of ice/snow (C)
+
+ !integer (kind=int_kind), dimension (max_ntrcr) :: &
+ ! trcr_depend ! = 0 for ice area tracers
+ ! = 1 for ice volume tracers
+ ! = 2 for snow volume tracers
+
+ integer (kind=int_kind) :: &
+ ntrcr ! number of tracers in use
+
+ !-----------------------------------------------------------------
+ ! indices and flags for tracers
+ !-----------------------------------------------------------------
+
+ integer (kind=int_kind) :: &
+ ntraceb , & ! number of bio layer tracers in use &
+ ntrace_start ! index of first bio tracer
+
+ integer (kind=int_kind) :: &
+ nt_Tsfc , & ! ice/snow temperature
+ nt_qice , & ! volume-weighted ice enthalpy (in layers)
+ nt_qsno , & ! volume-weighted snow enthalpy (in layers)
+ nt_sice , & ! volume-weighted ice bulk salinity (CICE grid layers)
+ nt_fbri , & ! volume fraction of ice with dynamic salt (hinS/vicen*aicen)
+ nt_iage , & ! volume-weighted ice age
+ nt_FY , & ! area-weighted first-year ice area
+ nt_alvl , & ! level ice area fraction
+ nt_vlvl , & ! level ice volume fraction
+ nt_apnd , & ! melt pond area fraction
+ nt_hpnd , & ! melt pond depth
+ nt_ipnd , & ! melt pond refrozen lid thickness
+ nt_aero , & ! starting index for aerosols in ice
+ nt_bgc_N_sk, & ! algae (skeletal layer)
+ nt_bgc_C_sk, & !
+ nt_bgc_chl_sk, & !
+ nt_bgc_Nit_sk, & ! nutrients (skeletal layer)
+ nt_bgc_Am_sk, & !
+ nt_bgc_Sil_sk, & !
+ nt_bgc_DMSPp_sk, & ! trace gases (skeletal layer)
+ nt_bgc_DMSPd_sk, & !
+ nt_bgc_DMS_sk, & !
+ nt_bgc_Nit_ml, & ! nutrients (ocean mixed layer)
+ nt_bgc_Am_ml, & !
+ nt_bgc_Sil_ml, & !
+ nt_bgc_DMSP_ml, & ! trace gases (ocean mixed layer)
+ nt_bgc_DMS_ml, & !
+ nt_bgc_N, & ! algae: bulk quantities are tracers (volume preserved)
+ nt_bgc_C, & !
+ nt_bgc_chl, & !
+ nt_bgc_NO, & ! nutrients
+ nt_bgc_NH, & !
+ nt_bgc_Sil, & !
+ nt_bgc_DMSPp, & ! trace gases (skeletal layer)
+ nt_bgc_DMSPd, & !
+ nt_bgc_DMS, & !
+ nt_bgc_PON, & ! zooplankton and detritus
+ nt_bgc_S ! Bulk salinity in fraction ice with dynamic salinity (Bio grid)
+
+ logical (kind=log_kind) :: &
+ tr_iage, & ! if .true., use age tracer
+ tr_FY, & ! if .true., use first-year area tracer
+ tr_lvl, & ! if .true., use level ice tracer
+ tr_pond, & ! if .true., use melt pond tracer
+ tr_pond_cesm,& ! if .true., use cesm pond tracer
+ tr_pond_lvl, & ! if .true., use level-ice pond tracer
+ tr_pond_topo,& ! if .true., use explicit topography-based ponds
+ tr_aero ! if .true., use aerosol tracers
+
+ !-----------------------------------------------------------------
+ ! dynamic variables closely related to the state of the ice
+ !-----------------------------------------------------------------
+
+ !real (kind=dbl_kind), dimension(nx_block,ny_block,max_blocks) :: &
+ ! uvel , & ! x-component of velocity (m/s)
+ ! vvel , & ! y-component of velocity (m/s)
+ ! divu , & ! strain rate I component, velocity divergence (1/s)
+ ! shear , & ! strain rate II component (1/s)
+ ! strength ! ice strength (N/m)
+
+ !-----------------------------------------------------------------
+ ! ice state at start of time step, saved for later in the step
+ !-----------------------------------------------------------------
+
+ !real (kind=dbl_kind), dimension(nx_block,ny_block,max_blocks) :: &
+ ! aice_init ! initial concentration of ice, for diagnostics
+
+ !real (kind=dbl_kind), &
+ ! dimension(nx_block,ny_block,ncat,max_blocks) :: &
+ ! aicen_init , & ! initial ice concentration, for linear ITD
+ ! vicen_init ! initial ice volume (m), for linear ITD
+
+ ! logical (kind=log_kind) :: &
+ ! hbrine ! if .true., brine height differs from ice thickness
+
+!=======================================================================
+
+ contains
+
+!=======================================================================
+
+ subroutine init_cice_state()
+
+ tr_iage = .false.
+ tr_FY = .false.
+ tr_lvl = .false.
+ tr_pond = .false.
+ tr_pond_cesm = .false.
+ tr_pond_lvl = .false.
+ tr_pond_topo = .false.
+ tr_aero = .false.
+
+ nt_Tsfc = 1 ! index tracers, starting with Tsfc = 1
+ ntrcr = 1 ! count tracers, starting with Tsfc = 1
+
+ nt_qice = ntrcr + 1
+ ntrcr = ntrcr + nilyr ! qice in nilyr layers
+
+ nt_qsno = ntrcr + 1
+ ntrcr = ntrcr + nslyr ! qsno in nslyr layers
+
+ nt_sice = ntrcr + 1
+ ntrcr = ntrcr + nilyr ! sice in nilyr layers
+
+ nt_iage = 0
+ if (tr_iage) then
+ nt_iage = ntrcr + 1 ! chronological ice age
+ ntrcr = ntrcr + 1
+ endif
+
+ nt_FY = 0
+ if (tr_FY) then
+ nt_FY = ntrcr + 1 ! area of first year ice
+ ntrcr = ntrcr + 1
+ endif
+
+ nt_alvl = 0
+ nt_vlvl = 0
+ if (tr_lvl) then
+ nt_alvl = ntrcr + 1
+ ntrcr = ntrcr + 1
+ nt_vlvl = ntrcr + 1
+ ntrcr = ntrcr + 1
+ endif
+
+ nt_apnd = 0
+ nt_hpnd = 0
+ nt_ipnd = 0
+ if (tr_pond) then ! all explicit melt pond schemes
+ nt_apnd = ntrcr + 1
+ ntrcr = ntrcr + 1
+ nt_hpnd = ntrcr + 1
+ ntrcr = ntrcr + 1
+ if (tr_pond_lvl) then
+ nt_ipnd = ntrcr + 1 ! refrozen pond ice lid thickness
+ ntrcr = ntrcr + 1 ! on level-ice ponds (if frzpnd='hlid')
+ endif
+ if (tr_pond_topo) then
+ nt_ipnd = ntrcr + 1 ! refrozen pond ice lid thickness
+ ntrcr = ntrcr + 1 !
+ endif
+ endif
+
+ nt_aero = 0
+ if (tr_aero) then
+ nt_aero = ntrcr + 1
+ ntrcr = ntrcr + 4*n_aero ! 4 dEdd layers, n_aero species
+ endif
+
+ end subroutine init_cice_state
+
+!=======================================================================
+
+ end module cice_state
+
+!=======================================================================
Added: branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_test.F
===================================================================
--- branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_test.F         (rev 0)
+++ branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_test.F        2013-01-31 21:37:47 UTC (rev 2408)
@@ -0,0 +1,262 @@
+module cice_test
+
+ use cice_kinds_mod
+ use cice_domain_size
+ use cice_constants
+
+contains
+
+!=======================================================================
+!BOP
+!
+! !ROUTINE: frzmlt_bottom_lateral - bottom and lateral heat fluxes
+!
+! !DESCRIPTION:
+!
+! Adjust frzmlt to account for changes in fhocn since from_coupler.
+! Compute heat flux to bottom surface.
+! Compute fraction of ice that melts laterally.
+!
+! !REVISION HISTORY:
+!
+! authors C. M. Bitz, UW
+! William H. Lipscomb, LANL
+! Elizabeth C. Hunke, LANL
+!
+! !INTERFACE:
+!
+ subroutine frzmlt_bottom_lateral (nx_block, ny_block, &
+ ilo, ihi, jlo, jhi, &
+ ntrcr, dt, &
+ aice, frzmlt, &
+ vicen, vsnon, &
+ trcrn, &
+ sst, Tf, &
+ strocnxT, strocnyT, &
+ Tbot, fbot, &
+ rside)
+!
+! !USES:
+!
+! !INPUT/OUTPUT PARAMETERS:
+
+ integer (kind=int_kind), intent(in) :: &
+ nx_block, ny_block, & ! block dimensions
+ ilo,ihi,jlo,jhi , & ! beginning and end of physical domain
+ ntrcr ! number of tracers
+
+ real (kind=dbl_kind), intent(in) :: &
+ dt ! time step
+
+ real (kind=dbl_kind), dimension(nx_block,ny_block), intent(in) :: &
+ aice , & ! ice concentration
+ frzmlt , & ! freezing/melting potential (W/m^2)
+ sst , & ! sea surface temperature (C)
+ Tf , & ! freezing temperature (C)
+ strocnxT, & ! ice-ocean stress, x-direction
+ strocnyT ! ice-ocean stress, y-direction
+
+ real (kind=dbl_kind), dimension(nx_block,ny_block,ncat), &
+ intent(in) :: &
+ vicen , & ! ice volume (m)
+ vsnon ! snow volume (m)
+
+ real (kind=dbl_kind), dimension(nx_block,ny_block,ntrcr,ncat), &
+ intent(in) :: &
+ trcrn ! tracer array
+
+ real (kind=dbl_kind), dimension(nx_block,ny_block), &
+ intent(out) :: &
+ Tbot , & ! ice bottom surface temperature (deg C)
+ fbot , & ! heat flux to ice bottom (W/m^2)
+ rside ! fraction of ice that melts laterally
+!
+!EOP
+!
+ integer (kind=int_kind) :: &
+ i, j , & ! horizontal indices
+ n , & ! thickness category index
+ k , & ! layer index
+ ij , & ! horizontal index, combines i and j loops
+ imelt ! number of cells with ice melting
+
+ integer (kind=int_kind), dimension (nx_block*ny_block) :: &
+ indxi, indxj ! compressed indices for cells with ice melting
+
+ real (kind=dbl_kind), dimension (:), allocatable :: &
+ etot , & ! total energy in column
+ fside ! lateral heat flux (W/m^2)
+
+ real (kind=dbl_kind) :: &
+ deltaT , & ! SST - Tbot >= 0
+ ustar , & ! skin friction velocity for fbot (m/s)
+ wlat , & ! lateral melt rate (m/s)
+ xtmp ! temporary variable
+
+ ! Parameters for bottom melting
+
+ ! 0.006 = unitless param for basal heat flx ala McPhee and Maykut
+
+ real (kind=dbl_kind), parameter :: &
+ cpchr = -cp_ocn*rhow*0.006_dbl_kind
+
+
+ ! Parameters for lateral melting
+
+ real (kind=dbl_kind), parameter :: &
+ floediam = 300.0_dbl_kind, & ! effective floe diameter (m)
+ alpha = 0.66_dbl_kind , & ! constant from Steele (unitless)
+ m1 = 1.6e-6_dbl_kind , & ! constant from Maykut & Perovich
+ ! (m/s/deg^(-m2))
+ m2 = 1.36_dbl_kind ! constant from Maykut & Perovich
+ ! (unitless)
+
+ do j = 1, ny_block
+ do i = 1, nx_block
+ rside(i,j) = c0
+ Tbot (i,j) = Tf(i,j)
+ fbot (i,j) = c0
+ enddo
+ enddo
+
+ !-----------------------------------------------------------------
+ ! Identify grid cells where ice can melt.
+ !-----------------------------------------------------------------
+
+ imelt = 0
+ do j = jlo, jhi
+ do i = ilo, ihi
+#if (defined notz_experiment || defined notz_fieldwork)
+ if (aice(i,j) > puny) then
+#else
+ if (aice(i,j) > puny .and. frzmlt(i,j) < c0) then ! ice can melt
+#endif
+ imelt = imelt + 1
+ indxi(imelt) = i
+ indxj(imelt) = j
+ endif
+ enddo ! i
+ enddo ! j
+
+ allocate(etot (imelt))
+ allocate(fside(imelt))
+
+ do ij = 1, imelt ! cells where ice can melt
+ i = indxi(ij)
+ j = indxj(ij)
+
+ fside(ij) = c0
+
+ !-----------------------------------------------------------------
+ ! Use boundary layer theory for fbot.
+ ! See Maykut and McPhee (1995): JGR, 100, 24,691-24,703.
+ !-----------------------------------------------------------------
+
+ deltaT = max((sst(i,j)-Tbot(i,j)),c0)
+
+ ! strocnx has units N/m^2 so strocnx/rho has units m^2/s^2
+ ustar = sqrt (sqrt(strocnxT(i,j)**2+strocnyT(i,j)**2)/rhow)
+ ustar = max (ustar,ustar_min)
+
+#if defined notz_experiment
+ fbot(i,j) = c0
+!#elif (defined pond_barrow || defined snowice_maksym)
+! fbot(i,j) = c0
+#elif defined notz_fieldwork
+ fbot(i,j) = cpchr * deltaT * ustar ! < 0
+#else
+ fbot(i,j) = cpchr * deltaT * ustar ! < 0
+ fbot(i,j) = max (fbot(i,j), frzmlt(i,j)) ! frzmlt < fbot < 0
+#endif
+
+!!! uncomment to use all frzmlt for standalone runs
+ ! fbot(i,j) = min (c0, frzmlt(i,j))
+
+ !-----------------------------------------------------------------
+ ! Compute rside. See these references:
+ ! Maykut and Perovich (1987): JGR, 92, 7032-7044
+ ! Steele (1992): JGR, 97, 17,729-17,738
+ !-----------------------------------------------------------------
+
+ wlat = m1 * deltaT**m2 ! Maykut & Perovich
+ rside(i,j) = wlat*dt*pi/(alpha*floediam) ! Steele
+ rside(i,j) = max(c0,min(rside(i,j),c1))
+
+ enddo ! ij
+
+ !-----------------------------------------------------------------
+ ! Compute heat flux associated with this value of rside.
+ !-----------------------------------------------------------------
+
+ do n = 1, ncat
+
+ do ij = 1, imelt
+ etot(ij) = c0
+ enddo
+
+ ! melting energy/unit area in each column, etot < 0
+
+ do k = 1, nslyr
+!DIR$ CONCURRENT !Cray
+!cdir nodep !NEC
+!ocl novrec !Fujitsu
+ do ij = 1, imelt
+ i = indxi(ij)
+ j = indxj(ij)
+ etot(ij) = etot(ij) + trcrn(i,j,nt_qsno+k-1,n) &
+ * vsnon(i,j,n)/real(nslyr,kind=dbl_kind)
+ enddo ! ij
+ enddo
+
+ do k = 1, nilyr
+!DIR$ CONCURRENT !Cray
+!cdir nodep !NEC
+!ocl novrec !Fujitsu
+ do ij = 1, imelt
+ i = indxi(ij)
+ j = indxj(ij)
+ etot(ij) = etot(ij) + trcrn(i,j,nt_qice+k-1,n) &
+ * vicen(i,j,n)/real(nilyr,kind=dbl_kind)
+ enddo ! ij
+ enddo ! nilyr
+
+!DIR$ CONCURRENT !Cray
+!cdir nodep !NEC
+!ocl novrec !Fujitsu
+ do ij = 1, imelt
+ i = indxi(ij)
+ j = indxj(ij)
+ ! lateral heat flux
+ fside(ij) = fside(ij) + rside(i,j)*etot(ij)/dt ! fside < 0
+ enddo ! ij
+
+ enddo ! n
+
+ !-----------------------------------------------------------------
+ ! Limit bottom and lateral heat fluxes if necessary.
+ !-----------------------------------------------------------------
+
+!DIR$ CONCURRENT !Cray
+!cdir nodep !NEC
+!ocl novrec !Fujitsu
+ do ij = 1, imelt
+ i = indxi(ij)
+ j = indxj(ij)
+
+ xtmp = frzmlt(i,j)/(fbot(i,j) + fside(ij) + puny)
+ xtmp = min(xtmp, c1)
+#if !(defined notz_experiment || defined notz_fieldwork || defined snowice_maksym || defined pond_barrow)
+ fbot(i,j) = fbot(i,j) * xtmp
+#endif
+ rside(i,j) = rside(i,j) * xtmp
+ enddo ! ij
+
+ deallocate(etot)
+ deallocate(fside)
+
+ end subroutine frzmlt_bottom_lateral
+
+!=======================================================================
+
+end module cice_test
+
Modified: branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_timestep.F
===================================================================
--- branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_timestep.F        2013-01-31 19:44:06 UTC (rev 2407)
+++ branches/cice_projects/initial_cice_core/src/core_cice/mpas_cice_timestep.F        2013-01-31 21:37:47 UTC (rev 2408)
@@ -1,7 +1,6 @@
module cice_timestep
use mpas_grid_types
- use cice_convert_to_CICE
implicit none
@@ -27,12 +26,18 @@
subroutine step_therm1(domain, dt)
+ use cice_test
+ use cice_state, only: ntrcr, nilyr, nt_qice, nt_qsno
+
type (domain_type), intent(inout) :: domain
real (kind=RKIND), intent(in) :: dt
integer :: nCells, nCategories
integer :: iCell
- type (struct_type) :: flux, state, tracer, mesh
+ type (block_type), pointer :: block
+ type (states_type), pointer :: states
+ type (tracer_type), pointer :: tracer
+ type (flux_type), pointer :: flux
! original non-local variables
real(kind=RKIND), dimension(1,1,1) :: &
@@ -56,63 +61,72 @@
Tbot, &
fbot
- mesh => domain % blocklist % mesh
- flux => domain % blocklist % flux
- staten => domain % blocklist % state
- tracer => domain % blocklist % tracer
-
- nCells = meshnnCells
- nCategories = mesh % nCategories
-
+ ! allocate local cice variables
allocate(vicen(1,1,nCategories,1))
allocate(vsnon(1,1,nCategories,1))
allocate(trcrn(1,1,ntrcr,nCategories,1))
- ! loop over all cells
- do iCell = 1, nCells
+ ! loop over blocks
+ block => domain % blocklist
+ do while (associated(block))
- ! state variable conversion
- aice(1,1,1) = state % iceAreaCell % array(iCell)
- vicen(1,1,:,1) = state % iceVolumeCell % array(iCell,:)
- vsnon(1,1,:,1) = state % snowVolumeCell % array(iCell,:)
+ ! loop over all cells
+ do iCell = 1, nCells
- ! flux varible conversion
- sst(1,1,1) = flux % seaSurfaceTemperature % array(iCell)
- Tf(1,1,1) = flux % seaFreezingTemperature % array(iCell)
- rside(1,1,1) = flux % iceLateralMeltFraction % array(iCell)
- frzmlt(1,1,1) = flux % seaFreezeMeltPotential % array(iCell)
+ ! structure pointers
+ states => block % states
+ tracer => block % tracer
+ flux => block % flux
- strocnxT(1,1,1) = c0
- strocnyT(1,1,1) = c0
-
- ! tracer conversion
- trcrn(1,1,nt_qice:nt_qice+nilyr-1,:,1) = tracer % iceVolumeLayerTracers % array(index_iceEnthalpy,:,iCell,:)
- trcrn(1,1,nt_qsno:nt_qsno+nilyr-1,:,1) = tracer % snowVolumeLayerTracers % array(index_snowEnthalpy,:,iCell,:)
-
- !!! BEGIN ORIGINAL CICE CALL
- !call frzmlt_bottom_lateral(1, 1, &
- ! 1, 1, 1, 1, &
- ! ntrcr, dt, &
- ! aice (:,:,:), frzmlt (:,:,:), &
- ! vicen (:,:,:,1), vsnon (:,:,:,:), &
- ! trcrn (:,:,1:ntrcr,:,:), &
- ! sst (:,:,:), Tf (:,:,:), &
- ! strocnxT(:,:,:), strocnyT(:,:,:), &
- ! Tbot, fbot, &
- ! rside (:,:,:))
- !!! END ORIGINAL CICE CALL
-
- ! state variable back conversion
- state % iceAreaCell % array(iCell) = aice(1,1,1)
- state % iceVolumeCell % array(iCell,:) = vicen(1,1,:,1)
- state % snowVolumeCell % array(iCell,:) = vsnon(1,1,:,1)
-
- ! tracer back conversion
- tracer % iceVolumeLayerTracers % array(index_iceEnthalpy,:,iCell,:) = trcrn(1,1,nt_qice:nt_qice+nilyr-1,:,1)
- tracer % snowVolumeLayerTracers % array(index_snowEnthalpy,:,iCell,:) = trcrn(1,1,nt_qsno:nt_qsno+nilyr-1,:,1)
-
- enddo ! iCell
-
+ ! state variable conversion
+ aice(1,1,1) = states % iceAreaCell % array(iCell)
+ vicen(1,1,:,1) = states % iceVolumeCategory % array(iCell,:)
+ vsnon(1,1,:,1) = states % snowVolumeCategory % array(iCell,:)
+
+ ! flux variable conversion
+ sst(1,1,1) = flux % seaSurfaceTemperature % array(iCell)
+ Tf(1,1,1) = flux % seaFreezingTemperature % array(iCell)
+ rside(1,1,1) = flux % iceLateralMeltFraction % array(iCell)
+ frzmlt(1,1,1) = flux % seaFreezeMeltPotential % array(iCell)
+
+ strocnxT(1,1,1) = 0.0_RKIND
+ strocnyT(1,1,1) = 0.0_RKIND
+
+ ! tracer conversion
+ trcrn(1,1,nt_qice:nt_qice+nilyr-1,:,1) = &
+ tracer % iceVolumeLayerTracers % array(tracer % index_iceEnthalpy,:,iCell,:)
+ trcrn(1,1,nt_qsno:nt_qsno+nilyr-1,:,1) = &
+ tracer % snowVolumeLayerTracers % array(tracer % index_snowEnthalpy,:,iCell,:)
+
+!!! BEGIN ORIGINAL CICE CALL
+ call frzmlt_bottom_lateral(1, 1, &
+ 1, 1, 1, 1, &
+ ntrcr, dt, &
+ aice (:,:,:), frzmlt (:,:,:), &
+ vicen (:,:,:,1), vsnon (:,:,:,:), &
+ trcrn (:,:,1:ntrcr,:,:), &
+ sst (:,:,:), Tf (:,:,:), &
+ strocnxT(:,:,:), strocnyT(:,:,:), &
+ Tbot, fbot, &
+ rside (:,:,:))
+!!! END ORIGINAL CICE CALL
+
+ ! state variable back conversion
+ states % iceAreaCell % array(iCell) = aice(1,1,1)
+ states % iceVolumeCategory % array(iCell,:) = vicen(1,1,:,1)
+ states % snowVolumeCategory % array(iCell,:) = vsnon(1,1,:,1)
+
+ ! tracer back conversion
+ tracer % iceVolumeLayerTracers % array(tracer % index_iceEnthalpy,:,iCell,:) = &
+ trcrn(1,1,nt_qice:nt_qice+nilyr-1,:,1)
+ tracer % snowVolumeLayerTracers % array(tracer % index_snowEnthalpy,:,iCell,:) = &
+ trcrn(1,1,nt_qsno:nt_qsno+nilyr-1,:,1)
+
+ enddo ! iCell
+
+ block => block % next
+ end do ! blocks
+
! clean up original variables
deallocate(vicen)
deallocate(vsnon)
</font>
</pre>