Skip to content

Commit

Permalink
add optional attributes for conditionally-allocated variables in FA M…
Browse files Browse the repository at this point in the history
…P, MYJ SFC/PBL, remove F77 continuation formatting
  • Loading branch information
grantfirl committed Jun 6, 2024
1 parent 47dec94 commit f4e0fa1
Show file tree
Hide file tree
Showing 6 changed files with 143 additions and 116 deletions.
2 changes: 1 addition & 1 deletion physics/MP/Ferrier_Aligo/mp_fer_hires.F90
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV &
real(kind_phys), intent(in ) :: epsq,r_d,p608,cp,g
real(kind_phys), intent(inout) :: t(:,:)
real(kind_phys), intent(inout) :: q(:,:)
real(kind_phys), intent(inout) :: train(:,:)
real(kind_phys), intent(inout), optional :: train(:,:)
real(kind_phys), intent(out ) :: sr(:)
real(kind_phys), intent(inout) :: qc(:,:)
real(kind_phys), intent(inout) :: qr(:,:)
Expand Down
1 change: 1 addition & 0 deletions physics/MP/Ferrier_Aligo/mp_fer_hires.meta
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
type = real
kind = kind_phys
intent = inout
optional = True
[sr]
standard_name = ratio_of_snowfall_to_rainfall
long_name = snow ratio: ratio of snow to total precipitation (explicit only)
Expand Down
82 changes: 41 additions & 41 deletions physics/PBL/MYJ/myjpbl_wrapper.F90
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,29 @@ end subroutine myjpbl_wrapper_init
!!
!###===================================================================
SUBROUTINE myjpbl_wrapper_run( &
& restart,do_myjsfc, &
& im,levs,dt_phs, &
& kdt,ntrac,ntke, &
& ntcw,ntiw,ntrw,ntsw,ntgl, &
& ugrs, vgrs, tgrs, qgrs, &
& prsl, prsi, phii, hprime1, &
& prsik_1, prslk_1, prslki, tsfc, qsfc, &
& phy_myj_qsfc, phy_myj_thz0, phy_myj_qz0, &
& phy_myj_uz0, phy_myj_vz0, phy_myj_z0base, &
& phy_myj_akhs, phy_myj_akms, &
& phy_myj_chkqlm, phy_myj_elflx, &
& phy_myj_a1u, phy_myj_a1t, phy_myj_a1q, &
& pblh, kpbl, kinver, slmsk, &
& garea, ustar, cm, ch, wind, &
& snowd, zorl, evap, hflx, &
& dudt, dvdt, dtdt, dqdt, &
& dusfc,dvsfc,dtsfc,dqsfc, &
& dkt,xkzm_m, xkzm_h,xkzm_s, gamt,gamq, &
& con_cp,con_g,con_rd, &
& me, lprnt, gen_tend, ldiag3d, dtend, dtidx, &
& index_of_temperature, index_of_x_wind, &
& index_of_y_wind, index_of_process_pbl, &
& ntqv, errmsg, errflg )
restart,do_myjsfc, &
im,levs,dt_phs, &
kdt,ntrac,ntke, &
ntcw,ntiw,ntrw,ntsw,ntgl, &
ugrs, vgrs, tgrs, qgrs, &
prsl, prsi, phii, hprime1, &
prsik_1, prslk_1, prslki, tsfc, qsfc, &
phy_myj_qsfc, phy_myj_thz0, phy_myj_qz0, &
phy_myj_uz0, phy_myj_vz0, phy_myj_z0base, &
phy_myj_akhs, phy_myj_akms, &
phy_myj_chkqlm, phy_myj_elflx, &
phy_myj_a1u, phy_myj_a1t, phy_myj_a1q, &
pblh, kpbl, kinver, slmsk, &
garea, ustar, cm, ch, wind, &
snowd, zorl, evap, hflx, &
dudt, dvdt, dtdt, dqdt, &
dusfc,dvsfc,dtsfc,dqsfc, &
dkt,xkzm_m, xkzm_h,xkzm_s, gamt,gamq, &
con_cp,con_g,con_rd, &
me, lprnt, gen_tend, ldiag3d, dtend, dtidx, &
index_of_temperature, index_of_x_wind, &
index_of_y_wind, index_of_process_pbl, &
ntqv, errmsg, errflg )

