Skip to content

Commit

Permalink
2020.02 candidate into NOAA-GFDL/dev/gfdl (#19)
Browse files Browse the repository at this point in the history
* Add LICENSE.md

* Renamed driver directories and removed the null version of the nh extensions for the public release

* Update license header for FV3

* Added a README.md file

* Replace GPL header with LGPL header

* fixed license header in every file and added it to those without it

* commit of new version of dycore from Weather and Climate Dynamics Group at GFDL

* updated README.md with current release information

* updated message for gfdl version of FV3

* fixed merge issues with fv_diagnostics.F90

* remove trailing spaces from sources

* remove extra file

* changes necessary for updated FMS diag_manager

* Master test (#17)

* commit of new version of dycore from Weather and Climate Dynamics Group at GFDL

* updated versions of GFDL-specific files from dev/gfdl

* updated README.md with current release information

* cleaned up a few lines in fv_dynamics

* new file RELEASE.md with release notes documenting differences between this and the last release

* updated RELEASE.md message

* hand merge of diagnostic updates

* remove trailing spaces from sources

* updates to merge some GFDL specific updates into this public release

* Master test (#18)

* commit of new version of dycore from Weather and Climate Dynamics Group at GFDL

* updated versions of GFDL-specific files from dev/gfdl

* updated README.md with current release information

* cleaned up a few lines in fv_dynamics

* new file RELEASE.md with release notes documenting differences between this and the last release

* updated RELEASE.md message

* hand merge of diagnostic updates

* remove trailing spaces from sources

* updates to merge some GFDL specific updates into this public release

* updated README.md

* updated GFDL_tools/fv_cmip_diag to be consistent with dev/gfdl branch

* remove tab characters from source files

* fixed comment in the README

Co-authored-by: Seth Underwood <[email protected]>
  • Loading branch information
bensonr and underwoo authored Mar 20, 2020
1 parent 72bbfcc commit 85333b8
Show file tree
Hide file tree
Showing 47 changed files with 31,708 additions and 13,155 deletions.
16 changes: 8 additions & 8 deletions GFDL_tools/fv_climate_nudge.F90
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,11 @@ subroutine fv_climate_nudge_init ( Time, axes, flag )
#else
if (file_exist('input.nml') ) then
unit = open_namelist_file()
ierr=1
ierr=1
do while (ierr /= 0)
read (unit, nml=fv_climate_nudge_nml, iostat=io, end=10)
read (unit, nml=fv_climate_nudge_nml, iostat=io, end=10)
ierr = check_nml_error (io, 'fv_climate_nudge_nml')
enddo
enddo
10 call close_file (unit)
endif
#endif
Expand Down Expand Up @@ -341,7 +341,7 @@ subroutine fv_climate_nudge (Time, dt, is, ie, js, je, npz, pfull, &

! vertically dependent factor
call get_factor (npz,pfull, factor)
! first time allocate state
! first time allocate state
if (do_state_alloc) then
call var_state_init ( is, ie, js, je, npz, State(1) )
call var_state_init ( is, ie, js, je, npz, State(2) )
Expand Down Expand Up @@ -634,7 +634,7 @@ subroutine get_factor (nlev,pfull,factor)
factor(k,2) = 0.
enddo
endif

! Specific humidity
if (skip_top_q > 0) then
do k = 1, skip_top_q
Expand Down Expand Up @@ -824,7 +824,7 @@ subroutine remap_coef( isd, ied, jsd, jed, lon_in, lat_in, &
!
integer, intent(out), dimension(is:ie,js:je ):: id1, id2, jdc
real, intent(out), dimension(is:ie,js:je,4):: s2c

!===============================================================================================

! local:
Expand All @@ -833,7 +833,7 @@ subroutine remap_coef( isd, ied, jsd, jed, lon_in, lat_in, &
real:: a1, b1
integer i, j, i1, i2, jc, i0, j0

!pk0(1) = ak_in(1)**KAPPA
!pk0(1) = ak_in(1)**KAPPA
!pn_top = log(ak_in(1))

do i=isd,ied-1
Expand Down Expand Up @@ -1007,7 +1007,7 @@ subroutine remap_ps( is, ie, js, je, km, &
gz(km+1) = gz_dat(i,j)
pk0(km+1) = ph_dat(i,j,km+1)**KAPPA
do k=km,1,-1
gz(k) = gz(k+1) + RDGAS*tp_dat(i,j,k)*(pn_dat(i,j,k+1)-pn_dat(i,j,k))
gz(k) = gz(k+1) + RDGAS*tp_dat(i,j,k)*(pn_dat(i,j,k+1)-pn_dat(i,j,k))
pk0(k) = ph_dat(i,j,k)**KAPPA
enddo
if ( phis(i,j) .gt. gz_dat(i,j) ) then
Expand Down
54 changes: 27 additions & 27 deletions GFDL_tools/fv_cmip_diag.F90
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ subroutine fv_cmip_diag_init ( Atm, axes, Time )

ID_va = register_cmip_diag_field_3d (mod_name, 'va', Time, &
'Northward Wind', 'm s-1', standard_name='northward_wind')

ID_hus = register_cmip_diag_field_3d (mod_name, 'hus', Time, &
'Specific Humidity', '1.0', standard_name='specific_humidity')

Expand All @@ -187,7 +187,7 @@ subroutine fv_cmip_diag_init ( Atm, axes, Time )
'Geopotential Height', 'm', standard_name='geopotential_height', axis='half')

!-----------------------------------------------------------------------
! register products of 3D variables (on model levels and pressure levels)
! register products of 3D variables (on model levels and pressure levels)

ID_u2 = register_cmip_diag_field_3d (mod_name, 'u2', Time, &
'Square of Eastward Wind', 'm2 s-2', standard_name='square_of_eastward_wind')
Expand Down Expand Up @@ -362,7 +362,7 @@ subroutine fv_cmip_diag_init ( Atm, axes, Time )
'Relative Vorticity at 200 hPa', 's-1', standard_name='atmosphere_relative_vorticity')
if (id_rv200 > 0 .and. id_plevels(id_p200) > 0) &
call diag_field_add_attribute (id_rv200, 'coordinates', 'p200')

id_rv500 = register_cmip_diag_field_2d (mod_name, 'rv500', Time, &
'Relative Vorticity at 500 hPa', 's-1', standard_name='atmosphere_relative_vorticity')
if (id_rv500 > 0 .and. id_plevels(id_p500) > 0) &
Expand All @@ -374,13 +374,13 @@ subroutine fv_cmip_diag_init ( Atm, axes, Time )
call diag_field_add_attribute (id_rv850, 'coordinates', 'p850')

!---- mean relative vorticity 600, 700, 850 hPa ----

id_vortmean = register_cmip_diag_field_2d (mod_name, 'vortmean', Time, &
'Mean Relative Vorticity over 600-850 hPa', 's-1', &
standard_name='atmosphere_relative_vorticity')
if (id_vortmean > 0 .and. id_pl700 > 0) &
call diag_field_add_attribute (id_vortmean, 'coordinates', 'pl700')

!---- omega at 500 hPa ----

id_wap500 = register_cmip_diag_field_2d (mod_name, 'wap500', Time, &
Expand Down Expand Up @@ -432,7 +432,7 @@ subroutine fv_cmip_diag ( Atm, zvir, Time )
real, dimension(Atm(1)%bd%isc:Atm(1)%bd%iec, &
Atm(1)%bd%jsc:Atm(1)%bd%jec) :: pfull, dat2, &
rv850, rv700, rv600

real, dimension(Atm(1)%bd%isc:Atm(1)%bd%iec, &
Atm(1)%bd%jsc:Atm(1)%bd%jec,1) :: dat3

Expand Down Expand Up @@ -462,9 +462,9 @@ subroutine fv_cmip_diag ( Atm, zvir, Time )
compute_wa = .false.
if (count(ID_hur%field_id(:)>0) > 0) compute_rh = .true.
if (count(ID_wa%field_id(:)>0) > 0) compute_wa = .true.

! compute relative humidity at model levels (if needed)
if (compute_rh .or. compute_wa) then
if (compute_rh .or. compute_wa) then
do k=1,npz
do j=jsc,jec
do i=isc,iec
Expand Down Expand Up @@ -580,80 +580,80 @@ subroutine fv_cmip_diag ( Atm, zvir, Time )
if (query_cmip_diag_id(ID_cls)) used = send_cmip_data_3d (ID_cls, Atm(n)%q(isc:iec,jsc:jec,:,nqa)*100., Time)
if (query_cmip_diag_id(ID_clws)) used = send_cmip_data_3d (ID_clws, Atm(n)%q(isc:iec,jsc:jec,:,nql), Time)
if (query_cmip_diag_id(ID_clis)) used = send_cmip_data_3d (ID_clis, Atm(n)%q(isc:iec,jsc:jec,:,nqi), Time)

!----------------------------------------------------------------------
! process 2D fields on specific pressure levels
!
!
if (id_ua10 > 0) then
call interpolate_vertical (isc, iec, jsc, jec, npz, 10.e2, Atm(n)%peln, &
Atm(n)%ua(isc:iec,jsc:jec,:), dat2)
Atm(n)%ua(isc:iec,jsc:jec,:), dat2)
used = send_data (id_ua10, dat2, Time)
endif

if (id_ua200 > 0) then
call interpolate_vertical (isc, iec, jsc, jec, npz, 200.e2, Atm(n)%peln, &
Atm(n)%ua(isc:iec,jsc:jec,:), dat2)
Atm(n)%ua(isc:iec,jsc:jec,:), dat2)
used = send_data (id_ua200, dat2, Time)
endif

if (id_va200 > 0) then
call interpolate_vertical (isc, iec, jsc, jec, npz, 200.e2, Atm(n)%peln, &
Atm(n)%va(isc:iec,jsc:jec,:), dat2)
Atm(n)%va(isc:iec,jsc:jec,:), dat2)
used = send_data (id_va200, dat2, Time)
endif

if (id_ua850 > 0) then
call interpolate_vertical (isc, iec, jsc, jec, npz, 850.e2, Atm(n)%peln, &
Atm(n)%ua(isc:iec,jsc:jec,:), dat2)
Atm(n)%ua(isc:iec,jsc:jec,:), dat2)
used = send_data (id_ua850, dat2, Time)
endif

if (id_va850 > 0) then
call interpolate_vertical (isc, iec, jsc, jec, npz, 850.e2, Atm(n)%peln, &
Atm(n)%va(isc:iec,jsc:jec,:), dat2)
Atm(n)%va(isc:iec,jsc:jec,:), dat2)
used = send_data (id_va850, dat2, Time)
endif

if (id_ta500 > 0) then
call interpolate_vertical (isc, iec, jsc, jec, npz, 500.e2, Atm(n)%peln, &
Atm(n)%pt(isc:iec,jsc:jec,:), dat2)
Atm(n)%pt(isc:iec,jsc:jec,:), dat2)
used = send_data (id_ta500, dat2, Time)
endif

