Skip to content

Commit 501e99b

Browse files
fix: remove sst_anom and sst_ncep from the amip_interp code (NOAA-GFDL#1695)
1 parent eadca83 commit 501e99b

5 files changed

Lines changed: 3 additions & 53 deletions

File tree

amip_interp/amip_interp.F90

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,8 @@ module amip_interp_mod
156156
integer :: j_sst = 600
157157
real(r8_kind), parameter:: big_number = 1.E30_r8_kind
158158
logical :: forecast_mode = .false.
159-
real(r8_kind), allocatable, dimension(:,:) :: sst_ncep, sst_anom
160159

161-
public i_sst, j_sst, sst_ncep, sst_anom, forecast_mode, use_ncep_sst
160+
public i_sst, j_sst, forecast_mode, use_ncep_sst
162161

163162
!-----------------------------------------------------------------------
164163
!--------------------- private below here ------------------------------
@@ -460,14 +459,6 @@ subroutine amip_interp_init
460459
!--- Added by SJL ----------------------------------------------
461460
if ( use_ncep_sst ) then
462461
mobs = i_sst; nobs = j_sst
463-
if (.not. allocated (sst_ncep)) then
464-
allocate (sst_ncep(i_sst,j_sst))
465-
sst_ncep(:,:) = big_number
466-
endif
467-
if (.not. allocated (sst_anom)) then
468-
allocate (sst_anom(i_sst,j_sst))
469-
sst_anom(:,:) = big_number
470-
endif
471462
else
472463
mobs = 360; nobs = 180
473464
endif

amip_interp/include/amip_interp.inc

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,6 @@ if ( .not.use_daily ) then
114114
temp1(:,:) = temp2(:,:) ! SJL BUG fix: June 24, 2011
115115
else
116116
call READ_RECORD_ ('sst', Date1, Udate1, temp1)
117-
if ( use_ncep_sst .and. (.not. no_anom_sst) ) then
118-
temp1 = temp1 + SST_ANOM_
119-
endif
120117
call horiz_interp ( Interp%Hintrp, temp1, Interp%DATA1_)
121118
call CLIP_DATA_ ('sst', Interp%DATA1_)
122119
Interp%Date1 = Date1
@@ -127,9 +124,6 @@ if ( .not.use_daily ) then
127124

128125
if (Date2 /= Interp%Date2) then
129126
call READ_RECORD_ ('sst', Date2, Udate2, temp2)
130-
if ( use_ncep_sst .and. (.not. no_anom_sst) ) then
131-
temp2 = temp2 + SST_ANOM_
132-
endif
133127
call horiz_interp ( Interp%Hintrp, temp2, Interp%DATA2_)
134128
call CLIP_DATA_ ('sst', Interp%DATA2_)
135129
Interp%Date2 = Date2
@@ -145,11 +139,6 @@ if ( .not.use_daily ) then
145139
! Nudging runs: (Note: NCEP SST updated only every 6-hr)
146140
! Compute SST anomaly from global SST datasets for subsequent forecast runs
147141
!-------------------------------------------------------------------------------
148-
if ( use_ncep_sst .and. no_anom_sst ) then
149-
sst_anom = SST_NCEP_ - (temp1 + fmonth*(temp2 - temp1))
150-
call horiz_interp (Interp%Hintrp, SST_NCEP_, sst)
151-
call CLIP_DATA_ ('sst', sst)
152-
endif
153142

154143
!! DEBUG CODE
155144
if (DEBUG) then
@@ -380,15 +369,7 @@ else
380369
!-- SJL -------------------------------------------------------------
381370
! Can NOT use ncep_sst to determine sea_ice For seasonal forecast
382371
! Use climo sea ice for seasonal runs
383-
if ( use_ncep_sst .and. use_ncep_ice ) then
384-
where ( SST_NCEP_ <= (real(TFREEZE, FMS_AMIP_INTERP_KIND_)+real(tice_crit, FMS_AMIP_INTERP_KIND_)) )
385-
sice = 1._lkind
386-
elsewhere
387-
sice = 0._lkind
388-
endwhere
389-
else
390-
call READ_RECORD_ ('ice', Date1, Udate1, sice)
391-
endif
372+
call READ_RECORD_ ('ice', Date1, Udate1, sice)
392373
!--------------------------------------------------------------------
393374
call horiz_interp ( Interp%Hintrp, sice, Interp%DATA1_)
394375
call CLIP_DATA_ ('ice', Interp%DATA1_)
@@ -401,15 +382,7 @@ else
401382
if (Date2 /= Interp%Date2) then
402383

403384
!-- SJL -------------------------------------------------------------
404-
if ( use_ncep_sst .and. use_ncep_ice ) then
405-
where ( SST_NCEP_ <= (real(TFREEZE, FMS_AMIP_INTERP_KIND_)+real(tice_crit, FMS_AMIP_INTERP_KIND_)) )
406-
sice = 1._lkind
407-
elsewhere
408-
sice = 0._lkind
409-
endwhere
410-
else
411-
call READ_RECORD_ ('ice', Date2, Udate2, sice)
412-
endif
385+
call READ_RECORD_ ('ice', Date2, Udate2, sice)
413386
!--------------------------------------------------------------------
414387
call horiz_interp ( Interp%Hintrp, sice, Interp%DATA2_)
415388
call CLIP_DATA_ ('ice', Interp%DATA2_)

amip_interp/include/amip_interp_r4.fh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#undef FMS_AMIP_INTERP_KIND_
2-
#undef SST_NCEP_
3-
#undef SST_ANOM_
42
#undef LON_BND_
53
#undef LAT_BND_
64
#undef TEMPAMIP_
@@ -18,8 +16,6 @@
1816
#undef ZONAL_SST_
1917

2018
#define FMS_AMIP_INTERP_KIND_ r4_kind
21-
#define SST_NCEP_ real(sst_ncep, r4_kind)
22-
#define SST_ANOM_ real(sst_anom, r4_kind)
2319
#define LON_BND_ real(lon_bnd, r4_kind)
2420
#define LAT_BND_ real(lat_bnd, r4_kind)
2521
#define TEMPAMIP_ real(tempamip, r4_kind)
@@ -39,8 +35,6 @@
3935
#include "amip_interp.inc"
4036

4137
#undef FMS_AMIP_INTERP_KIND_
42-
#undef SST_NCEP_
43-
#undef SST_ANOM_
4438
#undef LON_BND_
4539
#undef LAT_BND_
4640
#undef TEMPAMIP_

amip_interp/include/amip_interp_r8.fh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#undef FMS_AMIP_INTERP_KIND_
2-
#undef SST_NCEP_
3-
#undef SST_ANOM_
42
#undef LON_BND_
53
#undef LAT_BND_
64
#undef TEMPAMIP_
@@ -18,8 +16,6 @@
1816
#undef ZONAL_SST_
1917

2018
#define FMS_AMIP_INTERP_KIND_ r8_kind
21-
#define SST_NCEP_ sst_ncep
22-
#define SST_ANOM_ sst_anom
2319
#define LON_BND_ lon_bnd
2420
#define LAT_BND_ lat_bnd
2521
#define TEMPAMIP_ tempamip
@@ -39,8 +35,6 @@
3935
#include "amip_interp.inc"
4036

4137
#undef FMS_AMIP_INTERP_KIND_
42-
#undef SST_NCEP_
43-
#undef SST_ANOM_
4438
#undef LON_BND_
4539
#undef LAT_BND_
4640
#undef TEMPAMIP_

libFMS.F90

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ module fms
8181
assignment(=), &
8282
fms_amip_interp_i_sst => i_sst, &
8383
fms_amip_interp_j_sst => j_sst, &
84-
fms_amip_interp_sst_ncep => sst_ncep, &
85-
fms_amip_interp_sst_anom => sst_anom, &
8684
fms_amip_interp_forecast_mode=> forecast_mode, &
8785
fms_amip_interp_use_ncep_sst => use_ncep_sst
8886
!> astronomy

0 commit comments

Comments
 (0)