We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30a7606 commit 9e0ca30Copy full SHA for 9e0ca30
src/diagnostics/MOM_harmonic_analysis.F90
@@ -324,7 +324,7 @@ subroutine HA_write(ha1, Time, G, CS)
324
! Local variables
325
real, dimension(:,:,:), allocatable :: FtSSHw !< An array containing the harmonic constants [A]
326
integer :: year, month, day, hour, minute, second
327
- integer :: nc, k, is, ie, js, je
+ integer :: nc, i, j, k, is, ie, js, je
328
329
character(len=255) :: filename !< Output file name
330
type(MOM_infra_file) :: cdf !< The file handle for output harmonic constants
@@ -357,6 +357,11 @@ subroutine HA_write(ha1, Time, G, CS)
357
call create_MOM_file(cdf, trim(filename), cdf_vars, &
358
2*nc+1, cdf_fields, SINGLE_FILE, 86400.0, G=G)
359
360
+ ! Add the initial field back to the mean state
361
+ do j=js,je ; do i=is,ie
362
+ FtSSHw(i,j,1) = FtSSHw(i,j,1) + ha1%ref(i,j)
363
+ enddo ; enddo
364
+
365
! Write data
366
call MOM_write_field(cdf, cdf_fields(1), G%domain, FtSSHw(:,:,1), 0.0)
367
do k=1,nc
0 commit comments