!

Expand Down Expand Up @@ -92,7 +92,7 @@ SUBROUTINE myjpbl_wrapper_run( &
real(kind=kind_phys), intent(inout), optional :: dtend(:,:,:)
integer, intent(in) :: dtidx(:,:)
integer, intent(in) :: index_of_temperature, index_of_x_wind, &
& index_of_y_wind, index_of_process_pbl, ntqv
index_of_y_wind, index_of_process_pbl, ntqv

!MYJ-1D
integer,intent(in) :: im, levs
Expand All @@ -104,26 +104,26 @@ SUBROUTINE myjpbl_wrapper_run( &

!MYJ-2D
real(kind=kind_phys),dimension(:),intent(in) :: &
& prsik_1, prslk_1, prslki, slmsk, garea, &
prsik_1, prslk_1, prslki, slmsk, garea, &
snowd, evap, hflx, cm, ch, wind, hprime1
real(kind=kind_phys),dimension(:),intent(inout) :: &
& zorl, ustar, tsfc, qsfc
real(kind=kind_phys),dimension(:),intent(inout) :: &
& phy_myj_qsfc, phy_myj_thz0, phy_myj_qz0, &
& phy_myj_uz0, phy_myj_vz0, phy_myj_z0base, &
& phy_myj_akhs, phy_myj_akms, &
& phy_myj_chkqlm, phy_myj_elflx, &
& phy_myj_a1u, phy_myj_a1t, phy_myj_a1q
zorl, ustar, tsfc, qsfc
real(kind=kind_phys),dimension(:),intent(inout),optional :: &
phy_myj_thz0, phy_myj_z0base, phy_myj_chkqlm, &
phy_myj_akhs, phy_myj_akms, phy_myj_qz0, &
phy_myj_qsfc, phy_myj_elflx, phy_myj_a1u, &
phy_myj_a1t, phy_myj_a1q, phy_myj_uz0, &
phy_myj_vz0
real(kind=kind_phys),dimension(:),intent(out) :: &
& pblh,dusfc,dvsfc,dtsfc,dqsfc,gamt,gamq
pblh,dusfc,dvsfc,dtsfc,dqsfc,gamt,gamq
integer,dimension(:),intent(out) :: kpbl
integer,dimension(:),intent(in) :: kinver

!MYJ-3D
real(kind=kind_phys),dimension(:,:),intent(in) :: &
phii, prsi
real(kind=kind_phys),dimension(:,:),intent(in) :: &
& ugrs, vgrs, tgrs, prsl
ugrs, vgrs, tgrs, prsl
! real(kind=kind_phys),dimension(:,:),intent(inout) :: &
! dudt, dvdt, dtdt, dkt
real(kind=kind_phys),dimension(:,:),intent(inout) :: &
Expand All @@ -133,7 +133,7 @@ SUBROUTINE myjpbl_wrapper_run( &

!MYJ-4D
real(kind=kind_phys),dimension(:,:,:),intent(inout) :: &
& qgrs,dqdt
qgrs,dqdt

!LOCAL
integer :: ntsd, k, k1, i, kx1
Expand All @@ -150,8 +150,8 @@ SUBROUTINE myjpbl_wrapper_run( &
ustar1,z0,pblh_myj, &
elflx,mixht,ct
real(kind=kfpt), dimension(im,levs) :: &
& u_myj, v_myj, t_myj, q_myj, th_myj, &
& cw, dz_myj, pmid, q2, exner, del
u_myj, v_myj, t_myj, q_myj, th_myj, &
cw, dz_myj, pmid, q2, exner, del
real(kind=kfpt), dimension(im,levs+1) :: pint
real(kind=kfpt),dimension(im,levs) :: &
rublten,rvblten,rthblten,rqvblten,rqcblten
Expand All @@ -161,15 +161,15 @@ SUBROUTINE myjpbl_wrapper_run( &
real(kind=kfpt),dimension(im) :: thlm,qlm
real(kind=kfpt),dimension(im,13) :: phy_f2d_myj
real(kind=kfpt), dimension(im,levs) :: xcofh &
& ,xkzo,xkzmo
,xkzo,xkzmo
real(kind=kind_phys) :: g, r_d, g_inv, cappa
real(kind=kind_phys) :: thz0, qz0, a1u, a1t, a1q
real(kind=kind_phys) :: z0m, aa1u, aa1t, z1uov, z1tox
real(kind=kind_phys) :: tmax,tmin,t_myj1
real(kind=kind_phys),dimension(im) :: &
& thsfc,sfcz,tsfc1, &
& sm,work3,wind1,work4 &
& ,rho,qfc1,gdx,xkzm_hx,xkzm_mx,tx1, tx2
thsfc,sfcz,tsfc1, &
sm,work3,wind1,work4 &
,rho,qfc1,gdx,xkzm_hx,xkzm_mx,tx1, tx2
! real(kind=kind_phys), dimension(im,levs,ntrac) :: &
! & qgrs_myj
real(kind=kind_phys),dimension(im,levs) :: dkt2
Expand Down
13 changes: 13 additions & 0 deletions physics/PBL/MYJ/myjpbl_wrapper.meta
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@
type = real
kind = kind_phys
intent = inout
optional = True
[phy_myj_thz0]
standard_name = air_potential_temperature_at_top_of_viscous_sublayer
long_name = potential temperat at viscous sublayer top over water
Expand All @@ -246,6 +247,7 @@
type = real
kind = kind_phys
intent = inout
optional = True
[phy_myj_qz0]
standard_name = specific_humidity_at_top_of_viscous_sublayer
long_name = specific humidity at_viscous sublayer top over water
Expand All @@ -254,6 +256,7 @@
type = real
kind = kind_phys
intent = inout
optional = True
[phy_myj_uz0]
standard_name = x_wind_at_top_of_viscous_sublayer
long_name = u wind component at viscous sublayer top over water
Expand All @@ -262,6 +265,7 @@
type = real
kind = kind_phys
intent = inout
optional = True
[phy_myj_vz0]
standard_name = y_wind_at_top_of_viscous_sublayer
long_name = v wind component at viscous sublayer top over water
Expand All @@ -270,6 +274,7 @@
type = real
kind = kind_phys
intent = inout
optional = True
[phy_myj_z0base]
standard_name = baseline_surface_roughness_length
long_name = baseline surface roughness length for momentum in mete
Expand All @@ -278,6 +283,7 @@
type = real
kind = kind_phys
intent = inout
optional = True
[phy_myj_akhs]
standard_name = heat_exchange_coefficient_for_MYJ_schemes
long_name = surface heat exchange_coefficient for MYJ schemes
Expand All @@ -286,6 +292,7 @@
type = real
kind = kind_phys
intent = inout
optional = True
[phy_myj_akms]
standard_name = momentum_exchange_coefficient_for_MYJ_schemes
long_name = surface momentum exchange_coefficient for MYJ schemes
Expand All @@ -294,6 +301,7 @@
type = real
kind = kind_phys
intent = inout
optional = True
[phy_myj_chkqlm]
standard_name = control_for_surface_layer_evaporation
long_name = surface layer evaporation switch
Expand All @@ -302,6 +310,7 @@
type = real
kind = kind_phys
intent = inout
optional = True
[phy_myj_elflx]
standard_name = surface_upward_specific_humidity_flux_for_mellor_yamada_janjic_surface_layer_scheme
long_name = kinematic surface latent heat flux
Expand All @@ -310,6 +319,7 @@
type = real
kind = kind_phys
intent = inout
optional = True
[phy_myj_a1u]
standard_name = weight_for_momentum_at_top_of_viscous_sublayer
long_name = Weight for momentum at viscous layer top
Expand All @@ -318,6 +328,7 @@
type = real
kind = kind_phys
intent = inout
optional = True
[phy_myj_a1t]
standard_name = weight_for_potental_temperature_at_top_of_viscous_sublayer
long_name = Weight for potental temperature at viscous layer top
Expand All @@ -326,6 +337,7 @@
type = real
kind = kind_phys
intent = inout
optional = True
[phy_myj_a1q]
standard_name = weight_for_specific_humidity_at_top_of_viscous_sublayer
long_name = Weight for Specfic Humidity at viscous layer top
Expand All @@ -334,6 +346,7 @@
type = real
kind = kind_phys
intent = inout
optional = True
[pblh]
standard_name = atmosphere_boundary_layer_thickness
long_name = PBL thickness
Expand Down
Loading

0 comments on commit f4e0fa1

Please sign in to comment.