This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import absolute_import, division, print_function # Python 3 Support | |
import sys | |
from netCDF4 import Dataset | |
import numpy as np | |
if len(sys.argv) != 3: # Argument checking | |
print("Usage: python cellsOnCell.py meshFileName cell") | |
print("Please supply a mesh file and a cell number of your choosing") | |
sys.exit(-1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sphere_distance(lat1, lon1, lat2, lon2, radius, **kwargs): | |
""" Calculate the sphere distance between point1 and point2. | |
lat1 - Float - Radians - -pi:pi | |
lon1 - Float - Radians - 0:2*pi | |
lat2 - Float - Radians - -pi:pi | |
lon2 - Float - Radians - 0:2*pi | |
radius - Radius of the earth (or sphere) - Units can be ignored | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! Copyright (c) 2013, Los Alamos National Security, LLC (LANS) | |
! and the University Corporation for Atmospheric Research (UCAR). | |
! | |
! Unless noted otherwise source code is licensed under the BSD license. | |
! Additional copyright and license information can be found in the LICENSE file | |
! distributed with this code, or at http://mpas-dev.github.com/license.html | |
! | |
module init_atm_core | |
use mpas_stack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! Copyright (c) 2013, Los Alamos National Security, LLC (LANS) | |
! and the University Corporation for Atmospheric Research (UCAR). | |
! | |
! Unless noted otherwise source code is licensed under the BSD license. | |
! Additional copyright and license information can be found in the LICENSE file | |
! distributed with this code, or at http://mpas-dev.github.com/license.html | |
! | |
module init_atm_core | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program case | |
implicit none | |
character(len=100) :: arg | |
call getarg(1,arg) | |
write(0,*) "capitalize: ", capitalize(arg) | |
write(0,*) "lowercase: ", lowercase(arg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Boolean | |
# | |
signed=NO | |
# | |
# Integer | |
# | |
category_max=13 | |
category_min = 1 | |
filename_digits=5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
! OG - Terrain static interpolation | |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Name: temp | |
Type: channel | |
Upper-lat: 23.43676 | |
Lower-lat: 66.33333 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
class PyTimers: | |
""" A small timer class in a similar vain as MPAS timers. Probably no the most efficent, but | |
its easy to use. """ | |
def __init__(self): | |
self.timers = {} | |
def finalize(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program supersample_fac | |
implicit none | |
integer :: i, j, ii, jj | |
integer :: supersample | |
integer :: tile_nx, tile_ny | |
integer :: tile_bdr | |
real :: lat, lon, latp, lonp | |
real :: known_lat |