Merge branch 'master_14.4.1' into field_14.4.1

Conflicts:
	edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/serverConfig.py

Change-Id: I1f3f22ff1e9dfa32f971136479bb312230c1fc40

Former-commit-id: 291d66c66af4f1f4d298185412d5930714ffb2c5
This commit is contained in:
Ana Rivera 2015-01-27 22:05:12 +00:00
commit 20ad0a65f3
178 changed files with 10444 additions and 9003 deletions

View file

@ -40,6 +40,7 @@ import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
* Jan 28, 2014 2698 bclement removed getInfo, added methods to replace
* Jan 30, 2014 2698 bclement changed UserId to VenueParticipant
* Mar 06, 2014 2751 bclement added getParticipantUserid()
* Jan 09, 2015 3709 bclement added isPersistent()
*
* </pre>
*
@ -91,4 +92,10 @@ public interface IVenue {
*/
public UserId getParticipantUserid(VenueParticipant participant);
/**
* @return true if this is a room that exists on the server even when there
* are no participants
*/
public boolean isPersistent();
}

View file

@ -34,10 +34,12 @@ import org.jivesoftware.smack.packet.Presence.Type;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smackx.muc.Affiliate;
import org.jivesoftware.smackx.muc.MultiUserChat;
import org.jivesoftware.smackx.muc.RoomInfo;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.viz.collaboration.comm.identity.info.IVenue;
import com.raytheon.uf.viz.collaboration.comm.provider.connection.CollaborationConnection;
import com.raytheon.uf.viz.collaboration.comm.provider.user.IDConverter;
import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId;
import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
@ -59,6 +61,7 @@ import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
* Mar 05, 2014 2798 mpduff Get Presence from MUC.
* Mar 06, 2014 2751 bclement added getParticipantUserid()
* Mar 07, 2014 2848 bclement added hasOtherParticipants()
* Jan 09, 2015 3709 bclement added isPersistent()
*
* </pre>
*
@ -195,4 +198,21 @@ public class Venue implements IVenue {
return getParticipantCount() > 1;
}
@Override
public boolean isPersistent() {
boolean rval = false;
CollaborationConnection connection = CollaborationConnection
.getConnection();
XMPPConnection xmppConn = connection.getXmppConnection();
try {
RoomInfo roomInfo = MultiUserChat.getRoomInfo(xmppConn,
muc.getRoom());
rval = roomInfo.isPersistent();
} catch (XMPPException e) {
log.error("Unable to determine if room " + this.getId()
+ " is persistent", e);
}
return rval;
}
}

View file

@ -113,7 +113,8 @@ import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
* Apr 29, 2014 3061 bclement moved invite payload to shared display session
* May 09, 2014 3107 bclement removed catch from isRoomOwner() so callers know about errors
* Jun 16, 2014 3288 bclement changed String venueName to VenueId venueId, added createVenueId()
* Oct 08, 2014 3705 bclement aded getVenueId()
* Oct 08, 2014 3705 bclement added getVenueId()
* Jan 12, 2015 3709 bclement fixed rare invite bug
*
*
* </pre>
@ -247,7 +248,11 @@ public class VenueSession extends BaseSession implements IVenueSession {
protected Message createInviteMessage(UserId id, VenueInvite invite) {
Message msg = new Message();
msg.setType(Type.normal);
msg.setBody(invite.getMessage());
/*
* don't set a body on the message. smack will add a packet extension on
* it that will have the actual invite. openfire gets confused if there
* is both a body and an extension and drops the invite on the floor.
*/
return msg;
}

View file

@ -38,6 +38,7 @@ import org.jivesoftware.smackx.muc.Occupant;
* Jan 30, 2014 2698 bclement reworked convertFromRoom for venue participants
* Feb 3, 2014 2699 bclement fixed room id parsing when handle has special characters
* Feb 13, 2014 2751 bclement VenueParticipant refactor
* Jan 13, 2015 3709 bclement added convertFromRoom that doesn't reference MUC
*
* </pre>
*
@ -72,6 +73,24 @@ public class IDConverter {
* @return
*/
public static VenueParticipant convertFromRoom(MultiUserChat room, String id) {
VenueParticipant rval = convertFromRoom(id);
Occupant occupant;
if (room != null && (occupant = room.getOccupant(id)) != null) {
if (occupant.getJid() != null) {
// get actual user name
rval.setUserid(convertFrom(occupant.getJid()));
}
}
return rval;
}
/**
* Parse userId from room id string "room@host/handle".
*
* @param id
* @return
*/
public static VenueParticipant convertFromRoom(String id) {
String handle = StringUtils.parseResource(id);
if (handle == null || handle.trim().isEmpty()) {
throw new IllegalArgumentException(
@ -81,13 +100,6 @@ public class IDConverter {
String host = StringUtils.parseServer(cleanId);
String roomName = StringUtils.parseName(id);
VenueParticipant rval = new VenueParticipant(roomName, host, handle);
Occupant occupant;
if (room != null && (occupant = room.getOccupant(id)) != null) {
if (occupant.getJid() != null) {
// get actual user name
rval.setUserid(convertFrom(occupant.getJid()));
}
}
return rval;
}

View file

@ -17,19 +17,15 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.collaboration.ui;
package com.raytheon.uf.viz.collaboration.display.data;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.RGB;
/**
* Contains foreground and background chat colors for a list of users or sites
*
@ -43,6 +39,8 @@ import org.eclipse.swt.graphics.RGB;
* Nov 26, 2014 3709 mapeters Renamed from UserColorInformation, added fgSet getter.
* Dec 08, 2014 3709 mapeters Removed fgSet and individual colors' getters/setters,
* set foreground and background together.
* Jan 13, 2015 3709 bclement moved from collaboration.ui to collaboration.display
* moved ColorInfo class to UserColorInfo
*
* </pre>
*
@ -54,12 +52,25 @@ import org.eclipse.swt.graphics.RGB;
public class ColorInfoMap {
@XmlElement
private Map<String, ColorInfo> colors;
private Map<String, UserColorInfo> colors;
/**
*
*/
public ColorInfoMap() {
}
/**
* @param colors
*/
public ColorInfoMap(Map<String, UserColorInfo> colors) {
this.colors = colors;
}
/**
* @return the colors
*/
public Map<String, ColorInfo> getColors() {
public Map<String, UserColorInfo> getColors() {
return colors;
}
@ -67,58 +78,8 @@ public class ColorInfoMap {
* @param colors
* the colors to set
*/
public void setColors(Map<String, ColorInfo> colors) {
public void setColors(Map<String, UserColorInfo> colors) {
this.colors = colors;
}
@XmlAccessorType(XmlAccessType.NONE)
public static class ColorInfo {
@XmlAttribute
private int fgRed;
@XmlAttribute
private int fgGreen;
@XmlAttribute
private int fgBlue;
@XmlAttribute
private int bgRed;
@XmlAttribute
private int bgGreen;
@XmlAttribute
private int bgBlue;
public ColorInfo() {
}
/**
* @param type
* @return the RGB color of the given type
*/
public RGB getColor(int type) {
if (type == SWT.FOREGROUND) {
return new RGB(fgRed, fgGreen, fgBlue);
} else {
return new RGB(bgRed, bgGreen, bgBlue);
}
}
/**
* @param fg
* @param bg
*/
public void setColors(RGB fg, RGB bg) {
fgRed = fg.red;
fgGreen = fg.green;
fgBlue = fg.blue;
bgRed = bg.red;
bgGreen = bg.green;
bgBlue = bg.blue;
}
}
}

View file

@ -0,0 +1,69 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.collaboration.display.data;
import com.raytheon.uf.viz.collaboration.comm.identity.user.IUser;
/**
* Interface for color managers that keep track of color settings for users in a
* session or chat.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jan 13, 2015 3709 bclement Initial creation
*
* </pre>
*
* @author bclement
* @version 1.0
*/
public interface IColorManager<T extends IUser> {
/**
* Get assigned color for user
*
* @param user
* @return
*/
public UserColorInfo getColorForUser(T user);
/**
* Assign color to user
*
* @param user
* @param color
*/
public void setColorForUser(T user, UserColorInfo color);
/**
* Clear color assignments
*/
public void clearColors();
/**
* @return human readable description of color management
*/
public String getDescription(T user);
}

View file

@ -21,6 +21,7 @@ package com.raytheon.uf.viz.collaboration.display.data;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import org.eclipse.swt.graphics.RGB;
@ -46,6 +47,7 @@ import com.raytheon.viz.core.ColorUtil;
* Mar 06, 2014 2848 bclement synchronized color access
* Jul 02, 2014 1255 bclement collaboration specific RGB presets
* falls back to ColorUtil resource color presets
* Jan 13, 2015 3709 bclement implements IColorManager, uses UserColorInfo
*
* </pre>
*
@ -53,94 +55,129 @@ import com.raytheon.viz.core.ColorUtil;
* @version 1.0
*/
public class SessionColorManager {
public class SessionColorManager implements IColorManager<VenueParticipant> {
public static final String SESSION_COLOR_PREFERENCE_KEY = "collaborationParticipantColor";
private final Map<VenueParticipant, RGB> colors = new HashMap<VenueParticipant, RGB>();
protected final Map<VenueParticipant, UserColorInfo> colors = new HashMap<>();
private static final RGB[] rgbPresets;
private static final RGB[] foregroundPresets;
static {
HierarchicalPreferenceStore prefs = (HierarchicalPreferenceStore) Activator
.getDefault().getPreferenceStore();
String[] names = prefs.getStringArray(SESSION_COLOR_PREFERENCE_KEY);
if (names.length > 0) {
rgbPresets = new RGB[names.length];
foregroundPresets = new RGB[names.length];
int i = 0;
for (String name : names) {
rgbPresets[i++] = RGBColors.getRGBColor(name);
foregroundPresets[i++] = RGBColors.getRGBColor(name);
}
} else {
rgbPresets = ColorUtil.getResourceColorPresets();
foregroundPresets = ColorUtil.getResourceColorPresets();
}
}
/**
* Get a map of venue participants to their assigned colors used for
* Get a map of venue participants to their assigned foreground colors
*
* @return
*/
public Map<VenueParticipant, RGB> getColors() {
public Map<VenueParticipant, RGB> getForegroundColors() {
/*
* TODO the foreground specific methods are required since the shared
* display protocol doesn't support changing the background color as
* this would cause compatibility issues.
*/
Map<VenueParticipant, RGB> rval;
synchronized (colors) {
rval = new HashMap<VenueParticipant, RGB>(colors);
rval = new HashMap<VenueParticipant, RGB>(colors.size());
for (Entry<VenueParticipant, UserColorInfo> entry : colors
.entrySet()) {
rval.put(entry.getKey(), entry.getValue().getForeground());
}
}
return rval;
}
/**
* Clear color assignments and repopulate with supplied map
* Reassign foreground colors specified by map
*
* @param map
*/
public void setColors(Map<VenueParticipant, RGB> map) {
public void setForegroundColors(Map<VenueParticipant, RGB> map) {
synchronized (colors) {
colors.clear();
colors.putAll(map);
for (Entry<VenueParticipant, RGB> entry : map.entrySet()) {
VenueParticipant participant = entry.getKey();
UserColorInfo colorInfo = getColorInternal(participant);
RGB foreground = entry.getValue();
if (colorInfo != null) {
colorInfo.setForeground(foreground);
} else {
setColorInternal(participant, new UserColorInfo(foreground));
}
}
}
}
/**
* Get participant's assigned color
*
* @param user
* @return
*/
public RGB getColorForUser(VenueParticipant user) {
RGB rval;
synchronized (colors) {
rval = colors.get(user);
if (rval == null) {
@Override
public UserColorInfo getColorForUser(VenueParticipant user) {
UserColorInfo rval;
rval = getColorInternal(user);
if (rval == null) {
synchronized (colors) {
int count = colors.size();
if (rgbPresets.length <= count) {
count = count % rgbPresets.length;
if (foregroundPresets.length <= count) {
count = count % foregroundPresets.length;
}
rval = rgbPresets[count];
colors.put(user, rval);
rval = new UserColorInfo(foregroundPresets[count]);
setColorInternal(user, rval);
}
}
return rval;
}
/**
* Assign color to participant
*
* @param id
* @param rgb
* @param user
* @return null if user isn't found
*/
public void setColorForUser(VenueParticipant id, RGB rgb) {
synchronized (colors) {
colors.put(id, rgb);
protected UserColorInfo getColorInternal(VenueParticipant user) {
UserColorInfo rval = null;
if (user != null) {
synchronized (colors) {
rval = colors.get(user);
}
}
return rval;
}
/**
* Clear color assignments
* @param user
* @param color
*/
protected void setColorInternal(VenueParticipant user, UserColorInfo color) {
synchronized (colors) {
colors.put(user, color);
}
}
@Override
public void setColorForUser(VenueParticipant user, UserColorInfo color) {
setColorInternal(user, color);
}
@Override
public void clearColors() {
synchronized (colors) {
colors.clear();
}
}
@Override
public String getDescription(VenueParticipant user) {
return "Color changes will apply to the user " + user.getName()
+ " only in the " + user.getRoom() + " room. "
+ "\nColor changes will be discarded when you leave the room.";
}
}

View file

@ -54,6 +54,7 @@ import com.raytheon.uf.viz.core.VizApp;
* Feb 11, 2014 2751 njensen Added leaderChanged() and listeners
* Mar 07, 2014 2848 bclement made colorManager final, added modifyColors() listeners
* Mar 18, 2014 2895 njensen Improved javadoc
* Jan 13, 2015 3709 bclement SessionColorManager API changes
*
* </pre>
*
@ -72,7 +73,13 @@ public class SessionContainer {
/** subscribes to events related to the session based on role **/
private IRoleEventController roleEventController;
private final SessionColorManager colorManager = new SessionColorManager();
private final SessionColorManager colorManager = new SessionColorManager() {
@Override
public String getDescription(VenueParticipant user) {
return super.getDescription(user)
+ "\nColor changes will be seen by all participants in the session.";
}
};
private IRemoteDisplayContainer displayContainer;
@ -178,12 +185,13 @@ public class SessionContainer {
@Subscribe
public void modifyColors(ColorPopulator populator) {
colorManager.setColors(populator.getColors());
colorManager.setForegroundColors(populator.getColors());
}
@Subscribe
public void modifyColors(ColorChangeEvent event) {
colorManager.setColorForUser(event.getUserName(), event.getColor());
UserColorInfo color = new UserColorInfo(event.getColor());
colorManager.setColorForUser(event.getUserName(), color);
}
/**

View file

@ -0,0 +1,126 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.collaboration.display.data;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import org.eclipse.swt.graphics.RGB;
/**
* Color information for a collaboration user which is used when styling text
* and telestration
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jan 12, 2015 3709 bclement Initial creation, moved from ColorInfoMap
*
* </pre>
*
* @author bclement
* @version 1.0
*/
@XmlAccessorType(XmlAccessType.NONE)
public class UserColorInfo {
@XmlAttribute
private int fgRed;
@XmlAttribute
private int fgGreen;
@XmlAttribute
private int fgBlue;
@XmlAttribute
private int bgRed;
@XmlAttribute
private int bgGreen;
@XmlAttribute
private int bgBlue;
/**
*
*/
public UserColorInfo() {
}
/**
* @param foreground
*/
public UserColorInfo(RGB foreground) {
this(foreground, new RGB(255, 255, 255));
}
/**
* @param foreground
* @param background
*/
public UserColorInfo(RGB foreground, RGB background) {
setForeground(foreground);
setBackground(background);
}
/**
* @return the background
*/
public RGB getBackground() {
return new RGB(bgRed, bgGreen, bgBlue);
}
/**
* @param background
* the background to set
*/
public void setBackground(RGB background) {
if (background != null) {
this.bgRed = background.red;
this.bgGreen = background.green;
this.bgBlue = background.blue;
}
}
/**
* @return the foreground
*/
public RGB getForeground() {
return new RGB(fgRed, fgGreen, fgBlue);
}
/**
* @param foreground
* the foreground to set
*/
public void setForeground(RGB foreground) {
if (foreground != null) {
this.fgRed = foreground.red;
this.fgGreen = foreground.green;
this.fgBlue = foreground.blue;
}
}
}

View file

@ -19,8 +19,6 @@
**/
package com.raytheon.uf.viz.collaboration.display.roles;
import org.eclipse.swt.graphics.RGB;
import com.google.common.eventbus.Subscribe;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
@ -33,6 +31,7 @@ import com.raytheon.uf.viz.collaboration.comm.identity.invite.ColorPopulator;
import com.raytheon.uf.viz.collaboration.display.data.ColorChangeEvent;
import com.raytheon.uf.viz.collaboration.display.data.SessionColorManager;
import com.raytheon.uf.viz.collaboration.display.data.SharedDisplaySessionMgr;
import com.raytheon.uf.viz.collaboration.display.data.UserColorInfo;
import com.raytheon.uf.viz.collaboration.display.editor.ActivateRemoteDisplay;
import com.raytheon.uf.viz.collaboration.display.roles.dataprovider.SharedEditorsManager;
import com.raytheon.uf.viz.core.IDisplayPane;
@ -56,6 +55,7 @@ import com.raytheon.viz.ui.editor.AbstractEditor;
* Feb 13, 2014 2751 bclement VenueParticipant refactor
* Feb 13, 2014 2751 njensen Renamed container to displayContainer
* Mar 06, 2014 2848 bclement removed check for self from participantChanged
* Jan 13, 2015 3709 bclement SessionColorManager API changes
*
* </pre>
*
@ -98,12 +98,13 @@ public class DataProviderEventController extends
SessionColorManager scm = SharedDisplaySessionMgr
.getSessionContainer(session.getSessionId())
.getColorManager();
RGB color = scm.getColorForUser(event.getParticipant());
UserColorInfo color = scm.getColorForUser(event
.getParticipant());
ColorChangeEvent cce = new ColorChangeEvent(
event.getParticipant(), color);
event.getParticipant(), color.getForeground());
session.sendObjectToPeer(event.getParticipant(),
new ColorPopulator(scm.getColors()));
new ColorPopulator(scm.getForegroundColors()));
session.sendObjectToVenue(cce);
} catch (CollaborationException e) {
statusHandler.handle(Priority.PROBLEM,

View file

@ -29,6 +29,7 @@ import com.raytheon.uf.viz.collaboration.display.Activator;
import com.raytheon.uf.viz.collaboration.display.data.SessionColorManager;
import com.raytheon.uf.viz.collaboration.display.data.SessionContainer;
import com.raytheon.uf.viz.collaboration.display.data.SharedDisplaySessionMgr;
import com.raytheon.uf.viz.collaboration.display.data.UserColorInfo;
import com.raytheon.uf.viz.collaboration.display.editor.ReprojectRemoteDisplay;
import com.raytheon.uf.viz.core.DrawableString;
import com.raytheon.uf.viz.core.IExtent;
@ -60,6 +61,7 @@ import com.raytheon.uf.viz.remote.graphics.DispatchGraphicsTarget;
* Mar 06, 2014 2848 bclement get subject dynamically from session
* May 16, 2014 3163 bsteffen Remove references to deprecated
* {@link DrawableString} field.
* Jan 13, 2015 3709 bclement SessionColorManager API changes
*
* </pre>
*
@ -103,10 +105,12 @@ public class DataProviderRsc extends
}
target.clearClippingPlane();
IExtent extent = paintProps.getView().getExtent();
RGB color = colorManager.getColorForUser(session.getUserID());
target.drawRect(extent, color, 3.0f, 1.0f);
UserColorInfo colors = colorManager
.getColorForUser(session.getUserID());
RGB foreground = colors.getForeground();
target.drawRect(extent, foreground, 3.0f, 1.0f);
DrawableString string = new DrawableString(getName(), color);
DrawableString string = new DrawableString(getName(), foreground);
string.horizontalAlignment = HorizontalAlignment.CENTER;
string.verticallAlignment = VerticalAlignment.BOTTOM;
string.setCoordinates(extent.getMinX() + extent.getWidth() / 2,

View file

@ -36,6 +36,7 @@ import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
import com.raytheon.uf.viz.collaboration.display.Activator;
import com.raytheon.uf.viz.collaboration.display.data.SessionContainer;
import com.raytheon.uf.viz.collaboration.display.data.SharedDisplaySessionMgr;
import com.raytheon.uf.viz.collaboration.display.data.UserColorInfo;
import com.raytheon.uf.viz.collaboration.display.rsc.telestrator.CollaborationDrawingEvent.CollaborationEventType;
import com.raytheon.uf.viz.core.IGraphicsTarget;
import com.raytheon.uf.viz.core.IGraphicsTarget.LineStyle;
@ -70,6 +71,7 @@ import com.vividsolutions.jts.geom.Coordinate;
* May 05, 2014 3076 bclement old CLEAR_ALL is now DISPOSE_ALL,
* added clearLayers() and getAllDrawingLayers()
* Jun 30, 2014 1798 bclement added getManager()
* Jan 13, 2015 3709 bclement SessionColorManager API changes
*
* </pre>
*
@ -180,8 +182,9 @@ public class CollaborationDrawingResource extends
layer.setEraserWidth(16); // Configure?
layer.setLineStyle(outline.getLineStyle());
layer.setLineWidth(outline.getOutlineWidth());
layer.setColor(container.getColorManager().getColorForUser(
user));
UserColorInfo colorInfo = container.getColorManager()
.getColorForUser(user);
layer.setColor(colorInfo.getForeground());
layer.paint(target, paintProps);
}
}

View file

@ -1,128 +0,0 @@
package com.raytheon.uf.viz.collaboration.ui;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.swt.graphics.RGB;
import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.common.localization.LocalizationContext;
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
import com.raytheon.uf.common.localization.LocalizationFile;
import com.raytheon.uf.common.localization.PathManager;
import com.raytheon.uf.common.localization.PathManagerFactory;
import com.raytheon.uf.common.serialization.SerializationException;
import com.raytheon.uf.common.serialization.SingleTypeJAXBManager;
import com.raytheon.uf.viz.collaboration.ui.ColorInfoMap.ColorInfo;
/**
* Abstract class for collaboration chat coloring configuration managers
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 13, 2014 3709 mapeters Initial creation.
* Dec 09, 2014 3709 mapeters setColors() sets foreground and background together.
*
* </pre>
*
* @author mapeters
* @version 1.0
*/
public abstract class AbstractColorConfigManager {
private static final SingleTypeJAXBManager<ColorInfoMap> jaxb = SingleTypeJAXBManager
.createWithoutException(ColorInfoMap.class);
/**
* Set and store the given foreground and background colors for the given
* user/site at the given file location.
*
* @param key
* @param foreground
* @param background
* @param filePath
*/
protected void setColors(String key, RGB foreground, RGB background,
String filePath) {
ColorInfoMap colorInfoMap = this.getColorInfoMap();
if (colorInfoMap == null) {
colorInfoMap = new ColorInfoMap();
this.setColorInfoMap(colorInfoMap);
}
Map<String, ColorInfo> colors = colorInfoMap.getColors();
if (colors == null) {
colorInfoMap.setColors(new HashMap<String, ColorInfo>());
colors = colorInfoMap.getColors();
}
ColorInfo colorInfo = colors.get(key);
if (colorInfo == null) {
colorInfo = new ColorInfo();
colors.put(key, colorInfo);
}
colorInfo.setColors(foreground, background);
IPathManager pathMgr = PathManagerFactory.getPathManager();
LocalizationContext lContext = pathMgr.getContext(
LocalizationType.CAVE_STATIC, LocalizationLevel.USER);
LocalizationFile file = pathMgr.getLocalizationFile(lContext, filePath);
try {
jaxb.marshalToXmlFile(colorInfoMap, file.getFile().getPath());
file.save();
} catch (Exception e) {
Activator.statusHandler.error(
"Unable to write color information to file: "
+ file.getName() + " in context " + lContext, e);
}
}
/**
* Get the {@link ColorInfo} for the given user/site from memory.
*
* @param key
* @param filePath
* @return
*/
protected ColorInfo getColor(String key, String filePath) {
ColorInfoMap colorInfoMap = this.getColorInfoMap();
if (colorInfoMap == null) {
IPathManager pm = (PathManager) PathManagerFactory.getPathManager();
LocalizationContext locContext = pm.getContext(
LocalizationType.CAVE_STATIC, LocalizationLevel.USER);
LocalizationFile file = pm
.getLocalizationFile(locContext, filePath);
if (file != null && file.exists()) {
try {
colorInfoMap = jaxb.unmarshalFromXmlFile(file.getFile());
this.setColorInfoMap(colorInfoMap);
} catch (SerializationException e) {
Activator.statusHandler.error(
"Unable to read color information from file: "
+ file.getName() + " in level "
+ LocalizationLevel.USER, e);
}
}
}
if (colorInfoMap != null) {
Map<String, ColorInfo> colors = colorInfoMap.getColors();
if (colors != null) {
return colors.get(key);
}
}
return null;
}
public abstract void setColors(String key, RGB foreground, RGB background);
public abstract ColorInfo getColor(String key);
protected abstract ColorInfoMap getColorInfoMap();
protected abstract void setColorInfoMap(ColorInfoMap colorInfo);
}

View file

@ -59,7 +59,6 @@ import org.eclipse.swt.events.MouseTrackAdapter;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@ -89,6 +88,7 @@ import com.google.common.eventbus.Subscribe;
import com.raytheon.uf.viz.collaboration.comm.identity.IVenueSession;
import com.raytheon.uf.viz.collaboration.comm.identity.event.IRosterChangeEvent;
import com.raytheon.uf.viz.collaboration.comm.identity.event.RosterChangeType;
import com.raytheon.uf.viz.collaboration.comm.identity.user.IUser;
import com.raytheon.uf.viz.collaboration.comm.provider.connection.CollaborationConnection;
import com.raytheon.uf.viz.collaboration.comm.provider.event.BookmarkEvent;
import com.raytheon.uf.viz.collaboration.comm.provider.event.UserPresenceChangedEvent;
@ -123,6 +123,7 @@ import com.raytheon.uf.viz.collaboration.ui.actions.RemoveFromRosterAction;
import com.raytheon.uf.viz.collaboration.ui.actions.SendSubReqAction;
import com.raytheon.uf.viz.collaboration.ui.actions.ShowVenueAction;
import com.raytheon.uf.viz.collaboration.ui.actions.UserSearchAction;
import com.raytheon.uf.viz.collaboration.ui.colors.UserColorConfigManager;
import com.raytheon.uf.viz.collaboration.ui.data.AlertWordWrapper;
import com.raytheon.uf.viz.collaboration.ui.data.CollaborationGroupContainer;
import com.raytheon.uf.viz.collaboration.ui.data.PublicRoomContainer;
@ -168,6 +169,8 @@ import com.raytheon.viz.ui.views.CaveWorkbenchPageManager;
* Nov 14, 2014 3709 mapeters Removed change background/foreground color actions from menu.
* Dec 08, 2014 3709 mapeters Added MB3 change user text color actions to contacts list.
* Dec 12, 2014 3709 mapeters Store {@link ChangeTextColorAction}s in map, dispose them.
* Jan 09, 2015 3709 bclement color config manager API changes
* Jan 13, 2015 3709 bclement ChangeTextColorAction API changes
*
* </pre>
*
@ -208,7 +211,7 @@ public class CollaborationGroupView extends CaveFloatingView implements
private Action roomSearchAction;
private Map<String, ChangeTextColorAction> userColorActions;
private Map<String, ChangeTextColorAction<?>> userColorActions;
/**
* @param parent
@ -285,7 +288,8 @@ public class CollaborationGroupView extends CaveFloatingView implements
activeImage.dispose();
pressedImage.dispose();
for (ChangeTextColorAction userColorAction : userColorActions.values()) {
for (ChangeTextColorAction<?> userColorAction : userColorActions
.values()) {
userColorAction.dispose();
}
}
@ -448,7 +452,7 @@ public class CollaborationGroupView extends CaveFloatingView implements
if (o instanceof SessionGroupContainer) {
manager.add(createSessionAction);
return;
} else if (o instanceof PublicRoomContainer){
} else if (o instanceof PublicRoomContainer) {
manager.add(roomSearchAction);
return;
} else if (o instanceof IVenueSession) {
@ -476,13 +480,13 @@ public class CollaborationGroupView extends CaveFloatingView implements
}
manager.add(new AddNotifierAction(this));
manager.add(new Separator());
String name = user.getName();
ChangeTextColorAction userColorAction = userColorActions.get(name);
String colorActionKey = user.getFQName();
ChangeTextColorAction<?> userColorAction = userColorActions
.get(colorActionKey);
if (userColorAction == null) {
userColorAction = ChangeTextColorAction
.createChangeUserTextColorAction(name, false, new RGB(
0, 0, 255), new UserColorConfigManager());
userColorActions.put(name, userColorAction);
userColorAction = new ChangeTextColorAction<IUser>(user, false,
false, false, UserColorConfigManager.getInstance());
userColorActions.put(colorActionKey, userColorAction);
}
manager.add(userColorAction);
} else if (o instanceof UserId) {
@ -493,15 +497,14 @@ public class CollaborationGroupView extends CaveFloatingView implements
UserId me = connection.getUser();
if (me.isSameUser(user)) {
createMenu(manager);
String name = user.getName();
ChangeTextColorAction userColorAction = userColorActions
.get(name);
String colorActionKey = user.getFQName();
ChangeTextColorAction<?> userColorAction = userColorActions
.get(colorActionKey);
if (userColorAction == null) {
userColorAction = ChangeTextColorAction
.createChangeUserTextColorAction(name, true,
new RGB(0, 0, 255),
new UserColorConfigManager());
userColorActions.put(name, userColorAction);
userColorAction = new ChangeTextColorAction<IUser>(user,
true, true, false,
UserColorConfigManager.getInstance());
userColorActions.put(colorActionKey, userColorAction);
}
manager.insertBefore("afterFont", userColorAction);
}

View file

@ -1,87 +0,0 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.collaboration.ui;
import org.eclipse.swt.graphics.RGB;
import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.viz.collaboration.ui.ColorInfoMap.ColorInfo;
/**
* Configuration manager for reading/writing colors for each site to/from a
* user-localized file
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 10, 2014 3708 bclement Moved color methods from SiteConfigurationManager
* Nov 26, 2014 3709 mapeters Abstracted out code to {@link AbstractColorConfigManager},
* renamed from SiteColorConfigManager.
* Dec 08, 2014 3709 mapeters Set foreground and background colors together.
*
* </pre>
*
* @author bclement
* @version 1.0
*/
public class FeedColorConfigManager extends AbstractColorConfigManager {
private static final String FILE_PATH = "collaboration"
+ IPathManager.SEPARATOR + "siteColorInfo.xml";
private static ColorInfoMap colorInfoMap;
/**
* Set and store the given colors for the given site.
*
* @param site
* @param foreground
* @param background
*/
@Override
public synchronized void setColors(String site, RGB foreground,
RGB background) {
super.setColors(site, foreground, background, FILE_PATH);
}
/**
* Get the {@link ColorInfo} for the given site from memory.
*
* @param site
* @return
*/
@Override
public synchronized ColorInfo getColor(String site) {
return super.getColor(site, FILE_PATH);
}
@Override
protected ColorInfoMap getColorInfoMap() {
return colorInfoMap;
}
@Override
protected void setColorInfoMap(ColorInfoMap colorInfoMap) {
FeedColorConfigManager.colorInfoMap = colorInfoMap;
}
}

View file

@ -1,85 +0,0 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.collaboration.ui;
import org.eclipse.swt.graphics.RGB;
import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.viz.collaboration.ui.ColorInfoMap.ColorInfo;
/**
* User coloring configuration manager
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 13, 2014 3709 mapeters Initial creation.
* Nov 26, 2014 3709 mapeters Abstracted out code to {@link AbstractColorConfigManager}.
* Dec 08, 2014 3709 mapeters Set foreground and background colors together.
*
* </pre>
*
* @author mapeters
* @version 1.0
*/
public class UserColorConfigManager extends AbstractColorConfigManager {
private static final String FILE_PATH = "collaboration"
+ IPathManager.SEPARATOR + "userColorInfo.xml";
private static ColorInfoMap colorInfoMap;
/**
* Set and store the given colors for the given user.
*
* @param user
* @param foreground
* @param background
*/
@Override
public synchronized void setColors(String user, RGB foreground,
RGB background) {
super.setColors(user, foreground, background, FILE_PATH);
}
/**
* Get the {@link ColorInfo} for the given user from memory.
*
* @param user
* @return
*/
@Override
public synchronized ColorInfo getColor(String user) {
return super.getColor(user, FILE_PATH);
}
@Override
protected ColorInfoMap getColorInfoMap() {
return colorInfoMap;
}
@Override
protected void setColorInfoMap(ColorInfoMap colorInfoMap) {
UserColorConfigManager.colorInfoMap = colorInfoMap;
}
}

View file

@ -22,22 +22,19 @@ package com.raytheon.uf.viz.collaboration.ui.actions;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Device;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import com.google.common.eventbus.Subscribe;
import com.raytheon.uf.viz.collaboration.comm.provider.connection.CollaborationConnection;
import com.raytheon.uf.viz.collaboration.ui.AbstractColorConfigManager;
import com.raytheon.uf.viz.collaboration.ui.ColorInfoMap.ColorInfo;
import com.raytheon.uf.viz.collaboration.ui.FeedColorConfigManager;
import com.raytheon.uf.viz.collaboration.ui.ForegroundBackgroundColorDlg;
import com.raytheon.uf.viz.collaboration.ui.UserColorConfigManager;
import com.raytheon.uf.viz.collaboration.comm.identity.user.IUser;
import com.raytheon.uf.viz.collaboration.display.data.IColorManager;
import com.raytheon.uf.viz.collaboration.display.data.UserColorInfo;
import com.raytheon.uf.viz.collaboration.ui.colors.ForegroundBackgroundColorDlg;
import com.raytheon.uf.viz.collaboration.ui.colors.ForegroundColorDlg;
import com.raytheon.viz.ui.dialogs.ICloseCallback;
/**
@ -50,109 +47,101 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 12/02/14 3709 mapeters Initial creation.
* 12/09/14 3709 mapeters Uses {@link ForegroundBackgroundColorDlg}, renamed from
* Dec 02, 2014 3709 mapeters Initial creation.
* Dec 09, 2014 3709 mapeters Uses {@link ForegroundBackgroundColorDlg}, renamed from
* ChangeUserColorAction, support both user and site colors.
* 12/12/14 3709 mapeters Use static methods to call constructor, icon displays
* Dec 12, 2014 3709 mapeters Use static methods to call constructor, icon displays
* current foreground and background colors.
* Jan 05, 2015 3709 mapeters Added getTextColors(), added me param to createChangeUserTextColorAction().
* Jan 09, 2015 3709 bclement color change manager API changes
* Jan 12, 2015 3709 bclement removed event handler for icon changes, added ChangeTextColorCallback
* Jan 13, 2015 3709 bclement unified color management, simplified construction, added foregroundOnly mode
*
* </pre>
*
* @author mapeters
* @version 1.0
*/
public class ChangeTextColorAction extends Action {
public class ChangeTextColorAction<T extends IUser> extends Action {
private final String key;
private final T user;
private RGB defaultForeground;
private IColorManager<T> colorManager;
private AbstractColorConfigManager colorConfigManager;
private boolean foregroundOnly;
private Image icon;
/**
* Create and return new action for changing user colors.
* Callback that receives new color information when the action results in a
* new color selection for a user
*/
public static interface ChangeTextColorCallback {
public void newColor(IUser user, UserColorInfo colors);
}
private ChangeTextColorCallback actionCallback = null;
/**
* Generate display text string according to provided options
*
* @param user
* @param me
* true if user represents the currently logged in user
* @param displayName
* @param defaultForeground
* @param colorConfigManager
* true if the user's name should be used or false if a generic
* display text should be used
* @return
*/
public static ChangeTextColorAction createChangeUserTextColorAction(
String user, boolean displayName, RGB defaultForeground,
UserColorConfigManager colorConfigManager) {
public static String getDisplayText(IUser user, boolean me,
boolean displayName) {
String name = user.getName();
String text = "Change ";
if (displayName) {
boolean me = CollaborationConnection.getConnection().getUser()
.getName().equals(user);
text += me ? "Your" : (user + "'s");
text += me ? "Your" : (name + "'s");
} else {
text += "User";
}
text += " Text Colors...";
return new ChangeTextColorAction(text, user, defaultForeground,
colorConfigManager);
return text;
}
/**
* Create and return new action for changing site colors.
*
* @param site
* @param defaultForeground
* @param user
* @param me
* true if user represents the currently logged in user
* @param displayName
* true if the user's name should be used or false if a generic
* display text should be used
* @param foregroundOnly
* true if only the option to change the foreground should be
* provided
* @param colorConfigManager
* @return
*/
public static ChangeTextColorAction createChangeSiteTextColorAction(
String site, RGB defaultForeground,
FeedColorConfigManager colorConfigManager) {
return new ChangeTextColorAction("Change Site Text Colors...", site,
defaultForeground, colorConfigManager);
}
private ChangeTextColorAction(String text, String key,
RGB defaultForeground, AbstractColorConfigManager colorConfigManager) {
super(text);
this.key = key;
this.defaultForeground = defaultForeground;
this.colorConfigManager = colorConfigManager;
ColorInfo colorInfo = colorConfigManager.getColor(key);
RGB foreground;
RGB background;
if (colorInfo != null) {
foreground = colorInfo.getColor(SWT.FOREGROUND);
background = colorInfo.getColor(SWT.BACKGROUND);
} else {
foreground = defaultForeground;
background = new RGB(255, 255, 255);
}
setIconColors(foreground, background);
CollaborationConnection.getConnection().registerEventHandler(this);
public ChangeTextColorAction(T user, boolean me, boolean displayName,
boolean foregroundOnly, IColorManager<T> colorConfigManager) {
super(getDisplayText(user, me, displayName));
this.user = user;
this.colorManager = colorConfigManager;
this.foregroundOnly = foregroundOnly;
UserColorInfo colors = getTextColors();
setIconColors(colors);
}
@Override
public void run() {
ColorInfo colorInfo = colorConfigManager.getColor(key);
RGB foreground;
RGB background;
if (colorInfo != null) {
foreground = colorInfo.getColor(SWT.FOREGROUND);
background = colorInfo.getColor(SWT.BACKGROUND);
UserColorInfo colors = getTextColors();
ForegroundColorDlg dialog;
Shell shell = Display.getCurrent().getActiveShell();
String desc = colorManager.getDescription(user);
if (foregroundOnly) {
dialog = new ForegroundColorDlg(shell, desc, colors.getForeground());
} else {
/*
* Set dialog to display default colors
*/
foreground = defaultForeground;
background = new RGB(255, 255, 255);
dialog = new ForegroundBackgroundColorDlg(shell, desc,
colors.getForeground(), colors.getBackground());
}
ForegroundBackgroundColorDlg dialog = new ForegroundBackgroundColorDlg(
Display.getCurrent().getActiveShell(), foreground, background);
dialog.setCloseCallback(new ICloseCallback() {
@Override
@ -161,30 +150,38 @@ public class ChangeTextColorAction extends Action {
return;
}
if (returnValue instanceof RGB[]) {
RGB[] colors = (RGB[]) returnValue;
colorConfigManager.setColors(key, colors[0], colors[1]);
CollaborationConnection connection = CollaborationConnection
.getConnection();
connection.postEvent(new ChangeIconEvent(key, colors[0],
colors[1]));
if (returnValue instanceof UserColorInfo) {
UserColorInfo colors = (UserColorInfo) returnValue;
colorManager.setColorForUser(user, colors);
setIconColors(colors);
if (actionCallback != null) {
actionCallback.newColor(user, colors);
}
}
}
});
dialog.open();
}
@Subscribe
public void changeIcon(ChangeIconEvent event) {
if (event.key.equals(this.key)) {
setIconColors(event.foreground, event.background);
}
/**
* Get the stored colors (or default colors) of this action's user
*
* @return color selected by color manager or default color if none found
*/
private UserColorInfo getTextColors() {
return colorManager.getColorForUser(user);
}
private void setIconColors(RGB foreground, RGB background) {
/**
* Change colors in menu icon which represents the user's text color
* settings
*
* @param colors
*/
private void setIconColors(UserColorInfo colors) {
Device device = Display.getCurrent();
Color fg = new Color(device, foreground);
Color bg = new Color(device, background);
Color fg = new Color(device, colors.getForeground());
Color bg = new Color(device, colors.getBackground());
Image oldIcon = icon;
icon = new Image(device, 15, 15);
@ -206,30 +203,18 @@ public class ChangeTextColorAction extends Action {
}
}
private class ChangeIconEvent {
private String key;
private RGB foreground;
private RGB background;
private ChangeIconEvent(String key, RGB foreground, RGB background) {
this.key = key;
this.foreground = foreground;
this.background = background;
}
}
public void dispose() {
CollaborationConnection connection = CollaborationConnection
.getConnection();
if (connection != null) {
connection.unregisterEventHandler(this);
}
if (icon != null) {
icon.dispose();
}
}
}
/**
* @param actionCallback
* the actionCallback to set
*/
public void setActionCallback(ChangeTextColorCallback actionCallback) {
this.actionCallback = actionCallback;
}
}

View file

@ -0,0 +1,180 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.collaboration.ui.colors;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import com.raytheon.uf.viz.collaboration.display.data.UserColorInfo;
/**
* A dialog that displays a label with settable foreground and background colors
* using a color control.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 04, 2014 3709 lvenable Initial creation
* Jan 09, 2015 3709 bclement moved primary logic to new super class
* Jan 13, 2015 3709 bclement return UserColorInfo instead of RGB[]
*
* </pre>
*
* @author lvenable
* @version 1.0
*/
public class ForegroundBackgroundColorDlg extends ForegroundColorDlg {
/** Background color. */
private Color backgroundClr = null;
private Button foregroundRdo;
/**
* Constructor.
*
* @param parentShell
* Parent shell.
*/
public ForegroundBackgroundColorDlg(Shell parentShell, String description) {
this(parentShell, description, null, null);
}
/**
* Constructor.
*
* @param parentShell
* Parent shell.
* @param fgRGB
* Foreground RGB.
* @param bgRGB
* Background RGB.
*/
public ForegroundBackgroundColorDlg(Shell parentShell, String description,
RGB fgRGB, RGB bgRGB) {
super(parentShell, description, fgRGB);
setText("Foreground/Background Color Chooser");
/*
* If the background RGB is null then set it to a white color.
*/
if (bgRGB == null) {
backgroundClr = new Color(parentShell.getDisplay(), new RGB(255,
255, 255));
} else {
backgroundClr = new Color(parentShell.getDisplay(), bgRGB);
}
}
@Override
protected void disposed() {
super.disposed();
if (backgroundClr != null) {
backgroundClr.dispose();
}
}
@Override
protected void createColorControls() {
Composite colorControlComp = new Composite(shell, SWT.NONE);
colorControlComp.setLayout(new GridLayout(3, false));
colorControlComp.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT,
true, false));
/*
* Foreground/background radio buttons.
*/
foregroundRdo = new Button(colorControlComp, SWT.RADIO);
foregroundRdo.setText("Foreground Color");
foregroundRdo.setSelection(true);
foregroundRdo.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
colorWheelComp.setColor(foregroundClr.getRGB());
}
});
GridData gd = new GridData();
gd.horizontalIndent = 13;
Button backgroundRdo = new Button(colorControlComp, SWT.RADIO);
backgroundRdo.setText("Background Color");
backgroundRdo.setLayoutData(gd);
backgroundRdo.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
colorWheelComp.setColor(backgroundClr.getRGB());
}
});
/*
* Label displaying the foreground/background colors.
*/
gd = new GridData();
gd.horizontalIndent = 13;
previewLabel = new Label(colorControlComp, SWT.BORDER);
FontData fd = previewLabel.getFont().getFontData()[0];
fd.setHeight(16);
fd.setStyle(SWT.BOLD);
labelFont = new Font(getDisplay(), fd);
previewLabel.setFont(labelFont);
previewLabel.setText(" Sample Text ");
previewLabel.setLayoutData(gd);
previewLabel.setForeground(foregroundClr);
previewLabel.setBackground(backgroundClr);
}
@Override
protected void collectReturnValue() {
UserColorInfo colors = new UserColorInfo(foregroundClr.getRGB(),
backgroundClr.getRGB());
setReturnValue(colors);
}
@Override
public void colorChange(RGB rgb, String colorWheelTitle) {
if (foregroundRdo.getSelection()) {
foregroundClr.dispose();
foregroundClr = new Color(getDisplay(), rgb);
previewLabel.setForeground(foregroundClr);
} else {
backgroundClr.dispose();
backgroundClr = new Color(getDisplay(), rgb);
previewLabel.setBackground(backgroundClr);
}
}
}

View file

@ -17,7 +17,7 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.collaboration.ui;
package com.raytheon.uf.viz.collaboration.ui.colors;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
@ -34,13 +34,14 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Layout;
import org.eclipse.swt.widgets.Shell;
import com.raytheon.uf.viz.collaboration.display.data.UserColorInfo;
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
import com.raytheon.viz.ui.dialogs.colordialog.ColorWheelComp;
import com.raytheon.viz.ui.dialogs.colordialog.IColorWheelChange;
/**
* A dialog that displays a label with settable foreground and background colors
* using a color control.
* A dialog that displays a label with settable foreground color using a color
* control.
*
* <pre>
*
@ -48,32 +49,32 @@ import com.raytheon.viz.ui.dialogs.colordialog.IColorWheelChange;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 4, 2014 3709 lvenable Initial creation
* Jan 09, 2015 3709 bclement Initial creation, logic from ForegroundBackgroundColorDlg
* Jan 13, 2015 3709 bclement return UserColorInfo instead of RGB
*
* </pre>
*
* @author lvenable
* @author bclement
* @version 1.0
*/
public class ForegroundBackgroundColorDlg extends CaveSWTDialog implements
public class ForegroundColorDlg extends CaveSWTDialog implements
IColorWheelChange {
/** Color wheel composite. */
private ColorWheelComp colorWheelComp;
protected ColorWheelComp colorWheelComp;
/** Foreground color. */
private Color foregroundClr = null;
protected Color foregroundClr = null;
/** Background color. */
private Color backgroundClr = null;
/** preview label control. */
protected Label previewLabel = null;
/** Foreground/Background label control. */
private Label fgbgLabel = null;
/** Font for the preview label. */
protected Font labelFont = null;
/** Fond for the foreground/background label. */
private Font labelFont = null;
protected final String description;
private Button foregroundRdo;
protected Label descriptionLabel = null;
/**
* Constructor.
@ -81,8 +82,8 @@ public class ForegroundBackgroundColorDlg extends CaveSWTDialog implements
* @param parentShell
* Parent shell.
*/
public ForegroundBackgroundColorDlg(Shell parentShell) {
this(parentShell, null, null);
public ForegroundColorDlg(Shell parentShell, String description) {
this(parentShell, description, null);
}
/**
@ -92,14 +93,12 @@ public class ForegroundBackgroundColorDlg extends CaveSWTDialog implements
* Parent shell.
* @param fgRGB
* Foreground RGB.
* @param bgRGB
* Background RGB.
*/
public ForegroundBackgroundColorDlg(Shell parentShell, RGB fgRGB, RGB bgRGB) {
public ForegroundColorDlg(Shell parentShell, String description, RGB fgRGB) {
super(parentShell, SWT.DIALOG_TRIM | SWT.MIN, CAVE.DO_NOT_BLOCK
| CAVE.PERSPECTIVE_INDEPENDENT);
setText("Foreground/Background Color Chooser");
setText("Foreground Color Chooser");
this.description = description;
/*
* If the foreground RGB is null then set it to a blue color.
*/
@ -109,16 +108,6 @@ public class ForegroundBackgroundColorDlg extends CaveSWTDialog implements
} else {
foregroundClr = new Color(parentShell.getDisplay(), fgRGB);
}
/*
* If the background RGB is null then set it to a white color.
*/
if (bgRGB == null) {
backgroundClr = new Color(parentShell.getDisplay(), new RGB(255,
255, 255));
} else {
backgroundClr = new Color(parentShell.getDisplay(), bgRGB);
}
}
@Override
@ -140,19 +129,21 @@ public class ForegroundBackgroundColorDlg extends CaveSWTDialog implements
foregroundClr.dispose();
}
if (backgroundClr != null) {
backgroundClr.dispose();
}
if (labelFont != null) {
labelFont.dispose();
}
if (descriptionLabel != null) {
descriptionLabel.dispose();
}
}
@Override
protected void initializeComponents(Shell shell) {
createColorWheelControl();
createColorControls();
if (description != null && !description.isEmpty()) {
createDescriptionLabel();
}
addSeparator();
createBottomButtons();
@ -162,7 +153,7 @@ public class ForegroundBackgroundColorDlg extends CaveSWTDialog implements
/**
* Create the color wheel controls.
*/
private void createColorWheelControl() {
protected void createColorWheelControl() {
colorWheelComp = new ColorWheelComp(shell, this, " Color Chooser: ",
true);
}
@ -170,59 +161,33 @@ public class ForegroundBackgroundColorDlg extends CaveSWTDialog implements
/**
* Create the color controls.
*/
private void createColorControls() {
Composite colorControlComp = new Composite(shell, SWT.NONE);
colorControlComp.setLayout(new GridLayout(3, false));
colorControlComp.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT,
true, false));
/*
* Foreground/background radio buttons.
*/
foregroundRdo = new Button(colorControlComp, SWT.RADIO);
foregroundRdo.setText("Foreground Color");
foregroundRdo.setSelection(true);
foregroundRdo.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
colorWheelComp.setColor(foregroundClr.getRGB());
}
});
GridData gd = new GridData();
gd.horizontalIndent = 13;
Button backgroundRdo = new Button(colorControlComp, SWT.RADIO);
backgroundRdo.setText("Background Color");
backgroundRdo.setLayoutData(gd);
backgroundRdo.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
colorWheelComp.setColor(backgroundClr.getRGB());
}
});
/*
* Label displaying the foreground/background colors.
*/
gd = new GridData();
gd.horizontalIndent = 13;
fgbgLabel = new Label(colorControlComp, SWT.BORDER);
FontData fd = fgbgLabel.getFont().getFontData()[0];
protected void createColorControls() {
previewLabel = new Label(shell, SWT.BORDER);
FontData fd = previewLabel.getFont().getFontData()[0];
fd.setHeight(16);
fd.setStyle(SWT.BOLD);
labelFont = new Font(getDisplay(), fd);
fgbgLabel.setFont(labelFont);
fgbgLabel.setText(" Sample Text ");
fgbgLabel.setLayoutData(gd);
previewLabel.setFont(labelFont);
previewLabel.setText(" Sample Text ");
previewLabel.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, true,
true));
previewLabel.setForeground(foregroundClr);
}
fgbgLabel.setForeground(foregroundClr);
fgbgLabel.setBackground(backgroundClr);
/**
* Create a label that describes the scope of the color change.
*/
protected void createDescriptionLabel() {
descriptionLabel = new Label(shell, SWT.CENTER);
descriptionLabel.setText(description);
descriptionLabel.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, true,
true));
}
/**
* Create the bottom OK/Cancel buttons.
*/
private void createBottomButtons() {
protected void createBottomButtons() {
Composite buttonComp = new Composite(shell, SWT.NONE);
buttonComp.setLayout(new GridLayout(2, false));
buttonComp.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true,
@ -238,9 +203,7 @@ public class ForegroundBackgroundColorDlg extends CaveSWTDialog implements
okBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
RGB[] rgbArray = new RGB[] { foregroundClr.getRGB(),
backgroundClr.getRGB() };
setReturnValue(rgbArray);
collectReturnValue();
close();
}
});
@ -259,10 +222,18 @@ public class ForegroundBackgroundColorDlg extends CaveSWTDialog implements
});
}
/**
* Collect the return value from fields. Called when user clicks the ok
* button.
*/
protected void collectReturnValue() {
setReturnValue(new UserColorInfo(foregroundClr.getRGB()));
}
/**
* Add a separator line to the dialog.
*/
private void addSeparator() {
protected void addSeparator() {
GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
Label sepLbl = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
sepLbl.setLayoutData(gd);
@ -277,15 +248,9 @@ public class ForegroundBackgroundColorDlg extends CaveSWTDialog implements
*/
@Override
public void colorChange(RGB rgb, String colorWheelTitle) {
if (foregroundRdo.getSelection()) {
foregroundClr.dispose();
foregroundClr = new Color(getDisplay(), rgb);
fgbgLabel.setForeground(foregroundClr);
} else {
backgroundClr.dispose();
backgroundClr = new Color(getDisplay(), rgb);
fgbgLabel.setBackground(backgroundClr);
}
foregroundClr.dispose();
foregroundClr = new Color(getDisplay(), rgb);
previewLabel.setForeground(foregroundClr);
}
}

View file

@ -0,0 +1,148 @@
package com.raytheon.uf.viz.collaboration.ui.colors;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.common.localization.LocalizationContext;
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
import com.raytheon.uf.common.localization.LocalizationFile;
import com.raytheon.uf.common.localization.PathManager;
import com.raytheon.uf.common.localization.PathManagerFactory;
import com.raytheon.uf.common.serialization.SerializationException;
import com.raytheon.uf.common.serialization.SingleTypeJAXBManager;
import com.raytheon.uf.viz.collaboration.comm.identity.user.IUser;
import com.raytheon.uf.viz.collaboration.display.data.ColorInfoMap;
import com.raytheon.uf.viz.collaboration.display.data.UserColorInfo;
import com.raytheon.uf.viz.collaboration.ui.Activator;
/**
* Abstract class for persisting user color configuration to localization
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 13, 2014 3709 mapeters Initial creation.
* Dec 09, 2014 3709 mapeters setColors() sets foreground and background together.
* Jan 09, 2015 3709 bclement renamed from AbstractColorConfigManager
* moved colorInfoMap from subclasses to here
* Jan 13, 2015 3709 bclement renamed to PersistentColorConfigStorage, now a utility
*
* </pre>
*
* @author mapeters
* @version 1.0
*/
public abstract class PersistentColorConfigStorage<T extends IUser> {
protected static final String CONFIG_DIR_NAME = "collaboration";
private static final SingleTypeJAXBManager<ColorInfoMap> jaxb = SingleTypeJAXBManager
.createWithoutException(ColorInfoMap.class);
/**
* Persist color mapping configuration to localization file
*
* @param colorInfoMap
* @param filePath
*/
public void persistColors(Map<T, UserColorInfo> map, String filePath) {
IPathManager pathMgr = PathManagerFactory.getPathManager();
LocalizationContext lContext = pathMgr.getContext(
LocalizationType.CAVE_STATIC, LocalizationLevel.USER);
LocalizationFile file = pathMgr.getLocalizationFile(lContext, filePath);
try {
jaxb.marshalToXmlFile(createStorageMap(map), file.getFile()
.getPath());
file.save();
} catch (Exception e) {
Activator.statusHandler.error(
"Unable to write color information to file: "
+ file.getName() + " in context " + lContext, e);
}
}
/**
* Convert runtime map to a map that can be serialized to storage
*
* @param colorInfoMap
* @return
*/
protected ColorInfoMap createStorageMap(Map<T, UserColorInfo> colorInfoMap) {
Map<String, UserColorInfo> rval = new HashMap<>(colorInfoMap.size());
for (Entry<T, UserColorInfo> entry : colorInfoMap.entrySet()) {
rval.put(convert(entry.getKey()), entry.getValue());
}
return new ColorInfoMap(rval);
}
/**
* Convert map from storage to runtime map
*
* @param persisted
* @return
*/
public Map<T, UserColorInfo> unpackStorageMap(
Map<String, UserColorInfo> persisted) {
Map<T, UserColorInfo> rval = new HashMap<>(persisted.size());
for (Entry<String, UserColorInfo> entry : persisted.entrySet()) {
rval.put(convert(entry.getKey()), entry.getValue());
}
return rval;
}
/**
* Convert user object to string key for storage
*
* @param user
* @return
*/
protected String convert(T user) {
return user.getClientIndependentId();
}
/**
* Convert persisted key to user object
*
* @param persisted
* @return
*/
protected abstract T convert(String persisted);
/**
* Get the color mapping configuration from localization
*
* @param filePath
* @return empty map if file does not exists in localization
*/
public Map<T, UserColorInfo> getColors(String filePath) {
IPathManager pm = (PathManager) PathManagerFactory.getPathManager();
LocalizationContext locContext = pm.getContext(
LocalizationType.CAVE_STATIC, LocalizationLevel.USER);
LocalizationFile file = pm.getLocalizationFile(locContext, filePath);
Map<String, UserColorInfo> rval = null;
if (file != null && file.exists()) {
try {
ColorInfoMap map = jaxb.unmarshalFromXmlFile(file.getFile());
if (map != null) {
rval = map.getColors();
}
} catch (SerializationException e) {
Activator.statusHandler.error(
"Unable to read color information from file: "
+ file.getName() + " in level "
+ LocalizationLevel.USER, e);
}
}
if (rval == null) {
rval = new HashMap<>();
}
return unpackStorageMap(rval);
}
}

View file

@ -0,0 +1,106 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.collaboration.ui.colors;
import java.util.Map;
import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.viz.collaboration.comm.provider.user.IDConverter;
import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
import com.raytheon.uf.viz.collaboration.display.data.SessionColorManager;
import com.raytheon.uf.viz.collaboration.display.data.UserColorInfo;
/**
* Session color manager that persists colors to localization
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jan 13, 2015 3709 bclement Initial creation
*
* </pre>
*
* @author bclement
* @version 1.0
*/
public class PersistentSessionColorManager extends SessionColorManager {
private static final String ROOM_CONFIG_DIR = PersistentColorConfigStorage.CONFIG_DIR_NAME
+ IPathManager.SEPARATOR + "roomColors";
private final PersistentColorConfigStorage<VenueParticipant> storage = new PersistentColorConfigStorage<VenueParticipant>() {
@Override
protected VenueParticipant convert(String persisted) {
return IDConverter.convertFromRoom(persisted);
}
};
private final String configFilePath;
/**
* @param roomId
* @return
*/
public static PersistentSessionColorManager getManagerForRoom(String roomId) {
/*
* if multiple managers are created for the same room, it could cause
* concurrency issues with writing to localization. This could be solved
* with a soft reference cache here. However, since there *should* only
* be one of these per room id, it might be overkill
*/
return new PersistentSessionColorManager(roomId);
}
/**
* @param roomId
*/
protected PersistentSessionColorManager(String roomId) {
this.configFilePath = ROOM_CONFIG_DIR + IPathManager.SEPARATOR + roomId;
Map<VenueParticipant, UserColorInfo> persistedColors = storage
.getColors(configFilePath);
colors.putAll(persistedColors);
}
@Override
public String getDescription(VenueParticipant participant) {
return "Color changes will apply to the user " + participant.getName()
+ " only in the " + participant.getRoom() + " room.";
}
@Override
protected void setColorInternal(VenueParticipant user, UserColorInfo color) {
synchronized (storage) {
super.setColorInternal(user, color);
storage.persistColors(colors, configFilePath);
}
}
@Override
public void clearColors() {
synchronized (storage) {
super.clearColors();
storage.persistColors(colors, configFilePath);
}
}
}

View file

@ -0,0 +1,142 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.collaboration.ui.colors;
import java.util.Map;
import org.eclipse.swt.graphics.RGB;
import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.viz.collaboration.comm.identity.user.IUser;
import com.raytheon.uf.viz.collaboration.comm.provider.connection.CollaborationConnection;
import com.raytheon.uf.viz.collaboration.comm.provider.user.IDConverter;
import com.raytheon.uf.viz.collaboration.display.data.IColorManager;
import com.raytheon.uf.viz.collaboration.display.data.UserColorInfo;
/**
* Custom user coloring configuration manager for use where the user's true
* identity is known (eg one-to-one chat)
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 13, 2014 3709 mapeters Initial creation.
* Nov 26, 2014 3709 mapeters Abstracted out code to {@link PersistentColorConfigStorage}.
* Dec 08, 2014 3709 mapeters Set foreground and background colors together.
* Jan 09, 2015 3709 bclement made into a true singleton, moved colorInfoMap to super
* Jan 13, 2015 3709 bclement refactored to use PersistentColorConfigStorage utility
*
* </pre>
*
* @author mapeters
* @version 1.0
*/
public class UserColorConfigManager implements IColorManager<IUser> {
private static final String FILE_PATH = PersistentColorConfigStorage.CONFIG_DIR_NAME
+ IPathManager.SEPARATOR + "userColorInfo.xml";
/* dark blue */
private static final UserColorInfo DEFAULT_USER_COLORS = new UserColorInfo(
new RGB(0, 0, 191));
/* red */
private static final UserColorInfo DEFAULT_PEER_COLORS = new UserColorInfo(
new RGB(255, 0, 0));
private static UserColorConfigManager instance;
public static synchronized UserColorConfigManager getInstance() {
if (instance == null) {
instance = new UserColorConfigManager();
}
return instance;
}
private final PersistentColorConfigStorage<IUser> storage = new PersistentColorConfigStorage<IUser>() {
@Override
protected IUser convert(String persisted) {
return IDConverter.convertFrom(persisted);
}
};
private Map<IUser, UserColorInfo> _colors;
protected UserColorConfigManager() {
}
@Override
public String getDescription(IUser user) {
return "Color changes will apply to one-on-one chat sessions with user "
+ user.getName() + ".";
}
@Override
public UserColorInfo getColorForUser(IUser user) {
Map<IUser, UserColorInfo> colorMap = getColorMap();
UserColorInfo rval = colorMap.get(user);
if (rval == null) {
CollaborationConnection conn = CollaborationConnection
.getConnection();
if (conn.getUser().isSameUser(user)) {
rval = DEFAULT_USER_COLORS;
} else {
rval = DEFAULT_PEER_COLORS;
}
}
return rval;
}
/**
* Get color mappings, goes to storage if not initialized
*
* @return
*/
private Map<IUser, UserColorInfo> getColorMap() {
synchronized (storage) {
if (_colors == null) {
_colors = storage.getColors(FILE_PATH);
}
}
return _colors;
}
@Override
public void setColorForUser(IUser user, UserColorInfo color) {
synchronized (storage) {
Map<IUser, UserColorInfo> colorMap = getColorMap();
colorMap.put(user, color);
storage.persistColors(colorMap, FILE_PATH);
}
}
@Override
public void clearColors() {
synchronized (storage) {
Map<IUser, UserColorInfo> colorMap = getColorMap();
colorMap.clear();
storage.persistColors(colorMap, FILE_PATH);
}
}
}

View file

@ -99,6 +99,7 @@ import com.raytheon.viz.ui.views.CaveFloatingView;
* implemented here, added messagesTextMenuMgr.
* Nov 26, 2014 3709 mapeters Added {@link #getColorFromRGB()}.
* Dec 08, 2014 3709 mapeters Removed messagesTextMenuMgr.
* Jan 13, 2015 3709 bclement styleAndAppendText() takes foreground and background
* </pre>
*
* @author rferrel
@ -366,8 +367,8 @@ public abstract class AbstractSessionView<T extends IUser> extends
sb.append("(").append(time).append(") ");
int offset = sb.length();
boolean newLine = Activator.getDefault()
.getPreferenceStore().getBoolean("chatLines");
boolean newLine = Activator.getDefault().getPreferenceStore()
.getBoolean("chatLines");
String displayPreference = newLine ? ("\n ") : (": ");
sb.append(name).append(displayPreference).append(body);
@ -470,7 +471,8 @@ public abstract class AbstractSessionView<T extends IUser> extends
String name, T userId, String subject, List<StyleRange> ranges);
protected abstract void styleAndAppendText(StringBuilder sb, int offset,
String name, T userId, List<StyleRange> ranges, Color color);
String name, T userId, List<StyleRange> ranges, Color foreground,
Color background);
/**
* Find keys words in body of message starting at offset.
@ -586,7 +588,7 @@ public abstract class AbstractSessionView<T extends IUser> extends
oldFont.dispose();
}
}
public void setAlertWords(List<AlertWord> words) {
alertWords = words;
}
@ -636,14 +638,17 @@ public abstract class AbstractSessionView<T extends IUser> extends
builder.insert(0, "\n");
}
Color color = Display.getCurrent().getSystemColor(swtColor);
Color foreground = Display.getCurrent().getSystemColor(
swtColor);
Color background = Display.getCurrent().getSystemColor(
SWT.COLOR_WHITE);
StyleRange range = new StyleRange(messagesText
.getCharCount(), builder.length(), color, null,
SWT.BOLD);
.getCharCount(), builder.length(), foreground,
null, SWT.BOLD);
List<StyleRange> ranges = new ArrayList<StyleRange>();
ranges.add(range);
styleAndAppendText(builder, 0, builder.toString(), null,
ranges, color);
ranges, foreground, background);
}
// Archive the message

View file

@ -33,11 +33,8 @@ import org.eclipse.jface.action.Separator;
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.ColorDialog;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.ToolItem;
import org.eclipse.ui.IPartListener;
@ -54,6 +51,7 @@ import com.raytheon.uf.viz.collaboration.comm.identity.CollaborationException;
import com.raytheon.uf.viz.collaboration.comm.identity.ISharedDisplaySession;
import com.raytheon.uf.viz.collaboration.comm.identity.IVenueSession;
import com.raytheon.uf.viz.collaboration.comm.identity.invite.ColorPopulator;
import com.raytheon.uf.viz.collaboration.comm.identity.user.IUser;
import com.raytheon.uf.viz.collaboration.comm.identity.user.SharedDisplayRole;
import com.raytheon.uf.viz.collaboration.comm.provider.event.LeaderChangeEvent;
import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
@ -65,6 +63,7 @@ import com.raytheon.uf.viz.collaboration.display.data.ColorChangeEvent;
import com.raytheon.uf.viz.collaboration.display.data.SessionContainer;
import com.raytheon.uf.viz.collaboration.display.data.SessionContainer.IDisplayContainerChangedListener;
import com.raytheon.uf.viz.collaboration.display.data.SharedDisplaySessionMgr;
import com.raytheon.uf.viz.collaboration.display.data.UserColorInfo;
import com.raytheon.uf.viz.collaboration.display.rsc.SelfAddingSystemResourceListener;
import com.raytheon.uf.viz.collaboration.display.rsc.telestrator.CollaborationDrawingEvent;
import com.raytheon.uf.viz.collaboration.display.rsc.telestrator.CollaborationDrawingEvent.CollaborationEventType;
@ -73,6 +72,8 @@ import com.raytheon.uf.viz.collaboration.display.rsc.telestrator.CollaborationDr
import com.raytheon.uf.viz.collaboration.display.rsc.telestrator.CollaborationDrawingToolLayer;
import com.raytheon.uf.viz.collaboration.display.rsc.telestrator.CollaborationDrawingUIManager;
import com.raytheon.uf.viz.collaboration.ui.Activator;
import com.raytheon.uf.viz.collaboration.ui.actions.ChangeTextColorAction;
import com.raytheon.uf.viz.collaboration.ui.actions.ChangeTextColorAction.ChangeTextColorCallback;
import com.raytheon.uf.viz.core.ContextManager;
import com.raytheon.uf.viz.core.VizApp;
import com.raytheon.uf.viz.core.drawables.IRenderableDisplay;
@ -107,6 +108,8 @@ import com.raytheon.viz.ui.input.EditableManager;
* May 05, 2014 3076 bclement added clear all action
* Jun 30, 2014 1798 bclement added disableCurrentLayer()
* Dev 02, 2014 3709 mapeters added {@link #initComponents()} override
* Jan 09, 2015 3709 bclement now uses ForegroundColorDlg for consistency
* Jan 13, 2015 3709 bclement now uses ChangeTextColorAction for consistency
*
* </pre>
*
@ -130,8 +133,6 @@ public class CollaborationSessionView extends SessionView implements
}
};
private Action colorChangeAction;
private Action leaderChangeAction;
private ActionContributionItem drawAction;
@ -235,45 +236,10 @@ public class CollaborationSessionView extends SessionView implements
}
}
/*
* (non-Javadoc)
*
* @see
* com.raytheon.uf.viz.collaboration.ui.session.SessionView#initComponents
* (org.eclipse.swt.widgets.Composite)
*/
@Override
protected void initComponents(Composite parent) {
enableUserColors = false;
super.initComponents(parent);
}
@Override
protected void createActions() {
super.createActions();
Bundle bundle = Activator.getDefault().getBundle();
colorChangeAction = new Action("Change Color...",
IconUtil.getImageDescriptor(bundle, "change_color.gif")) {
@Override
public void run() {
ColorDialog dlg = new ColorDialog(Display.getCurrent()
.getActiveShell());
RGB rgb = dlg.open();
if (rgb != null) {
IStructuredSelection selection = (IStructuredSelection) usersTable
.getSelection();
VenueParticipant entry = (VenueParticipant) selection
.getFirstElement();
ColorChangeEvent event = new ColorChangeEvent(entry, rgb);
try {
session.sendObjectToVenue(event);
} catch (CollaborationException e) {
statusHandler.handle(Priority.PROBLEM,
"Unable to send color change to venue", e);
}
}
}
};
leaderChangeAction = new Action("Transfer Leadership",
IconUtil.getImageDescriptor(bundle, "leader_transfer.gif")) {
@ -608,7 +574,7 @@ public class CollaborationSessionView extends SessionView implements
|| session.hasRole(SharedDisplayRole.SESSION_LEADER)) {
if (session.hasRole(SharedDisplayRole.SESSION_LEADER)) {
manager.add(new Separator());
manager.add(colorChangeAction);
IStructuredSelection selection = (IStructuredSelection) usersTable
.getSelection();
VenueParticipant entry = (VenueParticipant) selection
@ -621,6 +587,55 @@ public class CollaborationSessionView extends SessionView implements
}
}
/**
* Callback used in the change color action. Gets the new color from the
* dialog and sends a color change event to the session
*/
private final ChangeTextColorCallback sendColorEventCallback = new ChangeTextColorCallback() {
@Override
public void newColor(IUser user, UserColorInfo colors) {
IStructuredSelection selection = (IStructuredSelection) usersTable
.getSelection();
VenueParticipant entry = (VenueParticipant) selection
.getFirstElement();
ColorChangeEvent event = new ColorChangeEvent(entry,
colors.getForeground());
try {
session.sendObjectToVenue(event);
} catch (CollaborationException e) {
statusHandler.handle(Priority.PROBLEM,
"Unable to send color change to venue", e);
}
}
};
/*
* (non-Javadoc)
*
* @see
* com.raytheon.uf.viz.collaboration.ui.session.SessionView#addColorAction
* (org.eclipse.jface.action.IMenuManager,
* com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant,
* boolean)
*/
@Override
protected void addColorAction(IMenuManager manager, VenueParticipant user,
boolean me) {
if (session.hasRole(SharedDisplayRole.SESSION_LEADER)) {
String colorActionKey = user.getFQName();
ChangeTextColorAction<VenueParticipant> userColorAction = userColorActions
.get(colorActionKey);
if (userColorAction == null) {
userColorAction = new ChangeTextColorAction<VenueParticipant>(
user, me, me, true, colorManager);
userColorAction.setActionCallback(sendColorEventCallback);
userColorActions.put(colorActionKey, userColorAction);
}
manager.add(userColorAction);
}
}
@Subscribe
public void modifyColors(ColorPopulator populator) {
VizApp.runAsync(new Runnable() {

View file

@ -38,6 +38,7 @@ import com.raytheon.uf.viz.collaboration.comm.provider.session.SharedDisplaySess
import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId;
import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
import com.raytheon.uf.viz.collaboration.display.data.SessionColorManager;
import com.raytheon.uf.viz.collaboration.display.data.UserColorInfo;
import com.raytheon.uf.viz.collaboration.ui.AbstractUserLabelProvider;
import com.raytheon.uf.viz.collaboration.ui.SiteConfigurationManager;
@ -58,6 +59,7 @@ import com.raytheon.uf.viz.collaboration.ui.SiteConfigurationManager;
* Feb 13, 2014 2751 njensen Added leader icons
* Feb 18, 2014 2751 bclement changed tooltip from JID to UserId
* Oct 10, 2014 3708 bclement SiteConfigurationManager changes, added actingSite
* Jan 13, 2015 3709 bclement added support for foreground and background colors
*
* </pre>
*
@ -71,10 +73,13 @@ public class ParticipantsLabelProvider extends
protected String sessionId = null;
private String actingSite;
private static final RGB DEFAULT_FOREGROUND = new RGB(0,0,0);
private static final RGB DEFAULT_BACKGROUND = new RGB(255,255,255);
protected Map<RGB, Color> colors = new HashMap<RGB, Color>();
private SessionColorManager manager;
private SessionColorManager sessionColorManager;
private Font boldFont;
@ -160,9 +165,34 @@ public class ParticipantsLabelProvider extends
return null;
}
VenueParticipant user = ((VenueParticipant) element);
RGB rgb = manager.getColorForUser(user);
UserColorInfo colors = sessionColorManager.getColorForUser(user);
RGB rgb = colors.getForeground();
return getTextColor(rgb, DEFAULT_FOREGROUND);
}
@Override
public Color getBackground(Object element) {
if (!(element instanceof VenueParticipant)) {
return null;
}
VenueParticipant user = ((VenueParticipant) element);
UserColorInfo colors = sessionColorManager.getColorForUser(user);
RGB rgb = colors.getBackground();
return getTextColor(rgb, DEFAULT_BACKGROUND);
}
/**
* Gets text coloring for participant.
*
* @param rgb
* @param defaultColor
* @return default if rgb is null
*/
private Color getTextColor(RGB rgb, RGB defaultColor) {
if (rgb == null) {
rgb = new RGB(0, 0, 0);
rgb = defaultColor;
}
Color color = colors.get(rgb);
if (color == null) {
@ -252,8 +282,8 @@ public class ParticipantsLabelProvider extends
* @param manager
* the manager to set
*/
public void setManager(SessionColorManager manager) {
this.manager = manager;
public void setSessionColorManager(SessionColorManager manager) {
this.sessionColorManager = manager;
}
@Override

View file

@ -32,7 +32,6 @@ import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.custom.StyleRange;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.jivesoftware.smack.packet.Presence.Type;
@ -49,10 +48,10 @@ import com.raytheon.uf.viz.collaboration.comm.provider.connection.CollaborationC
import com.raytheon.uf.viz.collaboration.comm.provider.user.RosterItem;
import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId;
import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
import com.raytheon.uf.viz.collaboration.ui.ColorInfoMap.ColorInfo;
import com.raytheon.uf.viz.collaboration.ui.UserColorConfigManager;
import com.raytheon.uf.viz.collaboration.display.data.UserColorInfo;
import com.raytheon.uf.viz.collaboration.ui.actions.ChangeTextColorAction;
import com.raytheon.uf.viz.collaboration.ui.actions.PrintLogActionContributionItem;
import com.raytheon.uf.viz.collaboration.ui.colors.UserColorConfigManager;
import com.raytheon.uf.viz.collaboration.ui.notifier.NotifierTask;
import com.raytheon.uf.viz.collaboration.ui.notifier.NotifierTools;
import com.raytheon.uf.viz.core.sounds.SoundUtil;
@ -77,6 +76,8 @@ import com.raytheon.uf.viz.core.sounds.SoundUtil;
* Dec 08, 2014 3709 mapeters move color change actions to menu bar.
* Dec 12, 2014 3709 mapeters Store {@link ChangeTextColorAction}s as fields,
* dispose them.
* Jan 09, 2015 3709 bclement color config manager API changes
* Jan 13, 2015 3709 bclement ChangeTextColorAction API changes
*
* </pre>
*
@ -92,24 +93,21 @@ public class PeerToPeerView extends AbstractSessionView<IUser> implements
public static final String ID = "com.raytheon.uf.viz.collaboration.PeerToPeerView";
private static final Color DEFAULT_USER_FOREGROUND_COLOR = Display
.getCurrent().getSystemColor(SWT.COLOR_DARK_BLUE);
private static final Color DEFAULT_PEER_FOREGROUND_COLOR = Display
.getCurrent().getSystemColor(SWT.COLOR_RED);
private static final Color BLACK = Display.getCurrent().getSystemColor(
SWT.COLOR_BLACK);
private static final Color WHITE = Display.getCurrent().getSystemColor(
SWT.COLOR_WHITE);
private IUser peer;
private boolean online = true;
private static UserColorConfigManager colorConfigManager;
private static UserColorConfigManager colorManager;
private ChangeTextColorAction userColorAction;
private ChangeTextColorAction<IUser> userColorAction;
private ChangeTextColorAction peerColorAction;
private ChangeTextColorAction<IUser> peerColorAction;
public PeerToPeerView() {
super();
@ -221,48 +219,40 @@ public class PeerToPeerView extends AbstractSessionView<IUser> implements
if (connection == null) {
return;
}
Color color = null;
Color foreground;
Color background;
if (userId == null) {
color = BLACK;
} else if (!userId.equals(connection.getUser())) {
color = DEFAULT_PEER_FOREGROUND_COLOR;
foreground = BLACK;
background = WHITE;
} else {
color = DEFAULT_USER_FOREGROUND_COLOR;
UserColorInfo colors = colorManager.getColorForUser(userId);
foreground = getColorFromRGB(colors.getForeground());
background = getColorFromRGB(colors.getBackground());
}
styleAndAppendText(sb, offset, name, userId, ranges, color);
styleAndAppendText(sb, offset, name, userId, ranges, foreground,
background);
};
@Override
public void styleAndAppendText(StringBuilder sb, int offset, String name,
IUser userId, List<StyleRange> ranges, Color color) {
Color fgColor = color;
Color bgColor = null;
if (userId != null) {
// get user colors from config manager
ColorInfo userColor = colorConfigManager.getColor(userId
.getName());
if (userColor != null) {
fgColor = getColorFromRGB(userColor.getColor(SWT.FOREGROUND));
bgColor = getColorFromRGB(userColor.getColor(SWT.BACKGROUND));
}
}
IUser userId, List<StyleRange> ranges, Color foreground,
Color background) {
StyleRange range = new StyleRange(messagesText.getCharCount(),
sb.length(), fgColor, null, SWT.NORMAL);
sb.length(), foreground, null, SWT.NORMAL);
ranges.add(range);
range = new StyleRange(messagesText.getCharCount() + offset,
(userId != null ? name.length() + 1 : sb.length() - offset),
fgColor, null, SWT.BOLD);
foreground, null, SWT.BOLD);
ranges.add(range);
messagesText.append(sb.toString());
for (StyleRange newRange : ranges) {
messagesText.setStyleRange(newRange);
}
int lineNumber = messagesText.getLineCount() - 1;
messagesText.setLineBackground(lineNumber, 1, bgColor);
messagesText.setLineBackground(lineNumber, 1, background);
messagesText.setTopIndex(lineNumber);
}
@ -329,7 +319,7 @@ public class PeerToPeerView extends AbstractSessionView<IUser> implements
@Override
protected void initComponents(Composite parent) {
super.initComponents(parent);
colorConfigManager = new UserColorConfigManager();
colorManager = UserColorConfigManager.getInstance();
// unfortunately this code cannot be a part of createToolbarButton
// because I cannot instantiate the ACI until after the messagesText
@ -398,12 +388,9 @@ public class PeerToPeerView extends AbstractSessionView<IUser> implements
*/
private void createDropDownMenu() {
IMenuManager mgr = getViewSite().getActionBars().getMenuManager();
String myName = CollaborationConnection.getConnection().getUser()
.getName();
RGB defaultUserForeground = DEFAULT_USER_FOREGROUND_COLOR.getRGB();
userColorAction = ChangeTextColorAction
.createChangeUserTextColorAction(myName, true,
defaultUserForeground, colorConfigManager);
UserId myUser = CollaborationConnection.getConnection().getUser();
userColorAction = new ChangeTextColorAction<IUser>(myUser, true, true,
false, colorManager);
mgr.add(userColorAction);
}
@ -412,11 +399,8 @@ public class PeerToPeerView extends AbstractSessionView<IUser> implements
*/
public void addChangePeerColorAction() {
IMenuManager mgr = getViewSite().getActionBars().getMenuManager();
String peerName = peer.getName();
RGB defaultPeerForeground = DEFAULT_PEER_FOREGROUND_COLOR.getRGB();
peerColorAction = ChangeTextColorAction
.createChangeUserTextColorAction(peerName, true,
defaultPeerForeground, colorConfigManager);
peerColorAction = new ChangeTextColorAction<IUser>(peer, false, true,
false, colorManager);
mgr.add(peerColorAction);
}
}

View file

@ -19,9 +19,6 @@
**/
package com.raytheon.uf.viz.collaboration.ui.session;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.eclipse.jface.action.Action;
@ -31,9 +28,6 @@ import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyleRange;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Composite;
import org.jivesoftware.smack.packet.Presence;
@ -43,8 +37,6 @@ import com.raytheon.uf.viz.collaboration.comm.identity.info.SiteConfigInformatio
import com.raytheon.uf.viz.collaboration.comm.provider.connection.CollaborationConnection;
import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
import com.raytheon.uf.viz.collaboration.ui.Activator;
import com.raytheon.uf.viz.collaboration.ui.ColorInfoMap.ColorInfo;
import com.raytheon.uf.viz.collaboration.ui.FeedColorConfigManager;
import com.raytheon.uf.viz.collaboration.ui.SiteConfigurationManager;
import com.raytheon.uf.viz.collaboration.ui.actions.ChangeTextColorAction;
import com.raytheon.uf.viz.collaboration.ui.prefs.CollabPrefConstants;
@ -78,6 +70,9 @@ import com.raytheon.uf.viz.collaboration.ui.prefs.CollabPrefConstants;
* Nov 26, 2014 3709 mapeters support foreground/background color preferences for each site
* Dec 08, 2014 3709 mapeters Removed ChangeSiteColorAction, uses {@link ChangeTextColorAction}.
* Dec 12, 2014 3709 mapeters Store {@link ChangeTextColorAction}s in map, dispose them.
* Jan 05, 2015 3709 mapeters Use both site and user name as key in siteColorActions map.
* Jan 09, 2015 3709 bclement color config manager API changes
* Jan 12, 2015 3709 bclement use parent object's session color manager, colors now based on user, not site
*
* </pre>
*
@ -95,8 +90,6 @@ public class SessionFeedView extends SessionView {
private Action userRemoveSiteAction;
private static FeedColorConfigManager colorConfigManager;
private String actingSite;
/**
@ -106,16 +99,13 @@ public class SessionFeedView extends SessionView {
private volatile boolean initialized = false;
private Map<String, ChangeTextColorAction> siteColorActions;
/**
*
*/
public SessionFeedView() {
super();
actingSite = CollaborationConnection.getConnection()
.getPresence().getProperty(SiteConfigInformation.SITE_NAME)
.toString();
actingSite = CollaborationConnection.getConnection().getPresence()
.getProperty(SiteConfigInformation.SITE_NAME).toString();
}
/*
@ -127,13 +117,8 @@ public class SessionFeedView extends SessionView {
*/
@Override
protected void initComponents(Composite parent) {
enableUserColors = false;
super.initComponents(parent);
colorConfigManager = new FeedColorConfigManager();
usersTable.refresh();
siteColorActions = new HashMap<>();
}
@Subscribe
@ -206,16 +191,6 @@ public class SessionFeedView extends SessionView {
protected void fillContextMenu(IMenuManager manager) {
super.fillContextMenu(manager);
String site = getSelectedSite();
RGB defaultForeground = colorManager
.getColorForUser(getSelectedParticipant());
ChangeTextColorAction siteColorAction = siteColorActions.get(site);
if(siteColorAction == null) {
siteColorAction = ChangeTextColorAction
.createChangeSiteTextColorAction(site, defaultForeground,
colorConfigManager);
siteColorActions.put(site, siteColorAction);
}
manager.add(siteColorAction);
if (!SiteConfigurationManager.isVisible(actingSite, site)) {
userAddSiteAction
.setText("Show Messages from " + getSelectedSite());
@ -269,50 +244,12 @@ public class SessionFeedView extends SessionView {
// should we append?
if (site == null
|| SiteConfigurationManager
.isVisible(actingSite, site.toString())) {
|| SiteConfigurationManager.isVisible(actingSite,
site.toString())) {
appendMessage(msg);
}
}
/**
* Get site's foreground/background colors from colorConfigManager to pass
* to parent method.
*
* @param sb
* @param offset
* @param name
* @param userId
* @param ranges
* @param fgColor
* @param bgColor
* @param subject
*/
@Override
protected void styleAndAppendText(StringBuilder sb, int offset,
String name, VenueParticipant userId, List<StyleRange> ranges,
Color fgColor, Color bgColor, String subject) {
String site = null;
if (subject != null) {
site = subject;
} else if (userId != null) {
Presence presence = session.getVenue().getPresence(userId);
if (presence != null) {
site = String.valueOf(presence
.getProperty(SiteConfigInformation.SITE_NAME));
}
}
if (site != null) {
ColorInfo siteColor = colorConfigManager.getColor(site);
if (siteColor != null) {
fgColor = getColorFromRGB(siteColor.getColor(SWT.FOREGROUND));
bgColor = getColorFromRGB(siteColor.getColor(SWT.BACKGROUND));
}
}
super.styleAndAppendText(sb, offset, name, userId, ranges, fgColor,
bgColor, subject);
}
/**
* Get the selected user
*
@ -485,12 +422,4 @@ public class SessionFeedView extends SessionView {
}
}
@Override
public void dispose() {
for (ChangeTextColorAction siteColorAction : siteColorActions.values()) {
siteColorAction.dispose();
}
super.dispose();
}
}

View file

@ -53,7 +53,6 @@ import org.eclipse.swt.events.MouseTrackAdapter;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
@ -82,12 +81,13 @@ import com.raytheon.uf.viz.collaboration.comm.provider.session.VenueSession;
import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId;
import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
import com.raytheon.uf.viz.collaboration.display.data.SessionColorManager;
import com.raytheon.uf.viz.collaboration.display.data.UserColorInfo;
import com.raytheon.uf.viz.collaboration.ui.Activator;
import com.raytheon.uf.viz.collaboration.ui.ColorInfoMap.ColorInfo;
import com.raytheon.uf.viz.collaboration.ui.UserColorConfigManager;
import com.raytheon.uf.viz.collaboration.ui.actions.ChangeTextColorAction;
import com.raytheon.uf.viz.collaboration.ui.actions.ChangeTextColorAction.ChangeTextColorCallback;
import com.raytheon.uf.viz.collaboration.ui.actions.PeerToPeerChatAction;
import com.raytheon.uf.viz.collaboration.ui.actions.PrintLogActionContributionItem;
import com.raytheon.uf.viz.collaboration.ui.colors.PersistentSessionColorManager;
import com.raytheon.uf.viz.collaboration.ui.prefs.CollabPrefConstants;
import com.raytheon.uf.viz.core.VizApp;
import com.raytheon.uf.viz.core.sounds.SoundUtil;
@ -122,6 +122,8 @@ import com.raytheon.uf.viz.core.sounds.SoundUtil;
* use parent's colors map.
* Dec 02, 2014 3709 mapeters added color actions for group chats without shared display.
* Dec 12, 2014 3709 mapeters Store {@link ChangeTextColorAction}s in map, dispose them.
* Jan 09, 2015 3709 bclement color config manager API changes
* Jan 12, 2015 3709 bclement unified color management into SessionColorManager
*
* </pre>
*
@ -155,11 +157,17 @@ public class SessionView extends AbstractSessionView<VenueParticipant>
protected SessionColorManager colorManager;
private static UserColorConfigManager colorConfigManager;
protected Map<String, ChangeTextColorAction<VenueParticipant>> userColorActions = new HashMap<>();
private Map<String, ChangeTextColorAction> userColorActions;
protected boolean enableUserColors = true;
/*
* callback used to refresh participant list when the user adds/changes a
* custom color configuration for a participant
*/
protected final ChangeTextColorCallback refreshCallback = new ChangeTextColorCallback() {
public void newColor(IUser user, UserColorInfo colors) {
refreshParticipantList();
}
};
public SessionView() {
super();
@ -182,10 +190,6 @@ public class SessionView extends AbstractSessionView<VenueParticipant>
protected void initComponents(Composite parent) {
initColorManager();
super.initComponents(parent);
if (enableUserColors) {
colorConfigManager = new UserColorConfigManager();
userColorActions = new HashMap<>();
}
// unfortunately this code cannot be a part of createToolbarButton
// because I cannot instantiate the ACI until after the messagesText
@ -239,19 +243,22 @@ public class SessionView extends AbstractSessionView<VenueParticipant>
if (!me) {
manager.add(new PeerToPeerChatAction(entry));
}
if (enableUserColors) {
// add color actions if in group chat room without shared display
String user = entry.getName();
RGB defaultForeground = colorManager.getColorForUser(entry);
ChangeTextColorAction userColorAction = userColorActions.get(user);
if (userColorAction == null) {
userColorAction = ChangeTextColorAction
.createChangeUserTextColorAction(user, me,
defaultForeground, colorConfigManager);
userColorActions.put(user, userColorAction);
}
manager.add(userColorAction);
addColorAction(manager, entry, me);
}
protected void addColorAction(IMenuManager manager, VenueParticipant user,
boolean me) {
String colorActionKey = user.getFQName();
ChangeTextColorAction<VenueParticipant> userColorAction = userColorActions
.get(colorActionKey);
if (userColorAction == null) {
userColorAction = new ChangeTextColorAction<VenueParticipant>(user,
me, me, false, colorManager);
userColorAction.setActionCallback(refreshCallback);
userColorActions.put(colorActionKey, userColorAction);
}
manager.add(userColorAction);
}
@Subscribe
@ -270,7 +277,13 @@ public class SessionView extends AbstractSessionView<VenueParticipant>
}
protected void initColorManager() {
colorManager = new SessionColorManager();
IVenue venue = session.getVenue();
if (venue.isPersistent()) {
colorManager = PersistentSessionColorManager
.getManagerForRoom(venue.getId());
} else {
colorManager = new SessionColorManager();
}
}
protected void createUsersComp(final Composite parent) {
@ -372,7 +385,7 @@ public class SessionView extends AbstractSessionView<VenueParticipant>
usersTable.getTable().setLayout(layout);
usersTable.getTable().setLayoutData(data);
ParticipantsLabelProvider labelProvider = new ParticipantsLabelProvider();
ParticipantsLabelProvider labelProvider = createParticipantsLabelProvider();
setParticipantValues(labelProvider);
usersTable.setContentProvider(ArrayContentProvider.getInstance());
@ -423,9 +436,13 @@ public class SessionView extends AbstractSessionView<VenueParticipant>
((GridData) usersComp.getLayoutData()).exclude = true;
}
protected ParticipantsLabelProvider createParticipantsLabelProvider() {
return new ParticipantsLabelProvider();
}
protected void setParticipantValues(ParticipantsLabelProvider labelProvider) {
labelProvider.setSessionId(sessionId);
labelProvider.setManager(colorManager);
labelProvider.setSessionColorManager(colorManager);
}
@Override
@ -436,12 +453,8 @@ public class SessionView extends AbstractSessionView<VenueParticipant>
disposeArrow(downArrow);
disposeArrow(rightArrow);
if (colorManager != null) {
colorManager.clearColors();
}
if (userColorActions != null) {
for (ChangeTextColorAction userColorAction : userColorActions
for (ChangeTextColorAction<?> userColorAction : userColorActions
.values()) {
userColorAction.dispose();
}
@ -499,9 +512,10 @@ public class SessionView extends AbstractSessionView<VenueParticipant>
protected void styleAndAppendText(StringBuilder sb, int offset,
String name, VenueParticipant userId, String subject,
List<StyleRange> ranges) {
RGB rgb = colorManager.getColorForUser(userId);
UserColorInfo colors = colorManager.getColorForUser(userId);
styleAndAppendText(sb, offset, name, userId, ranges,
getColorFromRGB(rgb), null, subject);
getColorFromRGB(colors.getForeground()),
getColorFromRGB(colors.getBackground()), subject);
}
/*
@ -515,21 +529,14 @@ public class SessionView extends AbstractSessionView<VenueParticipant>
@Override
protected void styleAndAppendText(StringBuilder sb, int offset,
String name, VenueParticipant userId, List<StyleRange> ranges,
Color color) {
styleAndAppendText(sb, offset, name, userId, ranges, color, null, null);
Color foreground, Color background) {
styleAndAppendText(sb, offset, name, userId, ranges, foreground,
background, null);
}
protected void styleAndAppendText(StringBuilder sb, int offset,
String name, VenueParticipant userId, List<StyleRange> ranges,
Color fgColor, Color bgColor, String subject) {
if (enableUserColors && name != null) {
// Color text by user if in group chat room without shared display
ColorInfo userColor = colorConfigManager.getColor(name);
if (userColor != null) {
fgColor = getColorFromRGB(userColor.getColor(SWT.FOREGROUND));
bgColor = getColorFromRGB(userColor.getColor(SWT.BACKGROUND));
}
}
StyleRange range = new StyleRange(messagesText.getCharCount(),
sb.length(), fgColor, null, SWT.NORMAL);
ranges.add(range);

View file

@ -29,9 +29,6 @@ import java.util.SortedMap;
import java.util.TreeMap;
import java.util.regex.Pattern;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
@ -40,20 +37,17 @@ import com.raytheon.uf.common.dataplugin.fog.FogRecord.FOG_THREAT;
import com.raytheon.uf.common.geospatial.SpatialException;
import com.raytheon.uf.common.monitor.MonitorAreaUtils;
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager.MonName;
import com.raytheon.uf.common.monitor.data.AdjacentWfoMgr;
import com.raytheon.uf.common.monitor.data.CommonConfig;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.viz.core.VizApp;
import com.raytheon.uf.viz.core.alerts.AlertMessage;
import com.raytheon.uf.viz.core.notification.NotificationMessage;
import com.raytheon.uf.viz.monitor.IMonitor;
import com.raytheon.uf.viz.monitor.Monitor;
import com.raytheon.uf.viz.monitor.ObsMonitor;
import com.raytheon.uf.viz.monitor.data.AreaContainer;
import com.raytheon.uf.viz.monitor.data.MonitoringArea;
import com.raytheon.uf.viz.monitor.data.ObMultiHrsReports;
import com.raytheon.uf.viz.monitor.data.ObReport;
import com.raytheon.uf.viz.monitor.data.ObsData;
@ -65,7 +59,6 @@ import com.raytheon.uf.viz.monitor.fog.threshold.FogThresholdMgr;
import com.raytheon.uf.viz.monitor.fog.ui.dialogs.FogMonitoringAreaConfigDlg;
import com.raytheon.uf.viz.monitor.fog.ui.dialogs.FogZoneTableDlg;
import com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg;
import com.raytheon.uf.viz.monitor.util.MonitorThresholdConfiguration;
import com.raytheon.viz.alerts.observers.ProductAlertObserver;
import com.raytheon.viz.ui.dialogs.ICloseCallback;
import com.vividsolutions.jts.geom.Geometry;
@ -93,6 +86,7 @@ import com.vividsolutions.jts.geom.Geometry;
* Sep 23, 2014 3356 njensen Remove unnecessary import
* Oct 16, 2014 3220 skorolev Corrected fogConfig assignment.
* Dec 11, 2014 3220 skorolev Moved refreshing of table in the UI thread.
* Jan 08, 2015 3220 skorolev Replaced MonitoringArea with fogConfig.
*
*
* </pre>
@ -165,12 +159,10 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
private FogMonitor() {
pluginPatterns.add(fogPattern);
fogConfig = FSSObsMonitorConfigurationManager.getFogObsManager();
updateMonitoringArea();
initObserver(OBS, this);
obData = new ObMultiHrsReports(CommonConfig.AppName.FOG);
obData.setThresholdMgr(FogThresholdMgr.getInstance());
obData.getZoneTableData();
readTableConfig(MonitorThresholdConfiguration.FOG_THRESHOLD_CONFIG);
}
/**
@ -184,7 +176,8 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
// Pre-populate dialog with an observations from DB
monitor.createDataStructures();
monitor.getAdjAreas();
monitor.processProductAtStartup(MonName.fog.name());
List<String> zones = monitor.fogConfig.getAreaList();
monitor.processProductAtStartup(zones);
monitor.fireMonitorEvent(monitor);
}
@ -215,8 +208,8 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
obsData = new ObsData();
algorithmData = new TreeMap<Date, Map<String, FOG_THREAT>>();
for (String zone : MonitoringArea.getPlatformMap().keySet()) {
obsData.addArea(zone, MonitoringArea.getPlatformMap().get(zone));
for (String zone : fogConfig.getAreaList()) {
obsData.addArea(zone, fogConfig.getAreaStations(zone));
}
}
@ -254,38 +247,11 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
@Override
public void processProductMessage(final AlertMessage filtered) {
if (fogPattern.matcher(filtered.dataURI).matches()) {
processURI(filtered.dataURI, filtered);
List<String> zones = fogConfig.getAreaList();
processURI(filtered.dataURI, filtered, zones);
}
}
/**
* Method that reads the table configuration and updates the zone monitor
* threshold map
*
* @param file
* -- the xml configuration filename
*/
public void readTableConfig(String file) {
// TODO update for Maritime
Map<String, List<String>> zones = new HashMap<String, List<String>>();
// create zones and stations list
try {
for (String zone : fogConfig.getAreaList()) {
// add the unique
List<String> stations = fogConfig.getAreaStations(zone);
zones.put(zone, stations);
}
} catch (Exception ve) {
String msg = "FOG Monitor failed to load configuration..."
+ this.getClass().getName();
ErrorDialog.openError(Display.getCurrent().getActiveShell(),
"FOG Monitor failed to load configuration", msg,
new Status(IStatus.ERROR, Activator.PLUGIN_ID, msg, ve));
}
MonitoringArea.setPlatformMap(zones);
}
/*
* (non-Javadoc)
*
@ -319,17 +285,9 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
@Override
public void configUpdate(IMonitorConfigurationEvent me) {
fogConfig = (FSSObsMonitorConfigurationManager) me.getSource();
updateMonitoringArea();
if (zoneDialog != null && !zoneDialog.isDisposed()) {
VizApp.runAsync(new Runnable() {
@Override
public void run() {
zoneDialog.refreshZoneTableData(obData);
fireMonitorEvent(zoneDialog.getClass().getName());
}
});
zoneDialog.refreshZoneTableData(obData);
fireMonitorEvent(zoneDialog.getClass().getName());
}
}
@ -343,21 +301,6 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
monitor = null;
}
/**
* Finds the zone based on the icao passed into it
*
* @param icao
* @return zone
*/
public String findZone(String icao) {
for (String zone : MonitoringArea.getPlatformMap().keySet()) {
if (MonitoringArea.getPlatformMap().get(zone).contains(icao)) {
return zone;
}
}
return null;
}
/**
* Gets the main map
*
@ -377,12 +320,16 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
@Override
protected void process(ObReport result) throws Exception {
obData.addReport(result);
String zone = findZone(result.getPlatformId());
if (zone != null) {
AreaContainer ac = getTableData().getArea(zone);
if (ac != null) {
ac.addReport(result.getObservationTime(), result);
fireMonitorEvent(this);
// Get zones containing station
List<String> zones = fogConfig.getAreaByStationId(result
.getPlatformId());
if (!zones.isEmpty() || zones != null) {
for (String zn : zones) {
AreaContainer ac = getTableData().getArea(zn);
if (ac != null) {
ac.addReport(result.getObservationTime(), result);
fireMonitorEvent(this);
}
}
}
}
@ -455,7 +402,7 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
algData = algorithmData.get(time);
} else {
// by default is nothing in the ALG column
for (String zone : MonitoringArea.getPlatformMap().keySet()) {
for (String zone : fogConfig.getAreaList()) {
algData.put(zone, FOG_THREAT.GRAY);
}
}
@ -632,9 +579,14 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
@Override
protected void processAtStartup(ObReport report) {
obData.addReport(report);
String zone = findZone(report.getPlatformId());
getTableData().getArea(zone).addReport(report.getObservationTime(),
report);
List<String> zones = fogConfig.getAreaByStationId(report
.getPlatformId());
if (!zones.isEmpty() || zones != null) {
for (String zn : zones) {
getTableData().getArea(zn).addReport(
report.getObservationTime(), report);
}
}
}
/**
@ -647,19 +599,11 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
}
/**
* Reads Table Configuration.
*
* Method that reads the table configuration and updates the zone monitor
* threshold map
* Gets Fog Area configuration dialog
*
* @return
*/
private void updateMonitoringArea() {
Map<String, List<String>> zones = new HashMap<String, List<String>>();
// create zones and station list
for (String zone : fogConfig.getAreaList()) {
List<String> stations = fogConfig.getAreaStations(zone);
zones.put(zone, stations);
}
MonitoringArea.setPlatformMap(zones);
public MonitoringAreaConfigDlg getAreaDialog() {
return areaDialog;
}
}

View file

@ -25,8 +25,8 @@ import org.eclipse.core.commands.ExecutionException;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import com.raytheon.uf.viz.monitor.fog.FogMonitor;
import com.raytheon.uf.viz.monitor.fog.ui.dialogs.FogMonitoringAreaConfigDlg;
import com.raytheon.viz.ui.dialogs.ICloseCallback;
/**
* The Fog Monitor Action
@ -42,6 +42,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
* May 08, 2014 3086 skorolev Added CloseCallback to dialog.
* Sep 16, 2014 2757 skorolev Added test of dialog on dispose.
* Sep 19, 2014 3220 skorolev Added check on dispose.
* Jan 08, 2015 3220 skorolev Used area type for launchDialog.
*
* </pre>
*
@ -65,19 +66,13 @@ public class FogAreaConfigAction extends AbstractHandler {
*/
@Override
public Object execute(ExecutionEvent arg0) throws ExecutionException {
if (areaDialog == null || areaDialog.isDisposed()) {
FogMonitor fog = FogMonitor.getInstance();
if (fog.getAreaDialog() == null || fog.getAreaDialog().isDisposed()) {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
areaDialog = new FogMonitoringAreaConfigDlg(shell,
"Fog Monitor Area Configuration");
areaDialog.setCloseCallback(new ICloseCallback() {
@Override
public void dialogClosed(Object returnValue) {
areaDialog = null;
}
});
fog.launchDialog("area", shell);
}
areaDialog.open();
return null;
}
}

View file

@ -42,14 +42,12 @@ import com.raytheon.uf.common.monitor.data.CommonConfig;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.viz.core.VizApp;
import com.raytheon.uf.viz.core.alerts.AlertMessage;
import com.raytheon.uf.viz.core.notification.NotificationMessage;
import com.raytheon.uf.viz.monitor.IMonitor;
import com.raytheon.uf.viz.monitor.Monitor;
import com.raytheon.uf.viz.monitor.ObsMonitor;
import com.raytheon.uf.viz.monitor.config.CommonTableConfig.CellType;
import com.raytheon.uf.viz.monitor.data.MonitoringArea;
import com.raytheon.uf.viz.monitor.data.ObMultiHrsReports;
import com.raytheon.uf.viz.monitor.data.ObReport;
import com.raytheon.uf.viz.monitor.data.TableCellData;
@ -61,8 +59,6 @@ import com.raytheon.uf.viz.monitor.safeseas.listeners.ISSResourceListener;
import com.raytheon.uf.viz.monitor.safeseas.threshold.SSThresholdMgr;
import com.raytheon.uf.viz.monitor.safeseas.ui.dialogs.SSMonitoringAreaConfigDlg;
import com.raytheon.uf.viz.monitor.safeseas.ui.dialogs.SSZoneTableDlg;
import com.raytheon.uf.viz.monitor.ui.dialogs.ZoneTableDlg;
import com.raytheon.uf.viz.monitor.util.MonitorThresholdConfiguration;
import com.raytheon.viz.alerts.observers.ProductAlertObserver;
import com.raytheon.viz.ui.dialogs.ICloseCallback;
import com.vividsolutions.jts.geom.Geometry;
@ -89,6 +85,7 @@ import com.vividsolutions.jts.geom.Geometry;
* Sep 04, 2014 3220 skorolev Updated configUpdate method and added updateMonitoringArea.
* Oct 16, 2014 3220 skorolev Corrected ssAreaConfig assignment.
* Dec 11, 2014 3220 skorolev Moved refreshing of table in the UI thread.
* Jan 08, 2015 3220 skorolev Replaced MonitoringArea with ssAreaConfig.
*
* </pre>
*
@ -164,13 +161,10 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
private SafeSeasMonitor() {
pluginPatterns.add(ssPattern);
ssAreaConfig = FSSObsMonitorConfigurationManager.getSsObsManager();
updateMonitoringArea();
initObserver(OBS, this);
obData = new ObMultiHrsReports(CommonConfig.AppName.SAFESEAS);
obData.setThresholdMgr(SSThresholdMgr.getInstance());
obData.getZoneTableData();
readTableConfig(MonitorThresholdConfiguration.SAFESEAS_THRESHOLD_CONFIG);
}
/**
@ -182,7 +176,8 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
// Pre-populate dialog with an observation (METAR) for KOMA
monitor.createDataStructures();
monitor.getAdjAreas();
monitor.processProductAtStartup("ss");
List<String> zones = monitor.ssAreaConfig.getAreaList();
monitor.processProductAtStartup(zones);
monitor.fireMonitorEvent(monitor);
}
return monitor;
@ -228,7 +223,7 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
} else if (type.equals("area")) {
if (areaDialog == null) {
areaDialog = new SSMonitoringAreaConfigDlg(shell,
"Safe Seas Monitor Area Configuration");
"SAFESEAS Monitor Area Configuration");
areaDialog.setCloseCallback(new ICloseCallback() {
@Override
@ -276,7 +271,8 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
@Override
public void processProductMessage(final AlertMessage filtered) {
if (ssPattern.matcher(filtered.dataURI).matches()) {
processURI(filtered.dataURI, filtered);
final List<String> zones = ssAreaConfig.getAreaList();
processURI(filtered.dataURI, filtered, zones);
}
}
@ -299,31 +295,6 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
stationTableData.addReplaceDataRow(stationRowData);
}
/**
* Reads Table Configuration.
*
* Method that reads the table configuration and updates the zone monitor
* threshold map
*
* @param file
* -- the xml configuration filename
*/
public void readTableConfig(String file) {
Map<String, List<String>> zones = new HashMap<String, List<String>>();
// create zones and station list
try {
for (String zone : ssAreaConfig.getAreaList()) {
List<String> stations = ssAreaConfig.getAreaStations(zone);
zones.put(zone, stations);
}
} catch (Exception e) {
statusHandler.handle(Priority.CRITICAL,
"SafeSeas failed to load configuration..."
+ this.getClass().getName(), e);
}
MonitoringArea.setPlatformMap(zones);
}
/*
* (non-Javadoc)
*
@ -357,18 +328,8 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
@Override
public void configUpdate(IMonitorConfigurationEvent me) {
ssAreaConfig = (FSSObsMonitorConfigurationManager) me.getSource();
updateMonitoringArea();
if (zoneDialog != null && !zoneDialog.isDisposed()) {
VizApp.runAsync(new Runnable() {
@Override
public void run() {
zoneDialog.refreshZoneTableData(obData);
fireMonitorEvent(zoneDialog.getClass().getName());
}
});
}
zoneDialog.refreshZoneTableData(obData);
fireMonitorEvent(zoneDialog.getClass().getName());
}
/**
@ -553,7 +514,7 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
algData = algorithmData.get(time);
} else {
// by default is nothing in the Fog column
for (String zone : MonitoringArea.getPlatformMap().keySet()) {
for (String zone : ssAreaConfig.getAreaList()) {
algData.put(zone, FOG_THREAT.GRAY);
}
}
@ -594,15 +555,6 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
return type;
}
/**
* Gets zone dialog
*
* @return zoneDialog
*/
public ZoneTableDlg getDialog() {
return zoneDialog;
}
/**
* Gets adjacent areas
*/
@ -679,19 +631,11 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
}
/**
* Reads Table Configuration.
*
* Method that reads the table configuration and updates the zone monitor
* threshold map
* Gets SAFESEAS Area configuration dialog
*
* @return
*/
public void updateMonitoringArea() {
Map<String, List<String>> zones = new HashMap<String, List<String>>();
// create zones and station list
for (String zone : ssAreaConfig.getAreaList()) {
List<String> stations = ssAreaConfig.getAreaStations(zone);
zones.put(zone, stations);
}
MonitoringArea.setPlatformMap(zones);
public SSMonitoringAreaConfigDlg getAreaDialog() {
return areaDialog;
}
}

View file

@ -25,8 +25,7 @@ import org.eclipse.core.commands.ExecutionException;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import com.raytheon.uf.viz.monitor.safeseas.ui.dialogs.SSMonitoringAreaConfigDlg;
import com.raytheon.viz.ui.dialogs.ICloseCallback;
import com.raytheon.uf.viz.monitor.safeseas.SafeSeasMonitor;
/**
* The SAFESEAS Action
@ -42,6 +41,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
* May 08, 2014 3086 skorolev Added CloseCallback to dialog.
* Sep 16, 2014 2757 skorolev Added test of dialog on dispose.
* Sep 19, 2014 3220 skorolev Added check on dispose.
* Jan 08, 2015 3220 skorolev Used area type for launchDialog.
*
* </pre>
*
@ -51,11 +51,6 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
public class SafeseasAreaConfigAction extends AbstractHandler {
/**
* SAFESEAS Monitoring Area Configuration Dialog.
*/
private SSMonitoringAreaConfigDlg configDlg;
/*
* (non-Javadoc)
*
@ -65,19 +60,14 @@ public class SafeseasAreaConfigAction extends AbstractHandler {
*/
@Override
public Object execute(ExecutionEvent arg0) throws ExecutionException {
if (configDlg == null || configDlg.isDisposed()) {
SafeSeasMonitor monitor = SafeSeasMonitor.getInstance();
if (monitor.getAreaDialog() == null
|| monitor.getAreaDialog().isDisposed()) {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
configDlg = new SSMonitoringAreaConfigDlg(shell,
"SAFESEAS Monitor Area Configuration");
configDlg.setCloseCallback(new ICloseCallback() {
@Override
public void dialogClosed(Object returnValue) {
configDlg = null;
}
});
monitor.launchDialog("area", shell);
}
configDlg.open();
return null;
}
}

View file

@ -22,9 +22,7 @@ package com.raytheon.uf.viz.monitor.snow;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
import org.eclipse.swt.widgets.Shell;
@ -34,13 +32,11 @@ import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
import com.raytheon.uf.common.monitor.data.CommonConfig;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.viz.core.VizApp;
import com.raytheon.uf.viz.core.alerts.AlertMessage;
import com.raytheon.uf.viz.core.notification.NotificationMessage;
import com.raytheon.uf.viz.monitor.IMonitor;
import com.raytheon.uf.viz.monitor.Monitor;
import com.raytheon.uf.viz.monitor.ObsMonitor;
import com.raytheon.uf.viz.monitor.data.MonitoringArea;
import com.raytheon.uf.viz.monitor.data.ObMultiHrsReports;
import com.raytheon.uf.viz.monitor.data.ObReport;
import com.raytheon.uf.viz.monitor.events.IMonitorConfigurationEvent;
@ -76,6 +72,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
* Sep 04, 2014 3220 skorolev Updated configUpdate method and added updateMonitoringArea.
* Oct 16, 2014 3220 skorolev Corrected snowConfig assignment.
* Dec 11, 2014 3220 skorolev Moved refreshing of table in the UI thread.
* Jan 08, 2015 3220 skorolev Replaced MonitoringArea with snowAreaConfig.
*
* </pre>
*
@ -99,7 +96,7 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
private SnowMonitoringAreaConfigDlg areaDialog = null;
/** SNOW configuration manager **/
private FSSObsMonitorConfigurationManager snowConfig = null;
private FSSObsMonitorConfigurationManager snowAreaConfig = null;
/**
* This object contains all observation data necessary for the table dialogs
@ -130,8 +127,7 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
*/
private SnowMonitor() {
pluginPatterns.add(snowPattern);
snowConfig = FSSObsMonitorConfigurationManager.getSnowObsManager();
updateMonitoringArea();
snowAreaConfig = FSSObsMonitorConfigurationManager.getSnowObsManager();
initObserver(OBS, this);
obData = new ObMultiHrsReports(CommonConfig.AppName.SNOW);
obData.setThresholdMgr(SnowThresholdMgr.getInstance());
@ -146,7 +142,8 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
public static synchronized SnowMonitor getInstance() {
if (monitor == null) {
monitor = new SnowMonitor();
monitor.processProductAtStartup("snow");
List<String> zones = monitor.snowAreaConfig.getAreaList();
monitor.processProductAtStartup(zones);
monitor.fireMonitorEvent(monitor);
}
return monitor;
@ -239,7 +236,8 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
@Override
public void processProductMessage(final AlertMessage filtered) {
if (snowPattern.matcher(filtered.dataURI).matches()) {
processURI(filtered.dataURI, filtered);
List<String> zones = snowAreaConfig.getAreaList();
processURI(filtered.dataURI, filtered, zones);
}
}
@ -256,23 +254,6 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
}
}
/**
* Reads Table Configuration.
*
* Method that reads the table configuration and updates the zone monitor
* threshold map
*
*/
public void updateMonitoringArea() {
Map<String, List<String>> zones = new HashMap<String, List<String>>();
// create zones and station list
for (String zone : snowConfig.getAreaList()) {
List<String> stations = snowConfig.getAreaStations(zone);
zones.put(zone, stations);
}
MonitoringArea.setPlatformMap(zones);
}
/*
* (non-Javadoc)
*
@ -305,18 +286,10 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
*/
@Override
public void configUpdate(IMonitorConfigurationEvent me) {
snowConfig = (FSSObsMonitorConfigurationManager) me.getSource();
updateMonitoringArea();
snowAreaConfig = (FSSObsMonitorConfigurationManager) me.getSource();
if (zoneDialog != null && !zoneDialog.isDisposed()) {
VizApp.runAsync(new Runnable() {
@Override
public void run() {
zoneDialog.refreshZoneTableData(obData);
fireMonitorEvent(zoneDialog.getClass().getName());
}
});
zoneDialog.refreshZoneTableData(obData);
fireMonitorEvent(zoneDialog.getClass().getName());
}
}
@ -427,7 +400,7 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
}
/**
* Gets Zone Dialog.
* Gets SNOW Zone Dialog.
*
* @return zoneDialog
*/
@ -435,6 +408,15 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
return zoneDialog;
}
/**
* Gets SNOW Area configuration dialog
*
* @return
*/
public SnowMonitoringAreaConfigDlg getAreaDialog() {
return areaDialog;
}
/**
* Sets the zoneDialog
*

View file

@ -25,8 +25,7 @@ import org.eclipse.core.commands.ExecutionException;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import com.raytheon.uf.viz.monitor.snow.ui.dialogs.SnowMonitoringAreaConfigDlg;
import com.raytheon.viz.ui.dialogs.ICloseCallback;
import com.raytheon.uf.viz.monitor.snow.SnowMonitor;
/**
* The Snow Area Action
@ -51,11 +50,6 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
public class SnowAreaConfigAction extends AbstractHandler {
/**
* SNOW Monitoring Area Configuration Dialog.
*/
private SnowMonitoringAreaConfigDlg configDlg;
/*
* (non-Javadoc)
*
@ -65,19 +59,12 @@ public class SnowAreaConfigAction extends AbstractHandler {
*/
@Override
public Object execute(ExecutionEvent arg0) throws ExecutionException {
if (configDlg == null || configDlg.isDisposed()) {
SnowMonitor snow = SnowMonitor.getInstance();
if (snow.getAreaDialog() == null || snow.getAreaDialog().isDisposed()) {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
configDlg = new SnowMonitoringAreaConfigDlg(shell,
"SNOW Monitor Area Configuration");
configDlg.setCloseCallback(new ICloseCallback() {
@Override
public void dialogClosed(Object returnValue) {
configDlg = null;
}
});
snow.launchDialog("area", shell);
}
configDlg.open();
return null;
}
}

View file

@ -22,11 +22,10 @@ package com.raytheon.uf.viz.monitor;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
import org.eclipse.swt.widgets.Display;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.annotations.DataURIUtil;
import com.raytheon.uf.common.dataplugin.fssobs.FSSObsRecord;
@ -43,7 +42,6 @@ import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.localization.LocalizationManager;
import com.raytheon.uf.viz.core.notification.NotificationMessage;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
import com.raytheon.uf.viz.monitor.data.MonitoringArea;
import com.raytheon.uf.viz.monitor.data.ObReport;
import com.raytheon.uf.viz.monitor.events.IMonitorConfigurationEvent;
import com.raytheon.uf.viz.monitor.events.IMonitorThresholdEvent;
@ -62,6 +60,7 @@ import com.raytheon.uf.viz.monitor.events.IMonitorThresholdEvent;
* Feb 04, 2014 2757 skorolev Added filter for removed stations
* May 08, 2014 3086 skorolev Added current site definition.
* Sep 04, 2014 3220 skorolev Removed cwa and monitorUsefrom vals.
* Jan 08, 2015 3220 skorolev Added zones parameter to processURI.
*
* </pre>
*
@ -187,45 +186,29 @@ public abstract class ObsMonitor extends Monitor {
*
* @param dataURI
* @param filtered
* @param zones
*/
public void processURI(String dataURI, AlertMessage filtered) {
public void processURI(String dataURI, AlertMessage filtered,
final List<String> zones) {
try {
Map<String, RequestConstraint> constraints = RequestConstraint
.toConstraintMapping(DataURIUtil.createDataURIMap(dataURI));
FSSObsRecord[] pdos = requestFSSObs(constraints, null);
if (pdos.length > 0 && pdos[0].getTimeObs() != null) {
final FSSObsRecord objectToSend = pdos[0];
try {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
try {
// Filter removed stations
ArrayList<String> zones = MonitoringArea
.getZoneIds(objectToSend
.getPlatformId());
if (!zones.isEmpty()) {
ObReport result = GenerateFSSObReport
.generateObReport(objectToSend);
statusHandler
.handle(Priority.INFO,
"New FSSrecord ===> "
+ objectToSend
.getDataURI());
process(result);
}
} catch (Exception e) {
statusHandler
.handle(Priority.PROBLEM,
"An error has occured processing the incoming messages.",
e);
}
}
});
} catch (Exception e) {
statusHandler
.handle(Priority.PROBLEM,
"An error has occured processing incoming dataURIs.",
e);
if (!zones.isEmpty()) {
ObReport result = GenerateFSSObReport
.generateObReport(objectToSend);
statusHandler.handle(Priority.INFO, "New FSSrecord ===> "
+ objectToSend.getDataURI());
try {
process(result);
} catch (Exception e) {
statusHandler
.handle(Priority.PROBLEM,
"An error has occured processing the incoming messages.",
e);
}
}
}
} catch (final Exception e) {
@ -237,10 +220,10 @@ public abstract class ObsMonitor extends Monitor {
/**
* Process products at startup
*
* @param monitorName
* @param zones
*
*/
public void processProductAtStartup(String monitorName) {
public void processProductAtStartup(List<String> zones) {
/**
* Assume this number for MaxNumObsTimes is larger enough to cover data
@ -275,8 +258,6 @@ public abstract class ObsMonitor extends Monitor {
FSSObsRecord[] obsRecords = requestFSSObs(vals, selectedTimes);
for (FSSObsRecord objectToSend : obsRecords) {
// Filter removed stations
ArrayList<String> zones = MonitoringArea
.getZoneIds(objectToSend.getPlatformId());
if (!zones.isEmpty()) {
ObReport result = GenerateFSSObReport
.generateObReport(objectToSend);
@ -286,7 +267,7 @@ public abstract class ObsMonitor extends Monitor {
}
} catch (DataCubeException e) {
statusHandler.handle(Priority.PROBLEM,
"No data in database at startup. " + monitorName);
"No data in database at startup.");
}
}

View file

@ -20,8 +20,10 @@
package com.raytheon.uf.viz.monitor.data;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
import com.raytheon.uf.common.monitor.data.ObConst;
import com.raytheon.uf.common.monitor.data.ObConst.ChosenAppKey;
import com.raytheon.uf.common.monitor.data.ObConst.ThreatLevel;
@ -40,6 +42,7 @@ import com.raytheon.uf.common.monitor.data.ObConst.VarName;
* Feb 17, 2009 1999 grichard Initial creation.
* 3/16/2009 2047 grichard Add threat monitoring routines.
* Dec 24, 2009 3424 zhao added getDualValuedThresholdMap and getSingleValuedThresholdMap
* Jan 12, 2015 3220 skorolev Replaced MonitoringArea with areaConfig.
*
* </pre>
*
@ -62,56 +65,6 @@ public final class MonitorAreaThresholds {
// Map containing the display thresholds
private static Map<String, DisplayThresholdsSet> zoneDisplayThresholds = new HashMap<String, DisplayThresholdsSet>();
/**
* This method receives an observation report and a variable name, and
* returns the threat level of that single variable.
*
* @param report
* -- the observation report
* @param varName
* -- the variable name within the report
* @return -- the threat level
*/
public static ObConst.ThreatLevel getThreatLevel(ObReport report,
VarName varName) {
ThreatLevel threatLevel = ThreatLevel.GRAY;
ThreatLevel temp = ThreatLevel.GRAY;
float varValue = ObConst.MISSING;
try {
varValue = getReportVarValue(report, varName);
String zoneId = report.getZoneId();
// TEMPORARILY USE DEFAULT ZONE ID, NAMELY, DEFAULT STATION.
zoneId = ObConst.DEFAULT_STATION_NAME;
if (report.isStationary()) {
if (MonitoringArea.listZonesToPlatform(report.getPlatformId())
.isEmpty()) {
// use the default zone if there are no zones
temp = getZoneThreatLevel(zoneId, varName, varValue);
if (temp.ordinal() < threatLevel.ordinal()) {
threatLevel = temp;
}
} else {
for (String z : MonitoringArea.listZonesToPlatform(report
.getPlatformId())) {
temp = getZoneThreatLevel(z, varName, varValue);
if (temp.ordinal() < threatLevel.ordinal()) {
threatLevel = temp;
}
}
}
} else {
temp = getZoneThreatLevel(zoneId, varName, varValue);
}
} catch (Exception e) {
// return the default threat level
}
return threatLevel;
}
/**
* This method receives an observation report and a variable name, and
* returns the threat level of that single variable.
@ -127,12 +80,13 @@ public final class MonitorAreaThresholds {
ThreatLevel threatLevel = ThreatLevel.GRAY;
ThreatLevel temp = ThreatLevel.GRAY;
String station = report.getPlatformId();
try {
if (report.isStationary()) {
if (chosenAppKey == ChosenAppKey.SAFESEAS) {
if (MonitoringArea.listZonesToPlatform(
report.getPlatformId()).isEmpty()) {
List<String> ssZones = FSSObsMonitorConfigurationManager
.getSsObsManager().getAreaByStationId(station);
if (ssZones.isEmpty()) {
// use the default zone if there are no zones
for (VarName v : VarName.values()) {
if (v == VarName.TEMPERATURE
@ -150,8 +104,7 @@ public final class MonitorAreaThresholds {
}
}
} else {
for (String z : MonitoringArea
.listZonesToPlatform(report.getPlatformId())) {
for (String z : ssZones) {
for (VarName v : VarName.values()) {
if (v == VarName.TEMPERATURE
|| v == VarName.WIND_CHILL
@ -169,8 +122,9 @@ public final class MonitorAreaThresholds {
}
}
} else if (chosenAppKey == ChosenAppKey.SNOW) {
if (MonitoringArea.listZonesToPlatform(
report.getPlatformId()).isEmpty()) {
List<String> snowZones = FSSObsMonitorConfigurationManager
.getSnowObsManager().getAreaByStationId(station);
if (snowZones.isEmpty()) {
// use the default zone if there are no zones
for (VarName v : VarName.values()) {
if (v == VarName.PRIM_SWELL_HT) {
@ -185,8 +139,7 @@ public final class MonitorAreaThresholds {
}
} else {
for (String z : MonitoringArea
.listZonesToPlatform(report.getPlatformId())) {
for (String z : snowZones) {
for (VarName v : VarName.values()) {
if (v == VarName.PRIM_SWELL_HT) {
break;
@ -199,9 +152,10 @@ public final class MonitorAreaThresholds {
}
}
}
} else {
if (MonitoringArea.listZonesToPlatform(
report.getPlatformId()).isEmpty()) {
} else {// chosenAppKey = FOG
List<String> fogZones = FSSObsMonitorConfigurationManager
.getFogObsManager().getAreaByStationId(station);
if (fogZones.isEmpty()) {
// use the default zone if there are no zones
temp = getZoneThreatLevel(ObConst.DEFAULT_STATION_NAME,
VarName.PRES_WX, report.getPresentWx());
@ -209,20 +163,21 @@ public final class MonitorAreaThresholds {
threatLevel = temp;
}
temp = getZoneThreatLevel(ObConst.DEFAULT_STATION_NAME,
VarName.VISIBILITY, getReportVarValue(report,
VarName.VISIBILITY));
VarName.VISIBILITY,
getReportVarValue(report, VarName.VISIBILITY));
if (temp.ordinal() < threatLevel.ordinal()) {
threatLevel = temp;
}
} else {
for (String z : MonitoringArea
.listZonesToPlatform(report.getPlatformId())) {
for (String z : fogZones) {
temp = getZoneThreatLevel(z, VarName.PRES_WX,
report.getPresentWx());
if (temp.ordinal() < threatLevel.ordinal()) {
threatLevel = temp;
}
temp = getZoneThreatLevel(z, VarName.VISIBILITY,
temp = getZoneThreatLevel(
z,
VarName.VISIBILITY,
getReportVarValue(report,
VarName.VISIBILITY));
if (temp.ordinal() < threatLevel.ordinal()) {
@ -231,6 +186,7 @@ public final class MonitorAreaThresholds {
}
}
}
// report is not Stationary
} else {
if (chosenAppKey == ChosenAppKey.SAFESEAS) {
String zoneId = report.getZoneId();
@ -243,8 +199,8 @@ public final class MonitorAreaThresholds {
} else if (v == VarName.STATIONARY) {
break;
}
temp = getZoneThreatLevel(zoneId, v, getReportVarValue(
report, v));
temp = getZoneThreatLevel(zoneId, v,
getReportVarValue(report, v));
if (temp.ordinal() < threatLevel.ordinal()) {
threatLevel = temp;
}
@ -257,13 +213,13 @@ public final class MonitorAreaThresholds {
if (v == VarName.PRIM_SWELL_HT) {
break;
}
temp = getZoneThreatLevel(zoneId, v, getReportVarValue(
report, v));
temp = getZoneThreatLevel(zoneId, v,
getReportVarValue(report, v));
if (temp.ordinal() < threatLevel.ordinal()) {
threatLevel = temp;
}
}
} else {
} else {// chosenAppKey = FOG
String zoneId = report.getZoneId();
// TEMPORARILY USE DEFAULT ZONE ID, NAMELY, DEFAULT STATION.
zoneId = ObConst.DEFAULT_STATION_NAME;
@ -605,32 +561,44 @@ public final class MonitorAreaThresholds {
}
return result;
}
/**
* [Dec 24, 2009, zhao]
* @param zone the zone ID
* @param varName enumerated-type variable name
* @return single-valued threshold map, or null if the variable
* name is invalid or if the map contains no mapping for the key
*
* @param zone
* the zone ID
* @param varName
* enumerated-type variable name
* @return single-valued threshold map, or null if the variable name is
* invalid or if the map contains no mapping for the key
*/
public static Map<ObConst.ThreatLevel,Float> getSingleValuedThresholdMap(String zone, ObConst.VarName varName) {
if (varName == VarName.WIND_DIR || varName == VarName.PRIM_SWELL_DIR || varName == VarName.SEC_SWELL_DIR ) {
return null;
}
return zoneMonitorThresholds.get(zone).getSingleValuedThresholdMap(varName);
public static Map<ObConst.ThreatLevel, Float> getSingleValuedThresholdMap(
String zone, ObConst.VarName varName) {
if (varName == VarName.WIND_DIR || varName == VarName.PRIM_SWELL_DIR
|| varName == VarName.SEC_SWELL_DIR) {
return null;
}
return zoneMonitorThresholds.get(zone).getSingleValuedThresholdMap(
varName);
}
/**
* [Dec 24, 2009, zhao]
* @param zone the zone ID
* @param varName enumerated-type variable name
* @return duel-valued threshold map, or null if the variable
* name is invalid or if the map contains no mapping for the key
*
* @param zone
* the zone ID
* @param varName
* enumerated-type variable name
* @return duel-valued threshold map, or null if the variable name is
* invalid or if the map contains no mapping for the key
*/
public static Map<ObConst.ThreatLevel,Float[]> getDualValuedThresholdMap(String zone, ObConst.VarName varName) {
if (varName != VarName.WIND_DIR || varName != VarName.PRIM_SWELL_DIR || varName != VarName.SEC_SWELL_DIR ) {
return null;
}
return zoneMonitorThresholds.get(zone).getDualValuedThresholdMap(varName);
public static Map<ObConst.ThreatLevel, Float[]> getDualValuedThresholdMap(
String zone, ObConst.VarName varName) {
if (varName != VarName.WIND_DIR || varName != VarName.PRIM_SWELL_DIR
|| varName != VarName.SEC_SWELL_DIR) {
return null;
}
return zoneMonitorThresholds.get(zone).getDualValuedThresholdMap(
varName);
}
}

View file

@ -23,8 +23,6 @@ import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
import com.raytheon.uf.common.monitor.data.CommonConfig;
import com.raytheon.uf.common.monitor.data.CommonConfig.AppName;
@ -41,12 +39,14 @@ import com.raytheon.uf.viz.monitor.thresholds.AbstractThresholdMgr;
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec. 1, 2009 3424 zhao Initial creation.
* Oct.29, 2012 1297 skorolev Changed HashMap to Map
* Oct.31 2012 1297 skorolev Cleaned code.
* Sep 04 2014 3220 skorolev Added updateZones method.
* Oct.31, 2012 1297 skorolev Cleaned code.
* Sep 04, 2014 3220 skorolev Added updateZones method.
* Dec 18, 2014 3841 skorolev Corrected updateZones method.
* Jan 08, 2015 3220 skorolev Replaced MonitoringArea with areaConfig.
*
* </pre>
*
@ -73,6 +73,9 @@ public class ObHourReports {
*/
private Map<String, ObZoneHourReports> hourReports;
/**
* current threshold manager
*/
private AbstractThresholdMgr thresholdMgr;
/**
@ -86,9 +89,8 @@ public class ObHourReports {
this.appName = appName;
this.thresholdMgr = thresholdMgr;
hourReports = new HashMap<String, ObZoneHourReports>();
Map<String, List<String>> zoneStationMap = MonitoringArea
.getPlatformMap();
for (String zone : zoneStationMap.keySet()) {
List<String> zones = thresholdMgr.getAreaConfigMgr().getAreaList();
for (String zone : zones) {
hourReports.put(zone, new ObZoneHourReports(nominalTime, zone,
appName, thresholdMgr));
}
@ -101,7 +103,8 @@ public class ObHourReports {
*/
public void addReport(ObReport report) {
String station = report.getPlatformId();
List<String> zones = MonitoringArea.getZoneIds(station);
List<String> zones = thresholdMgr.getAreaConfigMgr()
.getAreaByStationId(station);
if (zones.size() == 0) {
statusHandler
.error("Error: station: "
@ -123,6 +126,8 @@ public class ObHourReports {
}
/**
* Gets HourReports
*
* @return hourReports
*/
public Map<String, ObZoneHourReports> getHourReports() {
@ -186,8 +191,8 @@ public class ObHourReports {
}
/**
* Returns the ObZoneHourReports object of a caller-specified zone. If such
* object not available, returns null.
* Gets ObZoneHourReports Returns the ObZoneHourReports object of a
* caller-specified zone. If such object not available, returns null.
*
* @param zone
* @return hour reports
@ -200,6 +205,8 @@ public class ObHourReports {
}
/**
* Gets NominalTime
*
* @return nominalTime
*/
public Date getNominalTime() {
@ -207,6 +214,8 @@ public class ObHourReports {
}
/**
* Gets AppName
*
* @return appName
*/
public CommonConfig.AppName getAppName() {
@ -217,30 +226,27 @@ public class ObHourReports {
* Updates zones in the Hour Reports
*/
public void updateZones() {
Map<String, List<String>> zoneStationMap = MonitoringArea
.getPlatformMap();
// remove zones or stations
List<String> hourZones = new CopyOnWriteArrayList<String>(
hourReports.keySet());
for (String zone : hourZones) {
if (hourReports.keySet().contains(zone)) {
List<String> stations = new CopyOnWriteArrayList<String>(
hourReports.get(zone).getZoneHourReports().keySet());
for (String stn : stations) {
if (!zoneStationMap.get(zone).contains(stn)) {
hourReports.get(zone).getZoneHourReports().remove(stn);
}
}
if (!zoneStationMap.keySet().contains(zone)) {
hourReports.remove(zone);
}
// Updated list of zones
List<String> updtZones = thresholdMgr.getAreaConfigMgr().getAreaList();
// remove zones
hourReports.keySet().retainAll(updtZones);
// add zones
for (String zone : updtZones) {
if (!hourReports.keySet().contains(zone)) {
hourReports.put(zone, new ObZoneHourReports(nominalTime, zone,
appName, thresholdMgr));
}
}
// add zones
for (String zone : zoneStationMap.keySet()) {
List<String> stations = new CopyOnWriteArrayList<String>(
zoneStationMap.get(zone));
for (String stn : stations) {
// add and(or) remove stations
for (String zone : updtZones) {
// Updated list of stations in this zone
List<String> updtStns = thresholdMgr.getAreaConfigMgr()
.getAreaStations(zone);
// remove stations
hourReports.get(zone).getZoneHourReports().keySet()
.retainAll(updtStns);
// add stations
for (String stn : updtStns) {
if (!hourReports.get(zone).getZoneHourReports()
.containsKey(stn)) {
hourReports
@ -251,10 +257,8 @@ public class ObHourReports {
stn, appName, thresholdMgr));
}
}
if (!hourReports.containsKey(zone)) {
hourReports.put(zone, new ObZoneHourReports(nominalTime, zone,
appName, thresholdMgr));
}
// update hourReports for current zone
hourReports.get(zone).getZoneHourReports();
}
}
}

View file

@ -24,11 +24,13 @@ import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.SortedMap;
import java.util.TreeMap;
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
import com.raytheon.uf.common.monitor.data.CommonConfig;
import com.raytheon.uf.common.monitor.data.CommonConfig.AppName;
import com.raytheon.uf.common.monitor.data.ObConst;
@ -53,7 +55,8 @@ import com.raytheon.uf.viz.monitor.thresholds.AbstractThresholdMgr;
* Oct.31, 2012 1297 skorolev Clean code.
* Jan. 29, 2013 15654 zhao add Wind Chill calculation for SNOW
* Sep 04, 2014 3220 skorolev Updated getStationTableData method.
*
* Jan 08, 2015 3220 skorolev Replaced MonitoringArea with cfgMgr.
*
* </pre>
*
* @author zhao
@ -151,13 +154,15 @@ public class ObMultiHrsReports {
/**
* DR15654: set Wind Chill for SNOW
*/
if ( appName == AppName.SNOW ) {
if ( report.getTemperature() != ObConst.MISSING && report.getWindSpeed() != ObConst.MISSING ) {
report.setWindChill(calcWindChill( report.getTemperature(), report.getWindSpeed() ));
if (appName == AppName.SNOW) {
if (report.getTemperature() != ObConst.MISSING
&& report.getWindSpeed() != ObConst.MISSING) {
report.setWindChill(calcWindChill(report.getTemperature(),
report.getWindSpeed()));
}
}
if (multiHrsReports.containsKey(nominalTime)) {
multiHrsReports.get(nominalTime).addReport(report);
} else {
@ -173,28 +178,28 @@ public class ObMultiHrsReports {
}
}
/**
* DR 15654:
* Wind Chill calculation formula based on
* http://www.nws.noaa.gov/om/windchill/
* as of Jan. 29, 2013
*
* @param temperature in degree F
* @param windSpeed in knots
* @return wind chill in degree F
*/
private float calcWindChill(float temp, float windSpd) {
if ( temp > 50.0 || windSpd < 3.0 ) {
return ObConst.MISSING;
}
/**
* 1 knots = 1.15078 mph
*/
float spd = (float) Math.pow(1.15078*windSpd, 0.16);
return 35.74f + 0.6215f*temp - 35.75f*spd + 0.4275f*temp*spd;
}
/**
* DR 15654: Wind Chill calculation formula based on
* http://www.nws.noaa.gov/om/windchill/ as of Jan. 29, 2013
*
* @param temp
* in degree F
* @param windSpd
* in knots
* @return wind chill in degree F
*/
private float calcWindChill(float temp, float windSpd) {
if (temp > 50.0 || windSpd < 3.0) {
return ObConst.MISSING;
}
/**
* 1 knots = 1.15078 mph
*/
float spd = (float) Math.pow(1.15078 * windSpd, 0.16);
return 35.74f + 0.6215f * temp - 35.75f * spd + 0.4275f * temp * spd;
}
/**
/**
* Returns a zone TableData object of the latest nominal time. If no data
* available (the map is empty), returns an empty zone TableData object
* (table cells filled with "N/A").
@ -252,6 +257,9 @@ public class ObMultiHrsReports {
/**
* Returns the station TableData object for the latest nominal time. If no
* data available, an empty/default station TableData object is returned
*
* @param zone
* @return
*/
public TableData getStationTableData(String zone) {
if (multiHrsReports.isEmpty()) {
@ -264,9 +272,13 @@ public class ObMultiHrsReports {
* Returns a station TableData object for a caller-specified nominal-time
* and zone ID. If no data available, an empty/default station TableData
* object is returned.
*
* @param nominalTime
* @param zone
* @return
*/
public TableData getStationTableData(Date nominalTime, String zone) {
if(zone.equals("")){
if (zone.equals("")) {
return this.getEmptyZoneTableData();
}
if (nominalTime == null) {
@ -296,6 +308,7 @@ public class ObMultiHrsReports {
* @param zone
* @param Station
* @param varName
* @param productName
* @return ObTrendDataSet object, or null if no data available
*/
public ObTrendDataSet getTrendDataSet(String zone, String station,
@ -373,12 +386,15 @@ public class ObMultiHrsReports {
}
/**
* Gets Histogram Table Data
*
* @param zone
* : current zone
* @param station
* station ID
* : station ID
* @param obsType
* ObsHistType
* @return TableData object for obs history table
* : ObsHistType
* @return
*/
public TableData getHistTableData(String zone, String station,
ObsHistType obsType) {
@ -467,17 +483,17 @@ public class ObMultiHrsReports {
}
/**
* Returns a SortedMap object <nominal time, ObHourReports object>
* Gets MultiHrsReports
*
* @return multiHrsReports
* @return SortedMap object <nominal time, ObHourReports object>
*/
public SortedMap<Date, ObHourReports> getMultiHrsReports() {
return multiHrsReports;
}
/**
* Returns a SortedMap object (key is nominal time, value is zone TableData
* object)
* Gets MultiHrsTableData Returns a SortedMap object (key is nominal time,
* value is zone TableData object)
*
* @return
*/
@ -500,8 +516,8 @@ public class ObMultiHrsReports {
}
/**
* Returns the latest nominal time if the map is not empty; otherwise,
* returns the nominal time of the present date-time
* Gets the Latest NominalTime Returns the latest nominal time if the map is
* not empty; otherwise, returns the nominal time of the present date-time
*
* @return
*/
@ -517,17 +533,17 @@ public class ObMultiHrsReports {
}
/**
* Returns a set of nominal times
* Gets Nominal Times
*
* @return
* @return a set of nominal times
*/
public Set<Date> getNominalTimes() {
return multiHrsReports.keySet();
}
/**
* Returns the ObHourReports object of the latest nominal time. If no data
* available, returns an empty ObHourReports object.
* Gets ObHourReports Returns the ObHourReports object of the latest nominal
* time. If no data available, returns an empty ObHourReports object.
*
* @return
*/
@ -540,8 +556,9 @@ public class ObMultiHrsReports {
}
/**
* Returns an ObHourReports object of a caller-specified nominal time. If no
* data available, returns an empty ObHourReports object.
* Gets ObHourReports Returns an ObHourReports object of a caller-specified
* nominal time. If no data available, returns an empty ObHourReports
* object.
*
* @param nominalTime
* @return
@ -574,6 +591,7 @@ public class ObMultiHrsReports {
}
/**
* Gets Threshold Manager
*
* @return the threshold manager
*/
@ -591,6 +609,7 @@ public class ObMultiHrsReports {
}
/**
* Gets map of types for ALG cell
*
* @return fogAlgCellType
*/
@ -603,7 +622,13 @@ public class ObMultiHrsReports {
*/
private void initFogAlgCellType() {
fogAlgCellType = new HashMap<String, CellType>();
Set<String> zones = MonitoringArea.getPlatformMap().keySet();
FSSObsMonitorConfigurationManager cfgMgr = null;
if (appName.equals(CommonConfig.AppName.FOG)) {
cfgMgr = FSSObsMonitorConfigurationManager.getFogObsManager();
} else if (appName.equals(CommonConfig.AppName.SAFESEAS)) {
cfgMgr = FSSObsMonitorConfigurationManager.getSsObsManager();
}
List<String> zones = cfgMgr.getAreaList();
Iterator<String> itr = zones.iterator();
while (itr.hasNext()) {
fogAlgCellType.put(itr.next(), CellType.NotAvailable);

File diff suppressed because it is too large Load diff

View file

@ -53,6 +53,7 @@ import com.raytheon.uf.viz.monitor.util.MonitorConfigConstants;
* Feb 28, 2013 14410 zhao Modified getCellTypeForBlizWarn
* May 23, 2014 3086 skorolev Corrected ObsHistType. Cleaned code.
* Nov 21, 2014 3841 skorolev Added coordinates in the hover text for a newly added zones.
* Jan 08, 2015 3220 skorolev Corrected code for Fog and SNOW table data.
*
* </pre>
*
@ -113,10 +114,10 @@ public final class TableUtil {
isZone = true;
}
String hoverText = null;
String hoverText = "";
if (isZone) {
AreaIdXML zoneXML = FSSObsMonitorConfigurationManager
.getSsObsManager().getAreaXml(zone);
.getFogObsManager().getAreaXml(zone);
if (zoneXML != null) {
hoverText = getZoneHoverText(zoneXML);
}
@ -344,7 +345,7 @@ public final class TableUtil {
isZone = true;
}
String hoverText = null;
String hoverText = "";
if (isZone) {
AreaIdXML zoneXML = FSSObsMonitorConfigurationManager
.getSsObsManager().getAreaXml(zone);
@ -649,10 +650,10 @@ public final class TableUtil {
isZone = true;
}
String hoverText = null;
String hoverText = "";
if (isZone) {
AreaIdXML zoneXML = FSSObsMonitorConfigurationManager
.getSsObsManager().getAreaXml(zone);
.getSnowObsManager().getAreaXml(zone);
if (zoneXML != null) {
hoverText = getZoneHoverText(zoneXML);
}

View file

@ -57,6 +57,7 @@ import com.raytheon.uf.viz.monitor.xml.ThresholdsXML;
* Feb 16, 2011 #7346 zhao added getDirectionalThresholdValueCellType(...)
* Apr 28, 2014 3086 skorolev Updated getAreaConfigMgr method.
* Oct 17, 2014 3220 skorolev Replaced System.out.print with debug statusHandler.
* Jan 08, 2015 3220 skorolev Added getAreaConfigMgr.
*
* </pre>
*
@ -71,7 +72,7 @@ public abstract class AbstractThresholdMgr {
/**
* Monitor Area Configuration Manager.
*/
protected FSSObsMonitorConfigurationManager areaConfigMgr;
public FSSObsMonitorConfigurationManager areaConfigMgr;
/**
* Default file name for the FOG display thresholds.
@ -808,4 +809,13 @@ public abstract class AbstractThresholdMgr {
}
}
}
/**
* Gets current Area configuration manager.
*
* @return
*/
public FSSObsMonitorConfigurationManager getAreaConfigMgr() {
return areaConfigMgr;
}
}

View file

@ -79,6 +79,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
* Oct 27, 2014 3667 skorolev Corrected functionality of dialog. Cleaned code.
* Nov 12, 2014 3650 skorolev Added confirmation box for unsaved changes in the dialog.
* Nov 21, 2014 3841 skorolev Added formIsValid method.
* Dec 18, 2014 3841 skorolev Corrected addZoneStn method.
*
* </pre>
*
@ -1091,13 +1092,13 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
monitorAreaList
.setItems(maZones.toArray(new String[maZones.size()]));
monitorAreaList.setSelection(maZones.indexOf(zone));
handleMonitorAreaListSelection();
additionalZones.remove(zone);
configMgr.addArea(zoneXML);
if (!configMgr.getAddedZones().contains(zone)) {
configMgr.getAddedZones().add(zone);
}
configMgr.removeAdjArea(zone);
handleMonitorAreaListSelection();
} else { // Station mode
if (associatedList.getSelectionCount() == 0) {
showMessage(shell, SWT.ERROR, "Selection Needed",
@ -1300,6 +1301,9 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
* Handles the monitor area list selection.
*/
private void handleMonitorAreaListSelection() {
if (monitorAreaList.getSelectionIndex() == -1) {
return;
}
if (mode == Mode.Zone) {
String zone = monitorAreaList.getItem(monitorAreaList
.getSelectionIndex());

View file

@ -28,8 +28,7 @@
id="com.raytheon.uf.common.dataplugin.npp.viirs"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
version="0.0.0"/>
<plugin
id="com.raytheon.uf.viz.npp.viirs"

View file

@ -2,4 +2,5 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml
plugin.xml,\
localization/

View file

@ -63,6 +63,8 @@ import com.vividsolutions.jts.geom.impl.PackedCoordinateSequence;
* May 27, 2011 bsteffen Initial creation
* Aug 27, 2013 2287 randerso Refactored to allow subclassing
* Sep 23, 2013 2363 bsteffen Add more configuration options.
* Jan 13, 2015 3966 bsteffen Limit the number of flags on barbs.
*
*
* </pre>
*
@ -246,9 +248,26 @@ public class VectorGraphicsRenderable {
int n10 = calcSpd / 10;
calcSpd = calcSpd - 10 * n10;
int n5 = calcSpd / 5;
/*
* Rendering too many flags results in unacceptable rendering
* performance(freezes). Since real atmospheric conditions can never
* generate that much wind we want to limit it too a reasonablish number
* of flags. To make it somewhat configurable the number of flags is
* limited to 10 times the number of flags that fit on the staff size
* specified in the config. 10 was chosen arbitrarily, displays with
* that many flags are already unusable but still render with good
* enough performance.
*/
if (n50 * add * 2 > size * 10) {
throw new IllegalArgumentException(
"Unable to render a wind barb because magnitude is too great("
+ magnitude + ").");
}
double sx = ((n50 + n50 + n10 + n5 + 2)) * add;
double staff = Math.max(size, sx);
// DRAW STAFF
double ix2 = plotLoc.x + dix * size * config.getOffsetRatio();
double jy2 = plotLoc.y - djy * size * config.getOffsetRatio();

View file

@ -0,0 +1,183 @@
# ----------------------------------------------------------------------------
# This software is in the public domain, furnished "as is", without technical
# support, and with no warranty, express or implied, as to its usefulness for
# any purpose.
#
# Run_NWPS
# Description:
#
# This runs a Procedure within the GFE that builds NWPS
# forecast wind grids based on the operational wind forecast grids
# and then sends those Wind grids to the NWPS model.
#
# Authors: Pablo Santos and Alex Gibbs.
#
# Last Modified: 01/23/15 by AG/PS for AWIPS Baseline.
# ----------------------------------------------------------------------------
# The MenuItems list defines the GFE menu item(s) under which the
# Procedure is to appear. Possible items are: Populate, Edit, Consistency,
# Verify, Hazards
MenuItems = ["Edit"]
import SmartScript, LogStream
import time, os, shutil, TimeRange, AbsTime
import ProcessVariableList
class Procedure (SmartScript.SmartScript):
def __init__(self, dbss):
SmartScript.SmartScript.__init__(self, dbss)
def fileNameFromIntTime(self, floatTime):
tupleTime = time.gmtime(floatTime)
# print "TUPLETIME IS: ", tupleTime
return time.strftime("%Y%m%d_%H00", tupleTime)
def getButtonNames(self):
#currentTime = int(time.time() / 3600) * 3600 # truncated to this hour
currentTime = (self._gmtime().unixTime()/3600)*3600
#print "currentTime: ", currentTime
if time.gmtime(currentTime).tm_hour % 6 != 0:
currentTime = currentTime + (6 * 3600) # add three hours
startTime = int(currentTime / (6 * 3600)) * (6 * 3600)
#print "StartTime from GUI is: ", startTime
timeStrs = []
timeList = []
for i in range(0, 7):
currentTime = startTime + (6 * i) * 3600 - 108000 # 30 hrs
strTime = self.fileNameFromIntTime(currentTime)
timeList.append(currentTime)
timeStrs.append(strTime)
return timeStrs,timeList
def getModelTimeRange(self, modelID, param):
#before = time.time() - (3000 * 24 * 3600) # 3000 days ago. Does not work with DRT
#later = time.time() + 100 * 24 * 3600 # 100 days from now. Does not work with DRT
before = self._gmtime().unixTime() - (7 * 24 * 3600) # 7 days ago
later = self._gmtime().unixTime() + 8 * 24 * 3600 # 8 days from now
timeRange = TimeRange.TimeRange(AbsTime.AbsTime(before), AbsTime.AbsTime(later))
#self.deleteCmd(weNames, timeRange)
gridInfo = self.getGridInfo(modelID, param, "SFC", timeRange)
#print "GRIDINFO IS: ", modelID, gridInfo
if len(gridInfo) == 0:
self.statusBarMsg("No grids available for model:" + modelID, "S")
return None
minTime = later
maxTime = before
for g in gridInfo:
start = g.gridTime().startTime().unixTime()
end = g.gridTime().endTime().unixTime()
minTime = min(minTime,start)
maxTime = max(maxTime,end)
modelTR = TimeRange.TimeRange(AbsTime.AbsTime(minTime), AbsTime.AbsTime(maxTime))
#print "MODELTR", modelTR, minTime, maxTime
return modelTR, minTime, maxTime
def execute(self, editArea, timeRange, varDict):
buttonList, timeList = self.getButtonNames()
variableList = [
("How Long Do You Want To Run NWPS:" , 102, "scale", [12, 102], 3),
#("NWPS Model Winds:", "ForecastWindGrids", "radio", ["ForecastWindGrids"]),
("Model Start Time:", buttonList[4], "radio", buttonList),
("Local or NCEP:", "Local", "radio", ["Local","NCEP"]),
("Model Core:", "SWAN", "radio", ["SWAN","NWW","UNSWAN"]),
("Send Output to Web:", "Yes", "radio", ["Yes","No"]),
("Plot Output Only (No Web):", "No", "radio", ["Yes","No"]),
("Boundary Conditions:", "WNAWave", "radio", ["WNAWave", "TAFB-NWPS", "HURWave", "No"]),
("**Boundary Conditions: OPC/TAFB-NWPS: CHECK www.srh.noaa.gov/rtimages/nhc/wfo_boundary_conditions for up to date files for your SITE**\nNOTE: make sure there is a file time stamp online matching your selected Model Start Time","", "label"),
("Run Hi Res NEST:", "Yes", "radio", ["Yes","No"]),
("RTOFS Currents:", "Yes", "radio", ["Yes","No"]),
("Model Time Step:", "600", "radio", ["1200","900","600","300"]),
("Hotstart:", "True", "radio", ["True", "False"]),
("Waterlevels:", "ESTOFS", "radio", ["ESTOFS","PSURGE", "No"]),
("If PSURGE\n% Exceedance Hgt:", "10", "radio", ["10", "20", "30", "40", "50"]),
]
varDict = {}
processVarList = ProcessVariableList.ProcessVariableList("Run_NWPS", variableList, varDict, None)
status = processVarList.status()
if status != "OK":
return
fcst_length = processVarList.varDict()["How Long Do You Want To Run NWPS:"]
wind="ForecastWindGrids"
modelstarttime = processVarList.varDict()["Model Start Time:"]
wheretorun = processVarList.varDict()["Local or NCEP:"]
model = processVarList.varDict()["Model Core:"]
web = processVarList.varDict()["Send Output to Web:"]
plot = processVarList.varDict()["Plot Output Only (No Web):"]
wna = processVarList.varDict()["Boundary Conditions:"]
nests = processVarList.varDict()["Run Hi Res NEST:"]
stream = processVarList.varDict()["RTOFS Currents:"]
tstep = processVarList.varDict()["Model Time Step:"]
hotstart = processVarList.varDict()["Hotstart:"]
waterlevels = processVarList.varDict()["Waterlevels:"]
excd = processVarList.varDict()["If PSURGE\n% Exceedance Hgt:"]
fcstlength = str(fcst_length)
wind = str(wind)
wna = str(wna)
nest = str(nests)
gstream = str(stream)
waterlevels = str(waterlevels)
excd = str(excd)
modelTR = self.getModelTimeRange("Fcst", "Wind")
startHour = modelTR[1]
endHour = modelTR[2]
timeRange = modelTR[0]
if (modelstarttime == buttonList[0]):
starttime=timeList[0]
elif (modelstarttime == buttonList[1]):
starttime=timeList[1]
elif (modelstarttime == buttonList[2]):
starttime=timeList[2]
elif (modelstarttime == buttonList[3]):
starttime=timeList[3]
elif (modelstarttime == buttonList[4]):
starttime=timeList[4]
elif (modelstarttime == buttonList[5]):
starttime=timeList[5]
elif (modelstarttime == buttonList[6]):
starttime=timeList[6]
else:
starttime=startHour # Model start Hour if all others empty
if (startHour > starttime):
starttime = startHour
timeRange1 = TimeRange.TimeRange(AbsTime.AbsTime(starttime - 7*24*3600), AbsTime.AbsTime(starttime + 8*24*3600))
timeRange2 = TimeRange.TimeRange(AbsTime.AbsTime(starttime), AbsTime.AbsTime(starttime + fcst_length*3600))
self.deleteCmd(['NWPSwind'], timeRange1)
databaseID = self.findDatabase("Fcst")
self.copyToCmd([('Wind', 'NWPSwind')], databaseID, timeRange2)
self.fragmentCmd(['NWPSwind'], timeRange2)
self.saveElements(["NWPSwind"])
inp_args = fcstlength + ":" + wna + ":" + nest + ":" + gstream + ":" + wind + ":" + web + ":" + plot + ":" + tstep + ":" + hotstart + ":" + waterlevels + ":" + model + ":" + excd + ":" + wheretorun
try:
os.stat('/tmp/nwps')
except:
os.mkdir('/tmp/nwps')
os.chmod('/tmp/nwps',0o777)
f = open('/tmp/nwps/inp_args', 'w')
f.write(inp_args)
f.close()
os.chmod('/tmp/nwps/inp_args',0o666)
os.system('scp -rp /tmp/nwps/inp_args px2f:/awips2/GFESuite/nwps/var/')
shutil.rmtree('/tmp/nwps')

View file

@ -1370,4 +1370,28 @@
<DatabaseLevel levelName="FHAG" levelOneValue="2000"
levelTwoValue="5000.0" unit="m" />
</Level>
<Level displayName="Tertiary" key="Tertiary"> <!-- Start NWPS -->
<DatabaseLevel levelName="OSEQD" levelOneValue="3" />
</Level>
<Level displayName="OSEQD-4" key="OSEQD-4">
<DatabaseLevel levelName="OSEQD" levelOneValue="4" />
</Level>
<Level displayName="OSEQD-5" key="OSEQD-5">
<DatabaseLevel levelName="OSEQD" levelOneValue="5" />
</Level>
<Level displayName="OSEQD-6" key="OSEQD-6">
<DatabaseLevel levelName="OSEQD" levelOneValue="6" />
</Level>
<Level displayName="OSEQD-7" key="OSEQD-7">
<DatabaseLevel levelName="OSEQD" levelOneValue="7" />
</Level>
<Level displayName="OSEQD-8" key="OSEQD-8">
<DatabaseLevel levelName="OSEQD" levelOneValue="8" />
</Level>
<Level displayName="OSEQD-9" key="OSEQD-9">
<DatabaseLevel levelName="OSEQD" levelOneValue="9" />
</Level>
<Level displayName="OSEQD-10" key="OSEQD-10"> <!-- End NWPS -->
<DatabaseLevel levelName="OSEQD" levelOneValue="10" />
</Level>
</LevelMappings>

View file

@ -14,8 +14,8 @@ STATION_COLUMN='stationid'
LAT_COLUMN='latitude'
LON_COLUMN='longitude'
CONSTRAINT_NAME='latitude_longitude_officeId_refTime_forecastTime_eventType'
CONSTRAINT_COLUMNS='latitude, longitude, officeId, refTime, forecastTime, eventType'
CONSTRAINT_NAME='latitude_longitude_stationId_refTime_forecastTime_eventType'
CONSTRAINT_COLUMNS='latitude, longitude, stationId, refTime, forecastTime, eventType'
PSQL="/awips2/psql/bin/psql"

View file

@ -0,0 +1,97 @@
#!/usr/bin/env python
import imp, sys
DICT_KEYS = ['fullStateName',
'partOfState',
'stateAbbr',
'ugcCityString',
'ugcCode',
'ugcName',
'ugcTimeZone',
]
def diffCities(cityStringA, cityStringB):
cityListA = cityListB = []
cityListAMixed = cityListBMixed = []
if cityStringA is not None:
cityListAMixed = cityStringA.strip('.').split('...')
cityListA = cityStringA.strip('.').upper().split('...')
if cityStringB is not None:
cityListBMixed = cityStringB.strip('.').split('...')
cityListB = cityStringB.strip('.').upper().split('...')
added = []
for city in set(cityListB).difference(set(cityListA)):
added.append(cityListBMixed[cityListB.index(city)])
removed = []
for city in set(cityListA).difference(set(cityListB)):
removed.append(cityListAMixed[cityListA.index(city)])
if len(added) > 0:
print " added cities:", list(added)
if len(removed) > 0:
print " removed cities:", list(removed)
def printEntry(dict):
for key in DICT_KEYS:
if dict.has_key(key):
print " ",key+':',dict[key]
def main():
if len(sys.argv) < 3:
print "Usage:"
print sys.argv[0], "fileA, fileB"
print " fileA: path to old AreaDictionary.py file"
print " fileB: path to new AreaDictionary.py file"
print "Example:"
print sys.argv[0], "/awips2/edex/data/utility/cave_static/site/OAX/gfe/userPython/textUtilities/regular/AreaDictionary.py /awips2/edex/data/utility/cave_static/configured/OAX/gfe/userPython/textUtilities/regular/AreaDictionary.py"
sys.exit(1)
modA = imp.load_source('modA', sys.argv[1])
modB = imp.load_source('modB', sys.argv[2])
dictA = modA.AreaDictionary
dictB = modB.AreaDictionary
keys = set()
keys.update(dictA.keys())
keys.update(dictB.keys())
keys = list(keys)
keys.sort()
for key in keys:
if not dictA.has_key(key):
print '\n'+key+": added"
printEntry(dictB[key])
elif not dictB.has_key(key):
print '\n'+key+": removed"
printEntry(dictA[key])
else:
differs = False
dataA = dictA[key]
dataB = dictB[key]
for key1 in DICT_KEYS:
valueA = valueB = None
if dataA.has_key(key1):
valueA = dataA[key1]
if dataB.has_key(key1):
valueB = dataB[key1]
if str(valueA).upper() != str(valueB).upper():
if not differs:
differs = True
print '\n'+key+": differs"
if key1 == 'ugcCityString':
diffCities(valueA, valueB)
else:
print " ", key1,"old:", valueA
print " ", " "*len(key1),"new:", valueB
if __name__ == "__main__":
main()

View file

@ -0,0 +1,42 @@
#!/usr/bin/env python
# This script will preserve the site's current configured AreaDictionary.py file as
# a site level file if one does not already exist.
AREA_DICTIONARY_PATH = "/awips2/edex/data/utility/cave_static/configured/*/gfe/userPython/textUtilities/regular/AreaDictionary.py"
import glob
import os
import shutil
import traceback
def main():
# for each configured AreaDictionary.py file
for configFile in glob.glob(AREA_DICTIONARY_PATH):
siteFile = configFile.replace("cave_static/configured", "cave_static/site")
# if site file does not exist
if not os.path.exists(siteFile):
# create site directory if necessary
try:
os.makedirs(os.path.dirname(siteFile))
except OSError as e:
import errno
if e.errno != errno.EEXIST:
print "Error copying", configFile, "\n to", siteFile, \
"\nPlease manually copy this file before starting EDEX"
traceback.print_exc()
continue
# copy configured file to site.
print "Preserving", siteFile
try:
shutil.copy(configFile, siteFile)
except:
print "Error copying", configFile, "\n to", siteFile, \
"\nPlease manually copy this file before starting EDEX"
traceback.print_exc()
else:
print "Skipping ", configFile, "\n ", siteFile, "exists"
if __name__ == "__main__":
main()

View file

@ -215,6 +215,8 @@
<alias base="NAHwave15">NAHwave15</alias>
<alias base="NAHwave10">NAHwave10</alias>
<alias base="NAHwave4">NAHwave4</alias>
<alias base="nwpsCG1">nwpsCG1</alias>
<alias base="nwpsTrkngCG0">nwpsTrkngCG0</alias>
<alias base="FFG-ALR">RFCFFG_ParameterInfo</alias>
<alias base="FFG-FWR">RFCFFG_ParameterInfo</alias>
<alias base="FFG-KRF">RFCFFG_ParameterInfo</alias>

View file

@ -176,7 +176,6 @@ WaveHeight = ("WaveHeight", SCALAR, "ft", "Total Wave Height",
Swell = ("Swell", VECTOR, "ft", "Primary Swell", 100.0, 0.0, 0, NO)
Swell2 = ("Swell2", VECTOR, "ft", "Secondary Swell", 100.0, 0.0, 0, NO)
Period = ("Period", SCALAR, "sec", "Primary Period", 20.0, 0.0, 0, NO)
Period2 = ("Period2", SCALAR, "sec", "Secondary Period", 20.0, 0.0, 0, NO)
WindGust = ("WindGust", SCALAR, "kts", "Wind Gust", 125.0, 0.0, 0, NO)
IceCoverage = ("IceCoverage", SCALAR, "%", "Ice Coverage Amount",
100.0, 0.0, 0, NO)
@ -191,6 +190,53 @@ WindWaveHgt = ("WindWaveHgt", SCALAR, "ft", "Significant wave height of wind wav
WindWavePeriod = ("WindWavePeriod", SCALAR, "sec.", "Wind wave peak period", 20.0, 0.0, 0, NO)
WindWaveDir = ("WindWaveDir", VECTOR, "degree", "Direction of wind waves", 100.0, 0.0, 0, NO)
NWPSwind = ("NWPSwind", VECTOR, "kts", "NWPSwind", 150.0, 0.0, 0, NO)
SwanSwell = ("SwanSwell", SCALAR, "ft", "Total Significant Swell Height", 40.0, 0.0, 2, NO)
#Smart Init Grids - for partitioned wave groups
Wave_1 = ("Wave_1", VECTOR, "ft", "Wave_1", 50.0, 0.0, 2, NO)
Wave_2 = ("Wave_2", VECTOR, "ft", "Wave_2", 50.0, 0.0, 2, NO)
Wave_3 = ("Wave_3", VECTOR, "ft", "Wave_3", 50.0, 0.0, 2, NO)
Wave_4 = ("Wave_4", VECTOR, "ft", "Wave_4", 50.0, 0.0, 2, NO)
Wave_5 = ("Wave_5", VECTOR, "ft", "Wave_5", 50.0, 0.0, 2, NO)
Wave_6 = ("Wave_6", VECTOR, "ft", "Wave_6", 50.0, 0.0, 2, NO)
Wave_7 = ("Wave_7", VECTOR, "ft", "Wave_7", 50.0, 0.0, 2, NO)
Wave_8 = ("Wave_8", VECTOR, "ft", "Wave_8", 50.0, 0.0, 2, NO)
Wave_9 = ("Wave_9", VECTOR, "ft", "Wave_9", 50.0, 0.0, 2, NO)
#Fcst Grids - for partitioned wave groups
Wave1 = ("Wave1", VECTOR, "ft", "WAVE1", 50.0, 0.0, 1, NO)
Wave2 = ("Wave2", VECTOR, "ft", "WAVE2", 50.0, 0.0, 1, NO)
Wave3 = ("Wave3", VECTOR, "ft", "WAVE3", 50.0, 0.0, 1, NO)
Wave4 = ("Wave4", VECTOR, "ft", "WAVE4", 50.0, 0.0, 1, NO)
Wave5 = ("Wave5", VECTOR, "ft", "WAVE5", 50.0, 0.0, 1, NO)
Wave6 = ("Wave6", VECTOR, "ft", "WAVE6", 50.0, 0.0, 1, NO)
Wave7 = ("Wave7", VECTOR, "ft", "Wave7", 50.0, 0.0, 0, NO)
Wave8 = ("Wave8", VECTOR, "ft", "Wave8", 35.0, 0.0, 0, NO)
Wave9 = ("Wave9", VECTOR, "ft", "Wave9", 35.0, 0.0, 0, NO)
#Smart Init Grids - for partitioned wave groups
Period_1 = ("Period_1", SCALAR, "sec", "Period_1", 30.0, 1.0, 0, NO)
Period_2 = ("Period_2", SCALAR, "sec", "Period_2", 30.0, 1.0, 0, NO)
Period_3 = ("Period_3", SCALAR, "sec", "Period_3", 30.0, 1.0, 0, NO)
Period_4 = ("Period_4", SCALAR, "sec", "Period_4", 30.0, 1.0, 0, NO)
Period_5 = ("Period_5", SCALAR, "sec", "Period_5", 30.0, 0.0, 0, NO)
Period_6 = ("Period_6", SCALAR, "sec", "Period_6", 30.0, 0.0, 0, NO)
Period_7 = ("Period_7", SCALAR, "sec", "Period_7", 30.0, 0.0, 0, NO)
Period_8 = ("Period_8", SCALAR, "sec", "Period_8", 30.0, 0.0, 0, NO)
Period_9 = ("Period_9", SCALAR, "sec", "Period_9", 30.0, 0.0, 0, NO)
#Fcst Grids - for partitioned wave groups
Period1 = ("Period1", SCALAR, "sec", "Period1", 25.0, 0.0, 1, NO)
Period2 = ("Period2", SCALAR, "sec", "Period2", 25.0, 0.0, 1, NO)
Period3 = ("Period3", SCALAR, "sec", "Period3", 25.0, 0.0, 1, NO)
Period4 = ("Period4", SCALAR, "sec", "Period4", 25.0, 0.0, 1, NO)
Period5 = ("Period5", SCALAR, "sec", "Period5", 25.0, 0.0, 1, NO)
Period6 = ("Period6", SCALAR, "sec", "Period6", 25.0, 0.0, 1, NO)
Period7 = ("Period7", SCALAR, "sec", "Period7", 25.0, 0.0, 0, NO)
Period8 = ("Period8", SCALAR, "sec", "Period8", 25.0, 0.0, 0, NO)
Period9 = ("Period9", SCALAR, "sec", "Period9", 25.0, 0.0, 0, NO)
# Fire Weather Weather Elements
LAL = ("LAL", SCALAR, "cat", "Lightning Activity Level", 6.0, 1.0, 0, NO)
CWR = ("CWR", SCALAR, "%", "Chance of Wetting Rain", 100.0, 0.0, 0, NO)
@ -1004,6 +1050,8 @@ ISC = ('ISC', GRID, '', YES, NO, 1, 12)
LAPS = ('LAPS', GRID, '', YES, NO, 1, 30)
SAT = ('SAT', GRID, '', YES, NO, 1, 12)
ESTOFS = ('ESTOFS', GRID, '', NO, NO, 2, 0)
nwpsTrkngCG0 = ('nwpsTrkngCG0',GRID, '', NO, NO, 2, 0)
nwpsCG1 = ('nwpsCG1', GRID, '', NO, NO, 2, 0)
HPCGuide = ('HPCGuide', GRID, '', NO, NO, 2, 0)
NAM12 = ('NAM12', GRID, '', NO, NO, 2, 0)
NAM40 = ('NAM40', GRID, '', NO, NO, 2, 0)
@ -1096,6 +1144,8 @@ if SID in ALASKA_SITES:
'AKwave10',
'AKwave4',
'GlobalWave',
('nwpsCG1', 'nwpsCG1'),
('nwpsTrkngCG0', 'nwpsTrkngCG0'),
# ('AK-RTMA','RTMA'),
('AK-RTMA3','RTMA'), # Only have one RTMA
('AK-NamDNG5','NamDNG5'),
@ -1136,7 +1186,9 @@ elif SID == "HFO":
'WPHwave10',
'NPHwave4',
'GLOBHwave',
('MOSGuide-HI', 'MOSGuide'),
('MOSGuide-HI', 'MOSGuide'),
('nwpsCG1', 'nwpsCG1'),
('nwpsTrkngCG0', 'nwpsTrkngCG0'),
('GFS20-PAC', 'GFS20'),
]
@ -1165,6 +1217,8 @@ elif SID == "SJU":
'NAHwave15',
'NAHwave10',
'NAHwave4',
('nwpsCG1', 'nwpsCG1'),
('nwpsTrkngCG0', 'nwpsTrkngCG0'),
'GLOBHwave',
('GFS20-PRICO', 'GFS20'),
]
@ -1179,6 +1233,8 @@ elif SID == "GUM":
'RTOFS-Guam',
'WPHwave10',
'GLOBHwave',
('nwpsCG1', 'nwpsCG1'),
('nwpsTrkngCG0', 'nwpsTrkngCG0'),
('GFS20-PAC', 'GFS20'),
]
@ -1219,6 +1275,8 @@ elif SID in CONUS_EAST_SITES:
('OPCWave180', 'OPCTAFBE'),
('OPCWave181', 'OPCTAFBNW'),
('OPCWave182', 'OPCTAFBSW'),
('nwpsCG1', 'nwpsCG1'),
('nwpsTrkngCG0', 'nwpsTrkngCG0'),
'MOSGuide',
'RTMA',
'NamDNG5',
@ -1294,6 +1352,8 @@ else: #######DCS3501 WEST_CONUS
('OPCWave180', 'OPCTAFBE'),
('OPCWave181', 'OPCTAFBNW'),
('OPCWave182', 'OPCTAFBSW'),
('nwpsCG1', 'nwpsCG1'),
('nwpsTrkngCG0', 'nwpsTrkngCG0'),
'MOSGuide',
'RTMA',
'NamDNG5',
@ -1473,6 +1533,8 @@ elif SID in ALASKA_SITES:
"DGEX" : ['DGEX'],
# "GWW" : ["GWW"],
# "OPCTAFBNW" : ['OPCTAFBNW'],
"nwpsCG1" : ['nwpsCG1'],
"nwpsTrkngCG0" : ['nwpsTrkngCG0'],
"RTMA": ['RTMA'],
"NamDNG5" : ["NamDNG5"],
"AKMOSGuide" : ['MOSGuide'],
@ -1492,7 +1554,9 @@ elif SID == "HFO":
# "gfsLR" : ["gfsLR"],
"RTMA": ['RTMA'],
"NamDNG5" : ["NamDNG5"],
"MOSGuide" : ['MOSGuide'],
"MOSGuide" : ['MOSGuide'],
"nwpsCG1" : ['nwpsCG1'],
"nwpsTrkngCG0" : ['nwpsTrkngCG0'],
}
# San Juan OCONUS
@ -1525,6 +1589,8 @@ elif SID == "SJU":
"RTMA": ['RTMA'],
"NamDNG5" : ["NamDNG5"],
"ESTOFS" : ["ESTOFS"],
"nwpsCG1" : ['nwpsCG1'],
"nwpsTrkngCG0" : ['nwpsTrkngCG0'],
}
# Guam OCONUS
@ -1535,6 +1601,8 @@ elif SID == "GUM":
# "gfsLR" : ["gfsLR"],
# "GlobalWave" : ["GlobalWave"],
"RTMA": ['RTMA'],
"nwpsCG1" : ['nwpsCG1'],
"nwpsTrkngCG0" : ['nwpsTrkngCG0'],
}
#CONUS sites
@ -1572,6 +1640,8 @@ else:
# "ENPwave": ["ENPwave"],
"ESTOFS" : ["ESTOFS"],
"GFSLAMPGrid" : ["GFSLAMPGrid"],
"nwpsCG1" : ['nwpsCG1'],
"nwpsTrkngCG0" : ['nwpsTrkngCG0'],
}
#initialization skip certain model runs
@ -1713,7 +1783,12 @@ localRTMAParms = []
localNamDNG5Parms = []
localSREFParms = []
localTPCProbParms = []
localGFSLAMPGridParms = localHRRRParms = localESTOFSParms = localISCExtraParms = []
localGFSLAMPGridParms = []
localHRRRParms = []
localESTOFSParms = []
localnwpsCG1Parms = []
localnwpsTrkngCG0Parms = []
localISCExtraParms = []
myOfficeType = SITES[GFESUITE_SITEID][5]
@ -1727,6 +1802,8 @@ if not BASELINE and siteImport('localConfig'):
myOfficeType = SITES[GFESUITE_SITEID] #probably from localConfig
localESTOFSParms = getattr(localConfig, 'parmsESTOFS', localESTOFSParms)
localnwpsCG1Parms = getattr(localConfig, 'parmsnwpsCG1', localnwpsCG1Parms)
localnwpsTrkngCG0Parms = getattr(localConfig, 'parmsnwpsTrkngCG0', localnwpsTrkngCG0Parms)
localParms = getattr(localConfig, 'parms', localParms)
localNAM12Parms = getattr(localConfig, 'parmsNAM12', localNAM12Parms)
localOPCWavEParms = getattr(localConfig, 'parmsOPCWavE', localOPCWavEParms)
@ -1853,14 +1930,15 @@ MOS_MODEL = [([Temp, Td, Wind, Weather, Sky], TC1),
([SnowAmt, PoP], LTMOS), ([QPF], TC6NG)]
# Fcst and official database parameter groupings
OFFICIALDBS = [([Temp, Td, Wind, Weather, Sky, FzLevel, SnowLevel], TC1),
OFFICIALDBS = [([Temp, Td, Wind, NWPSwind, Weather, Sky, FzLevel, SnowLevel], TC1),
([HeatIndex, WindChill, RH, SnowAmt, CWR, QPF], TC1),
([PoP, Ttrend, RHtrend, Wind20ft], TC1),
([MinT], MinTTC), ([MaxT], MaxTTC),
([MinRH], MinRHTC), ([MaxRH], MaxRHTC),
([WaveHeight, SurfHeight, WindGust, Swell, Swell2, Period, Period2], TC1),
([WaveHeight, SurfHeight, WindGust, Swell, Swell2, Period], TC3NG),
([WindWaveHeight, SwanSwell, Wave1, Wave2, Wave3, Wave4, Wave5, Wave6, Wave7, Wave8, Wave9, Period1, Period2, Period3, Period4, Period5, Period6, Period7, Period8, Period9], TC3NG),
([VentRate, LAL, Haines, MixHgt, FreeWind, TransWind], TC1),
([WindWaveHeight, DSI, Stability, MarineLayer], TC1),
([DSI, Stability, MarineLayer], TC1),
([HrsOfSun, InvBurnOffTemp], LT24),
([IceAcc, IceCoverage, Hazards], TC1),
([Wetflag], FireWx1300TC),
@ -1880,6 +1958,11 @@ OFFICIALDBS = [([Temp, Td, Wind, Weather, Sky, FzLevel, SnowLevel], TC1),
([ApparentT, HeatIndex, WindChill, UWaveDir, VWaveDir, LkSfcT, SnowMap, WaveDir, SnowRatio, StormTotalQPF], TC1),
]
# NWPS
nwpsCG1_MODEL = [([SwanSwell, Period, WaveHeight, WindWaveHeight, Wind], TC3NG)]
nwpsTrkngCG0_MODEL = [([Wave1, Wave2, Wave3, Wave4, Wave5, Wave6, Wave7, Wave8, Wave9, Period1, Period2, Period3, Period4, Period5, Period6,Period7, Period8, Period9 ], TC3NG)]
# Global Wave Watch III, WNAWAVE, AKWAVE Model database parameter groupings
WAVEPARMS = [([WindWaveHeight, WaveHeight, SurfHeight, Wind], TC6),
([Swell, Swell2, Period, Period2], TC6)]
@ -2002,6 +2085,8 @@ DATABASES = [(Official, OFFICIALDBS + localParms),
(AKwave4, WAVEPARMS + localAKwave4Parms),
(EPwave10, WAVEPARMS + localEPwave10Parms),
(ESTOFS, ESTOFSPARMS + localESTOFSParms),
(nwpsCG1, nwpsCG1_MODEL + localnwpsCG1Parms),
(nwpsTrkngCG0, nwpsTrkngCG0_MODEL + localnwpsTrkngCG0Parms),
(GlobalWave, WAVEPARMS + localGlobalWaveParms),
(GLWM, GLWMPARMS + localGLWMParms), #####DCS3499
(HIRESWarw, STD3_MODEL + localHIRESWarwParms), #####DCS3501

View file

@ -0,0 +1,255 @@
<?xml version="1.0" encoding="UTF-8"?>
<gridParamInfo xmlns:ns2="group">
<!-- This is the GFE parameterInfo file for the nwpsCG1
Created: 16-MAY-13, BScalio/AGibbs
Change Log: 27-MAY-13, BScalio/AGibbs Corrected wrong paths for model information
D2D MODEL NAME = nwpsCG1
GRID DEFINITION = /awips2/edex/data/utility/common_static/site/XXX/grid/models/nwpsCG1.xml
= 7:0:9112:255
PARAMETER ALIAS = /awips2/edex/data/utility/common_static/site/XXX/grid/dataset/alias/gfeParamInfo.xml
= <alias base>"nwpsCG1">nwpsCG1</alias>
PARAMETER DEFS = /awips2/edex/data/utility/common_static/site/XXX/parameter/definition/parameters.xml
= Maps model specific (undefined in base) parameters: DBSS, DEVMSL, SPC, DIRC
SMART INIT = nwpsCG1
NOTE: Changes to this file or any other GFE parameter mapping files in alias or definition
require all the JVMs on all EDEx Processing Servers (DX3-6) to be restarted.
Do one server at a time, and wait for the EDEx-Request JVM to start back up before
continuing onto other servers and watch the logfiles at startup for any errors that
might be resultant from the changes made.
-->
<!-- Model forecast hours in D2D are:
00, 03, 06, 09, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, 99, 102
(in seconds below)
NOTE: If other FH hours added later, those must
be included in valtimeMINUSreftime below
-->
<valtimeMINUSreftime>
<fcst>0</fcst>
<fcst>10800</fcst>
<fcst>21600</fcst>
<fcst>32400</fcst>
<fcst>43200</fcst>
<fcst>54000</fcst>
<fcst>64800</fcst>
<fcst>75600</fcst>
<fcst>86400</fcst>
<fcst>97200</fcst>
<fcst>108000</fcst>
<fcst>118800</fcst>
<fcst>129600</fcst>
<fcst>140400</fcst>
<fcst>151200</fcst>
<fcst>162000</fcst>
<fcst>172800</fcst>
<fcst>183600</fcst>
<fcst>194400</fcst>
<fcst>205200</fcst>
<fcst>216000</fcst>
<fcst>226800</fcst>
<fcst>237600</fcst>
<fcst>248400</fcst>
<fcst>259200</fcst>
<fcst>270000</fcst>
<fcst>280800</fcst>
<fcst>291600</fcst>
<fcst>302400</fcst>
<fcst>313200</fcst>
<fcst>324000</fcst>
<fcst>334800</fcst>
<fcst>345600</fcst>
<fcst>356400</fcst>
<fcst>367200</fcst>
</valtimeMINUSreftime>
<!-- Parameters in D2D model are:
HTSGW, dirPW, PERPW, SWELL, HTSGW, WD
(defined in WCwave4 already, copied here)
WDEPTH, DSLM, DIRC, SPC, WS
(not in any baseline model)
Required addition to gfeParamInfo.xml and parameters.xml in alias and definition directories
-->
<!-- WDEPTH: Surface Geometric Depth Below Sea Surface -->
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>wdepth</short_name>
<long_name>Surface Geometric Depth Below Sea Surface</long_name>
<units>m</units>
<udunits>meters</udunits>
<uiname>DepthBelowSeaSurface</uiname>
<valid_range>0.0</valid_range>
<valid_range>10000.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>SFC</levelsDesc>
<levels>
<level>SFC</level>
</levels>
</gridParameterInfo>
<!-- DSLM: Surface Deviation of Sea Level from Mean -->
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>dslm</short_name>
<long_name>Surface Deviation of Sea Level From Mean</long_name>
<units>m</units>
<udunits>meters</udunits>
<uiname>DevFromMeanSeaLevel</uiname>
<valid_range>-15.0</valid_range>
<valid_range>15.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>SFC</levelsDesc>
<levels>
<level>SFC</level>
</levels>
</gridParameterInfo>
<!-- DIRC: Surface Current Direction -->
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>dirc</short_name>
<long_name>Surface Current Direction</long_name>
<units>degree_angle</units>
<udunits>degree_angle</udunits>
<uiname>CurrentDir</uiname>
<valid_range>0.0</valid_range>
<valid_range>360.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>SFC</levelsDesc>
<levels>
<level>SFC</level>
</levels>
</gridParameterInfo>
<!-- SPC: Surface Current Speed -->
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>spc</short_name>
<long_name>Surface Current Speed</long_name>
<units>m/s</units>
<udunits>meter/sec</udunits>
<uiname>CurrSpeed</uiname>
<valid_range>0</valid_range>
<valid_range>7</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>SFC</levelsDesc>
<levels>
<level>SFC</level>
</levels>
</gridParameterInfo>
<!-- WS: Surface Wind Speed -->
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>ws</short_name>
<long_name>Surface Wind Speed</long_name>
<units>m/s</units>
<udunits>meter/sec</udunits>
<uiname>WindSpeed</uiname>
<valid_range>0</valid_range>
<valid_range>150.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>SFC</levelsDesc>
<levels>
<level>SFC</level>
</levels>
</gridParameterInfo>
<!-- HTSGW: Total Significant Wave Height -->
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>htsgw</short_name>
<long_name>Sig height combined wind waves and swell</long_name>
<units>m</units>
<udunits>meters</udunits>
<uiname>heightWindWavesandSwell</uiname>
<valid_range>0.0</valid_range>
<valid_range>50.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>SFC</levelsDesc>
<levels>
<level>SFC</level>
</levels>
</gridParameterInfo>
<!-- SWELL: Swell Height -->
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>swell</short_name>
<long_name>Significant swell wave height</long_name>
<units>m</units>
<udunits>meter/sec</udunits>
<uiname>heightSwellWaves</uiname>
<valid_range>0.0</valid_range>
<valid_range>50.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>SFC</levelsDesc>
<levels>
<level>SFC</level>
</levels>
</gridParameterInfo>
<!-- dirPW: Primary Wave Direction -->
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>dirpw</short_name>
<long_name>Primary wave direction</long_name>
<units>degree_angle</units>
<udunits>degree_angle</udunits>
<uiname>primaryWaveDir</uiname>
<valid_range>0.0</valid_range>
<valid_range>360.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>SFC</levelsDesc>
<levels>
<level>SFC</level>
</levels>
</gridParameterInfo>
<!-- PERPW: Primary Wave Period -->
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>perpw</short_name>
<long_name>Primary wave period</long_name>
<units>s</units>
<udunits>seconds</udunits>
<uiname>primaryWavePeriod</uiname>
<valid_range>0.0</valid_range>
<valid_range>25.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>SFC</levelsDesc>
<levels>
<level>SFC</level>
</levels>
</gridParameterInfo>
<!-- WD: Wind Direction -->
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>wd</short_name>
<long_name>Wind Direction</long_name>
<units>degree_angle</units>
<udunits>degree_angle</udunits>
<uiname>windDir</uiname>
<valid_range>0.0</valid_range>
<valid_range>360.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>SFC</levelsDesc>
<levels>
<level>SFC</level>
</levels>
</gridParameterInfo>
<!-- ::END:: nwpsCG1 parameters for GFE -->
</gridParamInfo>

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="UTF-8"?>
<gridParamInfo xmlns:ns2="group">
<valtimeMINUSreftime>
<fcst>0</fcst>
<fcst>10800</fcst>
<fcst>21600</fcst>
<fcst>32400</fcst>
<fcst>43200</fcst>
<fcst>54000</fcst>
<fcst>64800</fcst>
<fcst>75600</fcst>
<fcst>86400</fcst>
<fcst>97200</fcst>
<fcst>108000</fcst>
<fcst>118800</fcst>
<fcst>129600</fcst>
<fcst>140400</fcst>
<fcst>151200</fcst>
<fcst>162000</fcst>
<fcst>172800</fcst>
<fcst>183600</fcst>
<fcst>194400</fcst>
<fcst>205200</fcst>
<fcst>216000</fcst>
<fcst>226800</fcst>
<fcst>237600</fcst>
<fcst>248400</fcst>
<fcst>259200</fcst>
<fcst>280800</fcst>
<fcst>302400</fcst>
<fcst>324000</fcst>
<fcst>345600</fcst>
<fcst>367200</fcst>
<fcst>388800</fcst>
<fcst>410400</fcst>
<fcst>432000</fcst>
<fcst>453600</fcst>
<fcst>475200</fcst>
<fcst>496800</fcst>
<fcst>518400</fcst>
<fcst>540000</fcst>
<fcst>561600</fcst>
<fcst>583200</fcst>
<fcst>604800</fcst>
<fcst>626400</fcst>
<fcst>648000</fcst>
</valtimeMINUSreftime>
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>SWDIR</short_name>
<long_name>Swell peak direction</long_name>
<units>degree_angle</units>
<udunits>degree_angle</udunits>
<uiname>swellWaveDir</uiname>
<valid_range>0.0</valid_range>
<valid_range>360.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>OSEQD 1 2 3 4 5 6 7 8 9 10</levelsDesc>
<levels>
<level>OSEQD1</level>
<level>OSEQD2</level>
<level>OSEQD3</level>
<level>OSEQD4</level>
<level>OSEQD5</level>
<level>OSEQD6</level>
<level>OSEQD7</level>
<level>OSEQD8</level>
<level>OSEQD9</level>
<level>OSEQD10</level>
</levels>
</gridParameterInfo>
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>SWPER</short_name>
<long_name>Swell wave peak period</long_name>
<units>s</units>
<udunits>seconds</udunits>
<uiname>swellWavePeriod</uiname>
<valid_range>0.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>OSEQD 1 2 3 4 5 6 7 8 9 10</levelsDesc>
<levels>
<level>OSEQD1</level>
<level>OSEQD2</level>
<level>OSEQD3</level>
<level>OSEQD4</level>
<level>OSEQD5</level>
<level>OSEQD6</level>
<level>OSEQD7</level>
<level>OSEQD8</level>
<level>OSEQD9</level>
<level>OSEQD10</level>
</levels>
</gridParameterInfo>
<gridParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>SWELL</short_name>
<long_name>Significant swell wave height</long_name>
<units>m</units>
<udunits>meters</udunits>
<uiname>heightSwellWaves</uiname>
<valid_range>0.0</valid_range>
<valid_range>50.0</valid_range>
<fillValue>-99999.0</fillValue>
<n3D>1</n3D>
<levelsDesc>OSEQD 1 2 3 4 5 6 7 8 9 10</levelsDesc>
<levels>
<level>OSEQD1</level>
<level>OSEQD2</level>
<level>OSEQD3</level>
<level>OSEQD4</level>
<level>OSEQD5</level>
<level>OSEQD6</level>
<level>OSEQD7</level>
<level>OSEQD8</level>
<level>OSEQD9</level>
<level>OSEQD10</level>
</levels>
</gridParameterInfo>
</gridParamInfo>

View file

@ -0,0 +1,24 @@
from Init import *
import os
class nwpsCG1Forecaster(Forecaster):
def __init__(self):
Forecaster.__init__(self, "nwpsCG1", "nwpsCG1")
def calcWaveHeight(self, htsgw_SFC):
grid = htsgw_SFC / 0.3048
return grid
def calcSwanSwell(self, swell_SFC):
grid = swell_SFC / 0.3048)
return grid
def calcPeriod(self, perpw_SFC):
period = clip(perpw_SFC, 0, 25)
return period
def main():
nwpsCG1Forecaster().run()
os.system('/awips2/GFESuite/bin/sendGfeMessage -s -m "SWAN WAVE GRIDS ARE NOW IN GFE"')
if __name__ == "__main__":
main()

View file

@ -27,4 +27,8 @@
<!-- ECMWF decrypted -->
<regex>ecmwf_decrypted</regex>
<!-- NWPS pattern -->
<regex>xxx_nwps_CG1*</regex>
<regex>xxx_nwps_CG0_Trkng*</regex>
</requestPatterns>

View file

@ -0,0 +1,13 @@
<?xml version='1.0' encoding='UTF-8'?>
<latLonGridCoverage>
<name>9112</name>
<description>nwpsCG1</description>
<la1>24.1</la1>
<lo1>-83.54</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>261</nx>
<ny>201</ny>
<dx>0.019731</dx>
<dy>0.018</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
This_software_was_developed_and_/_or_modified_by_Raytheon_Company,
pursuant_to_Contract_DG133W-05-CQ-1067_with_the_US_Government.
U.S._EXPORT_CONTROLLED_TECHNICAL_DATA
This_software_product_contains_export-restricted_data_whose
export/transfer/disclosure_is_restricted_by_U.S._law._Dissemination
to_non-U.S._persons_whether_in_the_United_States_or_abroad_requires
an_export_license_or_other_authorization.
Contractor_Name:________Raytheon_Company
Contractor_Address:_____6825_Pine_Street,_Suite_340
________________________Mail_Stop_B8
________________________Omaha,_NE_68106
________________________402.291.0100
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
further_licensing_information.
-->
<latLonGridCoverage>
<name>10201978</name>
<description>Grid for NWPS</description>
<la1>24.1</la1>
<lo1>276.45999</lo1>
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
<nx>174</nx>
<ny>134</ny>
<dx>0.029653</dx>
<dy>0.027068</dy>
<spacingUnit>degree</spacingUnit>
</latLonGridCoverage>

View file

@ -0,0 +1,21 @@
<?xml version='1.0' encoding='UTF-8'?>
<gribModelSet>
<model>
<name>nwpsCG1</name>
<center>7</center>
<subcenter>0</subcenter>
<grid>9112</grid>
<process>
<id>15</id>
</process>
</model>
<model>
<name>nwpsTrkngCG0</name>
<center>7</center>
<subcenter>0</subcenter>
<grid>10201978</grid>
<process>
<id>15</id>
</process>
</model>
</gribModelSet>

View file

@ -2,4 +2,5 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
res/
res/,\
utility/

View file

@ -72,6 +72,7 @@ import com.vividsolutions.jts.geom.Geometry;
* Jan 15, 2014 2581 njensen Changed constraint to use officeId instead of stationId
* Jan 30, 2014 2581 njensen Added dataURI column back in
* Sep 16, 2014 2707 bclement removed dataURI column, event type now string, added event units
* Jan 06, 2014 2707 bclement changed unique constraint from officeId to stationId
*
* </pre>
*
@ -81,7 +82,7 @@ import com.vividsolutions.jts.geom.Geometry;
@Entity
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "lsrseq")
@Table(name = "lsr", uniqueConstraints = { @UniqueConstraint(columnNames = {
"latitude", "longitude", "officeId", "refTime", "forecastTime",
"latitude", "longitude", "stationId", "refTime", "forecastTime",
"eventType" }) })
/*
* Both refTime and forecastTime are included in the refTimeIndex since

View file

@ -1,4 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
.,\
utility/

View file

@ -2,4 +2,5 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
res/
res/,\
utility/

View file

@ -20,6 +20,7 @@
package com.raytheon.uf.common.dataplugin.radar.dataaccess;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
@ -63,19 +64,19 @@ import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Envelope;
/**
*
*
* A data factory for getting radar data from the metadata database. There are
* currently not any required identifiers.
*
*
* Radar does not return subgrids for request envelopes like other gridded
* types. Instead data for only icaos within the request envelope are returned
* and all data for the product is used. This is done because subgridding radial
* products is complex and this is not often what a caller actually wants.
*
*
* <pre>
*
*
* SOFTWARE HISTORY
*
*
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Jan 23, 2013 bsteffen Initial creation
@ -86,9 +87,13 @@ import com.vividsolutions.jts.geom.Envelope;
* Oct 28, 2014 3755 nabowle Implement getAvailableParameters, handle
* empty parameters, fix error message, and
* handle dataless radial radars.
*
* Dec 18, 2014 3600 nabowle Implement getAvailableLevels and add
* optional identifiers to indicate what
* fields are used for the level one and two
* values.
*
* </pre>
*
*
* @author bsteffen
* @version 1.0
*/
@ -99,6 +104,10 @@ public class RadarGridFactory extends AbstractGridDataPluginFactory implements
private static final String PRIMARY_ANGLE = "primaryElevationAngle";
private static final String TRUE_ANGLE = "trueElevationAngle";
private static final String ELEVATION_NUMBER = "elevationNumber";
private static final String ICAO = "icao";
private static final String LONGITUDE = "longitude";
@ -111,9 +120,19 @@ public class RadarGridFactory extends AbstractGridDataPluginFactory implements
private static final String RASTER_FORMAT = "Raster";
private static final String LEVEL_ONE = "level.one.field";
private static final String LEVEL_TWO = "level.two.field";
private static final List<String> SUPPORTED_FORMATS = Arrays.asList(
RADIAL_FORMAT, RASTER_FORMAT);
private static final List<String> SUPPORTED_LEVELS = Arrays.asList(
PRIMARY_ANGLE, TRUE_ANGLE, ELEVATION_NUMBER);
private static final String LEVEL_ERROR = " must be " + PRIMARY_ANGLE
+ ", " + TRUE_ANGLE + ", or " + ELEVATION_NUMBER;
private static RadarInfoDict radarInfo = null;
private static MasterLevel tiltLevel = null;
@ -144,8 +163,7 @@ public class RadarGridFactory extends AbstractGridDataPluginFactory implements
.toString());
}
defaultGridData.setUnit(radarRecord.getDataUnit());
defaultGridData.setLevel(getTiltLevel(radarRecord
.getPrimaryElevationAngle()));
defaultGridData.setLevel(getLevel(radarRecord, request));
defaultGridData.setLocationName(generateLocationName(radarRecord));
Map<String, Object> attributes = new HashMap<String, Object>();
@ -157,6 +175,51 @@ public class RadarGridFactory extends AbstractGridDataPluginFactory implements
return defaultGridData;
}
/**
* Get the level for the radar record. If the request specifies
* {@value #LEVEL_ONE} or {@value #LEVEL_TWO} identifiers, those fields will
* be used. If {@value #LEVEL_ONE} is not specified, {@value #PRIMARY_ANGLE}
* will be used.
*
* @param radarRecord
* The radar record.
* @param request
* The request.
* @return The created level.
*/
private Level getLevel(RadarRecord radarRecord, IDataRequest request) {
Map<String, Object> identifiers = request.getIdentifiers();
String levelOneField = (String) identifiers.get(LEVEL_ONE);
String levelTwoField = (String) identifiers.get(LEVEL_TWO);
if (levelOneField == null) {
levelOneField = PRIMARY_ANGLE;
}
Level level;
if (PRIMARY_ANGLE.equals(levelOneField)) {
level = getTiltLevel(radarRecord.getPrimaryElevationAngle());
} else if (TRUE_ANGLE.equals(levelOneField)) {
level = getTiltLevel(radarRecord.getTrueElevationAngle());
} else { // elevationNumber
level = new Level();
level.setMasterLevel(new MasterLevel("OSEQD"));
level.setLevelonevalue(radarRecord.getElevationNumber());
}
if (levelTwoField != null) {
if (PRIMARY_ANGLE.equals(levelTwoField)) {
level.setLeveltwovalue(radarRecord.getPrimaryElevationAngle());
} else if (TRUE_ANGLE.equals(levelTwoField)) {
level.setLeveltwovalue(radarRecord.getTrueElevationAngle());
} else { // elevationNumber
level.setLeveltwovalue(radarRecord.getElevationNumber());
}
}
return level;
}
/**
* Get a unique name describing the location of the radar data. The name
* always includes icao, elevation angle, num bins and num radials. For
@ -335,11 +398,29 @@ public class RadarGridFactory extends AbstractGridDataPluginFactory implements
if (levels != null && levels.length > 0) {
RequestConstraint angleConstraint = new RequestConstraint(null,
ConstraintType.IN);
RequestConstraint levelTwoConstraint = new RequestConstraint(null,
ConstraintType.IN);
Map<String, Object> identifiers = request.getIdentifiers();
String levelOneField = (String) identifiers.get(LEVEL_ONE);
String levelTwoField = (String) identifiers.get(LEVEL_TWO);
if (levelOneField == null) {
levelOneField = PRIMARY_ANGLE;
}
for (Level level : levels) {
angleConstraint.addToConstraintValueList(level
.getLevelOneValueAsString());
if (levelTwoField != null
&& level.getLeveltwovalue() != Level.INVALID_VALUE) {
levelTwoConstraint.addToConstraintValueList(level
.getLevelTwoValueAsString());
}
}
constraints.put(levelOneField, angleConstraint);
if (levelTwoConstraint.getConstraintValue() != null) {
constraints.put(levelTwoField, levelTwoConstraint);
}
constraints.put(PRIMARY_ANGLE, angleConstraint);
}
String[] locations = request.getLocationNames();
@ -456,9 +537,83 @@ public class RadarGridFactory extends AbstractGridDataPluginFactory implements
return parameters.toArray(new String[0]);
}
/**
* Get the available levels. The optional identifiers, {@value #LEVEL_ONE}
* and {@value #LEVEL_TWO} can be supplied to choose which level fields are
* returned, otherwise {@value #PRIMARY_ANGLE} will be returned as the level
* one value.
*/
@Override
public Level[] getAvailableLevels(IDataRequest request) {
DbQueryRequest dbQueryRequest = buildDbQueryRequest(request);
dbQueryRequest.setDistinct(Boolean.TRUE);
Map<String, Object> identifiers = request.getIdentifiers();
String levelOneField = (String) identifiers.get(LEVEL_ONE);
String levelTwoField = (String) identifiers.get(LEVEL_TWO);
if (levelOneField == null) {
levelOneField = PRIMARY_ANGLE;
}
dbQueryRequest.addRequestField(levelOneField);
if (levelTwoField != null) {
dbQueryRequest.addRequestField(levelTwoField);
}
DbQueryResponse dbQueryResponse = this.executeDbQueryRequest(
dbQueryRequest, request.toString());
Level level;
List<Level> levels = new ArrayList<>();
for (Map<String, Object> result : dbQueryResponse.getResults()) {
if (PRIMARY_ANGLE.equals(levelOneField)
|| TRUE_ANGLE.equals(levelTwoField)) {
level = getTiltLevel(Double.valueOf(result.get(levelOneField)
.toString()));
} else {
level = new Level();
level.setMasterLevel(new MasterLevel("OSEQD"));
level.setLevelonevalue(Double.valueOf(result.get(levelOneField)
.toString()));
}
if (levelTwoField != null) {
level.setLeveltwovalue(Double.valueOf(result.get(levelTwoField)
.toString()));
}
levels.add(level);
}
return levels.toArray(new Level[0]);
}
@Override
public String[] getOptionalIdentifiers() {
return new String[] { ICAO };
return new String[] { ICAO, LEVEL_ONE, LEVEL_TWO };
}
@Override
protected DbQueryRequest buildDbQueryRequest(IDataRequest request) {
validateLevelIdentifiers(request);
return super.buildDbQueryRequest(request);
}
/**
* Validates that, if specified, the {@value #LEVEL_ONE} and
* {@value #LEVEL_TWO} identifier values are supported.
*
* @param request
*/
private void validateLevelIdentifiers(IDataRequest request) {
Map<String, Object> identifiers = request.getIdentifiers();
String levelOneField = (String) identifiers.get(LEVEL_ONE);
String levelTwoField = (String) identifiers.get(LEVEL_TWO);
if (levelOneField != null && !SUPPORTED_LEVELS.contains(levelOneField)) {
throw new DataRetrievalException(LEVEL_ONE + LEVEL_ERROR);
}
if (levelTwoField != null && !SUPPORTED_LEVELS.contains(levelTwoField)) {
throw new DataRetrievalException(LEVEL_TWO + LEVEL_ERROR);
}
}
/**

View file

@ -2,4 +2,5 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
res/
res/,\
utility/

View file

@ -528,11 +528,11 @@ public class FSSObsMonitorConfigurationManager implements
}
/**
* Gets an area of a station.
* Gets the zones where station is monitoring
*
* @param stationId
* The station to get the area
* @return List of areas
* The station to get the zones
* @return List of zones
*/
public List<String> getAreaByStationId(String stationId) {
List<String> results = new ArrayList<String>();

View file

@ -559,4 +559,24 @@
<abbreviation>TKE</abbreviation>
<unit>J/kg</unit>
</parameter>
<parameter>
<name>Geometric Depth Below Sea Surface</name>
<abbreviation>WDEPTH</abbreviation>
<unit>m</unit>
</parameter>
<parameter>
<name>Deviation Of Sea Level from Mean</name>
<abbreviation>DSLM</abbreviation>
<unit>m</unit>
</parameter>
<parameter>
<name>Surface Current Speed</name>
<abbreviation>SPC</abbreviation>
<unit>m/s</unit>
</parameter>
<parameter>
<name>Surface Current Direction</name>
<abbreviation>DIRC</abbreviation>
<unit>degree</unit>
</parameter>
</parameterList>

View file

@ -132,7 +132,6 @@ public class FogConfig {
// our new coverage boundaries including adjacent areas
Geometry monitorAreaGeo = AdjacentWfoMgr.getAdjacentAreas(getCwa());
// (SK) Geometry monitorAreaGeo =
// FogDbUtils.getMonitoringAreaGeometry(filter.getCwaGeometry(),getCwa());
setCenter(monitorAreaGeo.getCentroid().getCoordinate());
Coordinate[] coords = monitorAreaGeo.getEnvelope().getCoordinates();
this.upperLeftCorner = coords[1];

View file

@ -42,6 +42,10 @@ import com.raytheon.uf.common.registry.constants.RegistryObjectTypes;
import com.raytheon.uf.common.registry.handler.RegistryHandlerException;
import com.raytheon.uf.common.registry.services.RegistryServiceException;
import com.raytheon.uf.common.security.encryption.AESEncryptor;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.common.util.ClusterIdUtil;
import com.raytheon.uf.edex.registry.ebxml.RegistryUsers;
import com.raytheon.uf.edex.registry.ebxml.dao.PersonDao;
import com.raytheon.uf.edex.registry.ebxml.services.RegistryRESTServices;
@ -61,6 +65,7 @@ import com.raytheon.uf.edex.security.SecurityConfiguration;
* ------------ ---------- ----------- --------------------------
* 7/10/2014 1717 bphillip Initial creation
* 7/24/2014 1712 bphillip No longer singleton
* 1/06/2015 3918 dhladky Fixed issue where clients can't start without central registry.
* </pre>
*
* @author bphillip
@ -87,10 +92,26 @@ public class CredentialCache {
public static final boolean centralRegistry = System.getProperty(
"edex.run.mode").equals("centralRegistry");
/** States whether this node will join the federation */
public static final boolean isFederationEnabled = Boolean
.getBoolean("ebxml.registry.federation.enabled");
/** Address of the central registry */
private static final String CENTRAL_REGISTRY_ADDRESS = "https://"
+ (System.getProperty("ncf.host")) + ":"
+ (System.getProperty("ebxml.registry.webserver.port"));
private static final IUFStatusHandler statusHandler = UFStatus
.getHandler(CredentialCache.class);
/** used in non federated standalone environment */
private static final String DEFAULT_USER = "DEFAULT_USER_"+ClusterIdUtil.getId();
/** used in non federated standalone environment */
private static final String DEFAULT_PASSWORD = "DEFAULT_PASSWORD_"+ClusterIdUtil.getId();
/** used in non federated standalone environment */
private static final String DEFAULT_ROLE = "DEFAULT_ROLE_"+ClusterIdUtil.getId();
/** Cache holding users' credentials */
private LoadingCache<String, String[]> credentialCache = CacheBuilder
@ -105,8 +126,10 @@ public class CredentialCache {
@Override
public String[] doInTransaction(
TransactionStatus status) {
String localUserName = userName;
PersonType user = null;
String password = null;
String role = null;
/*
* If we are the central registry, directly
* query the registry
@ -114,53 +137,82 @@ public class CredentialCache {
if (centralRegistry) {
user = personDao.getById(userName
+ RegistryUsers.USER_SUFFIX);
}
/*
* If we are not the central registry, query
* the central registry to get the user's
* information
*/
else {
try {
user = restServices
.getRegistryObject(
CENTRAL_REGISTRY_ADDRESS,
userName
+ RegistryUsers.USER_SUFFIX);
} catch (Exception e) {
throw new WebServiceException(
"Error contacting central registry!",
e);
} else {
// This is a case required if you are
// connected to a central registry.
if (isFederationEnabled) {
/*
* If we are not the central
* registry, query the central
* registry to get the user's
* information
*/
try {
user = restServices
.getRegistryObject(
CENTRAL_REGISTRY_ADDRESS,
userName
+ RegistryUsers.USER_SUFFIX);
} catch (Exception e) {
throw new WebServiceException(
"Error contacting central registry!",
e);
}
}
}
/*
* User not found means unauthorized
*/
if (user == null) {
throw new WebServiceException("User ["
+ userName + " Not authorized!");
if (isFederationEnabled) {
/*
* User not found in federation mode means unauthorized
*/
if (user == null) {
throw new WebServiceException(
"User ["
+ userName
+ " Not authorized!");
} else {
/*
* Put the user name, password, and
* role in the return array. Decrypt
* the password.
*/
localUserName = user
.getSlotValue(RegistryUsers.USER_SLOT_NAME);
try {
password = encryption.decrypt(
securityConfig
.getEncryptionKey(),
(String) user
.getSlotValue(RegistryUsers.PASSWORD_SLOT_NAME));
} catch (Exception e) {
throw new RegistryServiceException(
"Error decrypting password!",
e);
}
role = user
.getSlotValue(RegistryUsers.ROLE_SLOT_NAME);
}
} else {
/*
* This is a case where you are not
* connected to a central registry
* (Standalone server and edge
* condition), use defaults.
*/
statusHandler
.handle(Priority.INFO,
"Federation not enabled! Proceeding with default user, pass, and role!");
localUserName = DEFAULT_USER;
password = DEFAULT_PASSWORD;
role = DEFAULT_ROLE;
}
/*
* Put the user name, password, and role in
* the return array. Decrypt the password.
*/
String userName = user
.getSlotValue(RegistryUsers.USER_SLOT_NAME);
String password = null;
try {
password = encryption.decrypt(
securityConfig
.getEncryptionKey(),
(String) user
.getSlotValue(RegistryUsers.PASSWORD_SLOT_NAME));
} catch (Exception e) {
throw new RegistryServiceException(
"Error decrypting password!", e);
}
String role = user
.getSlotValue(RegistryUsers.ROLE_SLOT_NAME);
return new String[] { userName, password,
role };
return new String[] { localUserName,
password, role };
}
});
}

View file

@ -0,0 +1,167 @@
#!/bin/bash
# -----------------------------------------------------------
# UNIX Shell Script File Name: process_lock.sh
# Tested Operating System(s): RHEL 3, 4, 5
# Tested Run Level(s): 3, 5
# Shell Used: BASH shell
# Original Author(s): Douglas.Gaer@noaa.gov
# File Creation Date: 09/20/2007
# Date Last Modified: 01/22/2009
#
# Version control: 1.04
#
# Support Team:
#
# Contributors:
# -----------------------------------------------------------
# ------------- Program Description and Details -------------
# -----------------------------------------------------------
#
# Complex locking protocol functions for BASH, POSIX, Bourn, KSH
#
# This script is designed to be sourced from other scripts.
# Before calling the lock file functions the caller must
# define the $LOCKfile variable that defined the lock file
# used by the caller to lock a process.
# -----------------------------------------------------------
function CreateLockFile()
{
# Build a new lock file using "hostname:PID" format
hostname=`hostname`
echo -n "${hostname}:" > ${LOCKfile}
echo -n $$ >> ${LOCKfile}
chmod 777 ${LOCKfile}
}
function RemoveLockFile()
{
rm -f ${LOCKfile}
}
function SimpleLockFileCheck()
{
# Simple check and remove for lock file
# Set the function variables
MINold="60"
if [ "$1" != "" ]
then
MINold="$1"
fi
echo "Checking for lock file older than $MINold minutes"
find ${LOCKfile} -mmin +$MINold -type f -print -exec rm -f {} \; &> /dev/null
if [ -e ${LOCKfile} ]
then
echo "Lock file still exists: ${LOCKfile}"
echo "Application may still be running or has terminated before completion"
echo "Exiting..."
exit 1
fi
echo "Removing the old lock file and continuing to run"
}
function LockFileCheck()
{
# Complex locking protocol
# Set the function variables
MINold="60"
if [ "$1" != "" ]
then
MINold="$1"
fi
if [ -e ${LOCKfile} ]
then
echo "A lock file exists: ${LOCKfile}"
# Read the hostname and the PID from the lock file
LOCKhostname=`awk -F: '{ print $1 }' ${LOCKfile}`
LOCKpid=`awk -F: '{ print $2 }' ${LOCKfile}`
# Check our current hostname
hostname=`hostname`
if [ "$hostname" != "$LOCKhostname" ]
then
echo "Process is locked on another node $LOCKhostname"
echo "Checking the lock file age, max is $MINold minutes"
SimpleLockFileCheck $MINold
return
fi
echo "Checking to see how long the process has been running"
currlockfile=`find ${LOCKfile} -mmin +$MINold -type f -print`
if [ "${currlockfile}" == "${LOCKfile}" ]
then
echo "PID ${LOCKpid} has been running for more than $MINold minutes"
ispidvalid=`ps -e | grep ${LOCKpid} | grep -v grep | awk '{print $1}'`
if [ "$ispidvalid" == "$LOCKpid" ]
then
echo "Attempting to kill the previous process ${LOCKpid} and any children"
pidlist=`ps -ef | grep $LOCKpid | grep -v grep | awk '{print $2}' | sort -rn`
for pids in $pidlist
do
echo "Killing PID $pids"
kill $pids
ispidvalid=`ps -ef | grep ${pids} | grep -v grep | awk '{print $2}'`
if [ "$ispidvalid" == "$pids" ]
then
echo "Could not kill process $pids for process ${LOCKpid}"
echo "${LOCKpid} process is still running"
echo "Application may be running or has terminated before completion"
echo "Exiting..."
exit 1
fi
done
# Check for PIDs that respawned after killing a child
pidlist=`ps -ef | grep $LOCKpid | grep -v grep | awk '{print $2}' | sort -rn`
for pids in $pidlist
do
echo "Killing respawned PID $pids"
ispidvalid=`ps -e | grep $pids | grep -v grep | awk '{print $1}'`
# Make sure the PID is still active are killing child process
if [ "$ispidvalid" == "$pids" ]
then
kill $pids
fi
# Check to see if the PID is still running
ispidvalid=`ps -ef | grep ${pids} | grep -v grep | awk '{print $2}'`
if [ "$ispidvalid" == "$pids" ]
then
echo "Could not kill process $pids for process ${LOCKpid}"
echo "${LOCKpid} process is still running"
echo "Application may be running or has terminated before completion"
echo "Exiting..."
exit 1
fi
done
else
echo "PID ${LOCKpid} is not running"
echo "Removing the old lock file and continuing to run"
rm -f ${LOCKfile}
return
fi
fi
# Check to see if the process is still running
ispidvalid=`ps -e | grep ${LOCKpid} | grep -v grep | awk '{print $1}'`
echo "Checking to see if the previous process is still running"
if [ "$ispidvalid" == "$LOCKpid" ]
then
echo "${LOCKpid} process is still running"
echo "Application may be running or has terminated before completion"
echo "Exiting..."
exit 1
fi
echo "Previous process is not running"
echo "Removing the old lock file and continuing to run"
rm -f ${LOCKfile}
fi
}
# -----------------------------------------------------------
# *******************************
# ********* End of File *********
# *******************************

View file

@ -0,0 +1,244 @@
#!/bin/bash
NWPSLOCAL="/awips2/GFESuite/nwps"
if [ ! -e ${NWPSLOCAL}/input ]
then
mkdir ${NWPSLOCAL}/input
chmod 777 ${NWPSLOCAL}/input
fi
if [ ! -e ${NWPSLOCAL}/logs ]
then
mkdir ${NWPSLOCAL}/logs
chmod 777 ${NWPSLOCAL}/logs
fi
if [ ! -e ${NWPSLOCAL}/var ]
then
mkdir ${NWPSLOCAL}/var
chmod 777 ${NWPSLOCAL}/var
fi
logfile=${NWPSLOCAL}/logs/nwps_runManual_Outside_AWIPS.log
rm -f ${NWPSLOCAL}/logs/*
rm -f ${NWPSLOCAL}/wcoss/*
PATH="/awips2/GFESuite/bin:/bin:/usr/bin:/usr/local/bin"
siteid=$(hostname|cut -c5-7)
SITEID=$(echo ${siteid} | tr [:lower:] [:upper:])
SSHARGS="-x -o stricthostkeychecking=no"
SCPARGS="-o stricthostkeychecking=no"
HOST="ldad@ls1-${siteid}"
DIR="/data/ldad/nwps/input"
Program="/awips2/GFESuite/bin/ifpnetCDF"
DB="${SITEID}_GRID__Fcst_00000000_0000"
GFESERVER="ec"
RUNSERVER="px"
WRKSWN="${NWPSLOCAL}/SUAWRKNWP.dat"
Output_Dir="${NWPSLOCAL}/input"
date=$(date "+%D %H:%M:%S")
Output_File="${Output_Dir}/Wind_File"
textfile="${Output_Dir}/$(date +%Y%m%d%H%M)_WIND.txt"
wcoss_textfile="${siteid}_$(date +%Y%m%d%H%M)_WIND.txt"
flagfile="${Output_Dir}/SWANflag"
cp ${NWPSLOCAL}/domains/${SITEID} ${NWPSLOCAL}/wcoss/${siteid}_domain_setup.cfg
chmod 666 ${NWPSLOCAL}/wcoss/${siteid}_domain_setup.cfg
### LOCK FILE STUFF:
source ${NWPSLOCAL}/bin/process_lock.sh
PROGRAMname="$0"
LOCKfile="${NWPSLOCAL}/logs/runManual_Outside_AWIPS.lck"
MINold="0"
LockFileCheck $MINold
CreateLockFile
### FUNCTIONS:
function logit () {
echo "$@" | tee -a $logfile
}
### RUN OPTIONS:
if [ -e ${NWPSLOCAL}/var/inp_args ]
then
inp_args=`cat ${NWPSLOCAL}/var/inp_args`
IFS=':' read -a inp <<< "${inp_args}"
RUNLEN=${inp[0]}
WNA=${inp[1]}
NEST=${inp[2]}
GS=${inp[3]}
WINDS=${inp[4]}
WEB=${inp[5]}
PLOT=${inp[6]}
DELTAC=${inp[7]}
HOTSTART=${inp[8]}
WATERLEVELS=${inp[9]}
CORE=${inp[10]}
EXCD=${inp[11]}
WHERETORUN=${inp[12]}
logit " "
logit "Arguments are: $RUNLEN $WNA $NEST $GS $WINDS $WEB $PLOT $DELTAC $HOTSTART $WATERLEVELS $CORE $EXCD $WHERETORUN"
logit " "
rm -f ${NWPSLOCAL}/var/inp_args
else
logit "No arguments or arguments file provided. No run to process. Exiting."
RemoveLockFile
exit 1
fi
### CHECK FOR GFECRON USER RUNNING THIS SCRIPT:
ID=$(id -u)
if [[ $ID -ne 104 ]]
then
logit "ONLY GFECRON USER IS ALLOWED TO RUN THIS SCRIPT."
logit "Exiting ..."
RemoveLockFile
exit 1
fi
### CHECK THAT THIS IS THE px2 (or px1 if failed over) HOST MACHINE:
HOST=$(hostname|cut -c1-2)
if [[ $HOST != $RUNSERVER ]]
then
logit "YOU ARE RUNNING FROM $HOST. THIS SCRIPT SHOULD ONLY BE RAN FROM $RUNSERVER."
logit "Exiting ... "
RemoveLockFile
exit 1
fi
##################################################################
### MAKE CRONTAB FRIENDLY:
cd ${NWPSLOCAL}
##################################################################
### START A CLEAN LOG FILE:
echo " " > $logfile
STARTED=$(date)
logit "STARTED: $STARTED"
logit " "
# logit "Program called with: $0 $@"
logit " "
##################################################################
logit "### Setting Up SWAN Input Model Forcing Time Range"
logit " "
##################################################################
logit " "
logit "scp ${SCPARGS} $WRKSWN ldad@ls1:/data/Incoming/"
logit " "
echo "" > $WRKSWN
echo "____________________NWPS RUN REQUEST DETAILS__________" >> $WRKSWN
echo "" >> $WRKSWN
echo "Run initiated at: ${date}" >> $WRKSWN
echo "" >> $WRKSWN
echo "Runlength: ${RUNLEN}" >> $WRKSWN
echo "Boundary Conditions: ${WNA}" >> $WRKSWN
echo "Nest: ${NEST}" >> $WRKSWN
echo "Current: ${GS}" >> $WRKSWN
echo "Winds: ${WINDS}" >> $WRKSWN
echo "Timestep: ${DELTAC}" >> $WRKSWN
echo "Hotstart: ${HOTSTART}" >> $WRKSWN
echo "WATERLEVELS: ${WATERLEVELS}" >> $WRKSWN
echo "Model Core: ${CORE}" >> $WRKSWN
echo "Psurge % Exceedance: ${EXCD}" >> $WRKSWN
echo "Running model in: ${WHERETORUN}" >> $WRKSWN
echo "" >> $WRKSWN
echo "______________________________________________________" >> $WRKSWN
scp ${SCPARGS} $WRKSWN ldad@ls1:/data/Incoming/
##################################################################
logit "### CREATE THE WIND NETCDF FILE AND SEND OVER TO SWAN BOX FOR PROCESSING:"
rm -vf $Output_Dir/* | tee -a $logfile
logit "$Program -o $Output_File -d $DB -h $GFESERVER -g -p NWPSwind"
$Program -o $Output_File -d $DB -h $GFESERVER -g -p NWPSwind | tee -a $logfile
/usr/local/netcdf/bin/ncdump $Output_File > $textfile
sed -i "s/NWPSwind/Wind/g" $textfile
cp $textfile ${NWPSLOCAL}/wcoss/${wcoss_textfile}
chmod 666 ${NWPSLOCAL}/wcoss/${wcoss_textfile}
gzip $textfile
touch $flagfile
chmod 666 $textfile.gz
chmod 666 $flagfile
if [ $WHERETORUN == "Local" ]
then
logit " "
logit "RUNNING IN WORKSTATION"
logit " "
logit "### ROUTING 3 WIND FILES NEEDED BY SWAN THROUGH LDAD TO LOCAL WORKSTATION:"
ssh ldad@ls1 mkdir -p ${DIR}
scp ${SCPARGS} $Output_File ldad@ls1:${DIR} | tee -a $logfile
scp ${SCPARGS} $textfile.gz ldad@ls1:${DIR} | tee -a $logfile
scp ${SCPARGS} $flagfile ldad@ls1:${DIR} | tee -a $logfile
logit " "
#########################################################################
logit "##################################################################"
logit "### SENDING WIND FILES TO NWPS SYSTEM VIA LDAD TO TRIGGER NEW RUN"
logit "### Start Time is: $(date)"
logit "##################################################################"
logit " "
logit "Runtime Parameters are: $RUNLEN:$WNA:$NEST:$GS:$WINDS:$WEB:$PLOT:$DELTAC:$HOTSTART:$WATERLEVELS:$CORE:$EXCD"
ssh ${SSHARGS} ldad@ls1 echo "$RUNLEN:$WNA:$NEST:$GS:$WINDS:$WEB:$PLOT:$DELTAC:$HOTSTART:$WATERLEVELS:$CORE:$EXCD > /data/ldad/nwps/input/inp_args" 2>&1 | tee -a $logfile
else
logit " "
logit "RUNNING IN NCEP"
logit " "
echo "$RUNLEN:$WNA:$NEST:$GS:$WINDS:$WEB:$PLOT:$DELTAC:$HOTSTART:$WATERLEVELS:$CORE:$EXCD" > ${NWPSLOCAL}/wcoss/${siteid}_inp_args.ctl
chmod 666 ${NWPSLOCAL}/wcoss/${siteid}_inp_args.ctl
cd ${NWPSLOCAL}/wcoss/
NWPSWINDGRID="NWPSWINDGRID_${siteid}_$(date +%Y%m%d%H%M)_$$.tar.gz"
tar cvfz ${NWPSWINDGRID} ${siteid}_inp_args.ctl ${siteid}_domain_setup.cfg ${wcoss_textfile}
scp ${NWPSWINDGRID} ldad@ls1:/tmp/
ssh ldad@ls1 "cd /tmp; /usr/local/ldm/bin/ldmsend -v -h srh-ls-cpnrs1.srh.noaa.gov -f EXP ${NWPSWINDGRID}" 2>&1 | tee -a $logfile
ssh ldad@ls1 "cd /tmp; /usr/local/ldm/bin/ldmsend -v -h srh-ls-cpnrs2.srh.noaa.gov -f EXP ${NWPSWINDGRID}" 2>&1 | tee -a $logfile
ssh ldad@ls1 rm -fv /tmp/${NWPSWINDGRID}
fi
logit " "
##################################################################
logit " "
RemoveLockFile
##################################################################
logit " "
logit "STARTED: $STARTED"
logit "FINISHED: $(date)"
logit " "
exit 0

View file

@ -0,0 +1,182 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 11/08/14 by alex.gibbs@onaa.gov
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# AKQ =
# GEOGRAPHICAL DOMAIN, GEOGRAFICAL RESOLUTION AND OUTPUT TIME STEP =
#========================================================================
export SITEID="AKQ"
export REGIONID="ER"
export NELAT="39.60"
export NELON="-74.25"
export SWLAT="35.80"
export SWLON="-77.50"
export RES="2.0"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# These nested grids are non-telescopic grids i.e all of them are =
# nested in the main grid, and get the boundary conditions only from it =
# =
#========================================================================
# NESTGRIDS: Number of nested grids, if = 0, nested grids and
# location numbers below will be ignore regardless of input specifications
#
# STATN=STA for STATIONARY RUNS, STAT=NON for NON-STATIONARY RUNS
# The default values is NONstationary for CG1 and STAtionary for the
# nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid.
#
export NESTGRIDS="0"
# AKQ Nest
export NELATN1=""
export NELONN1=""
export SWLATN1=""
export SWLONN1=""
export RESN1=".1"
export TSTEPN1="3"
export STATN1="NON"
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS =
#========================================================================
# Specta points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 name5:lat5:lon5 ...."
#
export SPECPOINTS="44014:36.611:-74.842 44009:38.461:-74.703"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOAKQN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be change in a new version, the user can get 1d-spectra but not g-h plots).
export WVTONCG="0"
export NELATWT="39.60"
export NELONWT="-74.25"
export SWLATWT="35.80"
export SWLONWT="-77.50"
export GEORESWT="3.0"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="NW-AKQ"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.NW-AKQ59.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#BOUN SEG XY 284.50 35.80 285.25 35.80 VAR FILE 0.00 'multi_1.NW-AKQ62.spec.swan' 1 &
#0.50 'multi_1.NW-AKQ61.spec.swan' 1 &
#1.00 'multi_1.NW-AKQ60.spec.swan' 1 &
#1.25 'multi_1.NW-AKQ59.spec.swan.cp' 1
#$
#BOUN SEG XY 285.25 35.80 285.25 39.50 VAR FILE 0.00 'multi_1.NW-AKQ59.spec.swan' 1 &
#0.20 'multi_1.NW-AKQ58.spec.swan' 1 &
#0.70 'multi_1.NW-AKQ57.spec.swan' 1 &
#1.20 'multi_1.NW-AKQ56.spec.swan' 1 &
#1.70 'multi_1.NW-AKQ55.spec.swan' 1 &
#2.20 'multi_1.NW-AKQ54.spec.swan' 1 &
#2.70 'multi_1.NW-AKQ53.spec.swan' 1 &
#3.20 'multi_1.NW-AKQ52.spec.swan' 1 &
#3.70 'multi_1.NW-AKQ51.spec.swan' 1
#$END BOUNSEG
#
#========================================================================
# RIP CURRENT PROGRAM (SEE NWPS MANUAL) =
#========================================================================
# IF RIP CURRENT PROGRAM WILL BE RUN, then RIPCONT=1, Otherwise =0;
# Setting up RIPCONT here to zero will permanently disable RIP program.
#
export RIPPROG="0"
export RIPDOMAIN="CG2"
export RIPCONT="5m"
#
#___________________________________________________________________________
# RAY Section: Define a pair of rays to drop data out along critical contours
# for rip current program.
#
# Example: for data output every 2km along a 5m bathy contour
#
# RAY 'rayname' xp yp xq yq int xp yp xq yq
#
# RAY 'ray1' 282.85 34.628 282.85 34.62 2000 283.00 34.655 283.00 34.62
#
# ISOLINE '5mcont' 'ray1' BOTtom 10
# TABLE '5mcont' HEAD '5mtable' HSIGN TPS PDIR OUTPUT 20110825.1200 3.0 HR
#_____________________________________________________________________________
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD RIP COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE RIP
# CURRENTS (RIPCONT="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
# POIN '5mcont' 279.887 25.8725
#
#$RIP LINES
#$ Ray for 5m and 20m contour data.
#$
#RAY 'ray1' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '5mcont' 'ray1' BOTtom 5
#TABLE '5mcont' HEAD '5m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#RAY 'ray2' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '20mcont' 'ray1' BOTtom 20
#TABLE '20mcont' HEAD '20m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#$END RIP
#

View file

@ -0,0 +1,195 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 11/08/14 by alex.gibbs@onaa.gov
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# MFL =
# GEOGRAPHICAL DOMAIN, GEOGRAFICAL RESOLUTION AND OUTPUT TIME STEP =
#========================================================================
export SITEID="BOX"
export REGIONID="ER"
export NELAT="43.25"
export NELON="-68.85"
export SWLAT="40.45"
export SWLON="-72.50"
export RES="2.0"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# These nested grids are non-telescopic grids i.e all of them are =
# nested in the main grid, and get the boundary conditions only from it =
# =
#========================================================================
# NESTGRIDS: Number of nested grids, if = 0, nested grids and
# location numbers below will be ignore regardless of input specifications
#
# STATN=STA for STATIONARY RUNS, STAT=NON for NON-STATIONARY RUNS
# The default values is NONstationary for CG1 and STAtionary for the
# nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid.
#
export NESTGRIDS="1"
# BOX Nest
export NELATN1="43.2"
export NELONN1="-70.3"
export SWLATN1="41.90"
export SWLONN1="-71.2"
export RESN1=".1"
export TSTEPN1="3"
export STATN1="NON"
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS =
#========================================================================
# Specta points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 name5:lat5:lon5 ...."
#
export SPECPOINTS="44017:40.694:-72.048 44020:41.443:-70.186 44013:42.346:-70.651"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOBOXN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be change in a new version, the user can get 1d-spectra but not g-h plots).
export WVTONCG="0"
export NELATWT="43.25"
export NELONWT="-68.85"
export SWLATWT="40.45"
export SWLONWT="-72.50"
export GEORESWT="3.0"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="NW-BOX"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.NW-BOX51.spec.swan, multi_1.NW-BOX59.spec.swan, multi_1.NW-BOX65.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#BOUN SEG XY 287.50 40.45 291.15 40.45 VAR FILE 0.00 'multi_1.NW-BOX51.spec.swan' 1 &
#0.50 'multi_1.NW-BOX52.spec.swan' 1 &
#1.00 'multi_1.NW-BOX53.spec.swan' 1 &
#1.50 'multi_1.NW-BOX54.spec.swan' 1 &
#2.00 'multi_1.NW-BOX55.spec.swan' 1 &
#2.50 'multi_1.NW-BOX56.spec.swan' 1 &
#3.00 'multi_1.NW-BOX57.spec.swan' 1 &
#3.50 'multi_1.NW-BOX58.spec.swan' 1 &
#3.65 'multi_1.NW-BOX59.spec.swan.cp' 1
#$
#BOUN SEG XY 291.15 40.45 291.15 43.25 VAR FILE 0.00 'multi_1.NW-BOX59.spec.swan' 1 &
#0.50 'multi_1.NW-BOX60.spec.swan' 1 &
#1.00 'multi_1.NW-BOX61.spec.swan' 1 &
#1.50 'multi_1.NW-BOX62.spec.swan' 1 &
#2.00 'multi_1.NW-BOX63.spec.swan' 1 &
#2.50 'multi_1.NW-BOX64.spec.swan' 1 &
#2.80 'multi_1.NW-BOX65.spec.swan.cp' 1
#$
#BOUN SEG XY 291.15 43.25 289.52 43.25 VAR FILE 0.00 'multi_1.NW-BOX65.spec.swan' 1 &
#0.50 'multi_1.NW-BOX66.spec.swan' 1 &
#1.00 'multi_1.NW-BOX67.spec.swan' 1 &
#1.50 'multi_1.NW-BOX68.spec.swan' 1 &
#1.63 'multi_1.NW-BOX69.spec.swan' 1
#$
#BOUN SEG XY 287.50 40.45 287.50 41.20 VAR FILE 0.00 'multi_1.NW-BOX51.spec.swan.cp' 1 &
#0.25 'multi_1.NW-BOX70.spec.swan' 1 &
#0.75 'multi_1.NW-BOX71.spec.swan' 1
#$END BOUNSEG
#
#========================================================================
# RIP CURRENT PROGRAM (SEE NWPS MANUAL) =
#========================================================================
# IF RIP CURRENT PROGRAM WILL BE RUN, then RIPCONT=1, Otherwise =0;
# Setting up RIPCONT here to zero will permanently disable RIP program.
#
export RIPPROG="1"
export RIPDOMAIN="CG2"
export RIPCONT="5m"
#
#___________________________________________________________________________
# RAY Section: Define a pair of rays to drop data out along critical contours
# for rip current program.
#
# Example: for data output every 2km along a 5m bathy contour
#
# RAY 'rayname' xp yp xq yq int xp yp xq yq
#
# RAY 'ray1' 282.85 34.628 282.85 34.62 2000 283.00 34.655 283.00 34.62
#
# ISOLINE '5mcont' 'ray1' BOTtom 10
# TABLE '5mcont' HEAD '5mtable' HSIGN TPS PDIR OUTPUT 20110825.1200 3.0 HR
#_____________________________________________________________________________
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD RIP COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE RIP
# CURRENTS (RIPCONT="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
# POIN '5mcont' 279.887 25.8725
#
#$RIP LINES
#$ Ray for 5m and 20m contour data.
#$
#RAY 'ray1' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '5mcont' 'ray1' BOTtom 5
#TABLE '5mcont' HEAD '5m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#RAY 'ray2' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '20mcont' 'ray1' BOTtom 20
#TABLE '20mcont' HEAD '20m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#$END RIP
#

View file

@ -0,0 +1,197 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 02/01/13
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# BRO =
# GEOGRAPHICAL DOMAIN, GEOGRAPHICAL RESOLUTION AND OUTPUT TIME STEP =
# =
# NOTE: RES = spatial resolution in km =
# TSTEP = request output time step (not the model time step) =
#========================================================================
#
export SITEID="BRO"
export REGIONID="SR"
export NELAT="28.26"
export NELON="-95.41"
export SWLAT="25.26"
export SWLON="-98.00"
export RES="1.25"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# =
# These nested grids are non-telescopic grids (i.e all of them are =
# nested in the outer grid, and get the boundary conditions only from it) =
# Later versions of NWPS will either allow for telescopic nesting or =
# will be run on an unstructured grid characterized with a fine mesh =
# over the nearshore zones and a coarser mesh across the offshore areas. =
# =
#========================================================================
#
# TO DO: Update the domains below to reflect the area/s that you are
# interested in (must reside inside of you outer domain defined
# above). Also, remember to remove or comment out the remaining
# example nests below that were configured for another area. Once
# your nests are configured, just toggle the NESTGRIDS to '1'
# (Default configuration is off or '0') and you will have control
# from the GFE GUI to activate your nests during your runs.
#
# STATIONARY VS NONSTATIONARY MODE:
#
# STATN=STA for STATIONARY RUNS, STATN=NON for NON-STATIONARY RUNS.
# The default value is NONstationary for CG1 (outer grid) and STAtionary
# for the nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid. In general,
# if your domain that you define as a nest below is >= 100 km^2, then
# set STATN=NON. For the very small domains or nests (<= 100 km^2)
# set STATN=STA.
#
# ACTIVATE NEST/S: default is off below
#
# NESTGRIDS="0" ... turns off nest options
# NESTGRIDS="1" ... turns on nest options
#
export NESTGRIDS="0"
#
# NEST 1
export NELATN1="27.02"
export NELONN1="-79.94"
export SWLATN1="26.90"
export SWLONN1="-80.10"
export RESN1=".5"
export TSTEPN1="3"
export STATN1="STA"
#
# NEST 2
export NELATN2="26.52"
export NELONN2="-79.98"
export SWLATN2="26.40"
export SWLONN2="-80.07"
export RESN2=".5"
export TSTEPN2="3"
export STATN2="STA"
#
# NEST 3
export NELATN3="26.37"
export NELONN3="-80.00"
export SWLATN3="26.25"
export SWLONN3="-80.09"
export RESN3=".5"
export TSTEPN3="3"
export STATN3="STA"
#
# NEST 4
export NELATN4="25.87"
export NELONN4="-80.04"
export SWLATN4="25.75"
export SWLONN4="-80.13"
export RESN4=".5"
export TSTEPN4="3"
export STATN4="STA"
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS
# =
# NOTE TO USER: the lat/lon points specified can be changed for any =
# arbitrary point of interest within your outer domain defined above. =
# Three default buoy locations have already been configured for you =
# below. =
#
# NOTE: These do not have to match NDBC locations. =
#
#========================================================================
# Spectra points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 name5:lat5:lon5 ...."
#
export SPECPOINTS="42045:26.217:-96.500 42020:26.968:-96.694 42048:27.940:-96.843"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOBRON, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be changed in a new version, the user can get 1d-spectra but not g-h plots).
#
export WVTONCG="0"
export NELATWT="28.26"
export NELONWT="-95.41"
export SWLATWT="25.26"
export SWLONWT="-98.00"
export GEORESWT="3.5"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="BRO"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.BRO54.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#BOUN SEG XY 263.09 25.26 264.59 25.26 VAR FILE 0.00 'multi_1.BRO51.spec.swan' 1 &
# 0.50 'multi_1.BRO52.spec.swan' 1 &
# 1.00 'multi_1.BRO53.spec.swan' 1 &
# 1.50 'multi_1.BRO54.spec.swan' 1
#$
#BOUN SEG XY 264.59 28.26 264.59 25.26 VAR FILE 0.00 'multi_1.BRO60.spec.swan' 1 &
# 0.50 'multi_1.BRO59.spec.swan' 1 &
# 1.00 'multi_1.BRO58.spec.swan' 1 &
# 1.50 'multi_1.BRO57.spec.swan' 1 &
# 2.00 'multi_1.BRO56.spec.swan' 1 &
# 2.50 'multi_1.BRO55.spec.swan' 1 &
# 3.00 'multi_1.BRO54.spec.swan.cp' 1
#$END BOUNSEG
#

View file

@ -0,0 +1,208 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 11/12/14
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# CAR =
# GEOGRAPHICAL DOMAIN, GEOGRAFICAL RESOLUTION AND OUTPUT TIME STEP =
#========================================================================
export SITEID="CAR"
export REGIONID="ER"
export NELAT="45.05"
export NELON="-66.30"
export SWLAT="43.30"
export SWLON="-69.2"
export RES="1.8"
export TSTEP="1"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# These nested grids are non-telescopic grids i.e all of them are =
# nested in the main grid, and get the boundary conditions only from it =
# =
#========================================================================
# NESTGRIDS: Number of nested grids, if = 0, nested grids and
# location numbers below will be ignore regardless of input specifications
#
# STATN=STA for STATIONARY RUNS, STAT=NON for NON-STATIONARY RUNS
# The default values is NONstationary for CG1 and STAtionary for the
# nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid.
#
export NESTGRIDS="2"
export NELATN1="44.42"
export NELONN1="-67.96"
export SWLATN1="44.27"
export SWLONN1="-68.17"
export RESN1=".1"
export TSTEPN1="1"
export STATN1="STA"
#
export NELATN2="44.30"
export NELONN2="-68.22"
export SWLATN2="44.16"
export SWLONN2="-68.42"
export RESN2=".1"
export TSTEPN2="1"
export STATN2="STA"
#
#export NELATN3="26.37"
#export NELONN3="-80.00"
#export SWLATN3="26.25"
#export SWLONN3="-80.09"
#export RESN3=".5"
#export TSTEPN3="3"
#export STATN3="STA"
#
#export NELATN4="25.87"
#export NELONN4="-80.04"
#export SWLATN4="25.75"
#export SWLONN4="-80.13"
#export RESN4=".5"
#export TSTEPN4="3"
#export STATN4="STA"
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS =
#========================================================================
# Specta points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 name5:lat5:lon5 ...."
#
export SPECPOINTS="44034:44.100:-68.100 44027:44.300:-67.300 Schood:44.328894:-68.055397 Seawall:44.224294:-68.281458"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOMIAN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
#IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be change in a new version, the user can get 1d-spectra but not g-h plots).
export WVTONCG="0"
export NELATWT="45.05"
export NELONWT="-66.30"
export SWLATWT="43.30"
export SWLONWT="-69.2"
export GEORESWT="4.00"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="MIA"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.NW-CAR57.spec.swan,multi_1.NW-CAR64.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#BOUN SEG XY 290.80 43.30 293.70 43.30 VAR FILE 0.00 'multi_1.NW-CAR57.spec.swan' 1 &
# 0.50 'multi_1.NW-CAR56.spec.swan' 1 &
# 1.00 'multi_1.NW-CAR55.spec.swan' 1 &
# 1.50 'multi_1.NW-CAR54.spec.swan' 1 &
# 2.00 'multi_1.NW-CAR53.spec.swan' 1 &
# 2.50 'multi_1.NW-CAR52.spec.swan' 1 &
# 3.00 'multi_1.NW-CAR51.spec.swan' 1
#$
#BOUN SEG XY 293.70 45.05 293.70 43.30 VAR FILE 0.00 'multi_1.NW-CAR64.spec.swan' 1 &
# 0.25 'multi_1.NW-CAR63.spec.swan' 1 &
# 0.50 'multi_1.NW-CAR62.spec.swan' 1 &
# 0.75 'multi_1.NW-CAR61.spec.swan' 1 &
# 1.00 'multi_1.NW-CAR60.spec.swan' 1 &
# 1.25 'multi_1.NW-CAR59.spec.swan' 1 &
# 1.50 'multi_1.NW-CAR58.spec.swan' 1 &
# 1.75 'multi_1.NW-CAR57.spec.swan.cp' 1
#$
#BOUN SEG XY 290.80 45.05 290.80 43.30 VAR FILE 0.00 'multi_1.NW-CAR67.spec.swan' 1 &
# 0.25 'multi_1.NW-CAR66.spec.swan' 1 &
# 0.50 'multi_1.NW-CAR65.spec.swan' 1 &
# 0.75 'multi_1.NW-CAR64.spec.swan.cp' 1
#$END BOUNSEG
#
#========================================================================
# RIP CURRENT PROGRAM (SEE NWPS MANUAL) =
#========================================================================
# IF RIP CURRENT PROGRAM WILL BE RUN, then RIPCONT=1, Otherwise =0;
# Setting up RIPCONT here to zero will permanently disable RIP program.
#
export RIPPROG="0"
export RIPDOMAIN="CG2"
export RIPCONT="5m"
#
#___________________________________________________________________________
# RAY Section: Define a pair of rays to drop data out along critical contours
# for rip current program.
#
# Example: for data output every 2km along a 5m bathy contour
#
# RAY 'rayname' xp yp xq yq int xp yp xq yq
#
# RAY 'ray1' 282.85 34.628 282.85 34.62 2000 283.00 34.655 283.00 34.62
#
# ISOLINE '5mcont' 'ray1' BOTtom 10
# TABLE '5mcont' HEAD '5mtable' HSIGN TPS PDIR OUTPUT 20110825.1200 3.0 HR
#_____________________________________________________________________________
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD RIP COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE RIP
# CURRENTS (RIPCONT="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
# POIN '5mcont' 279.887 25.8725
#
#$RIP LINES
#$ Ray for 5m contour data.
#$
#RAY 'ray1' 279.88 25.85 279.91 25.85 8 279.88 25.895 279.91 25.895
#ISOLINE '5mcont' 'ray1' BOTtom 5
#TABLE '5mcont' HEAD '5m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT YYYYMMDD.HHMM H.M HR
#$
#$END RIP
#

View file

@ -0,0 +1,183 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 11/08/14 by alex.gibbs@onaa.gov
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# CHS =
# GEOGRAPHICAL DOMAIN, GEOGRAFICAL RESOLUTION AND OUTPUT TIME STEP =
#========================================================================
export SITEID="CHS"
export REGIONID="ER"
export NELAT="33.58"
export NELON="-78.10"
export SWLAT="30.67"
export SWLON="-81.70"
export RES="1.8"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# These nested grids are non-telescopic grids i.e all of them are =
# nested in the main grid, and get the boundary conditions only from it =
# =
#========================================================================
# NESTGRIDS: Number of nested grids, if = 0, nested grids and
# location numbers below will be ignore regardless of input specifications
#
# STATN=STA for STATIONARY RUNS, STAT=NON for NON-STATIONARY RUNS
# The default values is NONstationary for CG1 and STAtionary for the
# nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid.
#
export NESTGRIDS="0"
# CHS Nest
export NELATN1=""
export NELONN1=""
export SWLATN1=""
export SWLONN1=""
export RESN1=".1"
export TSTEPN1="3"
export STATN1="NON"
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS =
#========================================================================
# Specta points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 name5:lat5:lon5 ...."
#
export SPECPOINTS="41008:31.4:-80.869 41112:30.79:-81.293 41004:32.501:-79.099 41029:32.810:-79.630 41033:32.280:-80.410 NCEP_53:30.67:-79.00 NCEP_57:32.13:-78.10 NCEP_60:33.58:-78.50"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOCHSN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be change in a new version, the user can get 1d-spectra but not g-h plots).
export WVTONCG="0"
export NELATWT="33.58"
export NELONWT="-78.10"
export SWLATWT="30.67"
export SWLONWT="-81.70"
export GEORESWT="3.5"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="NW-CHS"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.NW-CHS55.spec.swan,multi_1.NW-CHS59.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
# BOUN SEG XY 281.90 30.67 278.7 30.67 VAR FILE 0.00 'multi_1.CHS55.spec.swan' 1 &
# 0.90 'multi_1.CHS54.spec.swan' 1 &
# 1.70 'multi_1.CHS53.spec.swan' 1 &
# 2.40 'multi_1.CHS52.spec.swan' 1 &
# 3.20 'multi_1.CHS51.spec.swan' 1
#$
# BOUN SEG XY 281.90 33.58 281.90 30.67 VAR FILE 0.00 'multi_1.CHS59.spec.swan' 1 &
# 0.72 'multi_1.CHS58.spec.swan' 1 &
# 1.45 'multi_1.CHS57.spec.swan' 1 &
# 2.18 'multi_1.CHS56.spec.swan' 1 &
# 2.91 'multi_1.CHS55.spec.swan.cp' 1
#$
# BOUN SEG XY 281.10 33.58 281.90 33.58 VAR FILE 0.00 'multi_1.CHS61.spec.swan' 1 &
# 0.40 'multi_1.CHS60.spec.swan' 1 &
# 0.80 'multi_1.CHS59.spec.swan.cp' 1
#$END BOUNSEG
#
#========================================================================
# RIP CURRENT PROGRAM (SEE NWPS MANUAL) =
#========================================================================
# IF RIP CURRENT PROGRAM WILL BE RUN, then RIPCONT=1, Otherwise =0;
# Setting up RIPCONT here to zero will permanently disable RIP program.
#
export RIPPROG="0"
export RIPDOMAIN="CG2"
export RIPCONT="5m"
#
#___________________________________________________________________________
# RAY Section: Define a pair of rays to drop data out along critical contours
# for rip current program.
#
# Example: for data output every 2km along a 5m bathy contour
#
# RAY 'rayname' xp yp xq yq int xp yp xq yq
#
# RAY 'ray1' 282.85 34.628 282.85 34.62 2000 283.00 34.655 283.00 34.62
#
# ISOLINE '5mcont' 'ray1' BOTtom 10
# TABLE '5mcont' HEAD '5mtable' HSIGN TPS PDIR OUTPUT 20110825.1200 3.0 HR
#_____________________________________________________________________________
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD RIP COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE RIP
# CURRENTS (RIPCONT="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
# POIN '5mcont' 279.887 25.8725
#
#$RIP LINES
#$ Ray for 5m and 20m contour data.
#$
#RAY 'ray1' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '5mcont' 'ray1' BOTtom 5
#TABLE '5mcont' HEAD '5m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#RAY 'ray2' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '20mcont' 'ray1' BOTtom 20
#TABLE '20mcont' HEAD '20m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#$END RIP
#

View file

@ -0,0 +1,173 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 02/01/13
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# CRP =
# GEOGRAPHICAL DOMAIN, GEOGRAPHICAL RESOLUTION AND OUTPUT TIME STEP =
# =
# NOTE: RES = spatial resolution in km =
# TSTEP = request output time step (not the model time step) =
#========================================================================
#
export SITEID="CRP"
export REGIONID="SR"
export NELAT="29.50"
export NELON="-95.00"
export SWLAT="26.00"
export SWLON="-98.50"
export RES="1.8"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# =
# These nested grids are non-telescopic grids (i.e all of them are =
# nested in the outer grid, and get the boundary conditions only from it) =
# Later versions of NWPS will either allow for telescopic nesting or =
# will be run on an unstructured grid characterized with a fine mesh =
# over the nearshore zones and a coarser mesh across the offshore areas. =
# =
#========================================================================
#
# TO DO: Update the domains below to reflect the area/s that you are
# interested in (must reside inside of you outer domain defined
# above). Also, remember to remove or comment out the remaining
# example nests below that were configured for another area. Once
# your nests are configured, just toggle the NESTGRIDS to '1'
# (Default configuration is off or '0') and you will have control
# from the GFE GUI to activate your nests during your runs.
#
# STATIONARY VS NONSTATIONARY MODE:
#
# STATN=STA for STATIONARY RUNS, STATN=NON for NON-STATIONARY RUNS.
# The default value is NONstationary for CG1 (outer grid) and STAtionary
# for the nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid. In general,
# if your domain that you define as a nest below is >= 100 km^2, then
# set STATN=NON. For the very small domains or nests (<= 100 km^2)
# set STATN=STA.
#
# ACTIVATE NEST/S: default is off below
#
# NESTGRIDS="0" ... turns off nest options
# NESTGRIDS="1" ... turns on nest options
#
export NESTGRIDS="0"
#
# NEST 1
export NELATN1="27.02"
export NELONN1="-79.94"
export SWLATN1="26.90"
export SWLONN1="-80.10"
export RESN1=".5"
export TSTEPN1="3"
export STATN1="STA"
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS
# =
# NOTE TO USER: the lat/lon points specified can be changed for any =
# arbitrary point of interest within your outer domain defined above. =
# One default buoy locations has already been configured for you =
# below. Add more as needed. =
#
# NOTE: These do not have to match NDBC locations. =
#
#========================================================================
# Spectra points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 ...."
#
export SPECPOINTS="42019:27.913:-95.353 FCGT2:28.943:-95.303"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOCRPN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be changed in a new version, the user can get 1d-spectra but not g-h plots).
#
export WVTONCG="0"
export NELATWT="29.50"
export NELONWT="-95.00"
export SWLATWT="26.00"
export SWLONWT="-98.50"
export GEORESWT="3.5"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="CCTX"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.CCTX55.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#BOUN SEG XY 263.00 26.00 265.00 26.00 VAR FILE 0.00 'multi_1.CCTX51.spec.swan' 1 &
# 0.50 'multi_1.CCTX52.spec.swan' 1 &
# 1.00 'multi_1.CCTX53.spec.swan' 1 &
# 1.50 'multi_1.CCTX54.spec.swan' 1 &
# 2.00 'multi_1.CCTX55.spec.swan' 1
#$
#$CRP Eastern Side of grid. (point 61 (-95W/28.8) to point 55 (-95W/26N)
#$
#BOUN SEG XY 265.00 28.80 265.00 26.00 VAR FILE 0.00 'multi_1.CCTX61.spec.swan' 1 &
# 0.30 'multi_1.CCTX60.spec.swan' 1 &
# 0.80 'multi_1.CCTX59.spec.swan' 1 &
# 1.30 'multi_1.CCTX58.spec.swan' 1 &
# 1.80 'multi_1.CCTX57.spec.swan' 1 &
# 2.30 'multi_1.CCTX56.spec.swan' 1 &
# 2.80 'multi_1.CCTX55.spec.swan.cp' 1
#$END BOUNSEG
#

View file

@ -0,0 +1,184 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 05/11/13...ag
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# EHU =
# GEOGRAPHICAL DOMAIN, GEOGRAPHICAL RESOLUTION AND OUTPUT TIME STEP =
# =
# NOTE: RES = spatial resolution in km =
# TSTEP = request output time step (not the model time step) =
#========================================================================
#
export SITEID="EHU"
export REGIONID="SR"
export NELAT="33.00"
export NELON="-78.00"
export SWLAT="23.00"
export SWLON="-98.00"
export RES="3"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# =
# These nested grids are non-telescopic grids (i.e all of them are =
# nested in the outer grid, and get the boundary conditions only from it) =
# Later versions of NWPS will either allow for telescopic nesting or =
# will be run on an unstructured grid characterized with a fine mesh =
# over the nearshore zones and a coarser mesh across the offshore areas. =
# =
#========================================================================
#
# TO DO: Update the domains below to reflect the area/s that you are
# interested in (must reside inside of you outer domain defined
# above). Also, remember to remove or comment out the remaining
# example nests below that were configured for another area. Once
# your nests are configured, just toggle the NESTGRIDS to '1'
# (Default configuration is off or '0') and you will have control
# from the GFE GUI to activate your nests during your runs.
#
# STATIONARY VS NONSTATIONARY MODE:
#
# STATN=STA for STATIONARY RUNS, STATN=NON for NON-STATIONARY RUNS.
# The default value is NONstationary for CG1 (outer grid) and STAtionary
# for the nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid. In general,
# if your domain that you define as a nest below is >= 100 km^2, then
# set STATN=NON. For the very small domains or nests (<= 100 km^2)
# set STATN=STA.
#
# ACTIVATE NEST/S: default is off
#
# NESTGRIDS="0" ... turns off nest options
# NESTGRIDS="1" ... turns on nest options
#
export NESTGRIDS="0"
#
# NEST 1
export NELATN1="30.30"
export NELONN1="-85.30"
export SWLATN1="29.60"
export SWLONN1="-86.40"
export RESN1=".5"
export TSTEPN1="3"
export STATN1="NON"
#
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS
# =
# NOTE TO USER: the lat/lon points specified can be changed for any =
# arbitrary point of interest within your outer domain defined above. =
# One default buoy locations has already been configured for you =
# below. Add more as needed. =
#
# NOTE: These do not have to match NDBC locations. =
#
#========================================================================
# Spectra points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 ...."
#
export SPECPOINTS="42020:26.966:-96.695 42035:29.232:-94.413 42002:25.79:-94 42360:26.7:-90.46 42001:25.888:-89.658 42067:30.043:-88.649 42040:29.212:-88.207 42012:30.065:-87.555 42003:26.044:-85.612 42036:28.5:-84.517 42099:27.34:-84.245 41114:27.551:-80.225 41113:28.4:-80.53 41009:28.519:-80.166 41012:30.041:-80.533 41112:30.719:-81.293 41008:31.402:-80.869 41010:28.906:-78.471"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOEHUN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be changed in a new version, the user can get 1d-spectra but not g-h plots).
#
export WVTONCG="0"
export NELATWT="33.00"
export NELONWT="-78.00"
export SWLATWT="23.00"
export SWLONWT="-98.00"
export GEORESWT="6"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="SRH"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.SRH65.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#BOUN SEG XY 282.0 33.0 282.0 23.00 VAR FILE 0.00 'multi_1.SRH71.spec.swan' 1 &
# 1.00 'multi_1.SRH70.spec.swan' 1 &
# 2.00 'multi_1.SRH69.spec.swan' 1 &
# 3.00 'multi_1.SRH68.spec.swan' 1 &
# 4.00 'multi_1.SRH67.spec.swan' 1 &
# 5.00 'multi_1.SRH66.spec.swan' 1 &
# 10.00 'multi_1.SRH65.spec.swan' 1
#$
#$South side of SRH grid SW corner to SE corner
#$
#BOUN SEG XY 263.00 23.00 282.00 23.0 VAR FILE 0.00 'multi_1.SRH51.spec.swan' 1 &
# 1.00 'multi_1.SRH52.spec.swan' 1 &
# 2.00 'multi_1.SRH53.spec.swan' 1 &
# 3.00 'multi_1.SRH54.spec.swan' 1 &
# 4.00 'multi_1.SRH55.spec.swan' 1 &
# 5.00 'multi_1.SRH56.spec.swan' 1 &
# 6.00 'multi_1.SRH57.spec.swan' 1 &
# 7.00 'multi_1.SRH58.spec.swan' 1 &
# 8.00 'multi_1.SRH59.spec.swan' 1 &
# 9.00 'multi_1.SRH60.spec.swan' 1 &
# 10.00 'multi_1.SRH61.spec.swan' 1 &
# 11.00 'multi_1.SRH62.spec.swan' 1 &
# 12.00 'multi_1.SRH63.spec.swan' 1 &
# 18.00 'multi_1.SRH64.spec.swan' 1 &
# 19.00 'multi_1.SRH65.spec.swan.cp' 1
#$END BOUNSEG
#

View file

@ -0,0 +1,192 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 11/08/14 by alex.gibbs@onaa.gov
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# EKA =
# GEOGRAPHICAL DOMAIN, GEOGRAFICAL RESOLUTION AND OUTPUT TIME STEP =
#========================================================================
export SITEID="EKA"
export REGIONID="WR"
export NELAT="42.20"
export NELON="-123.35"
export SWLAT="38.40"
export SWLON="-126.27"
export RES="5.0"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# These nested grids are non-telescopic grids i.e all of them are =
# nested in the main grid, and get the boundary conditions only from it =
# =
#========================================================================
# NESTGRIDS: Number of nested grids, if = 0, nested grids and
# location numbers below will be ignore regardless of input specifications
#
# STATN=STA for STATIONARY RUNS, STAT=NON for NON-STATIONARY RUNS
# The default values is NONstationary for CG1 and STAtionary for the
# nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid.
#
export NESTGRIDS="0"
# EKA Nest
export NELATN1="42.00"
export NELONN1="-123.50"
export SWLATN1="38.25"
export SWLONN1="-123.50"
export RESN1="5"
export TSTEPN1="3"
export STATN1="NON"
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS =
#========================================================================
# Specta points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 name5:lat5:lon5 ...."
#
export SPECPOINTS="buoy213:40.30:-124.74 S475:39.45:-124.73 S470:40.80:-125.18 N450:41.35:-124.31 N455:40.05:-124.39 buoy212:40.75:-124.31 S455:39.45:-124.01 N470:41.35:-125.03 buoy027:41.76:-124.38 buoy014:39.22:-123.97 N475:40.05:-125.18"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOEKAN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be change in a new version, the user can get 1d-spectra but not g-h plots).
export WVTONCG="0"
export NELATWT="33.00"
export NELONWT="-78.00"
export SWLATWT="23.00"
export SWLONWT="-98.00"
export GEORESWT="6"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
# export WVTRKPA="10. 1. 0.25 0.1 10. 1."
export WVTRKPA="50. 5. 0.25 0.1 50. 5."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="NW-EKA"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.NW-EKA51.spec.swan, multi_1.NW-EKA59.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#BOUN SEG XY 233.73 38.40 236.3 38.40 VAR FILE 0.00 'multi_1.NW-EKA51.spec.swan' 1 &
# 0.07 'multi_1.NW-EKA69.spec.swan' 1 &
# 0.57 'multi_1.NW-EKA68.spec.swan' 1 &
# 1.07 'multi_1.NW-EKA67.spec.swan' 1 &
# 1.57 'multi_1.NW-EKA66.spec.swan' 1 &
# 2.07 'multi_1.NW-EKA65.spec.swan' 1 &
# 2.57 'multi_1.NW-EKA64.spec.swan' 1
#$ west side
#BOUN SEG XY 233.73 42.20 233.73 38.40 VAR FILE 0.00 'multi_1.NW-EKA59.spec.swan' 1 &
# 0.30 'multi_1.NW-EKA58.spec.swan' 1 &
# 0.80 'multi_1.NW-EKA57.spec.swan' 1 &
# 1.30 'multi_1.NW-EKA56.spec.swan' 1 &
# 1.80 'multi_1.NW-EKA55.spec.swan' 1 &
# 2.30 'multi_1.NW-EKA54.spec.swan' 1 &
# 2.80 'multi_1.NW-EKA53.spec.swan' 1 &
# 3.30 'multi_1.NW-EKA52.spec.swan' 1 &
# 3.80 'multi_1.NW-EKA51.spec.swan.cp' 1
#$ north side
#BOUN SEG XY 235.36 42.20 233.73 42.20 VAR FILE 0.00 'multi_1.NW-EKA63.spec.swan' 1 &
# 0.13 'multi_1.NW-EKA62.spec.swan' 1 &
# 0.63 'multi_1.NW-EKA61.spec.swan' 1 &
# 1.13 'multi_1.NW-EKA60.spec.swan' 1 &
# 1.63 'multi_1.NW-EKA59.spec.swan.cp' 1
#$END BOUNSEG
#
#========================================================================
# RIP CURRENT PROGRAM (SEE NWPS MANUAL) =
#========================================================================
# IF RIP CURRENT PROGRAM WILL BE RUN, then RIPCONT=1, Otherwise =0;
# Setting up RIPCONT here to zero will permanently disable RIP program.
#
export RIPPROG="0"
export RIPDOMAIN="CG2"
export RIPCONT="5m"
#
#___________________________________________________________________________
# RAY Section: Define a pair of rays to drop data out along critical contours
# for rip current program.
#
# Example: for data output every 2km along a 5m bathy contour
#
# RAY 'rayname' xp yp xq yq int xp yp xq yq
#
# RAY 'ray1' 282.85 34.628 282.85 34.62 2000 283.00 34.655 283.00 34.62
#
# ISOLINE '5mcont' 'ray1' BOTtom 10
# TABLE '5mcont' HEAD '5mtable' HSIGN TPS PDIR OUTPUT 20110825.1200 3.0 HR
#_____________________________________________________________________________
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD RIP COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE RIP
# CURRENTS (RIPCONT="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
# POIN '5mcont' 279.887 25.8725
#
#$RIP LINES
#$ Ray for 5m and 20m contour data.
#$
#RAY 'ray1' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '5mcont' 'ray1' BOTtom 5
#TABLE '5mcont' HEAD '5m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#RAY 'ray2' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '20mcont' 'ray1' BOTtom 20
#TABLE '20mcont' HEAD '20m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#$END RIP
#

View file

@ -0,0 +1,191 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 11/08/14 by alex.gibbs@onaa.gov
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# GYX =
# GEOGRAPHICAL DOMAIN, GEOGRAFICAL RESOLUTION AND OUTPUT TIME STEP =
#========================================================================
export SITEID="GYX"
export REGIONID="ER"
export NELAT="44.70"
export NELON="-67.85"
export SWLAT="42.40"
export SWLON="-71.75"
export RES="1.8"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# These nested grids are non-telescopic grids i.e all of them are =
# nested in the main grid, and get the boundary conditions only from it =
# =
#========================================================================
# NESTGRIDS: Number of nested grids, if = 0, nested grids and
# location numbers below will be ignore regardless of input specifications
#
# STATN=STA for STATIONARY RUNS, STAT=NON for NON-STATIONARY RUNS
# The default values is NONstationary for CG1 and STAtionary for the
# nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid.
#
export NESTGRIDS="2"
# NEST 1 - lake grid
export NELATN1="43.93"
export NELONN1="-70.45"
export SWLATN1="43.76"
export SWLONN1="-70.64"
export RESN1=".1"
export TSTEPN1="3"
export STATN1="STA"
#
# NEST 2 - lake grid
export NELATN1="43.73"
export NELONN1="-71.18"
export SWLATN1="43.47"
export SWLONN1="-71.50"
export RESN1=".1"
export TSTEPN1="3"
export STATN1="STA"
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS =
#========================================================================
# Specta points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 name5:lat5:lon5 ...."
#
export SPECPOINTS="44033:44.060:-69.000"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOGYXN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be change in a new version, the user can get 1d-spectra but not g-h plots).
export WVTONCG="0"
export NELATWT="44.70"
export NELONWT="-67.85"
export SWLATWT="42.40"
export SWLONWT="-71.75"
export GEORESWT="3.5"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="NW-GYX"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.NW-GYX58.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#BOUN SEG XY 289.14 42.40 292.15 42.40 VAR FILE 0.00 'multi_1.NW-GYX51.spec.swan' 1 &
# 0.50 'multi_1.NW-GYX52.spec.swan' 1 &
# 1.00 'multi_1.NW-GYX53.spec.swan' 1 &
# 1.50 'multi_1.NW-GYX54.spec.swan' 1 &
# 2.00 'multi_1.NW-GYX55.spec.swan' 1 &
# 2.50 'multi_1.NW-GYX56.spec.swan' 1 &
# 3.00 'multi_1.NW-GYX57.spec.swan' 1 &
# 3.01 'multi_1.NW-GYX58.spec.swan.cp' 1
#$
#BOUN SEG XY 292.15 42.40 292.15 44.40 VAR FILE 0.00 'multi_1.NW-GYX58.spec.swan' 1 &
# 0.50 'multi_1.NW-GYX59.spec.swan' 1 &
# 1.00 'multi_1.NW-GYX60.spec.swan' 1 &
# 1.50 'multi_1.NW-GYX61.spec.swan' 1 &
# 2.00 'multi_1.NW-GYX62.spec.swan' 1
#$END BOUNSEG
#
#========================================================================
# RIP CURRENT PROGRAM (SEE NWPS MANUAL) =
#========================================================================
# IF RIP CURRENT PROGRAM WILL BE RUN, then RIPCONT=1, Otherwise =0;
# Setting up RIPCONT here to zero will permanently disable RIP program.
#
export RIPPROG="0"
export RIPDOMAIN="CG2"
export RIPCONT="5m"
#
#___________________________________________________________________________
# RAY Section: Define a pair of rays to drop data out along critical contours
# for rip current program.
#
# Example: for data output every 2km along a 5m bathy contour
#
# RAY 'rayname' xp yp xq yq int xp yp xq yq
#
# RAY 'ray1' 282.85 34.628 282.85 34.62 2000 283.00 34.655 283.00 34.62
#
# ISOLINE '5mcont' 'ray1' BOTtom 10
# TABLE '5mcont' HEAD '5mtable' HSIGN TPS PDIR OUTPUT 20110825.1200 3.0 HR
#_____________________________________________________________________________
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD RIP COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE RIP
# CURRENTS (RIPCONT="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
# POIN '5mcont' 279.887 25.8725
#
#$RIP LINES
#$ Ray for 5m and 20m contour data.
#$
#RAY 'ray1' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '5mcont' 'ray1' BOTtom 5
#TABLE '5mcont' HEAD '5m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#RAY 'ray2' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '20mcont' 'ray1' BOTtom 20
#TABLE '20mcont' HEAD '20m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#$END RIP
#

View file

@ -0,0 +1,303 @@
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 05/11/13...ag
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# HFO =
# GEOGRAPHICAL DOMAIN, GEOGRAPHICAL RESOLUTION AND OUTPUT TIME STEP =
# =
# NOTE: RES = spatial resolution in km =
# TSTEP = request output time step (not the model time step) =
#========================================================================
#
export SITEID="HFO"
export REGIONID="PR"
export NELAT="27.00"
export NELON="-150.00"
export SWLAT="14.00"
export SWLON="-165.00"
export RES="18"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# =
# These nested grids are non-telescopic grids (i.e all of them are =
# nested in the outer grid, and get the boundary conditions only from it) =
# Later versions of NWPS will either allow for telescopic nesting or =
# will be run on an unstructured grid characterized with a fine mesh =
# over the nearshore zones and a coarser mesh across the offshore areas. =
# =
#========================================================================
#
# TO DO: Update the domains below to reflect the area/s that you are
# interested in (must reside inside of you outer domain defined
# above). Also, remember to remove or comment out the remaining
# example nests below that were configured for another area. Once
# your nests are configured, just toggle the NESTGRIDS to '1'
# (Default configuration is off or '0') and you will have control
# from the GFE GUI to activate your nests during your runs.
#
# STATIONARY VS NONSTATIONARY MODE:
#
# STATN=STA for STATIONARY RUNS, STATN=NON for NON-STATIONARY RUNS.
# The default value is NONstationary for CG1 (outer grid) and STAtionary
# for the nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid. In general,
# if your domain that you define as a nest below is >= 100 km^2, then
# set STATN=NON. For the very small domains or nests (<= 100 km^2)
# set STATN=STA.
#
# ACTIVATE NEST/S: default is on for HFO
#
# NESTGRIDS="0" ... turns off nest options
# NESTGRIDS="1" ... turns on nest options
#
export NESTGRIDS="0"
#
# NEST 1..all reef/keys domain
export NELATN1="25.40"
export NELONN1="-80.10"
export SWLATN1="24.30"
export SWLONN1="-83.20"
export RESN1="1"
export TSTEPN1="3"
export STATN1="NON"
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS
# =
# NOTE TO USER: the lat/lon points specified can be changed for any =
# arbitrary point of interest within your outer domain defined above. =
# One default buoy locations has already been configured for you =
# below. Add more as needed. =
#
# NOTE: These do not have to match NDBC locations. =
#
#========================================================================
# Spectra points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 ...."
#
# export SPECPOINTS="PLSF1:24.720:-82.860 SANF1:24.460:-81.940 SMKF1:24.600:-81.170 LONF1:24.780:-80.840 MLRF1:25.060:-80.440"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOHFON, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="OFF"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be changed in a new version, the user can get 1d-spectra but not g-h plots).
#
export WVTONCG="0"
export NELATWT="26.00"
export NELONWT="-79.00"
export SWLATWT="23.00"
export SWLONWT="-83.50"
export GEORESWT="3.5"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="NW-HFO"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.NW-HFO51.spec.swan,multi_1.NW-HFO63.spec.swan,multi_1.NW-HFO68.spec.swan,multi_1.NW-HFO71.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#$southern side HFO - east to west
#BOUN SEG XY 276.50 26.00 276.50 23.00 VAR FILE 0.00 'multi_1.NW-HFO51.spec.swan' 1 &
#0.25 'multi_1.NW-HFO52.spec.swan' 1 &
#0.50 'multi_1.NW-HFO53.spec.swan' 1 &
#0.75 'multi_1.NW-HFO54.spec.swan' 1 &
#1.00 'multi_1.NW-HFO55.spec.swan' 1 &
#1.25 'multi_1.NW-HFO56.spec.swan' 1 &
#1.50 'multi_1.NW-HFO57.spec.swan' 1 &
#1.75 'multi_1.NW-HFO58.spec.swan' 1 &
#2.00 'multi_1.NW-HFO59.spec.swan' 1 &
#2.25 'multi_1.NW-HFO60.spec.swan' 1 &
#2.50 'multi_1.NW-HFO61.spec.swan' 1 &
#2.75 'multi_1.NW-HFO62.spec.swan' 1 &
#3.00 'multi_1.NW-HFO63.spec.swan.cp' 1
#$ Southern Boundary
#BOUN SEG XY 276.50 23.00 281.00 23.00 VAR FILE 0.00 'multi_1.NW-HFO63.spec.swan' 1 &
#3.70 'multi_1.NW-HFO64.spec.swan' 1 &
#3.90 'multi_1.NW-HFO65.spec.swan' 1 &
#4.10 'multi_1.NW-HFO66.spec.swan' 1 &
#4.30 'multi_1.NW-HFO67.spec.swan' 1 &
#4.50 'multi_1.NW-HFO68.spec.swan.cp' 1
#$ Eastern Boundary
#BOUN SEG XY 281.00 23.00 281.00 26.00 VAR FILE 0.00 'multi_1.NW-HFO68.spec.swan' 1 &
#0.20 'multi_1.NW-HFO69.spec.swan' 1 &
#0.40 'multi_1.NW-HFO70.spec.swan' 1 &
#3.00 'multi_1.NW-HFO71.spec.swan.cp' 1
#$ Northern Boundary
#BOUN SEG XY 281.00 26.00 276.5 26.00 VAR FILE 0.00 'multi_1.NW-HFO71.spec.swan' 1 &
#0.20 'multi_1.NW-HFO72.spec.swan' 1 &
#0.40 'multi_1.NW-HFO73.spec.swan' 1 &
#0.60 'multi_1.NW-HFO74.spec.swan' 1 &
#0.80 'multi_1.NW-HFO75.spec.swan' 1 &
#1.00 'multi_1.NW-HFO76.spec.swan' 1 &
#3.20 'multi_1.NW-HFO77.spec.swan' 1 &
#3.45 'multi_1.NW-HFO78.spec.swan' 1 &
#3.70 'multi_1.NW-HFO79.spec.swan' 1 &
#3.95 'multi_1.NW-HFO80.spec.swan' 1 &
#4.20 'multi_1.NW-HFO81.spec.swan' 1 &
#4.50 'multi_1.NW-HFO51.spec.swan.cp' 1
#$END BOUNSEG
#
#################################################################################################
# UNSTRSWAN DEV
# Updated: 8/10/2014
# By: alex.gibbs@noaa.gov
# Code: to support the UNSWAN development
#################################################################################################
#
#$UNSTR SWAN BOUNDARY COMMAND LINES
#$ W boundary
#BOUNdspec SIDE 1 CLOCKW CON FILE 'multi_1.NW-HFO51.spec.swan' 1
#BOUNdspec SIDE 2 CLOCKW CON FILE 'multi_1.NW-HFO96.spec.swan' 1
#BOUNdspec SIDE 3 CLOCKW CON FILE 'multi_1.NW-HFO97.spec.swan' 1
#BOUNdspec SIDE 4 CLOCKW CON FILE 'multi_1.NW-HFO98.spec.swan' 1
#BOUNdspec SIDE 5 CLOCKW CON FILE 'multi_1.NW-HFO99.spec.swan' 1
#BOUNdspec SIDE 6 CLOCKW CON FILE 'multi_1.NW-HFO100.spec.swan' 1
#BOUNdspec SIDE 7 CLOCKW CON FILE 'multi_1.NW-HFO101.spec.swan' 1
#BOUNdspec SIDE 8 CLOCKW CON FILE 'multi_1.NW-HFO102.spec.swan' 1
#BOUNdspec SIDE 9 CLOCKW CON FILE 'multi_1.NW-HFO103.spec.swan' 1
#BOUNdspec SIDE 10 CLOCKW CON FILE 'multi_1.NW-HFO104.spec.swan' 1
#BOUNdspec SIDE 11 CLOCKW CON FILE 'multi_1.NW-HFO105.spec.swan' 1
#BOUNdspec SIDE 12 CLOCKW CON FILE 'multi_1.NW-HFO79.spec.swan' 1
#$ N boundary
#BOUNdspec SIDE 13 CLOCKW CON FILE 'multi_1.NW-HFO80.spec.swan' 1
#BOUNdspec SIDE 14 CLOCKW CON FILE 'multi_1.NW-HFO81.spec.swan' 1
#BOUNdspec SIDE 15 CLOCKW CON FILE 'multi_1.NW-HFO82.spec.swan' 1
#BOUNdspec SIDE 16 CLOCKW CON FILE 'multi_1.NW-HFO83.spec.swan' 1
#BOUNdspec SIDE 17 CLOCKW CON FILE 'multi_1.NW-HFO84.spec.swan' 1
#BOUNdspec SIDE 18 CLOCKW CON FILE 'multi_1.NW-HFO85.spec.swan' 1
#BOUNdspec SIDE 19 CLOCKW CON FILE 'multi_1.NW-HFO86.spec.swan' 1
#BOUNdspec SIDE 20 CLOCKW CON FILE 'multi_1.NW-HFO87.spec.swan' 1
#BOUNdspec SIDE 21 CLOCKW CON FILE 'multi_1.NW-HFO88.spec.swan' 1
#BOUNdspec SIDE 22 CLOCKW CON FILE 'multi_1.NW-HFO89.spec.swan' 1
#BOUNdspec SIDE 23 CLOCKW CON FILE 'multi_1.NW-HFO90.spec.swan' 1
#BOUNdspec SIDE 24 CLOCKW CON FILE 'multi_1.NW-HFO91.spec.swan' 1
#BOUNdspec SIDE 25 CLOCKW CON FILE 'multi_1.NW-HFO92.spec.swan' 1
#BOUNdspec SIDE 26 CLOCKW CON FILE 'multi_1.NW-HFO93.spec.swan' 1
#BOUNdspec SIDE 27 CLOCKW CON FILE 'multi_1.NW-HFO94.spec.swan' 1
#BOUNdspec SIDE 28 CLOCKW CON FILE 'multi_1.NW-HFO67.spec.swan' 1
#$ E boundary
#BOUNdspec SIDE 29 CLOCKW CON FILE 'multi_1.NW-HFO68.spec.swan' 1
#BOUNdspec SIDE 30 CLOCKW CON FILE 'multi_1.NW-HFO69.spec.swan' 1
#BOUNdspec SIDE 31 CLOCKW CON FILE 'multi_1.NW-HFO70.spec.swan' 1
#BOUNdspec SIDE 32 CLOCKW CON FILE 'multi_1.NW-HFO71.spec.swan' 1
#BOUNdspec SIDE 33 CLOCKW CON FILE 'multi_1.NW-HFO72.spec.swan' 1
#BOUNdspec SIDE 34 CLOCKW CON FILE 'multi_1.NW-HFO73.spec.swan' 1
#BOUNdspec SIDE 35 CLOCKW CON FILE 'multi_1.NW-HFO74.spec.swan' 1
#BOUNdspec SIDE 36 CLOCKW CON FILE 'multi_1.NW-HFO75.spec.swan' 1
#BOUNdspec SIDE 37 CLOCKW CON FILE 'multi_1.NW-HFO76.spec.swan' 1
#BOUNdspec SIDE 38 CLOCKW CON FILE 'multi_1.NW-HFO77.spec.swan' 1
#BOUNdspec SIDE 39 CLOCKW CON FILE 'multi_1.NW-HFO78.spec.swan' 1
#$ S boundary
#BOUNdspec SIDE 40 CLOCKW CON FILE 'multi_1.NW-HFO66.spec.swan' 1
#BOUNdspec SIDE 41 CLOCKW CON FILE 'multi_1.NW-HFO65.spec.swan' 1
#BOUNdspec SIDE 42 CLOCKW CON FILE 'multi_1.NW-HFO64.spec.swan' 1
#BOUNdspec SIDE 43 CLOCKW CON FILE 'multi_1.NW-HFO63.spec.swan' 1
#BOUNdspec SIDE 44 CLOCKW CON FILE 'multi_1.NW-HFO62.spec.swan' 1
#BOUNdspec SIDE 45 CLOCKW CON FILE 'multi_1.NW-HFO61.spec.swan' 1
#BOUNdspec SIDE 46 CLOCKW CON FILE 'multi_1.NW-HFO60.spec.swan' 1
#BOUNdspec SIDE 47 CLOCKW CON FILE 'multi_1.NW-HFO59.spec.swan' 1
#BOUNdspec SIDE 48 CLOCKW CON FILE 'multi_1.NW-HFO58.spec.swan' 1
#BOUNdspec SIDE 49 CLOCKW CON FILE 'multi_1.NW-HFO57.spec.swan' 1
#BOUNdspec SIDE 50 CLOCKW CON FILE 'multi_1.NW-HFO56.spec.swan' 1
#BOUNdspec SIDE 51 CLOCKW CON FILE 'multi_1.NW-HFO55.spec.swan' 1
#BOUNdspec SIDE 52 CLOCKW CON FILE 'multi_1.NW-HFO54.spec.swan' 1
#BOUNdspec SIDE 53 CLOCKW CON FILE 'multi_1.NW-HFO53.spec.swan' 1
#BOUNdspec SIDE 54 CLOCKW CON FILE 'multi_1.NW-HFO52.spec.swan' 1
#$END BOUNSEG for UNSTR SWAN
#
#========================================================================
# RIP CURRENT PROGRAM (SEE NWPS MANUAL) =
#========================================================================
# IF RIP CURRENT PROGRAM WILL BE RUN, then RIPCONT=1, Otherwise =0;
# Setting up RIPCONT here to zero will permanently disable RIP program.
#
export RIPPROG="1"
export RIPDOMAIN="CG2"
export RIPCONT="5m"
#
#___________________________________________________________________________
# RAY Section: Define a pair of rays to drop data out along critical contours
# for rip current program.
#
# Example: for data output every 2km along a 5m bathy contour
#
# RAY 'rayname' xp yp xq yq int xp yp xq yq
#
# RAY 'ray1' 282.85 34.628 282.85 34.62 2000 283.00 34.655 283.00 34.62
#
# ISOLINE '5mcont' 'ray1' BOTtom 5
# TABLE '5mcont' HEAD '5mtable' HSIGN TPS PDIR OUTPUT 20110825.1200 3.0 HR
#_____________________________________________________________________________
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD RIP COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE RIP
# CURRENTS (RIPCONT="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#ORIGINAL LINE
#TABLE '5mcont' HEAD '5m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT YYYYMMDD.HHMM H.M HR
#$RIP LINES
#$ Ray for 5m contour data.
#$
#RAY 'ray1' 279.88 25.84 279.9 25.84 100 279.88 25.90 279.90 25.90
#ISOLINE '5mcont' 'ray1' BOTtom 5
#TABLE '5mcont' HEAD '5m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL BOTLEV WIND OUTPUT YYYYMMDD.HHMM H.M HR
#$
#$END RIP
#

View file

@ -0,0 +1,170 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 02/01/13
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# HGX =
# GEOGRAPHICAL DOMAIN, GEOGRAPHICAL RESOLUTION AND OUTPUT TIME STEP =
# =
# NOTE: RES = spatial resolution in km =
# TSTEP = request output time step (not the model time step) =
#========================================================================
#
#
export SITEID="HGX"
export REGIONID="SR"
export NELAT="30.50"
export NELON="-93.37"
export SWLAT="27.00"
export SWLON="-97.40"
export RES="1.80"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# =
# These nested grids are non-telescopic grids (i.e all of them are =
# nested in the outer grid, and get the boundary conditions only from it) =
# Later versions of NWPS will either allow for telescopic nesting or =
# will be run on an unstructured grid characterized with a fine mesh =
# over the nearshore zones and a coarser mesh across the offshore areas. =
# =
#========================================================================
#
# TO DO: Update the domains below to reflect the area/s that you are
# interested in (must reside inside of you outer domain defined
# above). Also, remember to remove or comment out the remaining
# example nests below that were configured for another area. Once
# your nests are configured, just toggle the NESTGRIDS to '1'
# (Default configuration is off or '0') and you will have control
# from the GFE GUI to activate your nests during your runs.
#
# STATIONARY VS NONSTATIONARY MODE:
#
# STATN=STA for STATIONARY RUNS, STATN=NON for NON-STATIONARY RUNS.
# The default value is NONstationary for CG1 (outer grid) and STAtionary
# for the nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid. In general,
# if your domain that you define as a nest below is >= 100 km^2, then
# set STATN=NON. For the very small domains or nests (<= 100 km^2)
# set STATN=STA.
#
# ACTIVATE NEST/S: default is off below
#
# NESTGRIDS="0" ... turns off nest options
# NESTGRIDS="1" ... turns on nest options
#
export NESTGRIDS="1"
export NELATN1="29.80"
export NELONN1="-94.46"
export SWLATN1="29.00"
export SWLONN1="-95.18"
export RESN1=".5"
export TSTEPN1="3"
export STATN1="STA"
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS
# =
# NOTE TO USER: the lat/lon points specified can be changed for any =
# arbitrary point of interest within your outer domain defined above. =
# One default buoy location has already been configured for you =
# below. Add more as needed. =
#
# NOTE: These do not have to match NDBC locations. =
#
#========================================================================
# Spectra points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 ...."
#
export SPECPOINTS="KXIH:29.180:-94.521 42019:27.913:-95.353 42043:28.982:-94.919"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOHGXN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be changed in a new version, the user can get 1d-spectra but not g-h plots).
#
export WVTONCG="0"
export NELATWT="30.50"
export NELONWT="-93.37"
export SWLATWT="27.00"
export SWLONWT="-97.40"
export GEORESWT="3.0"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="HGX"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.HGX58.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#BOUN SEG XY 262.7 27.00 266.63 27.00 VAR FILE 0.00 'multi_1.HGX51.spec.swan' 1 &
# 0.93 'multi_1.HGX52.spec.swan' 1 &
# 1.43 'multi_1.HGX53.spec.swan' 1 &
# 1.93 'multi_1.HGX54.spec.swan' 1 &
# 2.43 'multi_1.HGX55.spec.swan' 1 &
# 2.93 'multi_1.HGX56.spec.swan' 1 &
# 3.43 'multi_1.HGX57.spec.swan' 1 &
# 3.93 'multi_1.HGX58.spec.swan' 1
#$
#BOUN SEG XY 266.63 29.50 266.63 27.00 VAR FILE 0.00 'multi_1.HGX62.spec.swan' 1 &
# 1.00 'multi_1.HGX61.spec.swan' 1 &
# 1.50 'multi_1.HGX60.spec.swan' 1 &
# 2.00 'multi_1.HGX59.spec.swan' 1 &
# 2.50 'multi_1.HGX58.spec.swan.cp' 1
#$END BOUNSEG

View file

@ -0,0 +1,183 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 11/08/14 by alex.gibbs@onaa.gov
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# ILM =
# GEOGRAPHICAL DOMAIN, GEOGRAFICAL RESOLUTION AND OUTPUT TIME STEP =
#========================================================================
export SITEID="ILM"
export REGIONID="ER"
export NELAT="34.80"
export NELON="-76.50"
export SWLAT="32.50"
export SWLON="-80.40"
export RES="2.0"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# These nested grids are non-telescopic grids i.e all of them are =
# nested in the main grid, and get the boundary conditions only from it =
# =
#========================================================================
# NESTGRIDS: Number of nested grids, if = 0, nested grids and
# location numbers below will be ignore regardless of input specifications
#
# STATN=STA for STATIONARY RUNS, STAT=NON for NON-STATIONARY RUNS
# The default values is NONstationary for CG1 and STAtionary for the
# nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid.
#
export NESTGRIDS="0"
# ILM Nest
export NELATN1=""
export NELONN1=""
export SWLATN1=""
export SWLONN1=""
export RESN1=".1"
export TSTEPN1="3"
export STATN1="NON"
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS =
#========================================================================
# Specta points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 name5:lat5:lon5 ...."
#
export SPECPOINTS="41036:34.207:-76.949 41013:33.436:-77.743 41004:32.501:-79.099"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOILMN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be change in a new version, the user can get 1d-spectra but not g-h plots).
export WVTONCG="0"
export NELATWT="34.80"
export NELONWT="-76.50"
export SWLATWT="32.50"
export SWLONWT="-80.40"
export GEORESWT="3.0"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="NW-ILM"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.NW-ILM59.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#BOUN SEG XY 279.85 32.50 283.50 32.50 VAR FILE 0.00 'multi_1.NW-ILM51.spec.swan' 1 &
#0.25 'multi_1.NW-ILM52.spec.swan' 1 &
#0.75 'multi_1.NW-ILM53.spec.swan' 1 &
#1.25 'multi_1.NW-ILM54.spec.swan' 1 &
#1.75 'multi_1.NW-ILM55.spec.swan' 1 &
#2.25 'multi_1.NW-ILM56.spec.swan' 1 &
#2.75 'multi_1.NW-ILM57.spec.swan' 1 &
#3.25 'multi_1.NW-ILM58.spec.swan' 1 &
#3.65 'multi_1.NW-ILM59.spec.swan.cp' 1
#$
#BOUN SEG XY 283.50 32.50 283.50 34.50 VAR FILE 0.00 'multi_1.NW-ILM59.spec.swan' 1 &
#0.50 'multi_1.NW-ILM60.spec.swan' 1 &
#1.00 'multi_1.NW-ILM61.spec.swan' 1 &
#1.50 'multi_1.NW-ILM62.spec.swan' 1 &
#2.00 'multi_1.NW-ILM63.spec.swan' 1
#$END BOUNSEG
#
#========================================================================
# RIP CURRENT PROGRAM (SEE NWPS MANUAL) =
#========================================================================
# IF RIP CURRENT PROGRAM WILL BE RUN, then RIPCONT=1, Otherwise =0;
# Setting up RIPCONT here to zero will permanently disable RIP program.
#
export RIPPROG="0"
export RIPDOMAIN="CG2"
export RIPCONT="5m"
#
#___________________________________________________________________________
# RAY Section: Define a pair of rays to drop data out along critical contours
# for rip current program.
#
# Example: for data output every 2km along a 5m bathy contour
#
# RAY 'rayname' xp yp xq yq int xp yp xq yq
#
# RAY 'ray1' 282.85 34.628 282.85 34.62 2000 283.00 34.655 283.00 34.62
#
# ISOLINE '5mcont' 'ray1' BOTtom 10
# TABLE '5mcont' HEAD '5mtable' HSIGN TPS PDIR OUTPUT 20110825.1200 3.0 HR
#_____________________________________________________________________________
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD RIP COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE RIP
# CURRENTS (RIPCONT="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
# POIN '5mcont' 279.887 25.8725
#
#$RIP LINES
#$ Ray for 5m and 20m contour data.
#$
#RAY 'ray1' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '5mcont' 'ray1' BOTtom 5
#TABLE '5mcont' HEAD '5m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#RAY 'ray2' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '20mcont' 'ray1' BOTtom 20
#TABLE '20mcont' HEAD '20m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#$END RIP
#

View file

@ -0,0 +1,204 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 05/11/13...ag
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# JAX =
# GEOGRAPHICAL DOMAIN, GEOGRAPHICAL RESOLUTION AND OUTPUT TIME STEP =
# =
# NOTE: RES = spatial resolution in km =
# TSTEP = request output time step (not the model time step) =
#========================================================================
#
export SITEID="JAX"
export REGIONID="SR"
export NELAT="32.00"
export NELON="-79.30"
export SWLAT="28.70"
export SWLON="-81.70"
export RES="1.8"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# =
# These nested grids are non-telescopic grids (i.e all of them are =
# nested in the outer grid, and get the boundary conditions only from it) =
# Later versions of NWPS will either allow for telescopic nesting or =
# will be run on an unstructured grid characterized with a fine mesh =
# over the nearshore zones and a coarser mesh across the offshore areas. =
# =
#========================================================================
#
# TO DO: Update the domains below to reflect the area/s that you are
# interested in (must reside inside of you outer domain defined
# above). Also, remember to remove or comment out the remaining
# example nests below that were configured for another area. Once
# your nests are configured, just toggle the NESTGRIDS to '1'
# (Default configuration is off or '0') and you will have control
# from the GFE GUI to activate your nests during your runs.
#
# STATIONARY VS NONSTATIONARY MODE:
#
# STATN=STA for STATIONARY RUNS, STATN=NON for NON-STATIONARY RUNS.
# The default value is NONstationary for CG1 (outer grid) and STAtionary
# for the nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid. In general,
# if your domain that you define as a nest below is >= 100 km^2, then
# set STATN=NON. For the very small domains or nests (<= 100 km^2)
# set STATN=STA.
#
# ACTIVATE NEST/S: default is on for JAX
#
# NESTGRIDS="0" ... turns off nest options
# NESTGRIDS="1" ... turns on nest options
#
export NESTGRIDS="4"
#
# NEST 1...ST. ANDREWS SOUND
export NELATN1="31.15"
export NELONN1="-81.26"
export SWLATN1="30.95"
export SWLONN1="-81.46"
export RESN1=".5"
export TSTEPN1="3"
export STATN1="STA"
# NEST 2...KINGS BAY/ST MARYS AND MAYPORT
export NELATN2="30.76"
export NELONN2="-81.10"
export SWLATN2="30.23"
export SWLONN2="-81.63"
export RESN2=".5"
export TSTEPN2="3"
export STATN2="STA"
# NEST 3...MAYPORT
export NELATN3="30.20"
export NELONN3="-81.33"
export SWLATN3="30.00"
export SWLONN3="-81.43"
export RESN3=".5"
export TSTEPN3="3"
export STATN3="STA"
# NEST 4...ST AUGUSTINE AND MATANZAS INLETS
export NELATN4="29.97"
export NELONN4="-81.15"
export SWLATN4="29.77"
export SWLONN4="-81.35"
export RESN4=".5"
export TSTEPN4="3"
export STATN4="STA"
#
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS
# =
# NOTE TO USER: the lat/lon points specified can be changed for any =
# arbitrary point of interest within your outer domain defined above. =
# One default buoy locations has already been configured for you =
# below. Add more as needed. =
#
# NOTE: These do not have to match NDBC locations. =
#
#========================================================================
# Spectra points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 ...."
#
export SPECPOINTS="SJM:30.398:-81.37 MTZ:29.706:-81.223 SAI:29.912:-81.281 NSS:30.513:-81.407 41112:30.718:-81.293 41012:30.041:-80.533 41008:31.402:-80.869"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOJAXN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be changed in a new version, the user can get 1d-spectra but not g-h plots).
#
export WVTONCG="0"
export NELATWT="32.00"
export NELONWT="-79.30"
export SWLATWT="28.70"
export SWLONWT="-81.70"
export GEORESWT="3.5"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="JXFL"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.JXFL60.spec.swan,multi_1.JXFL53.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#BOUN SEG XY 279.5 32.0 280.7 32.0 VAR FILE 0.00 'multi_1.JXFL63.spec.swan' 1 &
#0.30 'multi_1.JXFL62.spec.swan' 1 &
#0.70 'multi_1.JXFL61.spec.swan' 1 &
#1.20 'multi_1.JXFL60.spec.swan' 1
#$
#$eastern side JXFL: south to north or SE corner to NE corner
#$
#BOUN SEG XY 280.7 28.7 280.7 32.0 VAR FILE 0.00 'multi_1.JXFL53.spec.swan' 1 &
#0.50 'multi_1.JXFL54.spec.swan' 1 &
#1.00 'multi_1.JXFL55.spec.swan' 1 &
#1.50 'multi_1.JXFL56.spec.swan' 1 &
#2.00 'multi_1.JXFL57.spec.swan' 1 &
#2.50 'multi_1.JXFL58.spec.swan' 1 &
#2.90 'multi_1.JXFL59.spec.swan' 1 &
#3.30 'multi_1.JXFL60.spec.swan.cp' 1
#$
#$southern side JXFL: west to east - to SE corner of domain (53)
#$
#BOUN SEG XY 279.8 28.7 280.7 28.7 VAR FILE 0.00 'multi_1.JXFL51.spec.swan' 1 &
#0.50 'multi_1.JXFL52.spec.swan' 1 &
#0.90 'multi_1.JXFL53.spec.swan.cp' 1
#$END BOUNSEG
#

View file

@ -0,0 +1,206 @@
main File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 05/11/13...ag
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# KEY =
# GEOGRAPHICAL DOMAIN, GEOGRAPHICAL RESOLUTION AND OUTPUT TIME STEP =
# =
# NOTE: RES = spatial resolution in km =
# TSTEP = request output time step (not the model time step) =
#========================================================================
#
export SITEID="KEY"
export REGIONID="SR"
export NELAT="26.00"
export NELON="-79.00"
export SWLAT="23.00"
export SWLON="-83.50"
export RES="3.5"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# =
# These nested grids are non-telescopic grids (i.e all of them are =
# nested in the outer grid, and get the boundary conditions only from it) =
# Later versions of NWPS will either allow for telescopic nesting or =
# will be run on an unstructured grid characterized with a fine mesh =
# over the nearshore zones and a coarser mesh across the offshore areas. =
# =
#========================================================================
#
# TO DO: Update the domains below to reflect the area/s that you are
# interested in (must reside inside of you outer domain defined
# above). Also, remember to remove or comment out the remaining
# example nests below that were configured for another area. Once
# your nests are configured, just toggle the NESTGRIDS to '1'
# (Default configuration is off or '0') and you will have control
# from the GFE GUI to activate your nests during your runs.
#
# STATIONARY VS NONSTATIONARY MODE:
#
# STATN=STA for STATIONARY RUNS, STATN=NON for NON-STATIONARY RUNS.
# The default value is NONstationary for CG1 (outer grid) and STAtionary
# for the nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid. In general,
# if your domain that you define as a nest below is >= 100 km^2, then
# set STATN=NON. For the very small domains or nests (<= 100 km^2)
# set STATN=STA.
#
# ACTIVATE NEST/S: default is on for KEY
#
# NESTGRIDS="0" ... turns off nest options
# NESTGRIDS="1" ... turns on nest options
#
export NESTGRIDS="1"
#
# NEST 1..all reef/keys domain
export NELATN1="25.40"
export NELONN1="-80.10"
export SWLATN1="24.30"
export SWLONN1="-83.20"
export RESN1="1"
export TSTEPN1="3"
export STATN1="NON"
# NEST 2...grid matches bathy 1/3 arc-sec (~10m res) NAVD 88 DEM from NGDC...key west
# export NELATN2="24.88"
# export NELONN2="-81.27"
# export SWLATN2="24.40"
# export SWLONN2="-82.18"
# export RESN2=".5"
# export TSTEPN2="3"
# export STATN2="NON"
#
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS
# =
# NOTE TO USER: the lat/lon points specified can be changed for any =
# arbitrary point of interest within your outer domain defined above. =
# One default buoy locations has already been configured for you =
# below. Add more as needed. =
#
# NOTE: These do not have to match NDBC locations. =
#
#========================================================================
# Spectra points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 ...."
#
export SPECPOINTS="PLSF1:24.720:-82.860 SANF1:24.460:-81.940 SMKF1:24.600:-81.170 LONF1:24.780:-80.840 MLRF1:25.060:-80.440"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOKEYN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be changed in a new version, the user can get 1d-spectra but not g-h plots).
#
export WVTONCG="0"
export NELATWT="26.00"
export NELONWT="-79.00"
export SWLATWT="23.00"
export SWLONWT="-83.50"
export GEORESWT="3.5"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="KEY"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.KEY51.spec.swan,multi_1.KEY63.spec.swan,multi_1.KEY68.spec.swan,multi_1.KEY71.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#$southern side KEY - east to west
#BOUN SEG XY 276.50 26.00 276.50 23.00 VAR FILE 0.00 'multi_1.KEY51.spec.swan' 1 &
#0.25 'multi_1.KEY52.spec.swan' 1 &
#0.50 'multi_1.KEY53.spec.swan' 1 &
#0.75 'multi_1.KEY54.spec.swan' 1 &
#1.00 'multi_1.KEY55.spec.swan' 1 &
#1.25 'multi_1.KEY56.spec.swan' 1 &
#1.50 'multi_1.KEY57.spec.swan' 1 &
#1.75 'multi_1.KEY58.spec.swan' 1 &
#2.00 'multi_1.KEY59.spec.swan' 1 &
#2.25 'multi_1.KEY60.spec.swan' 1 &
#2.50 'multi_1.KEY61.spec.swan' 1 &
#2.75 'multi_1.KEY62.spec.swan' 1 &
#3.00 'multi_1.KEY63.spec.swan.cp' 1
#$ Southern Boundary
#BOUN SEG XY 276.50 23.00 281.00 23.00 VAR FILE 0.00 'multi_1.KEY63.spec.swan' 1 &
#3.70 'multi_1.KEY64.spec.swan' 1 &
#3.90 'multi_1.KEY65.spec.swan' 1 &
#4.10 'multi_1.KEY66.spec.swan' 1 &
#4.30 'multi_1.KEY67.spec.swan' 1 &
#4.50 'multi_1.KEY68.spec.swan.cp' 1
#$ Eastern Boundary
#BOUN SEG XY 281.00 23.00 281.00 26.00 VAR FILE 0.00 'multi_1.KEY68.spec.swan' 1 &
#0.20 'multi_1.KEY69.spec.swan' 1 &
#0.40 'multi_1.KEY70.spec.swan' 1 &
#3.00 'multi_1.KEY71.spec.swan.cp' 1
#$ Northern Boundary
#BOUN SEG XY 281.00 26.00 276.5 26.00 VAR FILE 0.00 'multi_1.KEY71.spec.swan' 1 &
#0.20 'multi_1.KEY72.spec.swan' 1 &
#0.40 'multi_1.KEY73.spec.swan' 1 &
#0.60 'multi_1.KEY74.spec.swan' 1 &
#0.80 'multi_1.KEY75.spec.swan' 1 &
#1.00 'multi_1.KEY76.spec.swan' 1 &
#3.20 'multi_1.KEY77.spec.swan' 1 &
#3.45 'multi_1.KEY78.spec.swan' 1 &
#3.70 'multi_1.KEY79.spec.swan' 1 &
#3.95 'multi_1.KEY80.spec.swan' 1 &
#4.20 'multi_1.KEY81.spec.swan' 1 &
#4.50 'multi_1.KEY51.spec.swan.cp' 1
#$END BOUNSEG
#

View file

@ -0,0 +1,206 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 02/01/13
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# LCH =
# GEOGRAPHICAL DOMAIN, GEOGRAPHICAL RESOLUTION AND OUTPUT TIME STEP =
# =
# NOTE: RES = spatial resolution in km =
# TSTEP = request output time step (not the model time step) =
#========================================================================
#
export SITEID="LCH"
export REGIONID="SR"
export NELAT="30.30"
export NELON="-90.43"
export SWLAT="27.41"
export SWLON="-95.03"
export RES="1.8"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# =
# These nested grids are non-telescopic grids (i.e all of them are =
# nested in the outer grid, and get the boundary conditions only from it) =
# Later versions of NWPS will either allow for telescopic nesting or =
# will be run on an unstructured grid characterized with a fine mesh =
# over the nearshore zones and a coarser mesh across the offshore areas. =
# =
#========================================================================
#
# TO DO: Update the domains below to reflect the area/s that you are
# interested in (must reside inside of you outer domain defined
# above). Also, remember to remove or comment out the remaining
# example nests below that were configured for another area. Once
# your nests are configured, just toggle the NESTGRIDS to '1'
# (Default configuration is off or '0') and you will have control
# from the GFE GUI to activate your nests during your runs.
#
# STATIONARY VS NONSTATIONARY MODE:
#
# STATN=STA for STATIONARY RUNS, STATN=NON for NON-STATIONARY RUNS.
# The default value is NONstationary for CG1 (outer grid) and STAtionary
# for the nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid. In general,
# if your domain that you define as a nest below is >= 100 km^2, then
# set STATN=NON. For the very small domains or nests (<= 100 km^2)
# set STATN=STA.
#
# ACTIVATE NEST/S: default is off below
#
# NESTGRIDS="0" ... turns off nest options
# NESTGRIDS="1" ... turns on nest options
#
export NESTGRIDS="1"
#
# NEST 1
export NELATN1="29.88"
export NELONN1="-91.60"
export SWLATN1="29.43"
export SWLONN1="-92.30"
export RESN1=".5"
export TSTEPN1="3"
export STATN1="NON"
#
# NEST 2
export NELATN2="26.52"
export NELONN2="-79.98"
export SWLATN2="26.40"
export SWLONN2="-80.07"
export RESN2=".5"
export TSTEPN2="3"
export STATN2="STA"
#
# NEST 3
export NELATN3="26.37"
export NELONN3="-80.00"
export SWLATN3="26.25"
export SWLONN3="-80.09"
export RESN3=".5"
export TSTEPN3="3"
export STATN3="STA"
#
# NEST 4
export NELATN4="25.87"
export NELONN4="-80.04"
export SWLATN4="25.75"
export SWLONN4="-80.13"
export RESN4=".5"
export TSTEPN4="3"
export STATN4="STA"
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS
# =
# NOTE TO USER: the lat/lon points specified can be changed for any =
# arbitrary point of interest within your outer domain defined above. =
# One default buoy location has already been configured for you =
# below. Add more as needed. =
#
# NOTE: These do not have to match NDBC locations. =
#
#========================================================================
# Spectra points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 ...."
#
export SPECPOINTS="42035:29.232:-92.413"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOLCHN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be changed in a new version, the user can get 1d-spectra but not g-h plots).
#
export WVTONCG="0"
export NELATWT="30.30"
export NELONWT="-90.43"
export SWLATWT="27.41"
export SWLONWT="-95.03"
export GEORESWT="3.5"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="LCH"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.LCH54.spec.swan,multi_1.LCH59.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#BOUN SEG XY 264.97 28.55 264.97 27.41 VAR FILE 0.00 'multi_1.LCH51.spec.swan' 1 &
# 0.32 'multi_1.LCH52.spec.swan' 1 &
# 0.76 'multi_1.LCH53.spec.swan' 1 &
# 1.14 'multi_1.LCH54.spec.swan' 1
#$
#$LCH southern side of grid: pt 59-54
#$
#BOUN SEG XY 269.57 27.41 264.97 27.41 VAR FILE 0.00 'multi_1.LCH59.spec.swan' 1 &
# 1.26 'multi_1.LCH58.spec.swan' 1 &
# 2.23 'multi_1.LCH57.spec.swan' 1 &
# 3.10 'multi_1.LCH56.spec.swan' 1 &
# 4.02 'multi_1.LCH55.spec.swan' 1 &
# 4.60 'multi_1.LCH54.spec.swan.cp' 1
#$
#$LCH eastern side of grid: point 59-63
#$
#BOUN SEG XY 269.57 28.68 269.57 27.41 VAR FILE 0.00 'multi_1.LCH63.spec.swan' 1 &
# 0.16 'multi_1.LCH62.spec.swan' 1 &
# 0.52 'multi_1.LCH61.spec.swan' 1 &
# 0.94 'multi_1.LCH60.spec.swan' 1 &
# 1.27 'multi_1.LCH59.spec.swan.cp' 1
#$END BOUNSEG
#

View file

@ -0,0 +1,181 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 02/01/13
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# LIX =
# GEOGRAPHICAL DOMAIN, GEOGRAPHICAL RESOLUTION AND OUTPUT TIME STEP =
# =
# NOTE: RES = spatial resolution in km =
# TSTEP = request output time step (not the model time step) =
#========================================================================
#
export SITEID="LIX"
export REGIONID="SR"
export NELAT="30.60"
export NELON="-87.40"
export SWLAT="27.50"
export SWLON="-91.80"
export RES="1.8"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# =
# These nested grids are non-telescopic grids (i.e all of them are =
# nested in the outer grid, and get the boundary conditions only from it) =
# Later versions of NWPS will either allow for telescopic nesting or =
# will be run on an unstructured grid characterized with a fine mesh =
# over the nearshore zones and a coarser mesh across the offshore areas. =
# =
#========================================================================
#
# TO DO: Update the domains below to reflect the area/s that you are
# interested in (must reside inside of you outer domain defined
# above). Also, remember to remove or comment out the remaining
# example nests below that were configured for another area. Once
# your nests are configured, just toggle the NESTGRIDS to '1'
# (Default configuration is off or '0') and you will have control
# from the GFE GUI to activate your nests during your runs.
#
# STATIONARY VS NONSTATIONARY MODE:
#
# STATN=STA for STATIONARY RUNS, STATN=NON for NON-STATIONARY RUNS.
# The default value is NONstationary for CG1 (outer grid) and STAtionary
# for the nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid. In general,
# if your domain that you define as a nest below is >= 100 km^2, then
# set STATN=NON. For the very small domains or nests (<= 100 km^2)
# set STATN=STA.
#
# ACTIVATE NEST/S: default is on for LIX
#
# NESTGRIDS="0" ... turns off nest options
# NESTGRIDS="1" ... turns on nest options
#
export NESTGRIDS="0"
#
# NEST 1
export NELATN1="30.40"
export NELONN1="-88.8"
export SWLATN1="29.3"
export SWLONN1="-90.6"
export RESN1="1.25"
export TSTEPN1="3"
export STATN1="STA"
#
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS
# =
# NOTE TO USER: the lat/lon points specified can be changed for any =
# arbitrary point of interest within your outer domain defined above. =
# One default buoy locations has already been configured for you =
# below. Add more as needed. =
#
# NOTE: These do not have to match NDBC locations. =
#
#========================================================================
# Spectra points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 ...."
#
export SPECPOINTS="42040:29.212:-88.207"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOLIXN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be changed in a new version, the user can get 1d-spectra but not g-h plots).
#
export WVTONCG="0"
export NELATWT="30.60"
export NELONWT="-87.40"
export SWLATWT="27.50"
export SWLONWT="-91.80"
export GEORESWT="3.5"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="LIX"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.LIX54.spec.swan,multi_1.LIX63.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#BOUN SEG XY 268.2 28.90 268.2 27.50 VAR FILE 0.00 'multi_1.LIX51.spec.swan' 1 &
# 0.50 'multi_1.LIX52.spec.swan' 1 &
# 1.00 'multi_1.LIX53.spec.swan' 1 &
# 1.50 'multi_1.LIX54.spec.swan' 1
#$
#BOUN SEG XY 272.6 27.50 268.2 27.50 VAR FILE 0.00 'multi_1.LIX63.spec.swan' 1 &
# 0.50 'multi_1.LIX62.spec.swan' 1 &
# 1.00 'multi_1.LIX61.spec.swan' 1 &
# 1.50 'multi_1.LIX60.spec.swan' 1 &
# 2.00 'multi_1.LIX59.spec.swan' 1 &
# 2.50 'multi_1.LIX58.spec.swan' 1 &
# 3.00 'multi_1.LIX57.spec.swan' 1 &
# 3.50 'multi_1.LIX56.spec.swan' 1 &
# 4.00 'multi_1.LIX55.spec.swan' 1 &
# 4.40 'multi_1.LIX54.spec.swan.cp' 1
#$
#BOUN SEG XY 272.6 30.00 272.6 27.50 VAR FILE 0.00 'multi_1.LIX68.spec.swan' 1 &
# 0.50 'multi_1.LIX67.spec.swan' 1 &
# 1.00 'multi_1.LIX66.spec.swan' 1 &
# 1.50 'multi_1.LIX65.spec.swan' 1 &
# 2.00 'multi_1.LIX64.spec.swan' 1 &
# 2.50 'multi_1.LIX63.spec.swan.cp' 1
#$END BOUNSEG
#

View file

@ -0,0 +1,195 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 11/08/14 by alex.gibbs@onaa.gov
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# LOX =
# GEOGRAPHICAL DOMAIN, GEOGRAFICAL RESOLUTION AND OUTPUT TIME STEP =
#========================================================================
export SITEID="LOX"
export REGIONID="WR"
export NELAT="36.10"
export NELON="-117.30"
export SWLAT="32.60"
export SWLON="-123.36"
export RES="2.0"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# These nested grids are non-telescopic grids i.e all of them are =
# nested in the main grid, and get the boundary conditions only from it =
# =
#========================================================================
# NESTGRIDS: Number of nested grids, if = 0, nested grids and
# location numbers below will be ignore regardless of input specifications
#
# STATN=STA for STATIONARY RUNS, STAT=NON for NON-STATIONARY RUNS
# The default values is NONstationary for CG1 and STAtionary for the
# nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid.
#
export NESTGRIDS="0"
# LOX Nest
export NELATN1=""
export NELONN1=""
export SWLATN1=""
export SWLONN1=""
export RESN1=".1"
export TSTEPN1="3"
export STATN1="NON"
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS =
#========================================================================
# Specta points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 name5:lat5:lon5 ...."
#
export SPECPOINTS="46028:35.741:-121.884 46219:33.221:-119.881 46069:33.674:-120.212 46221:33.855:-118.633"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOLOXN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be change in a new version, the user can get 1d-spectra but not g-h plots).
export WVTONCG="0"
export NELATWT="36.10"
export NELONWT="-117.30"
export SWLATWT="32.60"
export SWLONWT="-123.36"
export GEORESWT="3.0"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="NW-LOX"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.NW-LOX51.spec.swan, multi_1.NW-LOX58.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#BOUN SEG XY 238.14 36.10 236.64 36.10 VAR FILE 0.00 'multi_1.NW-LOX62.spec.swan' 1 &
#0.50 'multi_1.NW-LOX61.spec.swan' 1 &
#1.00 'multi_1.NW-LOX60.spec.swan' 1 &
#1.50 'multi_1.NW-LOX58.spec.swan' 1
#$
#BOUN SEG XY 236.64 36.10 236.64 32.60 VAR FILE 0.00 'multi_1.NW-LOX58.spec.swan.cp' 1 &
#0.50 'multi_1.NW-LOX57.spec.swan' 1 &
#1.00 'multi_1.NW-LOX56.spec.swan' 1 &
#1.50 'multi_1.NW-LOX55.spec.swan' 1 &
#2.00 'multi_1.NW-LOX54.spec.swan' 1 &
#2.50 'multi_1.NW-LOX53.spec.swan' 1 &
#3.00 'multi_1.NW-LOX52.spec.swan' 1 &
#3.50 'multi_1.NW-LOX51.spec.swan' 1
#$
#BOUN SEG XY 242.64 32.60 236.64 32.60 VAR FILE 0.00 'multi_1.NW-LOX75.spec.swan' 1 &
#0.50 'multi_1.NW-LOX74.spec.swan' 1 &
#1.00 'multi_1.NW-LOX73.spec.swan' 1 &
#1.50 'multi_1.NW-LOX72.spec.swan' 1 &
#2.00 'multi_1.NW-LOX71.spec.swan' 1 &
#2.50 'multi_1.NW-LOX70.spec.swan' 1 &
#3.00 'multi_1.NW-LOX69.spec.swan' 1 &
#3.50 'multi_1.NW-LOX68.spec.swan' 1 &
#4.00 'multi_1.NW-LOX67.spec.swan' 1 &
#4.50 'multi_1.NW-LOX66.spec.swan' 1 &
#5.00 'multi_1.NW-LOX65.spec.swan' 1 &
#5.50 'multi_1.NW-LOX64.spec.swan' 1 &
#6.00 'multi_1.NW-LOX51.spec.swan.cp' 1
#$END BOUNSEG
#
#========================================================================
# RIP CURRENT PROGRAM (SEE NWPS MANUAL) =
#========================================================================
# IF RIP CURRENT PROGRAM WILL BE RUN, then RIPCONT=1, Otherwise =0;
# Setting up RIPCONT here to zero will permanently disable RIP program.
#
export RIPPROG="0"
export RIPDOMAIN="CG2"
export RIPCONT="5m"
#
#___________________________________________________________________________
# RAY Section: Define a pair of rays to drop data out along critical contours
# for rip current program.
#
# Example: for data output every 2km along a 5m bathy contour
#
# RAY 'rayname' xp yp xq yq int xp yp xq yq
#
# RAY 'ray1' 282.85 34.628 282.85 34.62 2000 283.00 34.655 283.00 34.62
#
# ISOLINE '5mcont' 'ray1' BOTtom 10
# TABLE '5mcont' HEAD '5mtable' HSIGN TPS PDIR OUTPUT 20110825.1200 3.0 HR
#_____________________________________________________________________________
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD RIP COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE RIP
# CURRENTS (RIPCONT="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
# POIN '5mcont' 279.887 25.8725
#
#$RIP LINES
#$ Ray for 5m and 20m contour data.
#$
#RAY 'ray1' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '5mcont' 'ray1' BOTtom 5
#TABLE '5mcont' HEAD '5m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#RAY 'ray2' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '20mcont' 'ray1' BOTtom 20
#TABLE '20mcont' HEAD '20m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#$END RIP
#

View file

@ -0,0 +1,177 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 11/08/14 by alex.gibbs@onaa.gov
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# LWX =
# GEOGRALWXCAL DOMAIN, GEOGRAFICAL RESOLUTION AND OUTPUT TIME STEP =
#========================================================================
export SITEID="LWX"
export REGIONID="ER"
export NELAT="39.70"
export NELON="-75.40"
export SWLAT="36.75"
export SWLON="-77.80"
export RES="2.0"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# These nested grids are non-telescopic grids i.e all of them are =
# nested in the main grid, and get the boundary conditions only from it =
# =
#========================================================================
# NESTGRIDS: Number of nested grids, if = 0, nested grids and
# location numbers below will be ignore regardless of input specifications
#
# STATN=STA for STATIONARY RUNS, STAT=NON for NON-STATIONARY RUNS
# The default values is NONstationary for CG1 and STAtionary for the
# nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid.
#
export NESTGRIDS="0"
# LWX Nest
export NELATN1=""
export NELONN1=""
export SWLATN1=""
export SWLONN1=""
export RESN1=".1"
export TSTEPN1="3"
export STATN1="NON"
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS =
#========================================================================
# Specta points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 name5:lat5:lon5 ...."
#
export SPECPOINTS="44099:36.915:-75.720 44043:39.152:-76.391"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOLWXN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRALWXCAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be change in a new version, the user can get 1d-spectra but not g-h plots).
export WVTONCG="0"
export NELATWT="39.70"
export NELONWT="-75.40"
export SWLATWT="36.75"
export SWLONWT="-77.80"
export GEORESWT="3.0"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="NW-LWX"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.NW-LWX51.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#BOUN SEG XY 284.1 36.75 284.60 36.75 VAR FILE 0.00 'multi_1.NW-LWX53.spec.swan' 1 &
#0.25 'multi_1.NW-LWX52.spec.swan' 1 &
#0.50 'multi_1.NW-LWX51.spec.swan.cp' 1
#$
#BOUN SEG XY 284.60 36.75 284.60 37.75 VAR FILE 0.00 'multi_1.NW-LWX51.spec.swan' 1 &
#0.25 'multi_1.NW-LWX54.spec.swan' 1 &
#0.50 'multi_1.NW-LWX55.spec.swan' 1 &
#0.75 'multi_1.NW-LWX56.spec.swan' 1 &
#1.00 'multi_1.NW-LWX57.spec.swan' 1
#$END BOUNSEG
#
#========================================================================
# RIP CURRENT PROGRAM (SEE NWPS MANUAL) =
#========================================================================
# IF RIP CURRENT PROGRAM WILL BE RUN, then RIPCONT=1, Otherwise =0;
# Setting up RIPCONT here to zero will permanently disable RIP program.
#
export RIPPROG="0"
export RIPDOMAIN="CG2"
export RIPCONT="5m"
#
#___________________________________________________________________________
# RAY Section: Define a pair of rays to drop data out along critical contours
# for rip current program.
#
# Example: for data output every 2km along a 5m bathy contour
#
# RAY 'rayname' xp yp xq yq int xp yp xq yq
#
# RAY 'ray1' 282.85 34.628 282.85 34.62 2000 283.00 34.655 283.00 34.62
#
# ISOLINE '5mcont' 'ray1' BOTtom 10
# TABLE '5mcont' HEAD '5mtable' HSIGN TPS PDIR OUTPUT 20110825.1200 3.0 HR
#_____________________________________________________________________________
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD RIP COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE RIP
# CURRENTS (RIPCONT="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
# POIN '5mcont' 279.887 25.8725
#
#$RIP LINES
#$ Ray for 5m and 20m contour data.
#$
#RAY 'ray1' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '5mcont' 'ray1' BOTtom 5
#TABLE '5mcont' HEAD '5m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#RAY 'ray2' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '20mcont' 'ray1' BOTtom 20
#TABLE '20mcont' HEAD '20m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#$END RIP
#

View file

@ -0,0 +1,223 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 02/01/13
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# MFL =
# GEOGRAPHICAL DOMAIN, GEOGRAFICAL RESOLUTION AND OUTPUT TIME STEP =
#========================================================================
export SITEID="MFL"
export REGIONID="SR"
export NELAT="27.70"
export NELON="-78.41"
export SWLAT="24.10"
export SWLON="-83.54"
export RES="2.0"
#export RES="6"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# These nested grids are non-telescopic grids i.e all of them are =
# nested in the main grid, and get the boundary conditions only from it =
# =
#========================================================================
# NESTGRIDS: Number of nested grids, if = 0, nested grids and
# location numbers below will be ignore regardless of input specifications
#
# STATN=STA for STATIONARY RUNS, STAT=NON for NON-STATIONARY RUNS
# The default values is NONstationary for CG1 and STAtionary for the
# nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid.
#
export NESTGRIDS="4"
# MIAMI BEACH - HAULOVER INLET
export NELATN1="26.00"
export NELONN1="-79.87"
export SWLATN1="25.85"
export SWLONN1="-80.13"
export RESN1=".1"
export TSTEPN1="3"
export STATN1="NON"
#
# NAPLES - VANDERBILT BEACH - Naples Pier surf spot - CAM AVAILABLE TO MONITOR vanderbilt
export NELATN2="26.21"
export NELONN2="-81.80"
export SWLATN2="26.13"
export SWLONN2="-81.90"
export RESN2=".120"
export TSTEPN2="3"
export STATN2="NON"
#
# JUPITER - JUPITER INLET - CAM AVAILABLE
export NELATN3="26.945"
export NELONN3="-80.02"
export SWLATN3="26.89"
export SWLONN3="-80.07"
export RESN3=".12"
export TSTEPN3="3"
export STATN3="NON"
#
# FORT LAUDERDALE - DEERFIELD BEACH PIER TO LAUDERDALE BY THE SEA - CAM AVAILALBE
export NELATN4="26.25"
export NELONN4="-80.04"
export SWLATN4="26.18"
export SWLONN4="-80.11"
export RESN4=".12"
export TSTEPN4="3"
export STATN4="NON"
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS =
#========================================================================
# Specta points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 name5:lat5:lon5 ...."
#
export SPECPOINTS="42023:25.300:-82.000 GS:26.750:-79.500 NMIAnch:25.860:-80.090 DFDBCH:26.280:-80.040 WPB:26.750:-80.000 Jupiter:27.200:-80.100 41114:27.551:-80.225"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOMIAN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
#IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be change in a new version, the user can get 1d-spectra but not g-h plots).
export WVTONCG="0"
export NELATWT="27.70"
export NELONWT="-78.41"
export SWLATWT="24.10"
export SWLONWT="-83.54"
#export SWLONWT="-81.00" #For testing. Reduces the domain for wave tracking
export GEORESWT="3.0"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="MIA"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.MIA51.spec.swan,multi_1.MIA56.spec.swan,multi_1.MIA62.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#BOUN SEG XY 276.46 27.70 276.46 24.10 VAR FILE 0.00 'multi_1.MIA56.spec.swan' 1 &
# 0.72 'multi_1.MIA55.spec.swan' 1 &
# 1.44 'multi_1.MIA54.spec.swan' 1 &
# 2.16 'multi_1.MIA53.spec.swan' 1 &
# 2.88 'multi_1.MIA52.spec.swan' 1 &
# 3.60 'multi_1.MIA51.spec.swan' 1
#$
#BOUN SEG XY 281.59 27.70 276.46 27.70 VAR FILE 0.00 'multi_1.MIA62.spec.swan' 1 &
# 0.40 'multi_1.MIA61.spec.swan' 1 &
# 0.80 'multi_1.MIA60.spec.swan' 1 &
# 1.20 'multi_1.MIA59.spec.swan' 1 &
# 1.60 'multi_1.MIA58.spec.swan' 1 &
# 5.13 'multi_1.MIA56.spec.swan.cp' 1
#$
#BOUN SEG XY 281.59 24.10 281.59 27.70 VAR FILE 0.00 'multi_1.MIA67.spec.swan' 1 &
# 1.80 'multi_1.MIA66.spec.swan' 1 &
# 2.10 'multi_1.MIA65.spec.swan' 1 &
# 2.40 'multi_1.MIA64.spec.swan' 1 &
# 3.30 'multi_1.MIA63.spec.swan' 1 &
# 3.60 'multi_1.MIA62.spec.swan.cp' 1
#$
#BOUN SEG XY 276.46 24.10 281.59 24.10 VAR FILE 0.00 'multi_1.MIA51.spec.swan.cp' 1 &
# 0.51 'multi_1.MIA76.spec.swan' 1 &
# 1.03 'multi_1.MIA75.spec.swan' 1 &
# 1.54 'multi_1.MIA74.spec.swan' 1 &
# 2.05 'multi_1.MIA73.spec.swan' 1 &
# 2.57 'multi_1.MIA72.spec.swan' 1 &
# 3.08 'multi_1.MIA71.spec.swan' 1 &
# 3.59 'multi_1.MIA70.spec.swan' 1 &
# 4.10 'multi_1.MIA69.spec.swan' 1
#$END BOUNSEG
#
#========================================================================
# RIP CURRENT PROGRAM (SEE NWPS MANUAL) =
#========================================================================
# IF RIP CURRENT PROGRAM WILL BE RUN, then RIPCONT=1, Otherwise =0;
# Setting up RIPCONT here to zero will permanently disable RIP program.
#
export RIPPROG="1"
export RIPDOMAIN="CG2"
export RIPCONT="5m"
#
#___________________________________________________________________________
# RAY Section: Define a pair of rays to drop data out along critical contours
# for rip current program.
#
# Example: for data output every 2km along a 5m bathy contour
#
# RAY 'rayname' xp yp xq yq int xp yp xq yq
#
# RAY 'ray1' 282.85 34.628 282.85 34.62 2000 283.00 34.655 283.00 34.62
#
# ISOLINE '5mcont' 'ray1' BOTtom 10
# TABLE '5mcont' HEAD '5mtable' HSIGN TPS PDIR OUTPUT 20110825.1200 3.0 HR
#_____________________________________________________________________________
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD RIP COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE RIP
# CURRENTS (RIPCONT="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
# POIN '5mcont' 279.887 25.8725
#
#$RIP LINES
#$ Ray for 5m contour data.
#$
#RAY 'ray1' 279.88 25.85 279.91 25.85 8 279.88 25.895 279.91 25.895
#ISOLINE '5mcont' 'ray1' BOTtom 5
#TABLE '5mcont' HEAD '5m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT YYYYMMDD.HHMM H.M HR
#$
#$END RIP
#

View file

@ -0,0 +1,192 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 11/08/14 by alex.gibbs@onaa.gov
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# MFR =
# GEOGRAPHICAL DOMAIN, GEOGRAFICAL RESOLUTION AND OUTPUT TIME STEP =
#========================================================================
export SITEID="MFR"
export REGIONID="WR"
export NELAT="44.45"
export NELON="-123.65"
export SWLAT="41.00"
export SWLON="-127.30"
export RES="2.0"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# These nested grids are non-telescopic grids i.e all of them are =
# nested in the main grid, and get the boundary conditions only from it =
# =
#========================================================================
# NESTGRIDS: Number of nested grids, if = 0, nested grids and
# location numbers below will be ignore regardless of input specifications
#
# STATN=STA for STATIONARY RUNS, STAT=NON for NON-STATIONARY RUNS
# The default values is NONstationary for CG1 and STAtionary for the
# nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid.
#
export NESTGRIDS="0"
# MFR Nest
export NELATN1=""
export NELONN1=""
export SWLATN1=""
export SWLONN1=""
export RESN1=".1"
export TSTEPN1="3"
export STATN1="NON"
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS =
#========================================================================
# Specta points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 name5:lat5:lon5 ...."
#
export SPECPOINTS="46015:42.764:-124.832 46027:41.850:-124.381 46229:43.767:-124.549"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOMFRN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be change in a new version, the user can get 1d-spectra but not g-h plots).
export WVTONCG="0"
export NELATWT="44.45"
export NELONWT="-123.65"
export SWLATWT="41.00"
export SWLONWT="-127.30"
export GEORESWT="3.0"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="NW-MFR"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.NW-MFR51.spec.swan, multi_1.NW-MFR58.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#BOUN SEG XY 232.70 41.00 232.70 44.45 VAR FILE 0.00 'multi_1.NW-MFR51.spec.swan' 1 &
#0.50 'multi_1.NW-MFR52.spec.swan' 1 &
#1.00 'multi_1.NW-MFR53.spec.swan' 1 &
#1.50 'multi_1.NW-MFR54.spec.swan' 1 &
#2.00 'multi_1.NW-MFR55.spec.swan' 1 &
#2.50 'multi_1.NW-MFR56.spec.swan' 1 &
#3.00 'multi_1.NW-MFR57.spec.swan' 1 &
#3.45 'multi_1.NW-MFR58.spec.swan.cp' 1
#$
#BOUN SEG XY 232.70 44.45 235.70 44.45 VAR FILE 0.00 'multi_1.NW-MFR58.spec.swan' 1 &
#0.50 'multi_1.NW-MFR59.spec.swan' 1 &
#1.00 'multi_1.NW-MFR60.spec.swan' 1 &
#1.50 'multi_1.NW-MFR61.spec.swan' 1 &
#2.00 'multi_1.NW-MFR62.spec.swan' 1 &
#2.50 'multi_1.NW-MFR63.spec.swan' 1 &
#3.00 'multi_1.NW-MFR64.spec.swan' 1
#$
#BOUN SEG XY 232.70 41.00 235.70 41.00 VAR FILE 0.00 'multi_1.NW-MFR51.spec.swan.cp' 1 &
#0.50 'multi_1.NW-MFR70.spec.swan' 1 &
#1.00 'multi_1.NW-MFR69.spec.swan' 1 &
#1.50 'multi_1.NW-MFR68.spec.swan' 1 &
#2.00 'multi_1.NW-MFR67.spec.swan' 1 &
#2.50 'multi_1.NW-MFR66.spec.swan' 1 &
#3.00 'multi_1.NW-MFR65.spec.swan' 1
#$END BOUNSEG
#
#========================================================================
# RIP CURRENT PROGRAM (SEE NWPS MANUAL) =
#========================================================================
# IF RIP CURRENT PROGRAM WILL BE RUN, then RIPCONT=1, Otherwise =0;
# Setting up RIPCONT here to zero will permanently disable RIP program.
#
export RIPPROG="0"
export RIPDOMAIN="CG2"
export RIPCONT="5m"
#
#___________________________________________________________________________
# RAY Section: Define a pair of rays to drop data out along critical contours
# for rip current program.
#
# Example: for data output every 2km along a 5m bathy contour
#
# RAY 'rayname' xp yp xq yq int xp yp xq yq
#
# RAY 'ray1' 282.85 34.628 282.85 34.62 2000 283.00 34.655 283.00 34.62
#
# ISOLINE '5mcont' 'ray1' BOTtom 10
# TABLE '5mcont' HEAD '5mtable' HSIGN TPS PDIR OUTPUT 20110825.1200 3.0 HR
#_____________________________________________________________________________
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD RIP COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE RIP
# CURRENTS (RIPCONT="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
# POIN '5mcont' 279.887 25.8725
#
#$RIP LINES
#$ Ray for 5m and 20m contour data.
#$
#RAY 'ray1' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '5mcont' 'ray1' BOTtom 5
#TABLE '5mcont' HEAD '5m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#RAY 'ray2' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '20mcont' 'ray1' BOTtom 20
#TABLE '20mcont' HEAD '20m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#$END RIP
#

View file

@ -0,0 +1,187 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 11/08/14 by alex.gibbs@onaa.gov
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# MFL =
# GEOGRAPHICAL DOMAIN, GEOGRAFICAL RESOLUTION AND OUTPUT TIME STEP =
#========================================================================
export SITEID="MHX"
export REGIONID="ER"
export NELAT="37.1"
export NELON="-75.25"
export SWLAT="33.85"
export SWLON="-78.00"
export RES="2.0"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# These nested grids are non-telescopic grids i.e all of them are =
# nested in the main grid, and get the boundary conditions only from it =
# =
#========================================================================
# NESTGRIDS: Number of nested grids, if = 0, nested grids and
# location numbers below will be ignore regardless of input specifications
#
# STATN=STA for STATIONARY RUNS, STAT=NON for NON-STATIONARY RUNS
# The default values is NONstationary for CG1 and STAtionary for the
# nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid.
#
export NESTGRIDS="1"
# MHX Nest
export NELATN1=""
export NELONN1=""
export SWLATN1=""
export SWLONN1=""
export RESN1=".1"
export TSTEPN1="3"
export STATN1="NON"
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS =
#========================================================================
# Specta points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 name5:lat5:lon5 ...."
#
export SPECPOINTS="41109:34.487:-77.3 44095:35.750:-75.33 41036:34.207:-76.949 44014:36.611:-74.842 41025:35.006:-75.402"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOMHXN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be change in a new version, the user can get 1d-spectra but not g-h plots).
export WVTONCG="0"
export NELATWT="37.1"
export NELONWT="-75.25"
export SWLATWT="33.85"
export SWLONWT="-78.00"
export GEORESWT="3.5"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="NW-MHX"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.NW-MHX58.spec.swan,multi_1.NW-MHX64.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#BOUN SEG XY 284.17 36.60 285.25 36.60 VAR FILE 0.00 'multi_1.NW-MHX67.spec.swan' 1 &
# 0.08 'multi_1.NW-MHX66.spec.swan' 1 &
# 0.58 'multi_1.NW-MHX65.spec.swan' 1 &
# 1.08 'multi_1.NW-MHX64.spec.swan.cp' 1 &
#$
#BOUN SEG XY 285.25 36.35 285.25 33.85 VAR FILE 0.00 'multi_1.NW-MHX63.spec.swan' 1 &
# 0.50 'multi_1.NW-MHX62.spec.swan' 1 &
# 1.00 'multi_1.NW-MHX61.spec.swan' 1 &
# 1.50 'multi_1.NW-MHX60.spec.swan' 1 &
# 2.00 'multi_1.NW-MHX59.spec.swan' 1 &
# 2.50 'multi_1.NW-MHX58.spec.swan.cp' 1
#$
#BOUN SEG XY 285.09 33.85 282.09 33.85 VAR FILE 0.00 'multi_1.NW-MHX57.spec.swan' 1 &
# 0.50 'multi_1.NW-MHX56.spec.swan' 1 &
# 1.00 'multi_1.NW-MHX55.spec.swan' 1 &
# 1.50 'multi_1.NW-MHX54.spec.swan' 1 &
# 2.00 'multi_1.NW-MHX53.spec.swan' 1 &
# 2.50 'multi_1.NW-MHX52.spec.swan' 1 &
# 3.00 'multi_1.NW-MHX51.spec.swan' 1
#$END BOUNSEG
#
#========================================================================
# RIP CURRENT PROGRAM (SEE NWPS MANUAL) =
#========================================================================
# IF RIP CURRENT PROGRAM WILL BE RUN, then RIPCONT=1, Otherwise =0;
# Setting up RIPCONT here to zero will permanently disable RIP program.
#
export RIPPROG="0"
export RIPDOMAIN="CG2"
export RIPCONT="5m"
#
#___________________________________________________________________________
# RAY Section: Define a pair of rays to drop data out along critical contours
# for rip current program.
#
# Example: for data output every 2km along a 5m bathy contour
#
# RAY 'rayname' xp yp xq yq int xp yp xq yq
#
# RAY 'ray1' 282.85 34.628 282.85 34.62 2000 283.00 34.655 283.00 34.62
#
# ISOLINE '5mcont' 'ray1' BOTtom 10
# TABLE '5mcont' HEAD '5mtable' HSIGN TPS PDIR OUTPUT 20110825.1200 3.0 HR
#_____________________________________________________________________________
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD RIP COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE RIP
# CURRENTS (RIPCONT="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
# POIN '5mcont' 279.887 25.8725
#
#$RIP LINES
#$ Ray for 5m and 20m contour data.
#$
#RAY 'ray1' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '5mcont' 'ray1' BOTtom 5
#TABLE '5mcont' HEAD '5m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#RAY 'ray2' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '20mcont' 'ray1' BOTtom 20
#TABLE '20mcont' HEAD '20m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#$END RIP
#

View file

@ -0,0 +1,184 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 05/11/13...ag
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# MLB =
# GEOGRAPHICAL DOMAIN, GEOGRAPHICAL RESOLUTION AND OUTPUT TIME STEP =
# =
# NOTE: RES = spatial resolution in km =
# TSTEP = request output time step (not the model time step) =
#========================================================================
#
export SITEID="MLB"
export REGIONID="SR"
export NELAT="30.00"
export NELON="-78.51"
export SWLAT="26.50"
export SWLON="-81.40"
export RES="1.8"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# =
# These nested grids are non-telescopic grids (i.e all of them are =
# nested in the outer grid, and get the boundary conditions only from it) =
# Later versions of NWPS will either allow for telescopic nesting or =
# will be run on an unstructured grid characterized with a fine mesh =
# over the nearshore zones and a coarser mesh across the offshore areas. =
# =
#========================================================================
#
# TO DO: Update the domains below to reflect the area/s that you are
# interested in (must reside inside of you outer domain defined
# above). Also, remember to remove or comment out the remaining
# example nests below that were configured for another area. Once
# your nests are configured, just toggle the NESTGRIDS to '1'
# (Default configuration is off or '0') and you will have control
# from the GFE GUI to activate your nests during your runs.
#
# STATIONARY VS NONSTATIONARY MODE:
#
# STATN=STA for STATIONARY RUNS, STATN=NON for NON-STATIONARY RUNS.
# The default value is NONstationary for CG1 (outer grid) and STAtionary
# for the nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid. In general,
# if your domain that you define as a nest below is >= 100 km^2, then
# set STATN=NON. For the very small domains or nests (<= 100 km^2)
# set STATN=STA.
#
# ACTIVATE NEST/S: default is off for MLB
#
# NESTGRIDS="0" ... turns off nest options
# NESTGRIDS="1" ... turns on nest options
#
export NESTGRIDS="0"
#
# NEST 1
export NELATN1="28.13"
export NELONN1="-82.38"
export SWLATN1="27.38"
export SWLONN1="-82.88"
export RESN1=".5"
export TSTEPN1="3"
export STATN1="STA"
#
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS
# =
# NOTE TO USER: the lat/lon points specified can be changed for any =
# arbitrary point of interest within your outer domain defined above. =
# One default buoy locations has already been configured for you =
# below. Add more as needed. =
#
# NOTE: These do not have to match NDBC locations. =
#
#========================================================================
# Spectra points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 ...."
#
export SPECPOINTS="41114:27.551:-80.225 41113:28.400:-80.530 41009:28.523:-80.184 "
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOMLBN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be changed in a new version, the user can get 1d-spectra but not g-h plots).
#
export WVTONCG="0"
export NELATWT="30.00"
export NELONWT="-78.51"
export SWLATWT="26.50"
export SWLONWT="-81.40"
export GEORESWT="3.5"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="MLB"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.MLB57.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#BOUN SEG XY 281.49 30.00 279.0 30.00 VAR FILE 0.00 'nah.MLB57.spec.swan' 1 &
#0.49 'nah.MLB56.spec.swan' 1 &
#0.89 'nah.MLB55.spec.swan' 1 &
#1.29 'nah.MLB54.spec.swan' 1 &
#1.69 'nah.MLB53.spec.swan' 1 &
#2.09 'nah.MLB52.spec.swan' 1 &
#2.49 'nah.MLB51.spec.swan' 1
#$
#BOUN SEG XY 281.49 27.30 281.49 30.00 VAR FILE 0.00 'nah.MLB66.spec.swan' 1 &
#0.30 'nah.MLB65.spec.swan' 1 &
#0.60 'nah.MLB64.spec.swan' 1 &
#0.90 'nah.MLB63.spec.swan' 1 &
#1.20 'nah.MLB62.spec.swan' 1 &
#1.50 'nah.MLB61.spec.swan' 1 &
#1.80 'nah.MLB60.spec.swan' 1 &
#2.10 'nah.MLB59.spec.swan' 1 &
#2.40 'nah.MLB58.spec.swan' 1 &
#2.70 'nah.MLB57.spec.swan.cp' 1
#$
#BOUN SEG XY 280.10 26.50 281.10 26.50 VAR FILE 0.00 'nah.MLB67.spec.swan' 1 &
#0.20 'nah.MLB68.spec.swan' 1 &
#0.40 'nah.MLB69.spec.swan' 1 &
#0.60 'nah.MLB70.spec.swan' 1 &
#0.80 'nah.MLB71.spec.swan' 1 &
#1.00 'nah.MLB72.spec.swan' 1
#$END BOUNSEG
#

View file

@ -0,0 +1,196 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 11/08/14 by alex.gibbs@onaa.gov
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# MTR =
# GEOGRAPHICAL DOMAIN, GEOGRAFICAL RESOLUTION AND OUTPUT TIME STEP =
#========================================================================
export SITEID="MTR"
export REGIONID="WR"
export NELAT="39.40"
export NELON="-120.74"
export SWLAT="35.00"
export SWLON="-125.80"
export RES="2.0"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# These nested grids are non-telescopic grids i.e all of them are =
# nested in the main grid, and get the boundary conditions only from it =
# =
#========================================================================
# NESTGRIDS: Number of nested grids, if = 0, nested grids and
# location numbers below will be ignore regardless of input specifications
#
# STATN=STA for STATIONARY RUNS, STAT=NON for NON-STATIONARY RUNS
# The default values is NONstationary for CG1 and STAtionary for the
# nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid.
#
export NESTGRIDS="0"
# MTR Nest
export NELATN1=""
export NELONN1=""
export SWLATN1=""
export SWLONN1=""
export RESN1=".1"
export TSTEPN1="3"
export STATN1="NON"
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS =
#========================================================================
# Specta points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 name5:lat5:lon5 ...."
#
export SPECPOINTS="46042:36.785:-122.469 46028:35.741:-121.884 46239:36.342:-122.102 46236:36.761:-121.947 46240:36.626:-121.907"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOMTRN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be change in a new version, the user can get 1d-spectra but not g-h plots).
export WVTONCG="0"
export NELATWT="39.40"
export NELONWT="-120.74"
export SWLATWT="35.00"
export SWLONWT="-125.80"
export GEORESWT="3.0"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="NW-MTR"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.NW-MTR51.spec.swan, multi_1.NW-MTR60.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#BOUN SEG XY 234.2 39.40 235.95 39.40 VAR FILE 0.00 'multi_1.NW-MTR51.spec.swan' 1 &
#0.50 'multi_1.NW-MTR72spec.swan' 1 &
#1.00 'multi_1.NW-MTR73.spec.swan' 1 &
#1.50 'multi_1.NW-MTR74.spec.swan' 1 &
#1.75 'multi_1.NW-MTR75.spec.swan' 1
#$
#BOUN SEG XY 234.2 35.00 234.2 39.40 VAR FILE 0.00 'multi_1.NW-MTR60.spec.swan' 1 &
#0.40 'multi_1.NW-MTR59.spec.swan' 1 &
#0.90 'multi_1.NW-MTR58.spec.swan' 1 &
#1.40 'multi_1.NW-MTR57.spec.swan' 1 &
#1.90 'multi_1.NW-MTR56.spec.swan' 1 &
#2.40 'multi_1.NW-MTR55.spec.swan' 1 &
#2.90 'multi_1.NW-MTR54.spec.swan' 1 &
#3.40 'multi_1.NW-MTR53.spec.swan' 1 &
#3.90 'multi_1.NW-MTR52.spec.swan' 1 &
#4.40 'multi_1.NW-MTR51.spec.swan.cp' 1
#$
#BOUN SEG XY 239.2 35.00 234.2 35.00 VAR FILE 0.00 'multi_1.NW-MTR70.spec.swan' 1 &
#0.50 'multi_1.NW-MTR69.spec.swan' 1 &
#1.00 'multi_1.NW-MTR68.spec.swan' 1 &
#1.50 'multi_1.NW-MTR67.spec.swan' 1 &
#2.00 'multi_1.NW-MTR66.spec.swan' 1 &
#2.50 'multi_1.NW-MTR65.spec.swan' 1 &
#3.00 'multi_1.NW-MTR64.spec.swan' 1 &
#3.50 'multi_1.NW-MTR63.spec.swan' 1 &
#4.00 'multi_1.NW-MTR62.spec.swan' 1 &
#4.50 'multi_1.NW-MTR61.spec.swan' 1 &
#5.00 'multi_1.NW-MTR60.spec.swan.cp' 1
#$END BOUNSEG
#
#========================================================================
# RIP CURRENT PROGRAM (SEE NWPS MANUAL) =
#========================================================================
# IF RIP CURRENT PROGRAM WILL BE RUN, then RIPCONT=1, Otherwise =0;
# Setting up RIPCONT here to zero will permanently disable RIP program.
#
export RIPPROG="0"
export RIPDOMAIN="CG2"
export RIPCONT="5m"
#
#___________________________________________________________________________
# RAY Section: Define a pair of rays to drop data out along critical contours
# for rip current program.
#
# Example: for data output every 2km along a 5m bathy contour
#
# RAY 'rayname' xp yp xq yq int xp yp xq yq
#
# RAY 'ray1' 282.85 34.628 282.85 34.62 2000 283.00 34.655 283.00 34.62
#
# ISOLINE '5mcont' 'ray1' BOTtom 10
# TABLE '5mcont' HEAD '5mtable' HSIGN TPS PDIR OUTPUT 20110825.1200 3.0 HR
#_____________________________________________________________________________
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD RIP COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE RIP
# CURRENTS (RIPCONT="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
# POIN '5mcont' 279.887 25.8725
#
#$RIP LINES
#$ Ray for 5m and 20m contour data.
#$
#RAY 'ray1' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '5mcont' 'ray1' BOTtom 5
#TABLE '5mcont' HEAD '5m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#RAY 'ray2' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '20mcont' 'ray1' BOTtom 20
#TABLE '20mcont' HEAD '20m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#$END RIP
#

View file

@ -0,0 +1,32 @@
# Low res test domain for MFL
# NOTE: This template is for testing only
export SITEID="MXX"
export REGIONID="SR"
export NELAT="27.70"
export NELON="-78.41"
export SWLAT="24.10"
export SWLON="-83.54"
export RES="8.5"
export TSTEP="3"
# Specta points defined as space delimited list of:
#
# "name1:lat:lon name2:lat:lon name3:lat:lon name4:lat:lon name5:lat:lon"
#
## export SPECPOINTS=""
# Hanson plot locations defined as space delimited list of:
#
# "name1:lat:lon name2:lat:lon name3:lat:lon name4:lat:lon name5:lat:lon"
#
## export HANSONPOINTS=""
# Wave partitions defined as space delimited list of
#
# type:y (to enable) or type:n (to disable)
#
# Comment out line to disable patitioning
#
## export PATITIONS="SigHeight:y PeakPer:y MeanDir:y WaveLeng:y DirSpread:y WindseaFrac:y WaveSteep:y"

View file

@ -0,0 +1,462 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 05/11/13...ag
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# NHC =
# GEOGRAPHICAL DOMAIN, GEOGRAPHICAL RESOLUTION AND OUTPUT TIME STEP =
# =
# NOTE: RES = spatial resolution in km =
# TSTEP = request output time step (not the model time step) =
#========================================================================
#
export SITEID="NHC"
export REGIONID="SR"
export NELAT="32.00"
export NELON="-10.00"
export SWLAT="3.00"
export SWLON="-98.00"
export RES="18"
export TSTEP="6"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# =
# These nested grids are non-telescopic grids (i.e all of them are =
# nested in the outer grid, and get the boundary conditions only from it) =
# Later versions of NWPS will either allow for telescopic nesting or =
# will be run on an unstructured grid characterized with a fine mesh =
# over the nearshore zones and a coarser mesh across the offshore areas. =
# =
#========================================================================
#
# TO DO: Update the domains below to reflect the area/s that you are
# interested in (must reside inside of you outer domain defined
# above). Also, remember to remove or comment out the remaining
# example nests below that were configured for another area. Once
# your nests are configured, just toggle the NESTGRIDS to '1'
# (Default configuration is off or '0') and you will have control
# from the GFE GUI to activate your nests during your runs.
#
# STATIONARY VS NONSTATIONARY MODE:
#
# STATN=STA for STATIONARY RUNS, STATN=NON for NON-STATIONARY RUNS.
# The default value is NONstationary for CG1 (outer grid) and STAtionary
# for the nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid. In general,
# if your domain that you define as a nest below is >= 100 km^2, then
# set STATN=NON. For the very small domains or nests (<= 100 km^2)
# set STATN=STA.
#
# ACTIVATE NEST/S: default is on for NHC
#
# NESTGRIDS="0" ... turns off nest options
# NESTGRIDS="1" ... turns on nest options
#
export NESTGRIDS="0"
#
# NEST 1
export NELATN1="28.13"
export NELONN1="-82.38"
export SWLATN1="27.38"
export SWLONN1="-82.88"
export RESN1=".5"
export TSTEPN1="3"
export STATN1="STA"
#
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS
# =
# NOTE TO USER: the lat/lon points specified can be changed for any =
# arbitrary point of interest within your outer domain defined above. =
# One default buoy locations has already been configured for you =
# below. Add more as needed. =
#
# NOTE: These do not have to match NDBC locations. =
#
#========================================================================
# Spectra points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 ...."
#
export SPECPOINTS="42020:26.966:-96.695 42035:29.232:-94.413 42002:25.79:-94 42360:26.7:-90.46 42001:25.888:-89.658 42067:30.043:-88.649 42040:29.212:-88.207 42012:30.065:-87.555 42003:26.044:-85.612 42036:28.5:-84.517 42099:27.34:-84.245 41114:27.551:-80.225 41113:28.4:-80.53 41009:28.519:-80.166 41012:30.041:-80.533 41112:30.719:-81.293 41008:31.402:-80.869 41010:28.906:-78.471"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDONHCN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be changed in a new version, the user can get 1d-spectra but not g-h plots).
#
export WVTONCG="0"
export NELATWT="32.00"
export NELONWT="-10.00"
export SWLATWT="3.00"
export SWLONWT="-98.00"
export GEORESWT="36"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="NW-NHC"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.NW-NHC227.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#BOUN SEG XY 279.5 32.00 350.00 32.00 VAR FILE 0.00 'multi_1.NW-NHC79.spec.swan' 1 &
#0.50 'multi_1.NW-NHC80.spec.swan' 1 &
#1.00 'multi_1.NW-NHC81.spec.swan' 1 &
#1.50 'multi_1.NW-NHC82.spec.swan' 1 &
#2.00 'multi_1.NW-NHC83.spec.swan' 1 &
#2.50 'multi_1.NW-NHC84.spec.swan' 1 &
#3.00 'multi_1.NW-NHC85.spec.swan' 1 &
#3.50 'multi_1.NW-NHC86.spec.swan' 1 &
#4.00 'multi_1.NW-NHC87.spec.swan' 1 &
#4.50 'multi_1.NW-NHC88.spec.swan' 1 &
#5.00 'multi_1.NW-NHC89.spec.swan' 1 &
#5.50 'multi_1.NW-NHC90.spec.swan' 1 &
#6.00 'multi_1.NW-NHC91.spec.swan' 1 &
#6.50 'multi_1.NW-NHC92.spec.swan' 1 &
#7.00 'multi_1.NW-NHC93.spec.swan' 1 &
#7.50 'multi_1.NW-NHC94.spec.swan' 1 &
#8.00 'multi_1.NW-NHC95.spec.swan' 1 &
#8.50 'multi_1.NW-NHC96.spec.swan' 1 &
#9.00 'multi_1.NW-NHC97.spec.swan' 1 &
#9.50 'multi_1.NW-NHC98.spec.swan' 1 &
#10.00 'multi_1.NW-NHC99.spec.swan' 1 &
#10.50 'multi_1.NW-NHC100.spec.swan' 1 &
#11.00 'multi_1.NW-NHC101.spec.swan' 1 &
#11.50 'multi_1.NW-NHC102.spec.swan' 1 &
#12.00 'multi_1.NW-NHC103.spec.swan' 1 &
#12.50 'multi_1.NW-NHC104.spec.swan' 1 &
#13.00 'multi_1.NW-NHC105.spec.swan' 1 &
#13.50 'multi_1.NW-NHC106.spec.swan' 1 &
#14.00 'multi_1.NW-NHC107.spec.swan' 1 &
#14.50 'multi_1.NW-NHC108.spec.swan' 1 &
#15.00 'multi_1.NW-NHC109.spec.swan' 1 &
#15.50 'multi_1.NW-NHC110.spec.swan' 1 &
#16.00 'multi_1.NW-NHC111.spec.swan' 1 &
#16.50 'multi_1.NW-NHC112.spec.swan' 1 &
#17.00 'multi_1.NW-NHC113.spec.swan' 1 &
#17.50 'multi_1.NW-NHC114.spec.swan' 1 &
#18.00 'multi_1.NW-NHC115.spec.swan' 1 &
#18.50 'multi_1.NW-NHC116.spec.swan' 1 &
#19.00 'multi_1.NW-NHC117.spec.swan' 1 &
#19.50 'multi_1.NW-NHC118.spec.swan' 1 &
#20.00 'multi_1.NW-NHC119.spec.swan' 1 &
#20.50 'multi_1.NW-NHC120.spec.swan' 1 &
#21.00 'multi_1.NW-NHC121.spec.swan' 1 &
#21.50 'multi_1.NW-NHC122.spec.swan' 1 &
#22.00 'multi_1.NW-NHC123.spec.swan' 1 &
#22.50 'multi_1.NW-NHC124.spec.swan' 1 &
#23.00 'multi_1.NW-NHC125.spec.swan' 1 &
#23.50 'multi_1.NW-NHC126.spec.swan' 1 &
#24.00 'multi_1.NW-NHC127.spec.swan' 1 &
#24.50 'multi_1.NW-NHC128.spec.swan' 1 &
#25.00 'multi_1.NW-NHC129.spec.swan' 1 &
#25.50 'multi_1.NW-NHC130.spec.swan' 1 &
#26.00 'multi_1.NW-NHC131.spec.swan' 1 &
#26.50 'multi_1.NW-NHC132.spec.swan' 1 &
#27.00 'multi_1.NW-NHC133.spec.swan' 1 &
#27.50 'multi_1.NW-NHC134.spec.swan' 1 &
#28.00 'multi_1.NW-NHC135.spec.swan' 1 &
#28.50 'multi_1.NW-NHC136.spec.swan' 1 &
#29.00 'multi_1.NW-NHC137.spec.swan' 1 &
#29.50 'multi_1.NW-NHC138.spec.swan' 1 &
#30.00 'multi_1.NW-NHC139.spec.swan' 1 &
#30.50 'multi_1.NW-NHC140.spec.swan' 1 &
#31.00 'multi_1.NW-NHC141.spec.swan' 1 &
#31.50 'multi_1.NW-NHC142.spec.swan' 1 &
#32.00 'multi_1.NW-NHC143.spec.swan' 1 &
#32.50 'multi_1.NW-NHC144.spec.swan' 1 &
#33.00 'multi_1.NW-NHC145.spec.swan' 1 &
#33.50 'multi_1.NW-NHC146.spec.swan' 1 &
#34.00 'multi_1.NW-NHC147.spec.swan' 1 &
#34.50 'multi_1.NW-NHC148.spec.swan' 1 &
#35.00 'multi_1.NW-NHC149.spec.swan' 1 &
#35.50 'multi_1.NW-NHC150.spec.swan' 1 &
#36.00 'multi_1.NW-NHC151.spec.swan' 1 &
#36.50 'multi_1.NW-NHC152.spec.swan' 1 &
#37.00 'multi_1.NW-NHC153.spec.swan' 1 &
#37.50 'multi_1.NW-NHC154.spec.swan' 1 &
#38.00 'multi_1.NW-NHC155.spec.swan' 1 &
#38.50 'multi_1.NW-NHC156.spec.swan' 1 &
#39.00 'multi_1.NW-NHC157.spec.swan' 1 &
#39.50 'multi_1.NW-NHC158.spec.swan' 1 &
#40.00 'multi_1.NW-NHC159.spec.swan' 1 &
#40.50 'multi_1.NW-NHC160.spec.swan' 1 &
#41.00 'multi_1.NW-NHC161.spec.swan' 1 &
#41.50 'multi_1.NW-NHC162.spec.swan' 1 &
#42.00 'multi_1.NW-NHC163.spec.swan' 1 &
#42.50 'multi_1.NW-NHC164.spec.swan' 1 &
#43.00 'multi_1.NW-NHC165.spec.swan' 1 &
#43.50 'multi_1.NW-NHC166.spec.swan' 1 &
#44.00 'multi_1.NW-NHC167.spec.swan' 1 &
#44.50 'multi_1.NW-NHC168.spec.swan' 1 &
#45.00 'multi_1.NW-NHC169.spec.swan' 1 &
#45.50 'multi_1.NW-NHC170.spec.swan' 1 &
#46.00 'multi_1.NW-NHC171.spec.swan' 1 &
#46.50 'multi_1.NW-NHC172.spec.swan' 1 &
#47.00 'multi_1.NW-NHC173.spec.swan' 1 &
#47.50 'multi_1.NW-NHC174.spec.swan' 1 &
#48.00 'multi_1.NW-NHC175.spec.swan' 1 &
#48.50 'multi_1.NW-NHC176.spec.swan' 1 &
#49.00 'multi_1.NW-NHC177.spec.swan' 1 &
#49.50 'multi_1.NW-NHC178.spec.swan' 1 &
#50.00 'multi_1.NW-NHC179.spec.swan' 1 &
#50.50 'multi_1.NW-NHC180.spec.swan' 1 &
#51.00 'multi_1.NW-NHC181.spec.swan' 1 &
#51.50 'multi_1.NW-NHC182.spec.swan' 1 &
#52.00 'multi_1.NW-NHC183.spec.swan' 1 &
#52.50 'multi_1.NW-NHC184.spec.swan' 1 &
#53.00 'multi_1.NW-NHC185.spec.swan' 1 &
#53.50 'multi_1.NW-NHC186.spec.swan' 1 &
#54.00 'multi_1.NW-NHC187.spec.swan' 1 &
#54.50 'multi_1.NW-NHC188.spec.swan' 1 &
#55.00 'multi_1.NW-NHC189.spec.swan' 1 &
#55.50 'multi_1.NW-NHC190.spec.swan' 1 &
#56.00 'multi_1.NW-NHC191.spec.swan' 1 &
#56.50 'multi_1.NW-NHC192.spec.swan' 1 &
#57.00 'multi_1.NW-NHC193.spec.swan' 1 &
#57.50 'multi_1.NW-NHC194.spec.swan' 1 &
#58.00 'multi_1.NW-NHC195.spec.swan' 1 &
#58.50 'multi_1.NW-NHC196.spec.swan' 1 &
#59.00 'multi_1.NW-NHC197.spec.swan' 1 &
#59.50 'multi_1.NW-NHC198.spec.swan' 1 &
#60.00 'multi_1.NW-NHC199.spec.swan' 1 &
#60.50 'multi_1.NW-NHC200.spec.swan' 1 &
#61.00 'multi_1.NW-NHC201.spec.swan' 1 &
#61.50 'multi_1.NW-NHC202.spec.swan' 1 &
#62.00 'multi_1.NW-NHC203.spec.swan' 1 &
#62.50 'multi_1.NW-NHC204.spec.swan' 1 &
#63.00 'multi_1.NW-NHC205.spec.swan' 1 &
#63.50 'multi_1.NW-NHC206.spec.swan' 1 &
#64.00 'multi_1.NW-NHC207.spec.swan' 1 &
#64.50 'multi_1.NW-NHC208.spec.swan' 1 &
#65.00 'multi_1.NW-NHC209.spec.swan' 1 &
#65.50 'multi_1.NW-NHC210.spec.swan' 1 &
#66.00 'multi_1.NW-NHC211.spec.swan' 1 &
#66.50 'multi_1.NW-NHC212.spec.swan' 1 &
#67.00 'multi_1.NW-NHC213.spec.swan' 1 &
#67.50 'multi_1.NW-NHC214.spec.swan' 1 &
#68.00 'multi_1.NW-NHC215.spec.swan' 1 &
#68.50 'multi_1.NW-NHC216.spec.swan' 1 &
#69.00 'multi_1.NW-NHC217.spec.swan' 1 &
#69.50 'multi_1.NW-NHC218.spec.swan' 1 &
#70.00 'multi_1.NW-NHC219.spec.swan' 1 &
#70.50 'multi_1.NW-NHC220.spec.swan' 1
#$ east side
#BOUN SEG XY 350.00 5.50 350.00 3.00 VAR FILE 0.00 'multi_1.NW-NHC222.spec.swan' 1 &
#0.50 'multi_1.NW-NHC223.spec.swan' 1 &
#1.00 'multi_1.NW-NHC224.spec.swan' 1 &
#1.50 'multi_1.NW-NHC225.spec.swan' 1 &
#2.00 'multi_1.NW-NHC226.spec.swan' 1 &
#2.50 'multi_1.NW-NHC227.spec.swan' 1
#$ south side
#BOUN SEG XY 262.00 3.00 350.00 3.00 VAR FILE 0.00 'multi_1.NW-NHC370.spec.swan' 1 &
#0.50 'multi_1.NW-NHC369.spec.swan' 1 &
#1.00 'multi_1.NW-NHC368.spec.swan' 1 &
#1.50 'multi_1.NW-NHC367.spec.swan' 1 &
#2.00 'multi_1.NW-NHC366.spec.swan' 1 &
#2.50 'multi_1.NW-NHC365.spec.swan' 1 &
#3.00 'multi_1.NW-NHC364.spec.swan' 1 &
#3.50 'multi_1.NW-NHC363.spec.swan' 1 &
#4.00 'multi_1.NW-NHC362.spec.swan' 1 &
#4.50 'multi_1.NW-NHC361.spec.swan' 1 &
#5.00 'multi_1.NW-NHC360.spec.swan' 1 &
#5.50 'multi_1.NW-NHC359.spec.swan' 1 &
#6.00 'multi_1.NW-NHC358.spec.swan' 1 &
#6.50 'multi_1.NW-NHC357.spec.swan' 1 &
#7.00 'multi_1.NW-NHC356.spec.swan' 1 &
#7.50 'multi_1.NW-NHC355.spec.swan' 1 &
#8.00 'multi_1.NW-NHC354.spec.swan' 1 &
#8.50 'multi_1.NW-NHC353.spec.swan' 1 &
#9.00 'multi_1.NW-NHC352.spec.swan' 1 &
#9.50 'multi_1.NW-NHC351.spec.swan' 1 &
#10.00 'multi_1.NW-NHC350.spec.swan' 1 &
#10.50 'multi_1.NW-NHC349.spec.swan' 1 &
#11.00 'multi_1.NW-NHC348.spec.swan' 1 &
#11.50 'multi_1.NW-NHC347.spec.swan' 1 &
#12.00 'multi_1.NW-NHC346.spec.swan' 1 &
#12.50 'multi_1.NW-NHC345.spec.swan' 1 &
#13.00 'multi_1.NW-NHC344.spec.swan' 1 &
#13.50 'multi_1.NW-NHC343.spec.swan' 1 &
#14.00 'multi_1.NW-NHC342.spec.swan' 1 &
#14.50 'multi_1.NW-NHC341.spec.swan' 1 &
#15.00 'multi_1.NW-NHC340.spec.swan' 1 &
#15.50 'multi_1.NW-NHC339.spec.swan' 1 &
#16.00 'multi_1.NW-NHC338.spec.swan' 1 &
#16.50 'multi_1.NW-NHC337.spec.swan' 1 &
#17.00 'multi_1.NW-NHC336.spec.swan' 1 &
#17.50 'multi_1.NW-NHC335.spec.swan' 1 &
#18.00 'multi_1.NW-NHC334.spec.swan' 1 &
#18.50 'multi_1.NW-NHC333.spec.swan' 1 &
#19.00 'multi_1.NW-NHC332.spec.swan' 1 &
#19.50 'multi_1.NW-NHC331.spec.swan' 1 &
#20.00 'multi_1.NW-NHC330.spec.swan' 1 &
#20.25 'multi_1.NW-NHC329.spec.swan' 1 &
#47.25 'multi_1.NW-NHC328.spec.swan' 1 &
#47.50 'multi_1.NW-NHC327.spec.swan' 1 &
#48.00 'multi_1.NW-NHC326.spec.swan' 1 &
#48.50 'multi_1.NW-NHC325.spec.swan' 1 &
#49.00 'multi_1.NW-NHC324.spec.swan' 1 &
#49.50 'multi_1.NW-NHC323.spec.swan' 1 &
#50.00 'multi_1.NW-NHC322.spec.swan' 1 &
#50.50 'multi_1.NW-NHC321.spec.swan' 1 &
#51.00 'multi_1.NW-NHC320.spec.swan' 1 &
#51.50 'multi_1.NW-NHC319.spec.swan' 1 &
#52.00 'multi_1.NW-NHC318.spec.swan' 1 &
#52.50 'multi_1.NW-NHC317.spec.swan' 1 &
#53.00 'multi_1.NW-NHC310.spec.swan' 1 &
#53.50 'multi_1.NW-NHC309.spec.swan' 1 &
#54.00 'multi_1.NW-NHC308.spec.swan' 1 &
#54.50 'multi_1.NW-NHC307.spec.swan' 1 &
#55.00 'multi_1.NW-NHC306.spec.swan' 1 &
#55.50 'multi_1.NW-NHC305.spec.swan' 1 &
#56.00 'multi_1.NW-NHC298.spec.swan' 1 &
#56.50 'multi_1.NW-NHC291.spec.swan' 1 &
#57.00 'multi_1.NW-NHC290.spec.swan' 1 &
#57.50 'multi_1.NW-NHC289.spec.swan' 1 &
#58.00 'multi_1.NW-NHC288.spec.swan' 1 &
#58.50 'multi_1.NW-NHC287.spec.swan' 1 &
#59.00 'multi_1.NW-NHC286.spec.swan' 1 &
#59.50 'multi_1.NW-NHC285.spec.swan' 1 &
#60.00 'multi_1.NW-NHC284.spec.swan' 1 &
#60.50 'multi_1.NW-NHC283.spec.swan' 1 &
#61.00 'multi_1.NW-NHC282.spec.swan' 1 &
#61.50 'multi_1.NW-NHC281.spec.swan' 1 &
#62.00 'multi_1.NW-NHC280.spec.swan' 1 &
#62.50 'multi_1.NW-NHC279.spec.swan' 1 &
#63.00 'multi_1.NW-NHC278.spec.swan' 1 &
#63.50 'multi_1.NW-NHC277.spec.swan' 1 &
#64.00 'multi_1.NW-NHC276.spec.swan' 1 &
#64.50 'multi_1.NW-NHC275.spec.swan' 1 &
#65.00 'multi_1.NW-NHC274.spec.swan' 1 &
#65.50 'multi_1.NW-NHC273.spec.swan' 1 &
#66.00 'multi_1.NW-NHC272.spec.swan' 1 &
#66.50 'multi_1.NW-NHC271.spec.swan' 1 &
#67.00 'multi_1.NW-NHC270.spec.swan' 1 &
#67.50 'multi_1.NW-NHC269.spec.swan' 1 &
#68.00 'multi_1.NW-NHC268.spec.swan' 1 &
#68.50 'multi_1.NW-NHC267.spec.swan' 1 &
#69.00 'multi_1.NW-NHC266.spec.swan' 1 &
#69.50 'multi_1.NW-NHC265.spec.swan' 1 &
#70.00 'multi_1.NW-NHC264.spec.swan' 1 &
#70.50 'multi_1.NW-NHC263.spec.swan' 1 &
#71.00 'multi_1.NW-NHC262.spec.swan' 1 &
#71.50 'multi_1.NW-NHC261.spec.swan' 1 &
#72.00 'multi_1.NW-NHC260.spec.swan' 1 &
#72.50 'multi_1.NW-NHC259.spec.swan' 1 &
#73.00 'multi_1.NW-NHC258.spec.swan' 1 &
#73.50 'multi_1.NW-NHC257.spec.swan' 1 &
#74.00 'multi_1.NW-NHC256.spec.swan' 1 &
#74.50 'multi_1.NW-NHC255.spec.swan' 1 &
#75.00 'multi_1.NW-NHC254.spec.swan' 1 &
#75.50 'multi_1.NW-NHC253.spec.swan' 1 &
#76.00 'multi_1.NW-NHC252.spec.swan' 1 &
#76.50 'multi_1.NW-NHC251.spec.swan' 1 &
#77.00 'multi_1.NW-NHC250.spec.swan' 1 &
#77.50 'multi_1.NW-NHC249.spec.swan' 1 &
#78.00 'multi_1.NW-NHC248.spec.swan' 1 &
#78.50 'multi_1.NW-NHC247.spec.swan' 1 &
#79.00 'multi_1.NW-NHC246.spec.swan' 1 &
#79.50 'multi_1.NW-NHC245.spec.swan' 1 &
#80.00 'multi_1.NW-NHC244.spec.swan' 1 &
#80.50 'multi_1.NW-NHC243.spec.swan' 1 &
#81.00 'multi_1.NW-NHC242.spec.swan' 1 &
#81.50 'multi_1.NW-NHC241.spec.swan' 1 &
#82.00 'multi_1.NW-NHC240.spec.swan' 1 &
#82.50 'multi_1.NW-NHC239.spec.swan' 1 &
#83.00 'multi_1.NW-NHC238.spec.swan' 1 &
#83.50 'multi_1.NW-NHC237.spec.swan' 1 &
#84.00 'multi_1.NW-NHC236.spec.swan' 1 &
#84.50 'multi_1.NW-NHC235.spec.swan' 1 &
#85.00 'multi_1.NW-NHC234.spec.swan' 1 &
#85.50 'multi_1.NW-NHC233.spec.swan' 1 &
#86.00 'multi_1.NW-NHC232.spec.swan' 1 &
#86.50 'multi_1.NW-NHC231.spec.swan' 1 &
#87.00 'multi_1.NW-NHC230.spec.swan' 1 &
#87.50 'multi_1.NW-NHC229.spec.swan' 1 &
#88.00 'multi_1.NW-NHC227.spec.swan.cp' 1
#$ west
#BOUN SEG XY 262.00 16.00 262.00 3.00 VAR FILE 0.00 'multi_1.NW-NHC77.spec.swan' 1 &
#0.50 'multi_1.NW-NHC76.spec.swan' 1 &
#1.00 'multi_1.NW-NHC75.spec.swan' 1 &
#1.50 'multi_1.NW-NHC74.spec.swan' 1 &
#2.00 'multi_1.NW-NHC73.spec.swan' 1 &
#2.50 'multi_1.NW-NHC72.spec.swan' 1 &
#3.00 'multi_1.NW-NHC71.spec.swan' 1 &
#3.50 'multi_1.NW-NHC70.spec.swan' 1 &
#4.00 'multi_1.NW-NHC69.spec.swan' 1 &
#4.50 'multi_1.NW-NHC68.spec.swan' 1 &
#5.00 'multi_1.NW-NHC67.spec.swan' 1 &
#5.50 'multi_1.NW-NHC66.spec.swan' 1 &
#6.00 'multi_1.NW-NHC65.spec.swan' 1 &
#6.50 'multi_1.NW-NHC64.spec.swan' 1 &
#7.00 'multi_1.NW-NHC63.spec.swan' 1 &
#7.50 'multi_1.NW-NHC62.spec.swan' 1 &
#8.00 'multi_1.NW-NHC61.spec.swan' 1 &
#8.50 'multi_1.NW-NHC60.spec.swan' 1 &
#9.00 'multi_1.NW-NHC59.spec.swan' 1 &
#9.50 'multi_1.NW-NHC58.spec.swan' 1 &
#10.00 'multi_1.NW-NHC57.spec.swan' 1 &
#10.50 'multi_1.NW-NHC56.spec.swan' 1 &
#11.00 'multi_1.NW-NHC55.spec.swan' 1 &
#11.50 'multi_1.NW-NHC54.spec.swan' 1 &
#12.00 'multi_1.NW-NHC53.spec.swan' 1 &
#12.50 'multi_1.NW-NHC52.spec.swan' 1 &
#13.00 'multi_1.NW-NHC51.spec.swan' 1
#$END BOUNSEG
#

View file

@ -0,0 +1,181 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 11/08/14 by alex.gibbs@onaa.gov
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# OKX =
# GEOGRAPHICAL DOMAIN, GEOGRAFICAL RESOLUTION AND OUTPUT TIME STEP =
#========================================================================
export SITEID="OKX"
export REGIONID="ER"
export NELAT="41.40"
export NELON="-71.05"
export SWLAT="39.75"
export SWLON="-74.45"
export RES="2.0"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# These nested grids are non-telescopic grids i.e all of them are =
# nested in the main grid, and get the boundary conditions only from it =
# =
#========================================================================
# NESTGRIDS: Number of nested grids, if = 0, nested grids and
# location numbers below will be ignore regardless of input specifications
#
# STATN=STA for STATIONARY RUNS, STAT=NON for NON-STATIONARY RUNS
# The default values is NONstationary for CG1 and STAtionary for the
# nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid.
#
export NESTGRIDS="0"
# OKX Nest
export NELATN1=""
export NELONN1=""
export SWLATN1=""
export SWLONN1=""
export RESN1=".1"
export TSTEPN1="3"
export STATN1="NON"
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS =
#========================================================================
# Specta points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 name5:lat5:lon5 ...."
#
export SPECPOINTS="44017:40.694:-72.048 44065:40.369:-73.703 44025:40.250:-73.167"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOOKXN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be change in a new version, the user can get 1d-spectra but not g-h plots).
export WVTONCG="0"
export NELATWT="41.40"
export NELONWT="-71.05"
export SWLATWT="39.75"
export SWLONWT="-74.45"
export GEORESWT="3.0"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="NW-NYC"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.NW-NYC57.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#BOUN SEG XY 285.95 39.75 288.95 39.75 VAR FILE 0.00 'multi_1.NW-NYC56.spec.swan' 1 &
#0.50 'multi_1.NW-NYC55.spec.swan' 1 &
#1.00 'multi_1.NW-NYC54.spec.swan' 1 &
#1.50 'multi_1.NW-NYC53.spec.swan' 1 &
#2.00 'multi_1.NW-NYC52.spec.swan' 1 &
#2.50 'multi_1.NW-NYC51.spec.swan' 1 &
#3.00 'multi_1.NW-NYC57.spec.swan.cp' 1
#$
#BOUN SEG XY 288.95 39.75 288.95 41.38 VAR FILE 0.00 'multi_1.NW-NYC57.spec.swan' 1 &
#0.50 'multi_1.NW-NYC58.spec.swan' 1 &
#1.00 'multi_1.NW-NYC59.spec.swan' 1 &
#1.50 'multi_1.NW-NYC60.spec.swan' 1 &
#1.63 'multi_1.NW-NYC61.spec.swan' 1
#$END BOUNSEG
#
#========================================================================
# RIP CURRENT PROGRAM (SEE NWPS MANUAL) =
#========================================================================
# IF RIP CURRENT PROGRAM WILL BE RUN, then RIPCONT=1, Otherwise =0;
# Setting up RIPCONT here to zero will permanently disable RIP program.
#
export RIPPROG="0"
export RIPDOMAIN="CG2"
export RIPCONT="5m"
#
#___________________________________________________________________________
# RAY Section: Define a pair of rays to drop data out along critical contours
# for rip current program.
#
# Example: for data output every 2km along a 5m bathy contour
#
# RAY 'rayname' xp yp xq yq int xp yp xq yq
#
# RAY 'ray1' 282.85 34.628 282.85 34.62 2000 283.00 34.655 283.00 34.62
#
# ISOLINE '5mcont' 'ray1' BOTtom 10
# TABLE '5mcont' HEAD '5mtable' HSIGN TPS PDIR OUTPUT 20110825.1200 3.0 HR
#_____________________________________________________________________________
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD RIP COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE RIP
# CURRENTS (RIPCONT="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
# POIN '5mcont' 279.887 25.8725
#
#$RIP LINES
#$ Ray for 5m and 20m contour data.
#$
#RAY 'ray1' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '5mcont' 'ray1' BOTtom 5
#TABLE '5mcont' HEAD '5m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#RAY 'ray2' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '20mcont' 'ray1' BOTtom 20
#TABLE '20mcont' HEAD '20m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#$END RIP
#

View file

@ -0,0 +1,180 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 11/08/14 by alex.gibbs@onaa.gov
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# PHI =
# GEOGRAPHICAL DOMAIN, GEOGRAFICAL RESOLUTION AND OUTPUT TIME STEP =
#========================================================================
export SITEID="PHI"
export REGIONID="ER"
export NELAT="40.60"
export NELON="-73.25"
export SWLAT="38.10"
export SWLON="-75.75"
export RES="2.0"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# These nested grids are non-telescopic grids i.e all of them are =
# nested in the main grid, and get the boundary conditions only from it =
# =
#========================================================================
# NESTGRIDS: Number of nested grids, if = 0, nested grids and
# location numbers below will be ignore regardless of input specifications
#
# STATN=STA for STATIONARY RUNS, STAT=NON for NON-STATIONARY RUNS
# The default values is NONstationary for CG1 and STAtionary for the
# nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid.
#
export NESTGRIDS="0"
# PHI Nest
export NELATN1=""
export NELONN1=""
export SWLATN1=""
export SWLONN1=""
export RESN1=".1"
export TSTEPN1="3"
export STATN1="NON"
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS =
#========================================================================
# Specta points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 name5:lat5:lon5 ...."
#
export SPECPOINTS="44009:38.461:-74.703 44065:40.369:-73.703"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOPHIN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be change in a new version, the user can get 1d-spectra but not g-h plots).
export WVTONCG="0"
export NELATWT="40.60"
export NELONWT="-73.25"
export SWLATWT="38.10"
export SWLONWT="-75.75"
export GEORESWT="3.0"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="NW-PHI"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.NW-PHI55.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#BOUN SEG XY 284.75 38.10 286.75 38.10 VAR FILE 0.00 'multi_1.NW-PHI51.spec.swan' 1 &
#0.50 'multi_1.NW-PHI52.spec.swan' 1 &
#1.00 'multi_1.NW-PHI53.spec.swan' 1 &
#1.50 'multi_1.NW-PHI54.spec.swan' 1 &
#2.00 'multi_1.NW-PHI55.spec.swan.cp' 1
#$
#BOUN SEG XY 286.75 38.10 286.75 40.60 VAR FILE 0.00 'multi_1.NW-PHI55.spec.swan' 1 &
#0.50 'multi_1.NW-PHI56.spec.swan' 1 &
#1.00 'multi_1.NW-PHI57.spec.swan' 1 &
#1.50 'multi_1.NW-PHI58.spec.swan' 1 &
#2.00 'multi_1.NW-PHI59.spec.swan' 1 &
#2.50 'multi_1.NW-PHI60.spec.swan' 1
#$END BOUNSEG
#
#========================================================================
# RIP CURRENT PROGRAM (SEE NWPS MANUAL) =
#========================================================================
# IF RIP CURRENT PROGRAM WILL BE RUN, then RIPCONT=1, Otherwise =0;
# Setting up RIPCONT here to zero will permanently disable RIP program.
#
export RIPPROG="0"
export RIPDOMAIN="CG2"
export RIPCONT="5m"
#
#___________________________________________________________________________
# RAY Section: Define a pair of rays to drop data out along critical contours
# for rip current program.
#
# Example: for data output every 2km along a 5m bathy contour
#
# RAY 'rayname' xp yp xq yq int xp yp xq yq
#
# RAY 'ray1' 282.85 34.628 282.85 34.62 2000 283.00 34.655 283.00 34.62
#
# ISOLINE '5mcont' 'ray1' BOTtom 10
# TABLE '5mcont' HEAD '5mtable' HSIGN TPS PDIR OUTPUT 20110825.1200 3.0 HR
#_____________________________________________________________________________
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD RIP COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE RIP
# CURRENTS (RIPCONT="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
# POIN '5mcont' 279.887 25.8725
#
#$RIP LINES
#$ Ray for 5m and 20m contour data.
#$
#RAY 'ray1' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '5mcont' 'ray1' BOTtom 5
#TABLE '5mcont' HEAD '5m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#RAY 'ray2' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '20mcont' 'ray1' BOTtom 20
#TABLE '20mcont' HEAD '20m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#$END RIP
#

View file

@ -0,0 +1,189 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 11/08/14 by alex.gibbs@onaa.gov
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# PQR =
# GEOGRAPHICAL DOMAIN, GEOGRAFICAL RESOLUTION AND OUTPUT TIME STEP =
#========================================================================
export SITEID="PQR"
export REGIONID="WR"
export NELAT="47.15"
export NELON="-123.30"
export SWLAT="43.50"
export SWLON="-126.28"
export RES="2.0"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# These nested grids are non-telescopic grids i.e all of them are =
# nested in the main grid, and get the boundary conditions only from it =
# =
#========================================================================
# NESTGRIDS: Number of nested grids, if = 0, nested grids and
# location numbers below will be ignore regardless of input specifications
#
# STATN=STA for STATIONARY RUNS, STAT=NON for NON-STATIONARY RUNS
# The default values is NONstationary for CG1 and STAtionary for the
# nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid.
#
export NESTGRIDS="0"
# PQR Nest
export NELATN1=""
export NELONN1=""
export SWLATN1=""
export SWLONN1=""
export RESN1=".1"
export TSTEPN1="3"
export STATN1="NON"
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS =
#========================================================================
# Specta points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 name5:lat5:lon5 ...."
#
export SPECPOINTS="46211:46.858:-124.244 46243:46.215:-124.129 46248:46.133:-124.645 46029:46.159:-124.514"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOPQRN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be change in a new version, the user can get 1d-spectra but not g-h plots).
export WVTONCG="0"
export NELATWT="47.15"
export NELONWT="-123.30"
export SWLATWT="43.50"
export SWLONWT="-126.28"
export GEORESWT="3.0"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="NW-PQR"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.NW-PQR51.spec.swan, multi_1.NW-PQR59.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#BOUN SEG XY 233.72 43.50 235.70 43.50 VAR FILE 0.00 'multi_1.NW-PQR51.spec.swan' 1 &
#0.48 'multi_1.NW-PQR67.spec.swan' 1 &
#0.98 'multi_1.NW-PQR66.spec.swan' 1 &
#1.48 'multi_1.NW-PQR65.spec.swan' 1 &
#1.98 'multi_1.NW-PQR64.spec.swan' 1
#$
#BOUN SEG XY 233.72 47.15 233.72 43.50 VAR FILE 0.00 'multi_1.NW-PQR59.spec.swan' 1 &
#0.15 'multi_1.NW-PQR58.spec.swan' 1 &
#0.65 'multi_1.NW-PQR57.spec.swan' 1 &
#1.15 'multi_1.NW-PQR56.spec.swan' 1 &
#1.65 'multi_1.NW-PQR55.spec.swan' 1 &
#2.15 'multi_1.NW-PQR54.spec.swan' 1 &
#2.65 'multi_1.NW-PQR53.spec.swan' 1 &
#3.15 'multi_1.NW-PQR52.spec.swan' 1 &
#3.65 'multi_1.NW-PQR51.spec.swan.cp' 1
#$
#BOUN SEG XY 235.72 47.15 233.72 47.15 VAR FILE 0.00 'multi_1.NW-PQR63.spec.swan' 1 &
#0.50 'multi_1.NW-PQR62.spec.swan' 1 &
#1.00 'multi_1.NW-PQR61.spec.swan' 1 &
#1.50 'multi_1.NW-PQR60.spec.swan' 1 &
#2.00 'multi_1.NW-PQR59.spec.swan.cp' 1
#$END BOUNSEG
#
#========================================================================
# RIP CURRENT PROGRAM (SEE NWPS MANUAL) =
#========================================================================
# IF RIP CURRENT PROGRAM WILL BE RUN, then RIPCONT=1, Otherwise =0;
# Setting up RIPCONT here to zero will permanently disable RIP program.
#
export RIPPROG="0"
export RIPDOMAIN="CG2"
export RIPCONT="5m"
#
#___________________________________________________________________________
# RAY Section: Define a pair of rays to drop data out along critical contours
# for rip current program.
#
# Example: for data output every 2km along a 5m bathy contour
#
# RAY 'rayname' xp yp xq yq int xp yp xq yq
#
# RAY 'ray1' 282.85 34.628 282.85 34.62 2000 283.00 34.655 283.00 34.62
#
# ISOLINE '5mcont' 'ray1' BOTtom 10
# TABLE '5mcont' HEAD '5mtable' HSIGN TPS PDIR OUTPUT 20110825.1200 3.0 HR
#_____________________________________________________________________________
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD RIP COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE RIP
# CURRENTS (RIPCONT="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
# POIN '5mcont' 279.887 25.8725
#
#$RIP LINES
#$ Ray for 5m and 20m contour data.
#$
#RAY 'ray1' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '5mcont' 'ray1' BOTtom 5
#TABLE '5mcont' HEAD '5m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#RAY 'ray2' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '20mcont' 'ray1' BOTtom 20
#TABLE '20mcont' HEAD '20m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#$END RIP
#

View file

@ -0,0 +1,183 @@
#------------------------------------------------------------------------
# Domain File
# Original Author(s): Roberto Padilla-Hernandez,Douglas Gaer
# Alex Gibbs, Pablo Santos,Tony Freeman
# File Creation Date: 06/01/2012
# Date Last Modified: 11/08/14 by alex.gibbs@onaa.gov
#
# Version control: 1.33
#
# Support Team:
#
# Contributors:
#
# -----------------------------------------------------------------------
# ---------------------- Description and Details ------------------------
# -----------------------------------------------------------------------
#
# File used to setup a geographical domain for SWAN and WW3
#
# -----------------------------------------------------------
#========================================================================
# SEW =
# GEOGRAPHICAL DOMAIN, GEOGRAFICAL RESOLUTION AND OUTPUT TIME STEP =
#========================================================================
export SITEID="SEW"
export REGIONID="WR"
export NELAT="49.42"
export NELON="-121.91"
export SWLAT="46.10"
export SWLON="-127.00"
export RES="2.0"
export TSTEP="3"
#
#========================================================================
# NESTED GRID CONFIGURATION =
# These nested grids are non-telescopic grids i.e all of them are =
# nested in the main grid, and get the boundary conditions only from it =
# =
#========================================================================
# NESTGRIDS: Number of nested grids, if = 0, nested grids and
# location numbers below will be ignore regardless of input specifications
#
# STATN=STA for STATIONARY RUNS, STAT=NON for NON-STATIONARY RUNS
# The default values is NONstationary for CG1 and STAtionary for the
# nested grids. Change this only if you know what you are doing.
# You can choose STA or NON for a particular nested grid.
#
export NESTGRIDS="0"
# SEW Nest
export NELATN1=""
export NELONN1=""
export SWLATN1=""
export SWLONN1=""
export RESN1=".1"
export TSTEPN1="3"
export STATN1="NON"
#
#========================================================================
# SPECTRA OUTPUT LOCATIONS =
#========================================================================
# Specta points defined as space delimited list of:
# "name1:lat1:lon1 name2:lat2:lon2 name3:lat3:lon3 name4:lat4:lon4 name5:lat5:lon5 ...."
#
export SPECPOINTS="46206:48.840:-126.000 46041:47.353:-124.731 46087:48.494:-124.728 46088:48.336:-123.159"
#
#========================================================================
# WAVE TRACKING (and WAVE PARTITION) ON/OFF =
# SET: SUBDOSEWN, GEOGRAPH RESOL and TOLERANCE WAVETRACK PARAMETERS =
#========================================================================
# IF WAVE TRACKING IS REQUIRED THEN WVTRCK="ON", OTHER WISE SET IT AS "OFF"
# IF WVTRCK IS "ON", ADDTIONAL INFORMATION IS REQUIRED, SEE BELOW
#
export WVTRCK="ON"
#
# IF WAVE TRACKING IS REQUIRED EXACTLY OVER THE COMPUTATIONAL GRID AND SAME SPATIAL
# RESOLUTION: SET WVTONCG="1"
# IF USER WANTS TO CHANGE ANYONE OF THE PARAMETERS THEN WVTONCG="0" AND USER MUST GIVE
# ALL INFORMATION FOR THE DOMAIN OR SUBDOMAIN AND GEOGRAPHICAL RESOLUTION.
# BE CAREFULL, IF THERE IS ANY SPECTRAL OUTPUT LOCATIONS OUT OF THE NEW (REDUCED) DOMAIN
# FOR WAVE TRACKING NWPS WILL ABORT.
# (This will be change in a new version, the user can get 1d-spectra but not g-h plots).
export WVTONCG="0"
export NELATWT="49.42"
export NELONWT="-121.91"
export SWLATWT="46.10"
export SWLONWT="-127.00"
export GEORESWT="3.0"
#
# PARAMETERS FOR TRACKING ALGORITHM for WVTONCG=0 or =1 THIS IS ALWAYS READ
# *CAUTION* CHANGE THEM ONLY IF YOU KNOW WHAT YOU ARE DOING
# RECOMENDED VALUES WVTRKPA="10. 1. 0.25 0.1 10. 1."
# dirKnob, perKnob, hsKnob, wetPts, dirTimeKnob, tpTimeKnob
export WVTRKPA="10. 1. 0.25 0.1 10. 1."
#
#========================================================================
# CURRENTS DEFINITION (SEE SWAN MANUAL) =
#========================================================================
#export CURRL1="INPGRID CUR ............................."
#export CURRL2="READINP CUR ............................."
#
#========================================================================
# BOUNDARY CONDITIONS (SEE SWAN MANUAL) =
#========================================================================
# IF BOUNDARY CONDITIONS WILL BE USED then BOUNDCOND=1, Otherwise =0;
# Setting up BOUNDCOND here to zero will permanently disable BCs.
# If you leave it as 1 the user will still have the option to disable
# them from the interactive Run_NWPS GUI.
#
export BOUNCOND="1"
export FTPPAT1="multi_1"
export FTPPAT1B="multi_1"
export FTPPAT2="NW-SEW"
export NFTPATTEMPTS="3"
export WAVECPS="multi_1.NW-SEW51.spec.swan"
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD BOUNDARY COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE BOUNARY
# CONDITIONS (BOUNCOND="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
#
#$BOUNDARY COMMAND LINES
#BOUN SEG XY 233.00 46.10 235.59 46.10 VAR FILE 0.00 'multi_1.NW-SEW51.spec.swan' 1 &
#0.59 'multi_1.NW-SEW63.spec.swan' 1 &
#1.09 'multi_1.NW-SEW62.spec.swan' 1 &
#1.59 'multi_1.NW-SEW61.spec.swan' 1 &
#2.09 'multi_1.NW-SEW60.spec.swan' 1 &
#2.59 'multi_1.NW-SEW59.spec.swan' 1
#$
#BOUN SEG XY 233.00 49.42 233.00 46.10 VAR FILE 0.00 'multi_1.NW-SEW58.spec.swan' 1 &
#0.32 'multi_1.NW-SEW57.spec.swan' 1 &
#0.82 'multi_1.NW-SEW56.spec.swan' 1 &
#1.32 'multi_1.NW-SEW55.spec.swan' 1 &
#1.82 'multi_1.NW-SEW54.spec.swan' 1 &
#2.32 'multi_1.NW-SEW53.spec.swan' 1 &
#2.70 'multi_1.NW-SEW52.spec.swan' 1 &
#3.32 'multi_1.NW-SEW51.spec.swan.cp' 1
#$END BOUNSEG
#
#========================================================================
# RIP CURRENT PROGRAM (SEE NWPS MANUAL) =
#========================================================================
# IF RIP CURRENT PROGRAM WILL BE RUN, then RIPCONT=1, Otherwise =0;
# Setting up RIPCONT here to zero will permanently disable RIP program.
#
export RIPPROG="0"
export RIPDOMAIN="CG2"
export RIPCONT="5m"
#
#___________________________________________________________________________
# RAY Section: Define a pair of rays to drop data out along critical contours
# for rip current program.
#
# Example: for data output every 2km along a 5m bathy contour
#
# RAY 'rayname' xp yp xq yq int xp yp xq yq
#
# RAY 'ray1' 282.85 34.628 282.85 34.62 2000 283.00 34.655 283.00 34.62
#
# ISOLINE '5mcont' 'ray1' BOTtom 10
# TABLE '5mcont' HEAD '5mtable' HSIGN TPS PDIR OUTPUT 20110825.1200 3.0 HR
#_____________________________________________________________________________
#
# THE FOLLOWING LINES MUST BE COMMENTED. IF YOU ADD RIP COMMAND LINES FOR YOUR
# DOMAIN, ADD THEM WITH THE "#" AS A FIRST CHARACTER, IF YOU DECIDE NOT TO USE RIP
# CURRENTS (RIPCONT="0") THEY WILL REMAIN AS A COMMENTED LINES. IF YOU DECIDE TO USE
# BOUNDARY CONDITIONS (BOUNCOND="1") NWPS WILL INCLUDE THE INFORMATION IN THE ACTUAL
# INPUT FILES WITH NOT COMMENT CHARACTER
# POIN '5mcont' 279.887 25.8725
#
#$RIP LINES
#$ Ray for 5m and 20m contour data.
#$
#RAY 'ray1' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '5mcont' 'ray1' BOTtom 5
#TABLE '5mcont' HEAD '5m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#RAY 'ray2' 288.80 41.95 289.68 41.95 100 288.80 43.15 289.68 43.15
#ISOLINE '20mcont' 'ray1' BOTtom 20
#TABLE '20mcont' HEAD '20m_contour_CG2' TIME XP YP HSIGN TPS DIR DSPR VEL WATL WIND OUTPUT 20141030.0000 1.0 HR
#$
#$END RIP
#

Some files were not shown because too many files have changed in this diff Show more