Skip to content

Commit

Permalink
Remove old test write routine.
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGayno-NOAA committed Feb 9, 2023
1 parent 44c3f4b commit 1063f9b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 47 deletions.
4 changes: 2 additions & 2 deletions sorc/global_cycle.fd/cycle.f90
Original file line number Diff line number Diff line change
Expand Up @@ -717,11 +717,11 @@ SUBROUTINE SFCDRV(LUGB, IDIM,JDIM,LSM,LENSFC,LSOIL,DELTSFC, &

IF (IS_NOAHMP) THEN

CALL WRITE_DATA_SELECTED_RECORDS2(LENSFC,IDIM,JDIM,LSOIL,DO_NSST,NSST,VEGFCS=VEGFCS)
CALL WRITE_DATA_SELECTED_RECORDS(LENSFC,IDIM,JDIM,LSOIL,DO_NSST,NSST,VEGFCS=VEGFCS)

ELSE

CALL WRITE_DATA_SELECTED_RECORDS2(LENSFC,IDIM,JDIM,LSOIL, &
CALL WRITE_DATA_SELECTED_RECORDS(LENSFC,IDIM,JDIM,LSOIL, &
DO_NSST,NSST,SLIFCS=SLIFCS,TSFFCS=TSFFCS,VEGFCS=VEGFCS, &
SWEFCS=SWEFCS,TG3FCS=TG3FCS,ZORFCS=ZORFCS, &
ALBFCS=ALBFCS,ALFFCS=ALFFCS,CNPFCS=CNPFCS, &
Expand Down
46 changes: 1 addition & 45 deletions sorc/global_cycle.fd/read_write_data.f90
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ MODULE READ_WRITE_DATA
PUBLIC :: READ_LAT_LON_OROG
PUBLIC :: WRITE_DATA
PUBLIC :: WRITE_DATA_SELECTED_RECORDS
PUBLIC :: WRITE_DATA_SELECTED_RECORDS2
public :: read_tf_clim_grb,get_tf_clm_dim
public :: read_salclm_gfs_nc,get_dim_nc

Expand Down Expand Up @@ -116,7 +115,7 @@ MODULE READ_WRITE_DATA
!!
!! @author George Gayno NOAA/EMC

subroutine write_data_selected_records2(lensfc,idim,jdim,lsoil, &
subroutine write_data_selected_records(lensfc,idim,jdim,lsoil, &
do_nsst,nsst,slifcs,tsffcs,vegfcs,swefcs, &
tg3fcs,zorfcs,albfcs,alffcs, &
cnpfcs,f10m,t2m,q2m,vetfcs, &
Expand Down Expand Up @@ -576,49 +575,6 @@ subroutine write_data_selected_records2(lensfc,idim,jdim,lsoil, &

error = nf90_close(ncid)

end subroutine write_data_selected_records2

!> Write out selected surface records to a pre-existing
!! model restart file (in netcdf).
subroutine write_data_selected_records(vegfcs,lensfc,idim,jdim)

use mpi

implicit none

integer, intent(in) :: lensfc
integer, intent(in) :: idim, jdim

real, intent(in) :: vegfcs(lensfc)

real :: dum2d(idim,jdim)

character(len=50) :: fnbgso
character(len=3) :: rankch

integer :: myrank, error, ncid, id_var

call mpi_comm_rank(mpi_comm_world, myrank, error)

write(rankch, '(i3.3)') (myrank+1)

fnbgso = "./fnbgso." // rankch

print*
print*,"update OUTPUT SFC DATA TO: ",trim(fnbgso)

ERROR=NF90_OPEN(TRIM(fnbgso),NF90_WRITE,NCID)
CALL NETCDF_ERR(ERROR, 'OPENING FILE: '//TRIM(fnbgso) )

ERROR=NF90_INQ_VARID(NCID, "vfrac", ID_VAR)
CALL NETCDF_ERR(ERROR, 'READING vfrac ID' )

dum2d = reshape(vegfcs, (/idim,jdim/))
error = nf90_put_var( ncid, id_var, dum2d)
call netcdf_err(error, 'WRITING vegfcs RECORD' )

error = nf90_close(ncid)

end subroutine write_data_selected_records

subroutine write_data(slifcs,tsffcs,swefcs,tg3fcs,zorfcs, &
Expand Down

0 comments on commit 1063f9b

Please sign in to comment.