Store the reference profile at h points for a variable.
Definition at line 33 of file MOM_ALE_sponge.F90.
|
subroutine | set_up_ale_sponge_field_fixed (sp_val, G, f_ptr, CS) |
| This subroutine stores the reference profile at h points for the variable whose address is given by f_ptr. More...
|
|
subroutine | set_up_ale_sponge_field_varying (filename, fieldname, Time, G, GV, US, f_ptr, CS) |
| This subroutine stores the reference profile at h points for the variable whose address is given by filename and fieldname. More...
|
|
◆ set_up_ale_sponge_field_fixed()
subroutine mom_ale_sponge::set_up_ale_sponge_field::set_up_ale_sponge_field_fixed |
( |
real, dimension( g %isd: g %ied, g %jsd: g %jed,cs%nz_data), intent(in) |
sp_val, |
|
|
type(ocean_grid_type), intent(in) |
G, |
|
|
real, dimension( g %isd: g %ied, g %jsd: g %jed, g %ke), intent(in), target |
f_ptr, |
|
|
type(ale_sponge_cs), pointer |
CS |
|
) |
| |
|
private |
This subroutine stores the reference profile at h points for the variable whose address is given by f_ptr.
- Parameters
-
[in] | g | Grid structure |
| cs | ALE sponge control structure (in/out). |
[in] | sp_val | Field to be used in the sponge, it has arbitrary number of layers. |
[in] | f_ptr | Pointer to the field to be damped |
Definition at line 534 of file MOM_ALE_sponge.F90.
534 type(ocean_grid_type),
intent(in) :: G
535 type(ALE_sponge_CS),
pointer :: CS
536 real,
dimension(SZI_(G),SZJ_(G),CS%nz_data), &
538 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)), &
539 target,
intent(in) :: f_ptr
542 character(len=256) :: mesg
544 if (.not.
associated(cs))
return
546 cs%fldno = cs%fldno + 1
548 if (cs%fldno > max_fields_)
then
549 write(mesg,
'("Increase MAX_FIELDS_ to at least ",I3," in MOM_memory.h or decrease &
550 &the number of fields to be damped in the call to &
551 &initialize_sponge." )') cs%fldno
552 call mom_error(fatal,
"set_up_ALE_sponge_field: "//mesg)
556 allocate(cs%Ref_val(cs%fldno)%p(cs%nz_data,cs%num_col))
557 cs%Ref_val(cs%fldno)%p(:,:) = 0.0
560 cs%Ref_val(cs%fldno)%p(k,col) = sp_val(cs%col_i(col),cs%col_j(col),k)
564 cs%var(cs%fldno)%p => f_ptr
◆ set_up_ale_sponge_field_varying()
subroutine mom_ale_sponge::set_up_ale_sponge_field::set_up_ale_sponge_field_varying |
( |
character(len=*), intent(in) |
filename, |
|
|
character(len=*), intent(in) |
fieldname, |
|
|
type(time_type), intent(in) |
Time, |
|
|
type(ocean_grid_type), intent(in) |
G, |
|
|
type(verticalgrid_type), intent(in) |
GV, |
|
|
type(unit_scale_type), intent(in) |
US, |
|
|
real, dimension( g %isd: g %ied, g %jsd: g %jed, g %ke), intent(in), target |
f_ptr, |
|
|
type(ale_sponge_cs), pointer |
CS |
|
) |
| |
|
private |
This subroutine stores the reference profile at h points for the variable whose address is given by filename and fieldname.
- Parameters
-
[in] | filename | The name of the file with the time varying field data |
[in] | fieldname | The name of the field in the file with the time varying field data |
[in] | time | The current model time |
[in] | g | Grid structure (in). |
[in] | gv | ocean vertical grid structure |
[in] | us | A dimensional unit scaling type |
[in] | f_ptr | Pointer to the field to be damped (in). |
| cs | Sponge control structure (in/out). |
Definition at line 571 of file MOM_ALE_sponge.F90.
571 character(len=*),
intent(in) :: filename
573 character(len=*),
intent(in) :: fieldname
575 type(time_type),
intent(in) :: Time
576 type(ocean_grid_type),
intent(in) :: G
577 type(verticalGrid_type),
intent(in) :: GV
578 type(unit_scale_type),
intent(in) :: US
579 real,
dimension(SZI_(G),SZJ_(G),SZK_(G)), &
580 target,
intent(in) :: f_ptr
581 type(ALE_sponge_CS),
pointer :: CS
584 real,
allocatable,
dimension(:,:,:) :: sp_val
585 real,
allocatable,
dimension(:,:,:) :: mask_z
586 real,
allocatable,
dimension(:),
target :: z_in, z_edges_in
587 real :: missing_value
589 integer :: isd,ied,jsd,jed
591 integer,
dimension(4) :: fld_sz
593 character(len=256) :: mesg
595 real,
dimension(:),
allocatable :: tmpT1d
596 real :: zTopOfCell, zBottomOfCell
597 type(remapping_CS) :: remapCS
599 if (.not.
associated(cs))
return
601 call time_interp_external_init()
602 isd = g%isd; ied = g%ied; jsd = g%jsd; jed = g%jed
603 cs%fldno = cs%fldno + 1
604 if (cs%fldno > max_fields_)
then
605 write(mesg,
'("Increase MAX_FIELDS_ to at least ",I3," in MOM_memory.h or decrease &
606 &the number of fields to be damped in the call to &
607 &initialize_sponge." )') cs%fldno
608 call mom_error(fatal,
"set_up_ALE_sponge_field: "//mesg)
612 if (cs%spongeDataOngrid)
then
613 cs%Ref_val(cs%fldno)%id = init_external_field(filename, fieldname,domain=g%Domain%mpp_domain)
615 cs%Ref_val(cs%fldno)%id = init_external_field(filename, fieldname)
618 fld_sz = get_external_field_size(cs%Ref_val(cs%fldno)%id)
620 cs%Ref_val(cs%fldno)%nz_data = nz_data
621 cs%Ref_val(cs%fldno)%num_tlevs = fld_sz(4)
624 allocate(cs%Ref_val(cs%fldno)%p(nz_data,cs%num_col))
625 cs%Ref_val(cs%fldno)%p(:,:) = 0.0
626 allocate( cs%Ref_val(cs%fldno)%h(nz_data,cs%num_col) )
627 cs%Ref_val(cs%fldno)%h(:,:) = 0.0
628 cs%var(cs%fldno)%p => f_ptr
The documentation for this interface was generated from the following file:
- /glade/work/altuntas/cesm.sandboxes/cesm2_2_alpha_X_mom/components/mom/MOM6/src/parameterizations/vertical/MOM_ALE_sponge.F90