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

Remove Fortran 2018 warnings #79

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
501d1a5
bugfix for adj_mass_vmr
Feb 10, 2017
a6d2161
Merge branch 'user/bw/cmip_diag_v20170113' into dev/awg
Feb 10, 2017
991f9f9
Merge branch 'user/h1g/bugfix_mass_vmr_20170210' into dev/awg
Feb 10, 2017
4e8d746
minor bugfix to fv_cmip_diag
bensonr Mar 10, 2017
3ba849c
fixed missing timing_off call inside of atmosphere_init
bensonr Mar 13, 2017
462594b
Merge branch 'user/rab/IPDv4_gfdl' into dev/master
underwoo Mar 13, 2017
817fef9
Moves #ifdef for cmip diagnostics so AM3 can run
thomas-robinson Mar 17, 2017
c4bc3fa
add an addition layer below the lowest model level to form L33
Mar 20, 2017
f15ae8b
Merge branch 'dev/master' into dev/awg
Mar 22, 2017
3c47011
Merge branch 'user/miz/awg_v20170320' into dev/awg
Mar 22, 2017
823ad88
Removes the use_AM4 ifdef
thomas-robinson Mar 30, 2017
ab2bad7
Merge branch 'user/ter/removeAM4ifdef' into dev/master
underwoo Mar 30, 2017
4d1c380
Merge branch 'user/ter/AM3ifdef' into dev/master
underwoo Mar 30, 2017
dba365e
Merge branch dev/master into branch prerelease/warsaw
underwoo Mar 30, 2017
f1b4672
Removes extra #endif in sw_core
thomas-robinson Mar 31, 2017
ad82fbd
Merge branch 'user/ter/sw_core_fix' into dev/master
underwoo Mar 31, 2017
23c7b0f
Merge branch 'dev/master' into dev/awg
Apr 4, 2017
fed4a4f
removed mpp_domains_set_stack_size calls from domain_decomp
bensonr Apr 4, 2017
640987d
removed domain stack_size from fv_mp_mod
bensonr Apr 11, 2017
0e45e3a
updates to remove the CVS ID/TAGNAME and utilize the accepted GFDL/FM…
bensonr Apr 11, 2017
d819e06
fixed an OpenMP statement in atmosphere.F90 in the adiabatic initiali…
bensonr Apr 17, 2017
80883ce
Merge branch 'user/rab/IPDv4_gfdl' into dev/master
underwoo Apr 27, 2017
f69adaa
Added CMIP6 diagnostic fields that are prodocts of 3d variables.
Apr 28, 2017
e65e7f7
Removes code that was preventing AM3 nudge experiments from working.
thomas-robinson May 9, 2017
6625a59
Merge branch 'user/ter/nudge_CM3Z_fix' into dev/master
underwoo May 10, 2017
202b517
Merge branch 'dev/master' into dev/awg
May 11, 2017
b4c1024
Merge branch 'user/bw/cmip_diag_20170404' into dev/awg
May 11, 2017
dbc6652
clean-up of AM4 paper public release as per FV3 groups request
bensonr Dec 4, 2017
0805b83
addition of error_mesg and FATAL (fms_mod) to the source file
bensonr Dec 4, 2017
ebf40fd
added missing use statement for R_GRID
bensonr Dec 5, 2017
ef27c5e
Add LICENSE.md
bensonr Jul 17, 2019
59dd50d
Renamed driver directories for the public release
bensonr Jul 17, 2019
3d9a781
Update license header for FV3
underwoo Jul 18, 2019
aee2878
Added a README.md file
bensonr Jul 18, 2019
e6fc8f2
Replace GPL header with LGPL header
underwoo Jul 18, 2019
bdd4b81
fixed license header in every file and added it to those without it
bensonr Jul 19, 2019
8eabf34
updated README.md to be more explicit on the use of the dev/gfdl branch
bensonr Jul 29, 2019
95dbb73
Fixes for guilding with gfortran
thomas-robinson Sep 10, 2019
9b4cad5
Merge pull request #10 from thomas-robinson/gfortranBuild
bensonr Sep 10, 2019
e8a55d3
atmos_cubed_sphere (#14)
mlee03 Feb 7, 2020
72bbfcc
Updates needed for fms2_io (#15)
laurenchilutti Feb 13, 2020
85333b8
2020.02 candidate into NOAA-GFDL/dev/gfdl (#19)
bensonr Mar 20, 2020
028c1d8
merge 2-way update bugfix from master (#23)
bensonr Apr 21, 2020
17a9206
updated RELEASE.md for the 2020.02 release (issue #25)
bensonr Apr 22, 2020
34c623c
Merge remote-tracking branch 'gfdl/master' into dev/gfdl_#26
bensonr Apr 22, 2020
536afd3
Merge pull request #30 from bensonr/dev/gfdl_#26
bensonr Apr 22, 2020
be7fd17
incorporated reviewer comments into RELEASE.md for the 2020.02 releas…
bensonr Apr 22, 2020
29486ff
Merge pull request #27 from bensonr/dev/gfdl_#25
bensonr Apr 22, 2020
2aac011
Merge pull request #33 from NOAA-GFDL/master
bensonr Apr 22, 2020
57d7f48
Merge pull request #36 from NOAA-GFDL/master
bensonr Apr 28, 2020
c6d411d
Add PV diagnostics for 350K and 550K surfaces
wfcooke May 22, 2020
25b3383
Added namelist options for ECDA model.
wfcooke May 22, 2020
cce65ac
Update to correct some OpenMP assignments.
wfcooke Aug 12, 2020
db7b60f
Corrected declaration of variable in OMP region
wfcooke Aug 27, 2020
4dacd7e
Adding missing value for underground points in get_height_given_pressure
wfcooke Oct 6, 2020
e806b31
Merge pull request #47 from wfcooke/user/wfc/climate_nudging
bensonr Oct 9, 2020
d621b82
removed module use of mpp_node from fv_mp_mod.F90 (#60)
bensonr Oct 28, 2020
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
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# GFDL_atmos_cubed_sphere

The source contained herein reflects the 201912 release of the Finite Volume Cubed-Sphere Dynamical Core (FV3) from GFDL

The GFDL Microphysics is also available via this repository.
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 @@ -12,7 +10,6 @@ for more information.
# Proper usage attribution

Cite Putman and Lin (2007) and Harris and Lin (2013) when describing a model using the FV3 dynamical core.
Cite Chen et al (2013) and Zhou et al (2019) when using the GFDL Microphysics.

# What files are what

Expand All @@ -27,6 +24,13 @@ The top level directory structure groups source code and input files as follow:
| ```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
NOAA-GFDL/AM4 and NOAA-GFDL/CM4 projects and is included as a submodule within
those projects.

# Disclaimer

The United States Department of Commerce (DOC) GitHub project code is provided
Expand Down
30 changes: 15 additions & 15 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
# RELEASE NOTES for FV3: Summary
# RELEASE NOTES for GFDL FV3: Summary

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

This version has been tested against the current SHiELD (formerly fvGFS) physics
and with FMS release candidate 2020.02 from https://github.com/NOAA-GFDL/FMS
This version has been tested within current GFDL Models (AM4+, CM4+, ESM4+, SPEAR, etc.) and requires the 2020.02 release of the [FMS infrastructure](https://github.com/NOAA-GFDL/FMS).

Includes all of the features of the GFDL Release to EMC, as well as:
Includes all of the features from the [201912 Public Release](https://github.com/NOAA-GFDL/GFDL_atmos_cubed_sphere/releases/tag/201912_public_release) which include:

- 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)
- Updates to support new nesting capabilities in FMS
- 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)
- 2018 Stand-alone regional capabilities (from EMC)
- Refactored model front-end (fv_control, fv_restart)
- Support for point soundings
- full non-hydrostatic capability is now included as a runtime option
- And other updates

# Interface changes
# Directory structure changes

drivers: renamed 'fvGFS' directory to SHiELD
***drivers/*** (important for those moving from the GFDL internal project)
- renamed ***fvGFS*** to ***SHiELD***
- renamed ***coupled*** to ***GFDL***

atmosphere.F90: 'mytile' is renamed 'mygrid'
***model_nh_null/***
- has been removed

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.
Update your build system as appropriate

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.
# Documentation

For a complete technical description see the NOAA Technical Memorandum OAR GFDL: https://repository.library.noaa.gov/view/noaa/23432
2 changes: 1 addition & 1 deletion driver/GFDL/atmosphere.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,7 @@ subroutine fv_compute_p_z (npz, phis, pe, peln, delp, delz, pt, q_sph, &
endif
if (do_uni_zfull) then
do k=1,npz
z_full(:,:,k)=0.5*(z_half(:,:,k)+z_half(:,:,k+1))
z_full(:,:,k)=0.5*(z_half(:,:,k)+z_half(:,:,k+1))
enddo
endif
end subroutine fv_compute_p_z
Expand Down
3 changes: 3 additions & 0 deletions model/fv_arrays.F90
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ module fv_arrays_mod
id_dbz, id_maxdbz, id_basedbz, id_dbz4km, id_dbztop, id_dbz_m10C, &
id_ctz, id_w1km, id_wmaxup, id_wmaxdn, id_cape, id_cin

! Selected theta-level fields from 3D variables:
integer :: id_pv350K, id_pv550K

! Selected p-level fields from 3D variables:
integer :: id_vort200, id_vort500, id_w500, id_w700
integer :: id_vort850, id_w850, id_x850, id_srh25, &
Expand Down
3 changes: 2 additions & 1 deletion model/fv_sg.F90
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ module fv_sg_mod
use constants_mod, only: rdgas, rvgas, cp_air, cp_vapor, hlv, hlf, kappa, grav
use tracer_manager_mod, only: get_tracer_index
use field_manager_mod, only: MODEL_ATMOS
use gfdl_cloud_microphys_mod, only: wqs1, wqs2, wqsat2_moist
! use gfdl_cloud_microphys_mod, only: wqs1, wqs2, wqsat2_moist
use lin_cld_microphys_mod, only: wqs2, wqsat2_moist
use fv_mp_mod, only: mp_reduce_min, is_master

implicit none
Expand Down
6 changes: 4 additions & 2 deletions model/sw_core.F90
Original file line number Diff line number Diff line change
Expand Up @@ -979,8 +979,10 @@ subroutine d_sw(delpc, delp, ptc, pt, u, v, w, uc,vc, &
! endif
call fv_tp_2d(pt, crx_adv,cry_adv, npx, npy, hord_tm, gx, gy, &
xfx_adv,yfx_adv, gridstruct, bd, ra_x, ra_y, &
mfx=fx, mfy=fy, mass=delp, nord=nord_v, damp_c=damp_v)
! mfx=fx, mfy=fy, mass=delp, nord=nord_t, damp_c=damp_t)
! This is a difference from the publicly released version in github master
! and is provided to ensure reproducibility with AM4/CM4 models from GFDL
! mfx=fx, mfy=fy, mass=delp, nord=nord_v, damp_c=damp_v)
mfx=fx, mfy=fy, mass=delp, nord=nord_t, damp_c=damp_t)
#endif

if ( inline_q ) then
Expand Down
62 changes: 48 additions & 14 deletions tools/fv_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ module fv_diagnostics_mod
use sat_vapor_pres_mod, only: compute_qs, lookup_es

use fv_arrays_mod, only: max_step
use gfdl_cloud_microphys_mod, only: wqs1, qsmith_init
! use gfdl_cloud_microphys_mod, only: wqs1, qsmith_init
use lin_cld_microphys_mod, only: wqs1, qsmith_init

use column_diagnostics_mod, only: column_diagnostics_init, &
initialize_diagnostic_columns, &
Expand Down Expand Up @@ -707,6 +708,10 @@ subroutine fv_diag_init(Atm, axes, Time, npx, npy, npz, p_ref)
!--------------------
idiag%id_pv = register_diag_field ( trim(field), 'pv', axes(1:3), Time, &
'potential vorticity', '1/s', missing_value=missing_value )
idiag%id_pv350K = register_diag_field ( trim(field), 'pv350K', axes(1:2), Time, &
'350-K potential vorticity; needs x350 scaling', '(K m**2) / (kg s)', missing_value=missing_value)
idiag%id_pv550K = register_diag_field ( trim(field), 'pv550K', axes(1:2), Time, &
'550-K potential vorticity; needs x550 scaling', '(K m**2) / (kg s)', missing_value=missing_value)

! -------------------
! Vertical flux correlation terms (good for averages)
Expand Down Expand Up @@ -1576,8 +1581,8 @@ subroutine fv_diag(Atm, zvir, Time, print_freq)
endif

if ( idiag%id_vort200>0 .or. idiag%id_vort500>0 .or. idiag%id_vort850>0 .or. idiag%id_vorts>0 &
.or. idiag%id_vort>0 .or. idiag%id_pv>0 .or. idiag%id_rh>0 .or. idiag%id_x850>0 .or. &
idiag%id_uh03>0 .or. idiag%id_uh25>0) then
.or. idiag%id_vort>0 .or. idiag%id_pv>0 .or. idiag%id_pv350K>0 .or. idiag%id_pv550K>0 &
.or. idiag%id_rh>0 .or. idiag%id_x850>0 .or. idiag%id_uh03>0 .or. idiag%id_uh25>0) then
call get_vorticity(isc, iec, jsc, jec, isd, ied, jsd, jed, npz, Atm(n)%u, Atm(n)%v, wk, &
Atm(n)%gridstruct%dx, Atm(n)%gridstruct%dy, Atm(n)%gridstruct%rarea)

Expand Down Expand Up @@ -1731,11 +1736,36 @@ subroutine fv_diag(Atm, zvir, Time, print_freq)
endif


if ( idiag%id_pv > 0 ) then
! Note: this is expensive computation.
if ( idiag%id_pv > 0 .or. idiag%id_pv350K >0 .or. idiag%id_pv550K >0) then
if (allocated(a3)) deallocate(a3)
allocate ( a3(isc:iec,jsc:jec,npz+1) )
! Modified pv_entropy to get potential temperature at layer interfaces (last variable)
! The values are needed for interpolate_z
! Note: this is expensive computation.
call pv_entropy(isc, iec, jsc, jec, ngc, npz, wk, &
Atm(n)%gridstruct%f0, Atm(n)%pt, Atm(n)%pkz, Atm(n)%delp, grav)
used = send_data ( idiag%id_pv, wk, Time )
Atm(n)%gridstruct%f0, Atm(n)%pt, Atm(n)%pkz, Atm(n)%delp, grav,a3)
if ( idiag%id_pv > 0) then
used = send_data ( idiag%id_pv, wk, Time )
endif
if( idiag%id_pv350K > 0 .or. idiag%id_pv550K >0 ) then
!"pot temp" from pv_entropy is only semi-finished; needs p0^kappa (pk0)
do k=1,npz+1
do j=jsc,jec
do i=isc,iec
a3(i,j,k) = a3(i,j,k) * pk0
enddo
enddo
enddo
!wk as input, which stores pv from pv_entropy;
!use z interpolation, both potential temp and z increase monotonically with height
!interpolate_vertical will apply log operation to 350, and also assumes a different vertical order
call interpolate_z(isc, iec, jsc, jec, npz, 350., a3, wk, a2)
used = send_data( idiag%id_pv350K, a2, Time)
!interpolate_vertical will apply log operation to 350, and also assumes a different vertical order
call interpolate_z(isc, iec, jsc, jec, npz, 550., a3, wk, a2)
used = send_data( idiag%id_pv550K, a2, Time)
endif
deallocate ( a3 )
if (prt_minmax) call prt_maxmin('PV', wk, isc, iec, jsc, jec, 0, 1, 1.)
endif

Expand Down Expand Up @@ -4236,6 +4266,7 @@ subroutine get_height_given_pressure(is, ie, js, je, km, wz, kd, id, log_p, peln
go to 1000
endif
enddo
a2(i,j,n) =missing_value
1000 continue
enddo
enddo
Expand Down Expand Up @@ -4919,7 +4950,7 @@ end subroutine updraft_helicity



subroutine pv_entropy(is, ie, js, je, ng, km, vort, f_d, pt, pkz, delp, grav)
subroutine pv_entropy(is, ie, js, je, ng, km, vort, f_d, pt, pkz, delp, grav, te)

! !INPUT PARAMETERS:
integer, intent(in):: is, ie, js, je, ng, km
Expand All @@ -4930,7 +4961,9 @@ subroutine pv_entropy(is, ie, js, je, ng, km, vort, f_d, pt, pkz, delp, grav)
real, intent(in):: f_d(is-ng:ie+ng,js-ng:je+ng)

! vort is relative vorticity as input. Becomes PV on output
real, intent(inout):: vort(is:ie,js:je,km)
real, intent(inout):: vort(is:ie,js:je,km)
! output potential temperature at the interface so it can be used for diagnostics
real, intent(out):: te(is:ie,js:je,km+1)

! !DESCRIPTION:
! EPV = 1/r * (vort+f_d) * d(S)/dz; where S is a conservative scalar
Expand All @@ -4941,7 +4974,7 @@ subroutine pv_entropy(is, ie, js, je, ng, km, vort, f_d, pt, pkz, delp, grav)
! z-surface is not that different from the hybrid sigma-p coordinate.
! See page 39, Pedlosky 1979: Geophysical Fluid Dynamics
!
! The follwoing simplified form is strictly correct only if vort is computed on
! The following simplified form is strictly correct only if vort is computed on
! constant z surfaces. In addition hydrostatic approximation is made.
! EPV = - GRAV * (vort+f_d) / del(p) * del(pt) / pt
! where del() is the vertical difference operator.
Expand All @@ -4952,7 +4985,7 @@ subroutine pv_entropy(is, ie, js, je, ng, km, vort, f_d, pt, pkz, delp, grav)
!---------------------------------------------------------------------
!BOC
real w3d(is:ie,js:je,km)
real te(is:ie,js:je,km+1), t2(is:ie,km), delp2(is:ie,km)
real t2(is:ie,km), delp2(is:ie,km)
real te2(is:ie,km+1)
integer i, j, k

Expand All @@ -4965,8 +4998,8 @@ subroutine pv_entropy(is, ie, js, je, ng, km, vort, f_d, pt, pkz, delp, grav)
enddo
#else
! Compute PT at layer edges.
!$OMP parallel do default(none) shared(is,ie,js,je,km,pt,pkz,w3d,delp,te2,te) &
!$OMP private(t2, delp2)
!$OMP parallel do default(none) shared(is,ie,js,je,km,pt,pkz,w3d,delp,te) &
!$OMP private(t2, te2, delp2)
do j=js,je
do k=1,km
do i=is,ie
Expand All @@ -4985,7 +5018,8 @@ subroutine pv_entropy(is, ie, js, je, ng, km, vort, f_d, pt, pkz, delp, grav)
enddo
enddo

!$OMP parallel do default(none) shared(is,ie,js,je,km,vort,f_d,te,w3d,delp,grav)
!$OMP parallel do default(none) shared(is,ie,js,je,km,vort,te,w3d,delp,grav) &
!$OMP private(f_d)
do k=1,km
do j=js,je
do i=is,ie
Expand Down
2 changes: 1 addition & 1 deletion tools/fv_mp_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module fv_mp_mod
! !USES:
use fms_mod, only : fms_init, fms_end
use mpp_mod, only : FATAL, MPP_DEBUG, NOTE, MPP_CLOCK_SYNC,MPP_CLOCK_DETAILED, WARNING
use mpp_mod, only : mpp_pe, mpp_npes, mpp_node, mpp_root_pe, mpp_error, mpp_set_warn_level
use mpp_mod, only : mpp_pe, mpp_npes, mpp_root_pe, mpp_error, mpp_set_warn_level
use mpp_mod, only : mpp_declare_pelist, mpp_set_current_pelist, mpp_sync
use mpp_mod, only : mpp_clock_begin, mpp_clock_end, mpp_clock_id
use mpp_mod, only : mpp_chksum, stdout, stderr, mpp_broadcast
Expand Down
Loading