Skip to content
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

Physics separator merge: Step8 #30

Merged
merged 37 commits into from
Dec 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
4a93408
First round of changes to gwdc.f and gwdps.f along with necessary
gsketefian Sep 21, 2017
8cb214e
Define and use interstitial subroutines. Tables not yet updated.
gsketefian Sep 28, 2017
5701d9a
Update argument tables, including for interstitial subroutines.
gsketefian Sep 28, 2017
f9522d4
Fixed error in table for gwdc_run.
gsketefian Sep 28, 2017
bb0f436
Rename subroutine rayleigh_damp to rayleigh_damp_run.
gsketefian Sep 28, 2017
20e2ae8
Added argument table for Rayleigh_damp_run(...) subroutine.
gsketefian Sep 28, 2017
24e69e6
Fixed subroutine names to follow convention suggested by Dave Gill.
gsketefian Sep 28, 2017
4307174
Fix subroutine names in argument tables.
gsketefian Sep 28, 2017
72bd905
added doxygen formatting to gwdc.f and gwdps.f; restructured doxygen …
grantfirl Oct 10, 2017
b24aae2
Merge branch 'master' into gsk_separator_work_gfs
grantfirl Oct 10, 2017
ae7c7f5
Redid doxygen table headings using Gerard's Matlab script to check th…
gsketefian Oct 11, 2017
db14565
Put Rayleigh damping in a module, add _init and _finalize subroutines,
gsketefian Oct 11, 2017
31c8c7f
Fix USE statements in GFS_physics_driver.F90 to work with latest
gsketefian Oct 11, 2017
d9256fb
Add "contains" statement to gwdps module. Also, modify spacing
gsketefian Oct 11, 2017
a75ded0
Make new schemes out of cnvc90, get_prs_fv3, get_phi_fv3, and dcyc2t3…
gsketefian Nov 2, 2017
e20a3d8
Bug fixes to get code to compile and run. Result is bit-4-bit identi…
gsketefian Nov 3, 2017
451d004
Changed argument lists of subroutines get_prs_fv3_run(...) and get_ph…
gsketefian Nov 3, 2017
4675e57
Completed tables for subroutines cnvc90_run(...) and dcyc2t3_run(...).
gsketefian Nov 7, 2017
02a425d
Made modifications to argument tables as suggested by Grant in an ema…
gsketefian Nov 8, 2017
4440b53
Further cleaned up argument tables (removed many ??s). Also, moved I…
gsketefian Nov 8, 2017
d2ba442
Moved more interstitial lines from GFS_physics_driver.F90 to gwdc_pre…
gsketefian Nov 9, 2017
9ea3797
Bug fixes in gwdc.f to get code to compile.
gsketefian Nov 9, 2017
06a58b4
Another round of argument table edits.
gsketefian Nov 15, 2017
2a272ca
Merge remote-tracking branch 'origin/gsk_separator_work_gfs' into gsk…
gsketefian Nov 15, 2017
ec7d523
Create modules dcyc2t3_pre and dcyc2t3_post (along with corresponding…
gsketefian Nov 17, 2017
74b6584
Fix bug in gwdc_pre_run(...) that was causing b4b to fail.
gsketefian Nov 20, 2017
7fdfc19
Add code into dcyc2t3_post_run(...) and call it from GFS_physics_driv…
gsketefian Nov 21, 2017
adb38b0
Create argument table for dcyc2t3_post_run. This code is b4b (but di…
gsketefian Nov 21, 2017
d3741f2
Add a .gitignore file to the gfsphysics submodule.
gsketefian Nov 22, 2017
509c800
Modify .gitignore to ignore temporary Matlab editor files (*.asv).
gsketefian Nov 22, 2017
1d8d546
Make subroutine ozphys(...) into a CCPP-compliant scheme.
gsketefian Dec 5, 2017
453fa49
Changes to ozphys_run(...) argument table.
gsketefian Dec 6, 2017
a441197
Minor changes requested by Dom H.
gsketefian Dec 6, 2017
e1c46e2
Make same changes that Grant made to GFS_physics_driver.F90 to fix is…
gsketefian Dec 7, 2017
4467dd7
Added ozphys_pre and ozphys_post modules. ozphys_post_run(...) is th…
gsketefian Dec 15, 2017
9d22e0a
Fixed up argument table for gwdc_pre_run(...).
gsketefian Dec 15, 2017
72a90a4
Merge branch 'gsk_separator_work_gfs' of https://github.com/gsketefia…
llpcarson Dec 21, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.exe
*.o
*.mod
*.a
*.backup
*.swo
*.swp
*.asv

376 changes: 222 additions & 154 deletions GFS_layer/GFS_physics_driver.F90

Large diffs are not rendered by default.

44 changes: 41 additions & 3 deletions physics/cnvc90.f
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
SUBROUTINE CNVC90(CLSTP,IM,IX,RN,KBOT,KTOP,KM,PRSI,
1 ACV,ACVB,ACVT,CV,CVB,CVT)
module cnvc90

contains


!! \section arg_table_cnvc90_init Argument Table
!!
subroutine cnvc90_init()
end subroutine cnvc90_init


!! \section arg_table_cnvc90_run Argument Table
!! | local var name | longname | description | units | rank | type | kind | intent | optional |
!! |----------------|---------------------------------------------------------|---------------------------------------------------------|-------|------|---------|-----------|--------|----------|
!! | clstp | convective_cloud_switch | switch for saving convective clouds | none | 0 | real | kind_phys | in | F |
!! | im | horizontal_loop_extent | horizontal loop extent | index | 0 | integer | default | in | F |
!! | ix | horizontal_dimension | horizontal dimension | index | 0 | integer | default | in | F |
!! | rn | instantaneous_rainfall_amount | convective rainfall | m | 1 | real | kind_phys | in | F |
!! | kbot | vertical_index_at_cloud_base | vertical index at cloud base | index | 1 | integer | default | in | F |
!! | ktop | vertical_index_at_cloud_top | vertical index at cloud top | index | 1 | integer | default | in | F |
!! | km | vertical_dimension | number of vertical layers | index | 0 | integer | default | in | F |
!! | prsi | air_pressure_at_interface | interface pressure | Pa | 2 | real | kind_phys | in | F |
!! | acv | convective_rainfall_accumulated_thus_far | convective rainfall accumulated thus far | m | 1 | real | kind_phys | inout | F |
!! | acvb | smallest_cloud_base_vertical_index_encountered_thus_far | smallest cloud base vertical index encountered thus far | index | 1 | real | kind_phys | inout | F |
!! | acvt | largest_cloud_top_vertical_index_encountered_thus_far | largest cloud top vertical index encountered thus far | index | 1 | real | kind_phys | inout | F |
!! | cv | fraction_of_convective_cloud | fraction of convective cloud | none | 1 | real | kind_phys | inout | F |
!! | cvb | pressure_at_bottom_of_convective_cloud | pressure at bottom of convective cloud | Pa | 1 | real | kind_phys | inout | F |
!! | cvt | pressure_at_top_of_convective_cloud | pressure at top of convective cloud | Pa | 1 | real | kind_phys | inout | F |
!!
SUBROUTINE cnvc90_run(CLSTP,IM,IX,RN,KBOT,KTOP,KM,PRSI,
1 ACV,ACVB,ACVT,CV,CVB,CVT)
cc
USE MACHINE, ONLY :kind_phys
implicit none
Expand Down Expand Up @@ -86,5 +115,14 @@ SUBROUTINE CNVC90(CLSTP,IM,IX,RN,KBOT,KTOP,KM,PRSI,
ENDDO
ENDIF
RETURN
END
END SUBROUTINE cnvc90_run


!! \section arg_table_cnvc90_finalize Argument Table
!!
subroutine cnvc90_finalize()
end subroutine cnvc90_finalize


end module cnvc90

154 changes: 152 additions & 2 deletions physics/dcyc2.f

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion physics/dcyc2.pre.rad.f
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
! !
! usage: !
! !
! call dcyc2t3_pre rad !
! call dcyc2t3_pre_rad !
! inputs: !
! ( solhr,slag,sdec,cdec,sinlat,coslat, !
! xlon,coszen,tsea,tf,tsflw, !
Expand Down
95 changes: 82 additions & 13 deletions physics/get_prs_fv3.f90
Original file line number Diff line number Diff line change
@@ -1,23 +1,42 @@
module gfs_fv3_needs
module get_prs_fv3

use machine, only: kind_phys
use physcons, only: con_fvirt

!--- public declarations
public get_prs_fv3, get_phi_fv3
public get_prs_fv3_init, get_prs_fv3_run, get_prs_fv3_finalize

!--- local variables
real(kind=kind_phys), parameter :: zero = 0.0_kind_phys
real(kind=kind_phys), parameter :: half = 0.5_kind_phys

contains

subroutine get_prs_fv3(ix, levs, ntrac, phii, prsi, tgrs, qgrs, del, del_gz)
integer, intent(in) :: ix, levs, ntrac

!! \section arg_table_get_prs_fv3_init Argument Table
!!
subroutine get_prs_fv3_init()
end subroutine get_prs_fv3_init


!! \section arg_table_get_prs_fv3_run Argument Table
!! | local var name | longname | description | units | rank | type | kind | intent | optional |
!! |----------------|-----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|------------|------|---------|-----------|--------|----------|
!! | ix | horizontal_dimension | horizontal dimension | index | 0 | integer | default | in | F |
!! | levs | vertical_dimension | number of vertical layers | index | 0 | integer | default | in | F |
!! | phii | geopotential_at_interface | interface geopotential | m2 s-2 | 2 | real | kind_phys | in | F |
!! | prsi | air_pressure_at_interface | interface pressure | Pa | 2 | real | kind_phys | in | F |
!! | tgrs | air_temperature | mid-layer temperature | K | 2 | real | kind_phys | in | F |
!! | qgrs1 | water_vapor_specific_humidity | mid-layer specific humidity of water vapor | kg kg-1 | 2 | real | kind_phys | in | F |
!! | del | air_pressure_difference_between_midlayers | difference between mid-layer pressures | Pa | 2 | real | kind_phys | inout | F |
!! | del_gz | geopotential_difference_between_midlayers_divided_by_midlayer virtual_temperature | difference between mid-layer geopotentials divided by mid-layer virtual temperature | m2 s-2 K-1 | 2 | real | kind_phys | inout | F |
!!
subroutine get_prs_fv3_run(ix, levs, phii, prsi, tgrs, qgrs1, del, del_gz)
integer, intent(in) :: ix, levs
real(kind=kind_phys), dimension(ix,levs+1), intent(in) :: phii
real(kind=kind_phys), dimension(ix,levs+1), intent(in) :: prsi
real(kind=kind_phys), dimension(ix,levs), intent(in) :: tgrs
real(kind=kind_phys), dimension(ix,levs,ntrac), intent(in) :: qgrs
real(kind=kind_phys), dimension(ix,levs), intent(in) :: qgrs1
real(kind=kind_phys), dimension(ix,levs), intent(inout) :: del
real(kind=kind_phys), dimension(ix,levs+1), intent(inout) :: del_gz

Expand All @@ -27,17 +46,58 @@ subroutine get_prs_fv3(ix, levs, ntrac, phii, prsi, tgrs, qgrs, del, del_gz)
do i=1,ix
del(i,k) = prsi(i,k) - prsi(i,k+1)
del_gz(i,k) = (phii(i,k+1) - phii(i,k)) / &
(tgrs(i,k)*(1.+con_fvirt*max(zero,qgrs(i,k,1))))
(tgrs(i,k)*(1.+con_fvirt*max(zero,qgrs1(i,k))))
enddo
enddo

end subroutine get_prs_fv3
end subroutine get_prs_fv3_run


!! \section arg_table_get_prs_fv3_finalize Argument Table
!!
subroutine get_prs_fv3_finalize()
end subroutine get_prs_fv3_finalize


end module get_prs_fv3


subroutine get_phi_fv3(ix, levs, ntrac, gt0, gq0, del_gz, phii, phil)
integer, intent(in) :: ix, levs, ntrac

module get_phi_fv3

use machine, only: kind_phys
use physcons, only: con_fvirt

!--- public declarations
public get_phi_fv3_init, get_phi_fv3_run, get_phi_fv3_finalize

!--- local variables
real(kind=kind_phys), parameter :: zero = 0.0_kind_phys
real(kind=kind_phys), parameter :: half = 0.5_kind_phys

contains

!! \section arg_table_get_phi_fv3_init Argument Table
!!
subroutine get_phi_fv3_init()
end subroutine get_phi_fv3_init


!! \section arg_table_get_phi_fv3_run Argument Table
!! | local var name | longname | description | units | rank | type | kind | intent | optional |
!! |----------------|-----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|------------|------|---------|-----------|--------|----------|
!! | ix | horizontal_dimension | horizontal dimension | index | 0 | integer | default | in | F |
!! | levs | vertical_dimension | number of vertical layers | index | 0 | integer | default | in | F |
!! | gt0 | air_temperature_updated_by_physics | updated air temperature | K | 2 | real | kind_phys | in | F |
!! | gq01 | water_vapor_specific_humidity | mid-layer specific humidity of water vapor | kg kg-1 | 2 | real | kind_phys | in | F |
!! | del_gz | geopotential_difference_between_midlayers_divided_by_midlayer virtual_temperature | difference between mid-layer geopotentials divided by mid-layer virtual temperature | m2 s-2 K-1 | 2 | real | kind_phys | inout | F |
!! | phii | geopotential_at_interface | interface geopotential | m2 s-2 | 2 | real | kind_phys | inout | F |
!! | phil | geopotential | mid-layer geopotential | m2 s-2 | 2 | real | kind_phys | inout | F |
!!
subroutine get_phi_fv3_run(ix, levs, gt0, gq01, del_gz, phii, phil)
integer, intent(in) :: ix, levs
real(kind=kind_phys), dimension(ix,levs), intent(in) :: gt0
real(kind=kind_phys), dimension(ix,levs,ntrac), intent(in) :: gq0
real(kind=kind_phys), dimension(ix,levs), intent(in) :: gq01
real(kind=kind_phys), dimension(ix,levs+1), intent(inout) :: del_gz
real(kind=kind_phys), dimension(ix,levs+1), intent(inout) :: phii
real(kind=kind_phys), dimension(ix,levs), intent(inout) :: phil
Expand All @@ -49,12 +109,21 @@ subroutine get_phi_fv3(ix, levs, ntrac, gt0, gq0, del_gz, phii, phil)
do k=1,levs
do i=1,ix
del_gz(i,k) = del_gz(i,k)*gt0(i,k) * &
& (1.+con_fvirt*max(zero,gq0(i,k,1)))
& (1.+con_fvirt*max(zero,gq01(i,k)))
phii(i,k+1) = phii(i,k) + del_gz(i,k)
phil(i,k) = half*(phii(i,k) + phii(i,k+1))
enddo
enddo

end subroutine get_phi_fv3
end subroutine get_phi_fv3_run


!! \section arg_table_get_phi_fv3_finalize Argument Table
!!
subroutine get_phi_fv3_finalize()
end subroutine get_phi_fv3_finalize


end module get_phi_fv3


end module gfs_fv3_needs
Loading