Skip to content

Commit

Permalink
Wrapper PR for NCAR#366 (remove redundant surface variables) and NCAR…
Browse files Browse the repository at this point in the history
…#363 (send correct pointers to JEDI) (NCAR#368)

* clean up redundant surface variables
* Updates to send correct pointers to JEDI 

Co-authored-by: man.zhang <Man.Zhang@noaa.gov>
Co-authored-by: Mark Potts <Mark.Potts@noaa.gov>
  • Loading branch information
3 people authored Aug 17, 2021
1 parent 83aa1ee commit 6bad820
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 51 deletions.
28 changes: 14 additions & 14 deletions atmos_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2791,35 +2791,35 @@ subroutine setup_exportdata(rc)
call block_data_copy_or_fill(datar82d, DYCORE_data(nb)%coupling%z_bot, zeror8, Atm_block, nb, rc=localrc)
!--- JEDI fields
case ('u')
call block_atmos_copy(datar83d, Atm(mygrid)%u, Atm_block, nb, rc=localrc)
call block_atmos_copy(datar83d, Atm(mygrid)%u(isc:iec,jsc:jec,:), Atm_block, nb, rc=localrc)
case ('v')
call block_atmos_copy(datar83d, Atm(mygrid)%v, Atm_block, nb, rc=localrc)
call block_atmos_copy(datar83d, Atm(mygrid)%v(isc:iec,jsc:jec,:), Atm_block, nb, rc=localrc)
case ('ua')
call block_atmos_copy(datar83d, Atm(mygrid)%ua, Atm_block, nb, rc=localrc)
call block_atmos_copy(datar83d, Atm(mygrid)%ua(isc:iec,jsc:jec,:),Atm_block, nb, rc=localrc)
case ('va')
call block_atmos_copy(datar83d, Atm(mygrid)%va, Atm_block, nb, rc=localrc)
call block_atmos_copy(datar83d, Atm(mygrid)%va(isc:iec,jsc:jec,:), Atm_block, nb, rc=localrc)
case ('t')
call block_atmos_copy(datar83d, Atm(mygrid)%pt, Atm_block, nb, rc=localrc)
call block_atmos_copy(datar83d, Atm(mygrid)%pt(isc:iec,jsc:jec,:), Atm_block, nb, rc=localrc)
case ('delp')
call block_atmos_copy(datar83d, Atm(mygrid)%delp, Atm_block, nb, rc=localrc)
call block_atmos_copy(datar83d, Atm(mygrid)%delp(isc:iec,jsc:jec,:), Atm_block, nb, rc=localrc)
case ('sphum')
sphum = get_tracer_index(MODEL_ATMOS, 'sphum')
call block_atmos_copy(datar83d, Atm(mygrid)%q, sphum, Atm_block, nb, rc=localrc)
call block_atmos_copy(datar83d, Atm(mygrid)%q(isc:iec,jsc:jec,:,:), sphum, Atm_block, nb, rc=localrc)
case ('ice_wat')
ice_wat = get_tracer_index(MODEL_ATMOS, 'ice_wat')
call block_atmos_copy(datar83d, Atm(mygrid)%q, ice_wat, Atm_block, nb, rc=localrc)
call block_atmos_copy(datar83d, Atm(mygrid)%q(isc:iec,jsc:jec,:,:), ice_wat, Atm_block, nb, rc=localrc)
case ('liq_wat')
liq_wat = get_tracer_index(MODEL_ATMOS, 'liq_wat')
call block_atmos_copy(datar83d, Atm(mygrid)%q, liq_wat, Atm_block, nb, rc=localrc)
call block_atmos_copy(datar83d, Atm(mygrid)%q(isc:iec,jsc:jec,:,:), liq_wat, Atm_block, nb, rc=localrc)
case ('o3mr')
o3mr = get_tracer_index(MODEL_ATMOS, 'o3mr')
call block_atmos_copy(datar83d, Atm(mygrid)%q, o3mr, Atm_block, nb, rc=localrc)
call block_atmos_copy(datar83d, Atm(mygrid)%q(isc:iec,jsc:jec,:,:), o3mr, Atm_block, nb, rc=localrc)
case ('phis')
call block_atmos_copy(datar82d, Atm(mygrid)%phis, Atm_block, nb, rc=localrc)
call block_atmos_copy(datar82d, Atm(mygrid)%phis(isc:iec,jsc:jec), Atm_block, nb, rc=localrc)
case ('u_srf')
call block_atmos_copy(datar82d, Atm(mygrid)%u_srf, Atm_block, nb, rc=localrc)
call block_atmos_copy(datar82d, Atm(mygrid)%u_srf(isc:iec,jsc:jec), Atm_block, nb, rc=localrc)
case ('v_srf')
call block_atmos_copy(datar82d, Atm(mygrid)%v_srf, Atm_block, nb, rc=localrc)
call block_atmos_copy(datar82d, Atm(mygrid)%v_srf(isc:iec,jsc:jec), Atm_block, nb, rc=localrc)
case ('weasd')
call block_data_copy(datar82d, GFS_data(nb)%sfcprop%weasd, Atm_block, nb, rc=localrc)
case ('tsea')
Expand Down Expand Up @@ -2847,7 +2847,7 @@ subroutine setup_exportdata(rc)
end select
enddo
if (ESMF_LogFoundError(rcToCheck=localrc, msg="Failure to populate exported field: "//trim(fieldname), &
line=__LINE__, file=__FILE__, rcToReturn=rc)) return
line=__LINE__, file=__FILE__, rcToReturn=rc)) return
endif
enddo ! exportFields

