Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
28 changes: 14 additions & 14 deletions model/bin/ww3_from_ftp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ fi

dir0=$(cd $(dirname $0) > /dev/null && pwd -P)
ww3dir=$(dirname $(dirname $dir0))
#Get top level directory of ww3 from user:

#Get top level directory of ww3 from user:
echo -e "\n\n This script will download data from the ftp for WAVEWATCH III "
if [ "$interactive" = "n" ]
then
Expand All @@ -55,19 +55,19 @@ else
echo -e "Enter the absolute or relative path to the main/top directory, "
echo -e "this would be '../../' if in the model/bin directory "
echo -e "or './' if already in the top/main directory:"
read ww3dir
read ww3dir
fi

#Move to top level directory of ww3:
cd $ww3dir
#Move to top level directory of ww3:
cd $ww3dir

#Download from ftp and uptar:
echo -e "Downloading and untaring file from ftp:"
#Download from ftp and uptar:
echo -e "Downloading and untaring file from ftp:"
wget --no-check-certificate https://ftp.emc.ncep.noaa.gov/static_files/public/WW3/ww3_from_ftp.${ww3ver}.tar.gz
tar -xvzf ww3_from_ftp.${ww3ver}.tar.gz

#Move regtest info from data_regtests to regtests:
echo -e "Moving data from data_regtests to regtests"
echo -e "Moving data from data_regtests to regtests"
cp -r data_regtests/ww3_tp2.18/input/*.nc regtests/ww3_tp2.18/input/
cp -r data_regtests/ww3_tp2.15/input/wind.nc regtests/ww3_tp2.15/input/
cp -r data_regtests/ww3_tp2.15/input/*.nc regtests/ww3_tp2.15/input_rho/
Expand All @@ -93,7 +93,7 @@ if [ ! -d regtests/ww3_tp2.14/input/oasis3-mct/doc ]
then
mkdir regtests/ww3_tp2.14/input/oasis3-mct/doc
fi
cp -r data_regtests/ww3_tp2.14/input/oasis3-mct/doc/* regtests/ww3_tp2.14/input/oasis3-mct/doc/
cp -r data_regtests/ww3_tp2.14/input/oasis3-mct/doc/* regtests/ww3_tp2.14/input/oasis3-mct/doc/
cp -r data_regtests/ww3_tp2.14/input/toy/*.nc.OAS*CM regtests/ww3_tp2.14/input/toy/
cp -r data_regtests/ww3_tp2.14/input/toy/r-toy.nc.OASACM regtests/ww3_tp2.14/input/toy/r-toy.nc.OASACM2
cp -r data_regtests/ww3_tp2.14/input/toy/toy_coupled_field.nc.OASACM regtests/ww3_tp2.14/input/toy/toy_coupled_field.nc.OASACM2
Expand All @@ -110,7 +110,7 @@ cp -r data_regtests/ww3_ufs1.1/input_unstr/* regtests/ww3_ufs1.1/input_unstr
cp -r data_regtests/ww3_ufs1.1/input/*.nc regtests/ww3_ufs1.2/input/
cp -r data_regtests/ww3_ufs1.2/input/* regtests/ww3_ufs1.2/input/
cp -r data_regtests/ww3_ufs1.3/input/*nc regtests/ww3_ufs1.3/input/
#Do you want to clean up (aka delete tar file, delete the data_regtests directory)
#Do you want to clean up (aka delete tar file, delete the data_regtests directory)
echo -e "\n\n Do you want to delete the tar file ww3_from_ftp.${ww3ver}.tar.gz [y|n]: "
if [ "$interactive" = "n" ]
then
Expand All @@ -120,10 +120,10 @@ else
fi
if [ "${keep}" = "N" ] || [ "${keep}" = "n" ]
then
echo -e '\n Deleting tar file ww3_from_ftp.${ww3ver}.tar.gz'
echo -e "\n Deleting tar file ww3_from_ftp.${ww3ver}.tar.gz"
rm ww3_from_ftp.${ww3ver}.tar.gz
else
echo -e ' Not deleting tar file.'
echo -e ' Not deleting tar file.'
fi

echo -e "\n\n Files were copied from the data_regtests to the regtests folder."
Expand All @@ -139,9 +139,9 @@ then
echo -e '\n Deleting the data_regtests folder'
rm -rf data_regtests
else
echo -e ' Not deleting the data_regtests folder.'
echo -e ' Not deleting the data_regtests folder.'
fi

#move back to original directory:
#move back to original directory:
cd $curr_dir
echo -e "End of ww3_from_ftp.sh"
10 changes: 6 additions & 4 deletions model/src/w3iorsmd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -880,10 +880,12 @@ SUBROUTINE W3IORS ( INXOUT, NDSR, DUMFPI, IMOD, FLRSTRT )
IF ( IAPROC .EQ. NAPRST ) THEN
!
#ifdef W3_MPI
ALLOCATE ( STAT2(MPI_STATUS_SIZE,NRQRS) )
CALL MPI_WAITALL &
( NRQRS, IRQRS , STAT2, IERR_MPI )
DEALLOCATE ( STAT2 )
if (associated(irqrs)) then
ALLOCATE ( STAT2(MPI_STATUS_SIZE,NRQRS) )
CALL MPI_WAITALL &
( NRQRS, IRQRS , STAT2, IERR_MPI )
DEALLOCATE ( STAT2 )
end if
#endif
!
RPOS = 1_8 + LRECL*(NREC-1_8)
Expand Down
Loading