if (id_ta700 > 0) then
call interpolate_vertical (isc, iec, jsc, jec, npz, 700.e2, Atm(n)%peln, &
Atm(n)%pt(isc:iec,jsc:jec,:), dat2)
Atm(n)%pt(isc:iec,jsc:jec,:), dat2)
used = send_data (id_ta700, dat2, Time)
endif

if (id_ta850 > 0) then
call interpolate_vertical (isc, iec, jsc, jec, npz, 850.e2, Atm(n)%peln, &
Atm(n)%pt(isc:iec,jsc:jec,:), dat2)
Atm(n)%pt(isc:iec,jsc:jec,:), dat2)
used = send_data (id_ta850, dat2, Time)
endif

if (id_hus850 > 0) then
call interpolate_vertical (isc, iec, jsc, jec, npz, 850.e2, Atm(n)%peln, &
Atm(n)%q(isc:iec,jsc:jec,:,sphum), dat2)
Atm(n)%q(isc:iec,jsc:jec,:,sphum), dat2)
used = send_data (id_hus850, dat2, Time)
endif

if (id_wap500 > 0) then
call interpolate_vertical (isc, iec, jsc, jec, npz, 500.e2, Atm(n)%peln, &
Atm(n)%omga(isc:iec,jsc:jec,:), dat2)
Atm(n)%omga(isc:iec,jsc:jec,:), dat2)
used = send_data (id_wap500, dat2, Time)
endif

