-
Notifications
You must be signed in to change notification settings - Fork 281
Zero'ing surface fluxes below tabular icebergs #388
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
Merged
adcroft
merged 1 commit into
mom-ocean:dev/master
from
sternalon:zeroing_out_frazil_from_dev_master
Dec 1, 2016
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -157,6 +157,7 @@ module ocean_model_mod | |
| logical :: use_ice_shelf ! If true, the ice shelf model is enabled. | ||
| logical :: icebergs_apply_rigid_boundary ! If true, the icebergs can change ocean bd condition. | ||
| real :: kv_iceberg ! The viscosity of the icebergs in m2/s (for ice rigidity) | ||
| real :: Lat_fusion ! Latent heat of fusio | ||
| real :: density_iceberg ! A typical density of icebergs in kg/m3 (for ice rigidity) | ||
| type(ice_shelf_CS), pointer :: Ice_shelf_CSp => NULL() | ||
| logical :: restore_salinity ! If true, the coupled MOM driver adds a term to | ||
|
|
@@ -293,6 +294,8 @@ subroutine ocean_model_init(Ocean_sfc, OS, Time_init, Time_in) | |
| "The viscosity of the icebergs", units="m2 s-1",default=1.0e10) | ||
| call get_param(param_file, mod, "DENSITY_ICEBERGS", OS%density_iceberg, & | ||
| "A typical density of icebergs.", units="kg m-3", default=917.0) | ||
| call get_param(param_file, mod, "Lat_fusion", OS%Lat_fusion, & | ||
| "Latent heat of fusion for ice", units="J kg-1",default=3.34e5) | ||
| endif | ||
|
|
||
| OS%press_to_z = 1.0/(Rho0*G_Earth) | ||
|
|
@@ -420,7 +423,7 @@ subroutine update_ocean_model(Ice_ocean_boundary, OS, Ocean_sfc, & | |
| endif | ||
| if (OS%icebergs_apply_rigid_boundary) then | ||
| !This assumes that the iceshelf and ocean are on the same grid. I hope this is true | ||
| call add_berg_flux_to_shelf(OS%grid, OS%fluxes,OS%use_ice_shelf,OS%density_iceberg,OS%kv_iceberg) | ||
| call add_berg_flux_to_shelf(OS%grid, OS%fluxes,OS%use_ice_shelf,OS%density_iceberg,OS%kv_iceberg, OS%Lat_fusion, OS%State, time_step) | ||
| endif | ||
| ! Indicate that there are new unused fluxes. | ||
| OS%fluxes%fluxes_used = .false. | ||
|
|
@@ -434,7 +437,7 @@ subroutine update_ocean_model(Ice_ocean_boundary, OS, Ocean_sfc, & | |
| endif | ||
| if (OS%icebergs_apply_rigid_boundary) then | ||
| !This assumes that the iceshelf and ocean are on the same grid. I hope this is true | ||
| call add_berg_flux_to_shelf(OS%grid, OS%flux_tmp, OS%use_ice_shelf,OS%density_iceberg,OS%kv_iceberg) | ||
| call add_berg_flux_to_shelf(OS%grid, OS%flux_tmp, OS%use_ice_shelf,OS%density_iceberg,OS%kv_iceberg, OS%Lat_fusion, OS%State, time_step) | ||
| endif | ||
|
|
||
| call forcing_accumulate(OS%flux_tmp, OS%fluxes, time_step, OS%grid, weight) | ||
|
|
@@ -503,15 +506,19 @@ end subroutine update_ocean_model | |
| ! </DESCRIPTION> | ||
| ! | ||
|
|
||
| subroutine add_berg_flux_to_shelf(G, fluxes, use_ice_shelf, density_ice, kv_ice) | ||
| subroutine add_berg_flux_to_shelf(G, fluxes, use_ice_shelf, density_ice, kv_ice, Lat_fusion, state, time_step) | ||
| type(ocean_grid_type), intent(inout) :: G | ||
| type(forcing), intent(inout) :: fluxes | ||
| type(surface), intent(inout) :: state | ||
| logical, intent(in) :: use_ice_shelf | ||
| real, intent(in) :: kv_ice ! The viscosity of ice, in m2 s-1. | ||
| real, intent(in) :: density_ice ! A typical density of ice, in kg m-3. | ||
| real, intent(in) :: Lat_fusion ! The latent heat of fusion, in J kg-1. | ||
| real, intent(in) :: time_step ! The latent heat of fusion, in J kg-1. | ||
| ! Arguments: | ||
| ! (in) fluxes - A structure of surface fluxes that may be used. | ||
| ! (in) G - The ocean's grid structure. | ||
| real :: fraz ! refreezing rate in kg m-2 s-1 | ||
| integer :: i, j, is, ie, js, je, isd, ied, jsd, jed | ||
| is = G%isc ; ie = G%iec ; js = G%jsc ; je = G%jec | ||
| isd = G%isd ; jsd = G%jsd ; ied = G%ied ; jed = G%jed | ||
|
|
@@ -559,6 +566,33 @@ subroutine add_berg_flux_to_shelf(G, fluxes, use_ice_shelf, density_ice, kv_ice) | |
| max(fluxes%mass_berg(i,j), fluxes%mass_berg(i,j+1))) | ||
| enddo ; enddo | ||
| call pass_vector(fluxes%frac_shelf_u, fluxes%frac_shelf_v, G%domain, TO_ALL, CGRID_NE) | ||
|
|
||
| !Zero'ing out other fluxes under the tabular icebergs | ||
| do j=jsd,jed ; do i=isd,ied | ||
| if (fluxes%frac_shelf_h(i,j) > 0.5) then !Only applying for ice shelf covering most of cell | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will this affect any other experiments? If we make this "0.5" a run-time parameter we could at least turn off the zero'ing. |
||
|
|
||
| if (associated(fluxes%sw)) fluxes%sw(i,j) = 0.0 | ||
| if (associated(fluxes%lw)) fluxes%lw(i,j) = 0.0 | ||
| if (associated(fluxes%latent)) fluxes%latent(i,j) = 0.0 | ||
| if (associated(fluxes%evap)) fluxes%evap(i,j) = 0.0 | ||
|
|
||
| ! Add frazil formation diagnosed by the ocean model (J m-2) in the | ||
| ! form of surface layer evaporation (kg m-2 s-1). Update lprec in the | ||
| ! control structure for diagnostic purposes. | ||
|
|
||
| if (associated(state%frazil)) then | ||
| fraz = state%frazil(i,j) / time_step / Lat_fusion | ||
| if (associated(fluxes%evap)) fluxes%evap(i,j) = fluxes%evap(i,j) - fraz | ||
| !CS%lprec(i,j)=CS%lprec(i,j) - fraz | ||
| state%frazil(i,j) = 0.0 | ||
| endif | ||
|
|
||
| !Alon: Should these be set to zero too? | ||
| if (associated(fluxes%sens)) fluxes%sens(i,j) = 0.0 | ||
| if (associated(fluxes%salt_flux)) fluxes%salt_flux(i,j) = 0.0 | ||
| if (associated(fluxes%lprec)) fluxes%lprec(i,j) = 0.0 | ||
| endif | ||
| enddo ; enddo | ||
|
|
||
| end subroutine add_berg_flux_to_shelf | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run-time parameters are upper case by convention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out we already have this parameter called LATENT_HEAT_FUSION so I'm using that...