Skip to content

Commit

Permalink
Fix formatting in physics/GFS_phys_time_vary.fv3.F90
Browse files Browse the repository at this point in the history
  • Loading branch information
climbfuji committed Jan 26, 2021
1 parent 79dd17e commit a5547cb
Showing 1 changed file with 25 additions and 23 deletions.
48 changes: 25 additions & 23 deletions physics/GFS_phys_time_vary.fv3.F90
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ subroutine GFS_phys_time_vary_init (
integer, intent(inout) :: jindx1_ci(:), jindx2_ci(:), iindx1_ci(:), iindx2_ci(:)
real(kind_phys), intent(inout) :: ddy_ci(:), ddx_ci(:)
integer, intent(inout) :: imap(:), jmap(:)

logical, intent(in) :: do_ugwp_v1
real(kind_phys), intent(inout) :: ddy_j1tau(:), ddy_j2tau(:)
integer, intent(inout) :: jindx1_tau(:), jindx2_tau(:)
Expand All @@ -108,7 +107,7 @@ subroutine GFS_phys_time_vary_init (
!$OMP shared (jindx1_o3,jindx2_o3,ddy_o3,jindx1_h,jindx2_h,ddy_h) &
!$OMP shared (jindx1_aer,jindx2_aer,ddy_aer,iindx1_aer,iindx2_aer,ddx_aer) &
!$OMP shared (jindx1_ci,jindx2_ci,ddy_ci,iindx1_ci,iindx2_ci,ddx_ci) &
!$OMP shared (do_ugwp_v1, jindx1_tau, jindx2_tau, ddy_j1tau, ddy_j2tau) &
!$OMP shared (do_ugwp_v1,jindx1_tau,jindx2_tau,ddy_j1tau,ddy_j2tau) &
!$OMP private (ix,i,j)

!$OMP sections
Expand Down Expand Up @@ -185,11 +184,13 @@ subroutine GFS_phys_time_vary_init (
! No consistency check needed for in/ccn data, all values are
! hardcoded in module iccn_def.F and GFS_typedefs.F90
endif
!$OMP section

!$OMP section
!> - Call tau_amf dats for ugwp_v1
if (do_ugwp_v1) then
call read_tau_amf(me, master, errmsg, errflg)
endif
if (do_ugwp_v1) then
call read_tau_amf(me, master, errmsg, errflg)
endif

!$OMP end sections

! Need an OpenMP barrier here (implicit in "end sections")
Expand Down Expand Up @@ -224,12 +225,14 @@ subroutine GFS_phys_time_vary_init (
jindx2_ci, ddy_ci, xlon_d, &
iindx1_ci, iindx2_ci, ddx_ci)
endif

!$OMP section
!> - Call cires_indx_ugwp to read monthly-mean GW-tau diagnosed from FV3GFS-runs that can resolve GWs
if (do_ugwp_v1) then
call cires_indx_ugwp (im, me, master, xlat_d, jindx1_tau, jindx2_tau, &
ddy_j1tau, ddy_j2tau)
endif

!$OMP section
!--- initial calculation of maps local ix -> global i and j
ix = 0
Expand Down Expand Up @@ -292,7 +295,7 @@ subroutine GFS_phys_time_vary_timestep_init (
tsfc, tsfco, tisfc, hice, fice, facsf, facwf, alvsf, alvwf, alnsf, alnwf, zorli, zorll, &
zorlo, weasd, slope, snoalb, canopy, vfrac, vtype, stype, shdmin, shdmax, snowd, &
cv, cvb, cvt, oro, oro_uf, xlat_d, xlon_d, slmsk, &
do_ugwp_v1, jindx1_tau, jindx2_tau, ddy_j1tau, ddy_j2tau, tau_amf, errmsg, errflg)
do_ugwp_v1, jindx1_tau, jindx2_tau, ddy_j1tau, ddy_j2tau, tau_amf, errmsg, errflg)

implicit none

Expand All @@ -316,19 +319,17 @@ subroutine GFS_phys_time_vary_timestep_init (
real(kind_phys), intent(in) :: prsl(:,:)
integer, intent(in) :: seed0
real(kind_phys), intent(inout) :: rann(:,:)

logical, intent(in) :: do_ugwp_v1
integer, intent(in) :: jindx1_tau(:), jindx2_tau(:)
real(kind_phys), intent(in) :: ddy_j1tau(:), ddy_j2tau(:)
real(kind_phys), intent(inout) :: tau_amf(:)
real(kind_phys), intent(in) :: ddy_j1tau(:), ddy_j2tau(:)
real(kind_phys), intent(inout) :: tau_amf(:)

! For gcycle only
integer, intent(in) :: nthrds, nx, ny, nsst, tile_num, nlunit, lsoil
integer, intent(in) :: lsoil_lsm, kice, ialb, isot, ivegsrc
character(len=*), intent(in) :: input_nml_file(:)

logical, intent(in) :: use_ufo, nst_anl, frac_grid

real(kind_phys), intent(in) :: fhcyc, phour, lakefrac(:), min_seaice, min_lakeice, &
xlat_d(:), xlon_d(:)
real(kind_phys), intent(inout) :: smc(:,:), slc(:,:), stc(:,:), smois(:,:), sh2o(:,:), &
Expand All @@ -337,7 +338,7 @@ subroutine GFS_phys_time_vary_timestep_init (
facsf(:), facwf(:), alvsf(:), alvwf(:), alnsf(:), alnwf(:), &
zorli(:), zorll(:), zorlo(:), weasd(:), slope(:), snoalb(:), &
canopy(:), vfrac(:), vtype(:), stype(:), shdmin(:), shdmax(:), &
snowd(:), cv(:), cvb(:), cvt(:), oro(:), oro_uf(:), slmsk(:)
snowd(:), cv(:), cvb(:), cvt(:), oro(:), oro_uf(:), slmsk(:)
!
character(len=*), intent(out) :: errmsg
integer, intent(out) :: errflg
Expand Down Expand Up @@ -431,13 +432,14 @@ subroutine GFS_phys_time_vary_timestep_init (
iindx2_ci, ddx_ci, &
levs, prsl, in_nm, ccn_nm)
endif

!> - Call cires_indx_ugwp to read monthly-mean GW-tau diagnosed from FV3GFS-runs that resolve GW-activ
if (do_ugwp_v1) then
call tau_amf_interp(me, master, im, idate,fhour, &
jindx1_tau, jindx2_tau, ddy_j1tau, ddy_j2tau, tau_amf)
call tau_amf_interp(me, master, im, idate, fhour, &
jindx1_tau, jindx2_tau, &
ddy_j1tau, ddy_j2tau, tau_amf)
endif

!> - Call gcycle() to repopulate specific time-varying surface properties for AMIP/forecast runs
if (nscyc > 0) then
if (mod(kdt,nscyc) == 1) THEN
Expand Down Expand Up @@ -512,12 +514,12 @@ subroutine GFS_phys_time_vary_finalize(errmsg, errflg)
if (allocated(ciplin) ) deallocate(ciplin)
if (allocated(ccnin) ) deallocate(ccnin)
if (allocated(ci_pres) ) deallocate(ci_pres)
! Deallocate UGWP-input arrays
if (allocated (ugwp_taulat)) deallocate(ugwp_taulat)
if (allocated (tau_limb)) deallocate (tau_limb)

! Deallocate UGWP-input arrays
if (allocated (ugwp_taulat)) deallocate(ugwp_taulat)
if (allocated (tau_limb)) deallocate (tau_limb)
if (allocated (days_limb)) deallocate(days_limb)

is_initialized = .false.

end subroutine GFS_phys_time_vary_finalize
Expand Down

0 comments on commit a5547cb

Please sign in to comment.