if (id_rv200 > 0) then
call interpolate_vertical (isc, iec, jsc, jec, npz, 200.e2, Atm(n)%peln, rv, dat2)
used = send_data (id_rv200, dat2, Time)
endif

if (id_rv500 > 0) then
call interpolate_vertical (isc, iec, jsc, jec, npz, 500.e2, Atm(n)%peln, rv, dat2)
used = send_data (id_rv500, dat2, Time)
endif

if (id_rv850 > 0 .or. id_vortmean > 0 ) then
call interpolate_vertical (isc, iec, jsc, jec, npz, 850.e2, Atm(n)%peln, rv, rv850)
if (id_rv850 > 0) used = send_data (id_rv850, rv850, Time)
Expand All @@ -663,27 +663,27 @@ subroutine fv_cmip_diag ( Atm, zvir, Time )
used = send_data (id_vortmean, (rv600+rv700+rv850)/3., Time)
endif
endif

if (id_zg10 > 0) then
call get_height_given_pressure (isc, iec, jsc, jec, ngc, npz, wz, 1, (/id_zg10/), &
call get_height_given_pressure (isc, iec, jsc, jec, npz, wz, 1, (/id_zg10/), &
(/log(10.e2)/), Atm(n)%peln, dat3)
used = send_data (id_zg10, dat3(:,:,1), Time)
endif

if (id_zg100 > 0) then
call get_height_given_pressure (isc, iec, jsc, jec, ngc, npz, wz, 1, (/id_zg100/), &
call get_height_given_pressure (isc, iec, jsc, jec, npz, wz, 1, (/id_zg100/), &
(/log(100.e2)/), Atm(n)%peln, dat3)
used = send_data (id_zg100, dat3(:,:,1), Time)
endif

if (id_zg500 > 0) then
call get_height_given_pressure (isc, iec, jsc, jec, ngc, npz, wz, 1, (/id_zg500/), &
call get_height_given_pressure (isc, iec, jsc, jec, npz, wz, 1, (/id_zg500/), &
(/log(500.e2)/), Atm(n)%peln, dat3)
used = send_data (id_zg500, dat3(:,:,1), Time)
endif

if (id_zg1000 > 0) then
call get_height_given_pressure (isc, iec, jsc, jec, ngc, npz, wz, 1, (/id_zg1000/), &
call get_height_given_pressure (isc, iec, jsc, jec, npz, wz, 1, (/id_zg1000/), &
(/log(1000.e2)/), Atm(n)%peln, dat3)
used = send_data (id_zg1000, dat3(:,:,1), Time)
endif
Expand Down
16 changes: 8 additions & 8 deletions GFDL_tools/read_climate_nudge_data.F90
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ module read_climate_nudge_data_mod
INDEX_U = 8, INDEX_V = 9
character(len=8), dimension(NUM_REQ_FLDS) :: required_field_names = &
(/ 'P0 ', 'hyai', 'hybi', 'PHI ', 'PS ', 'T ', 'Q ', 'U ', 'V ' /)

integer, parameter :: MAXFILES = 53
character(len=256) :: filenames(MAXFILES)
character(len=256) :: filename_tails(MAXFILES)
Expand All @@ -85,7 +85,7 @@ module read_climate_nudge_data_mod
integer, dimension(NUM_REQ_FLDS) :: field_index ! varid for variables
integer, dimension(NUM_REQ_AXES) :: axis_index ! varid for dimensions
type(axistype), dimension(NUM_REQ_FLDS) :: axes
type(fieldtype), dimension(NUM_REQ_FLDS) :: fields
type(fieldtype), dimension(NUM_REQ_FLDS) :: fields
end type

type(filedata_type), allocatable :: Files(:)
Expand Down Expand Up @@ -301,7 +301,7 @@ subroutine read_grid ( lon, lat, ak, bk )
else
ak = 0.
endif

call mpp_read(Files(1)%ncid, Files(1)%fields(INDEX_BK), bk)


Expand Down Expand Up @@ -392,7 +392,7 @@ subroutine read_climate_nudge_data_2d (itime, field, dat, is, js)
call error_mesg ('read_climate_nudge_data_mod', 'itime out of range', FATAL)
endif

! check dimensions
! check dimensions
if (present(js)) then
if (size(dat,1) .ne. global_axis_size(INDEX_LON) .or. &
size(dat,2) .ne. sub_domain_latitude_size) then
Expand All @@ -414,7 +414,7 @@ subroutine read_climate_nudge_data_2d (itime, field, dat, is, js)
else
call error_mesg ('read_climate_nudge_data_mod', 'incorrect field requested in read_climate_nudge_data_2d', FATAL)
endif

! file index and actual time index in file
n = file_index(itime)
atime = itime - Files(n)%time_offset
Expand All @@ -427,9 +427,9 @@ subroutine read_climate_nudge_data_2d (itime, field, dat, is, js)
nread = 1
nread(1) = size(dat,1)
nread(2) = size(dat,2)

call mpp_read(Files(n)%ncid, Files(n)%fields(this_index), dat, start, nread)

! geopotential height (convert to m2/s2 if necessary)
if (field .eq. 'phis') then
if (maxval(dat) > 1000.*GRAV) then
Expand Down Expand Up @@ -489,7 +489,7 @@ subroutine read_climate_nudge_data_3d (itime, field, dat, is, js)
else
call error_mesg ('read_climate_nudge_data_mod', 'incorrect field requested in read_climate_nudge_data_3d', FATAL)
endif


! file index and actual time index in file
n = file_index(itime)
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GFDL_atmos_cubed_sphere

This is for the FV3 dynamical core used in the current GFDL models (AM4/CM4).
The source contained herein reflects the 201912 release of the Finite Volume Cubed-Sphere Dynamical Core (FV3) for use in the current GFDL models (AM4/CM4/ESM4/SPEAR).

# Where to find information

Expand All @@ -9,8 +9,7 @@ for more information.

# Proper usage attribution

Cite either Putman and Lin (2007) or Harris and Lin (2013) when describing a
model using the FV3 dynamical core.
Cite Putman and Lin (2007) and Harris and Lin (2013) when describing a model using the FV3 dynamical core.

# What files are what

Expand All @@ -21,15 +20,14 @@ The top level directory structure groups source code and input files as follow:
| ```LICENSE.md``` | a copy of the Gnu lesser general public license, version 3. |
| ```README.md``` | this file with basic pointers to more information |
| ```model/``` | contains the source code for core of the FV3 dyanmical core |
| ```model_nh_null/``` | contains the source stub code for satisfying references |
| ```driver/``` | contains drivers used by different models/modeling systems |
| ```tools/``` | contains source code of tools used within the core |
| ```GFDL_tools/``` | contains source code of tools specific to GFDL models |

# Dependencies

The source code in this repository requires other NOAA-GFDL projects in
order to compile. As stated above, this branch is for use with the current
order to compile. As stated above, this branch is for use with the current
NOAA-GFDL/AM4 and NOAA-GFDL/CM4 projects and is included as a submodule within
those projects.

Expand Down
31 changes: 31 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# RELEASE NOTES for FV3: Summary

FV3-201912-public --- 10 January 2020
Lucas Harris, GFDL <[email protected]>

This version has been tested against the current GFDL AM4 phsyics
and with release candidate 2020.02 of the FMS code at https://github.com/NOAA-GFDL/FMS

Includes all of the features of the GFDL Release to EMC, as well as:

- Updated 2017 GFDL Microphysics (from S-J Lin and L Zhou included in GFSv15)
- Updates for GFSv15 ICs (from T Black/J Abeles, EMC)
- Updates to support new nesting capabilities in FMS (from Z Liang)
- Re-written grid nesting code for efficiency and parallelization
- Re-organized fv_eta for improved vertical level selection
- 2018 Stand-alone regional capabilities (from T Black/J Abeles, EMC)
- Refactored model front-end (fv_control, fv_restart)
- Support for point soundings
- And other updates

# Interface changes

drivers: renamed 'fvGFS' directory to SHiELD

atmosphere.F90: 'mytile' is renamed 'mygrid'

The non-functional gfdl_cloud_microphys.F90 has been removed and replaced with the 2017 public release given to EMC. Also added a proper initialization routine, that includes the use of INTERNAL_FILE_NML and thereby requires the input_nml_file argument. If you do not define the compiler flag INTERNAL_FILE_NML then you can delete this argument.

The namelist nggps_diag_nml has been eliminated. 'fdiag' is no longer handled by the dynamical core, and should be handled by the physics driver.

For a complete technical description see the [forthcoming] GFDL Technical Memorandum.
Loading

0 comments on commit 85333b8

Please sign in to comment.