Expand Down
8 changes: 0 additions & 8 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2065,7 +2065,6 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: t2mmp(:) => null() !<
real (kind=kind_phys), pointer :: theta(:) => null() !<
real (kind=kind_phys), pointer :: th1(:) => null() !<
real (kind=kind_phys), pointer :: tice(:) => null() !<
real (kind=kind_phys), pointer :: tlvl(:,:) => null() !<
real (kind=kind_phys), pointer :: tlyr(:,:) => null() !<
real (kind=kind_phys), pointer :: tprcp_ice(:) => null() !<
Expand All @@ -2080,7 +2079,6 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: tseal(:) => null() !<
real (kind=kind_phys), pointer :: tsfa(:) => null() !<
real (kind=kind_phys), pointer :: tsfc_ice(:) => null() !<
real (kind=kind_phys), pointer :: tsfc_land(:) => null() !<
real (kind=kind_phys), pointer :: tsfc_land_save(:) => null() !<
real (kind=kind_phys), pointer :: tsfc_water(:) => null() !<
real (kind=kind_phys), pointer :: tsfg(:) => null() !<
Expand Down Expand Up @@ -7143,7 +7141,6 @@ subroutine interstitial_create (Interstitial, IM, Model)
allocate (Interstitial%stress_land (IM))
allocate (Interstitial%stress_water (IM))
allocate (Interstitial%theta (IM))
allocate (Interstitial%tice (IM))
allocate (Interstitial%tlvl (IM,Model%levr+1+LTP))
allocate (Interstitial%tlyr (IM,Model%levr+LTP))
allocate (Interstitial%tprcp_ice (IM))
Expand All @@ -7153,7 +7150,6 @@ subroutine interstitial_create (Interstitial, IM, Model)
allocate (Interstitial%tseal (IM))
allocate (Interstitial%tsfa (IM))
allocate (Interstitial%tsfc_ice (IM))
allocate (Interstitial%tsfc_land (IM))
allocate (Interstitial%tsfc_water (IM))
allocate (Interstitial%tsfg (IM))
allocate (Interstitial%tsurf_ice (IM))
Expand Down Expand Up @@ -7881,14 +7877,12 @@ subroutine interstitial_phys_reset (Interstitial, Model)
Interstitial%stress_land = huge
Interstitial%stress_water = huge
Interstitial%theta = clear_val
Interstitial%tice = clear_val
Interstitial%tprcp_ice = huge
Interstitial%tprcp_land = huge
Interstitial%tprcp_water = huge
Interstitial%trans = clear_val
Interstitial%tseal = clear_val
Interstitial%tsfc_ice = huge
Interstitial%tsfc_land = huge
Interstitial%tsfc_water = huge
Interstitial%tsurf_ice = huge
Interstitial%tsurf_land = huge
Expand Down Expand Up @@ -8268,7 +8262,6 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno)
write (0,*) 'sum(Interstitial%stress_land ) = ', sum(Interstitial%stress_land )
write (0,*) 'sum(Interstitial%stress_water ) = ', sum(Interstitial%stress_water )
write (0,*) 'sum(Interstitial%theta ) = ', sum(Interstitial%theta )
write (0,*) 'sum(Interstitial%tice ) = ', sum(Interstitial%tice )
write (0,*) 'sum(Interstitial%tlvl ) = ', sum(Interstitial%tlvl )
write (0,*) 'sum(Interstitial%tlyr ) = ', sum(Interstitial%tlyr )
write (0,*) 'sum(Interstitial%tprcp_ice ) = ', sum(Interstitial%tprcp_ice )
Expand All @@ -8278,7 +8271,6 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno)
write (0,*) 'sum(Interstitial%tseal ) = ', sum(Interstitial%tseal )
write (0,*) 'sum(Interstitial%tsfa ) = ', sum(Interstitial%tsfa )
write (0,*) 'sum(Interstitial%tsfc_ice ) = ', sum(Interstitial%tsfc_ice )
write (0,*) 'sum(Interstitial%tsfc_land ) = ', sum(Interstitial%tsfc_land )
write (0,*) 'sum(Interstitial%tsfc_water ) = ', sum(Interstitial%tsfc_water )
write (0,*) 'sum(Interstitial%tsfg ) = ', sum(Interstitial%tsfg )
write (0,*) 'sum(Interstitial%tsurf_ice ) = ', sum(Interstitial%tsurf_ice )
Expand Down
42 changes: 14 additions & 28 deletions ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -7499,22 +7499,22 @@
kind = kind_phys
active = (control_for_microphysics_scheme == identifier_for_fer_hires_microphysics_scheme)
[adjsfculw_water]
standard_name = surface_upwelling_longwave_flux_over_water_interstitial
long_name = surface upwelling longwave flux at current time over water (temporary use as interstitial)
standard_name = surface_upwelling_longwave_flux_over_water
long_name = surface upwelling longwave flux at current time over water
units = W m-2
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[adjsfculw_land]
standard_name = surface_upwelling_longwave_flux_over_land_interstitial
long_name = surface upwelling longwave flux at current time over land (temporary use as interstitial)
standard_name = surface_upwelling_longwave_flux_over_land
long_name = surface upwelling longwave flux at current time over land
units = W m-2
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[adjsfculw_ice]
standard_name = surface_upwelling_longwave_flux_over_ice_interstitial
long_name = surface upwelling longwave flux at current time over ice (temporary use as interstitial)
standard_name = surface_upwelling_longwave_flux_over_ice
long_name = surface upwelling longwave flux at current time over ice
units = W m-2
dimensions = (horizontal_loop_extent)
type = real
Expand Down Expand Up @@ -8215,8 +8215,8 @@
type = real
kind = kind_phys
[semis_water]
standard_name = surface_longwave_emissivity_over_water_interstitial
long_name = surface lw emissivity in fraction over water (temporary use as interstitial)
standard_name = surface_longwave_emissivity_over_water
long_name = surface lw emissivity in fraction over water
units = frac
dimensions = (horizontal_loop_extent)
type = real
Expand Down Expand Up @@ -9691,13 +9691,6 @@
type = real
kind = kind_phys
active = (control_for_land_surface_scheme == identifier_for_noah_wrfv4_land_surface_scheme)
[tice]
standard_name = sea_ice_temperature_interstitial
long_name = sea ice surface skin temperature use as interstitial
units = K
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[tlvl]
standard_name = air_temperature_at_interface_for_radiation
long_name = air temperature at vertical interface for radiation calculation
Expand Down Expand Up @@ -9781,30 +9774,23 @@
type = real
kind = kind_phys
[tsfc_water]
standard_name = surface_skin_temperature_over_water_interstitial
long_name = surface skin temperature over water (temporary use as interstitial)
units = K
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[tsfc_land]
standard_name = surface_skin_temperature_over_land_interstitial
long_name = surface skin temperature over land (temporary use as interstitial)
standard_name = surface_skin_temperature_over_water
long_name = surface skin temperature over water
units = K
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[tsfc_land_save]
standard_name = surface_skin_temperature_over_land_interstitial_save
long_name = surface skin temperature over land before entering a physics scheme (temporary use as interstitial)
standard_name = surface_skin_temperature_over_land_save
long_name = surface skin temperature over land before entering a physics scheme
units = K
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_land_surface_scheme == identifier_for_noah_wrfv4_land_surface_scheme)
[tsfc_ice]
standard_name = surface_skin_temperature_over_ice_interstitial
long_name = surface skin temperature over ice (temporary use as interstitial)
standard_name = surface_skin_temperature_over_ice
long_name = surface skin temperature over ice
units = K
dimensions = (horizontal_loop_extent)
type = real
Expand Down

0 comments on commit 6bad820

Please sign in to comment.