Skip to content

Commit

Permalink
Merge pull request #11 from juliaputko/uvic_ice_jp
Browse files Browse the repository at this point in the history
info for dimensions, addition to salinity is commented, if uncommente…
  • Loading branch information
PatrickFarnole authored Jul 20, 2021
2 parents 6e4d1b8 + 2f08c13 commit b3e316f
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
2 changes: 1 addition & 1 deletion extern/flexout
2 changes: 1 addition & 1 deletion extern/stim
4 changes: 3 additions & 1 deletion src/gotm/gotm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ module gotm

#ifdef _ICE_
use ice, only: init_ice, post_init_ice, do_ice, clean_ice, ice_cover
use stim_variables, only: Tice_surface,albedo_ice,transmissivity, nilay
use stim_variables, only: Tice_surface,albedo_ice,transmissivity,nilay,ice_uvic_Tice
#endif

use turbulence, only: turb_method
Expand Down Expand Up @@ -413,7 +413,9 @@ subroutine initialize_gotm()
call fm%register_dimension('lat',1,id=id_dim_lat)
call fm%register_dimension('z',nlev,id=id_dim_z)
call fm%register_dimension('zi',nlev+1,id=id_dim_zi)
call fm%register_dimension('z1',nilay,id=id_dim_z1)
call fm%register_dimension('zice',nilay+1,id=id_dim_zice) !jpnote
call fm%register_dimension('dzice',nilay,id=id_dim_dzice) !jpnote
call fm%register_dimension('time',id=id_dim_time)
call fm%initialize(prepend_by_default=(/id_dim_lon,id_dim_lat/),append_by_default=(/id_dim_time/))

Expand Down
19 changes: 12 additions & 7 deletions src/gotm/register_all_variables.F90
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ subroutine register_stim_variables(nlev)
use stim_variables, only: ice_hi,ice_hs,ice_uvic_hm,ice_uvic_ts,ice_uvic_tb,ice_uvic_swr_0,ice_uvic_precip_i,ice_uvic_sfall_i,ice_uvic_parb,ice_uvic_parui
use stim_variables, only: ice_uvic_Fh,ice_uvic_Fs,ice_uvic_Ff,ice_uvic_Sicebulk
use stim_variables, only: ice_uvic_topmelt,ice_uvic_botmelt,ice_uvic_termelt,ice_uvic_topgrowth,ice_uvic_botgrowth
use stim_variables, only: ice_uvic_Hmix,ice_uvic_Aice,ice_uvic_asnow,ice_uvic_Amelt,ice_uvic_dzi,ice_uvic_Cond,ice_uvic_rhoCp,ice_uvic_zi,ice_uvic_Tice,ice_uvic_Sint,ice_uvic_Pari
use stim_variables, only: ice_uvic_Hmix,ice_uvic_Aice,ice_uvic_asnow,ice_uvic_Amelt,ice_uvic_dzi,ice_uvic_Cond,ice_uvic_rhoCp,ice_uvic_zi,ice_uvic_zice,ice_uvic_dzice,ice_uvic_Tice,ice_uvic_Sint,ice_uvic_Pari
use stim_variables, only: nilay
use stim_variables, only: ocean_ice_flux
! use stim_variables, only: hsmin, PenFrac, hlaymin
Expand Down Expand Up @@ -273,14 +273,19 @@ subroutine register_stim_variables(nlev)
call fm%register('Amelt', '', 'fraction of ice area that is melt pond', standard_name='', data0d=ice_uvic_Amelt, category='ice')
!call fm%register('h', '', '', standard_name='', data0d=, category='ice')

!nilay or nlev? ??jpnote
!---------------------------- jpnote
call fm%register('ice_zi', 'm', 'Ice interface depth', standard_name='', data0d=ice_uvic_zi(nilay+1), category='ice') !???
call fm%register('dzi', 'm', 'Ice layer thickness', standard_name='', data0d=ice_uvic_dzi(nilay), category='ice')
call fm%register('Cond', 'W m-1 kg-1', 'Ice conductivity', standard_name='',data0d=ice_uvic_Cond(nilay), category='ice')
call fm%register('rhoCp', '10^6 J m-3 K-1', 'volum heat capacity', standard_name='', data0d=ice_uvic_rhoCp(nilay), category='ice')
call fm%register('ice_dzi', 'm', 'Ice interface depth', standard_name='', data0d=ice_uvic_dzi(nilay), category='ice')
call fm%register('ice_zice', 'layers', 'zice', standard_name='', data0d=ice_uvic_zice(nilay+1), category='ice')
call fm%register('ice_dzice', 'layer', 'dzice', standard_name='', data0d=ice_uvic_dzice(nilay), category='ice')

!--------------------------

call fm%register('dzi', 'm', 'Ice layer thickness', standard_name='', dimensions=(/id_dim_dzice/), data1d=ice_uvic_dzi(1:nilay), category='ice')

!Causing error for now jpnote
call fm%register('Tice', 'Celsius', 'Ice slab temperature', standard_name='',dimensions=(/id_dim_zice/), data1d=ice_uvic_Tice(0:nilay), category='ice')
call fm%register('Cond', 'W m-1 kg-1', 'Ice conductivity', standard_name='',dimensions=(/id_dim_dzice/),data1d=ice_uvic_Cond(1:nilay), category='ice')
call fm%register('rhoCp', '10^6 J m-3 K-1', 'volum heat capacity', standard_name='',dimensions=(/id_dim_dzice/), data1d=ice_uvic_rhoCp(1:nilay), category='ice')
call fm%register('Tice', 'Celsius', 'Ice slab temperature', standard_name='',dimensions=(/id_dim_zice/), data1d=ice_uvic_Tice(2:nilay+2), category='ice') ! jpnote: changed range so that it matched the mortenson output
call fm%register('Sint', 'W m-3', 'Ice SW internal heat', standard_name='',dimensions=(/id_dim_zice/),data1d=ice_uvic_Sint(1:nilay+1), category='ice')
call fm%register('Pari', 'W m-2', 'PAR radiation in ice', standard_name='',dimensions=(/id_dim_zice/), data1d=ice_uvic_Pari(1:nilay+1), category='ice')
!--------------------------------------------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions src/meanflow/salinity.F90
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ subroutine salinity(nlev,dt,cnpar,nus,gams)
! set boundary conditions
DiffBcup = Neumann
DiffBcdw = Neumann
!----------------- jp added : uncomment for test
!precip%value = 0.0 !jpnote precip reset -- resolves kb error (not reading precip_EC.dat file correctly? )
!------------------
DiffSup = -S(nlev)*(precip%value+evap)
DiffSdw = _ZERO_

Expand Down

0 comments on commit b3e316f

Please sign in to comment.