CHARACTER(LEN=11) shiptempfile! rawinsonde filename. CHARACTER(LEN=11) tempdropfile! Dropwindsode filename. CHARACTER(LEN=11) tempfile
|
|
- Nancy Dixon
- 5 years ago
- Views:
Transcription
1 ################################################################## ################################################################## ###### ###### ###### ingest_upperair.f09 ###### ###### ###### ###### Developed by ###### ###### Center for Analysis and Prediction of Storms ###### ###### University of Oklahoma ###### ###### ###### ################################################################## ################################################################## How to run this code: ingest_upperair.exe [-t YYMMDDHH] [-latmin min_lat] [-latmax max_lat] [-lonmin min_lon] [-lonmax max_lon] [-dt delta_mins] [+dt delta_mins] [-o output_file] PURPOSE: The airep file provided by the Central Weather Bureau is the data output from an airplane flight, which are not fixed in location and sample the atmosphere every hour. The airplane measures: Pressure [mb*10] Height [gpm] Temperature [deg Celsius*10] Wind Speed [m/s] Wind Direction [deg] The pilot file provided by the Central Weather Bureau is the data output that is fixed in location and sample the atmosphere every twelve hours. The instrument measures: Pressure [mb*10] Height [gpm] Wind Speed [m/s] Wind Direction [deg] The shiptemp file provided by the Central Weather Bureau is the data output from a rawinsonde that was launched from a ship, which are not-fixed in location and sample the atmosphere every twelve hours. The rawinsonde measures: Pressure [mb*10] Height [gpm] Temperature [deg Celsius*10] Wind Speed [m/s] Dewpoint Depression [deg Celsius*10] Wind Direction [deg] The tempdrop file provided by the Central Weather Bureau is the data output from a dropwindsonde, which are not fixed in location and are irregular temporally. The dropwindsonde measures: Pressure [mb*10] Height [gpm] Temperature [deg Celsius*10] Wind Speed [m/s] Dewpoint Depression [deg Celsius*10] Wind Direction [deg] According to the National Hurricane Center typical measurement errors for a GPS dropwindsonde are: pressure ~ 1mb temperature ~ 0.2K relative humidity ~ 5-10% wind < 1m/s The temp file provided by the Central Weather Bureau is the data output from a rawinsonde, which are fixed in location and sample the atmosphere every twelve hours. The rawinsonde measures: Pressure [mb*10] Height [gpm] -1-
2 Temperature [deg Celsius*10] Wind Speed [m/s] Dewpoint Depression [deg Celsius*10] Wind Direction [deg] This code: 1. Reads in the data measured from the each of the aforementioned intruments. 2. Coverts the data into the units needed for assimulation into the ARPS model: Pressure [mb] Height [gpm] Temperature [deg Celsius] Wind Speed [m/s] Dewpoint Temperature [deg Celsius] Wind Direction [deg] 3. Outputs the data into an *.snd file AUTHOR: Michael Kevin Hernandez, (11/08/2011) PROGRAM ingest_upperair IMPLICIT NONE CHARACTER(LEN=11) airepfile Airep filename CHARACTER(LEN=11) pilotfile Pilot filename CHARACTER(LEN=11) shiptempfile rawinsonde filename CHARACTER(LEN=11) tempfile rawinsonde filename CHARACTER(LEN=11) tempdropfile Dropwindsode filename CHARACTER(LEN=3) airepprefix CHARACTER(LEN=3) pilotprefix CHARACTER(LEN=3) shiptempprefix CHARACTER(LEN=3) tempprefix CHARACTER(LEN=3) tempdropprefix CHARACTER(LEN=3) instrument three letter identifier Command line arguement variables: INTEGER*4 IARGC Intrinsic subroutine INTEGER*4 nargs # of command line args INTEGER*4 iargs, jargs index for command line args CHARACTER(LEN=7) cargs var for command line options CHARACTER(LEN=8) date Input date (MUST BE INCLUDED) REAL*4 min_lat, max_lat User specified lat BC REAL*4 min_lon, max_lon User specified lon BC INTEGER*4 delta_mins_minus, delta_mins_add User specified time BC CHARACTER(LEN=20) output_filename User specified output filename Command line indicators LOGICAL min_lat_ind, max_lat_ind LOGICAL min_lon_ind, max_lon_ind LOGICAL delta_mins_minus_ind, delta_mins_add_ind LOGICAL output_filename_ind Debug level: if debug = 0 the basic information is printed out to the screen if debug = 1 the basic info plus user settings are printed out if debug = 9 the data gets outputted into the screen INTEGER*4, PARAMETER :: debug = 0 Each data file has a prefix. airepprefix = "tua" pilotprefix = "tup" shiptempprefix = "tus" tempprefix = "tus" tempdropprefix = "tux" Grab the command line arguement: -2-
3 Process command line: [-t YYMMDDHH] [-latmin min_lat] [-latmax max_lat] [-lonmin min_lon] [-lonmax max_lon] [-dt delta_mins] [+dt delta_mins] [-o output_file] nargs = IARGC() iargs = 1 DO jargs = 1, nargs, 2 CALL GETARG(iargs,cargs) IF (cargs(1:2) /= '-t') THEN WRITE(*,*) 'ERROR: Please enter a date \"-t YYMMDDHH\"' STOP ENDDO IF (debug == 1) THEN WRITE(*,*) 'Number of command line arguments: ', nargs Setting the indicators to zero, if there is a command line arguement other than date (which is required) then the index gets set to one. min_lat_ind =.FALSE. max_lat_ind =.FALSE. min_lon_ind =.FALSE. max_lon_ind =.FALSE. delta_mins_minus_ind =.FALSE. delta_mins_add_ind =.FALSE. output_filename_ind =.FALSE. iargs = 1 DO jargs = 1, nargs, 2 CALL GETARG(iargs,cargs) iargs = iargs + 1 IF (cargs(1:2) == '-t') THEN CALL GETARG(iargs,date) IF (debug == 1) THEN WRITE(*,*) 'User Specified date: ', date IF (cargs(1:7) == '-latmin') THEN CALL GETARG(iargs,cargs) READ(cargs,*) min_lat min_lat_ind =.TRUE. IF (debug == 1) THEN WRITE(*,'(A25,F5.2)') 'User Specified min lat: ', min_lat Error Check IF (ABS(min_lat).GT ) THEN WRITE(*,'(A35)') 'ERROR: The minimum latitude is < -90' STOP IF (cargs(1:7) == '-latmax') THEN CALL GETARG(iargs,cargs) READ(cargs,*) max_lat max_lat_ind =.TRUE. IF (debug == 1) THEN WRITE(*,'(A25,F5.2)') 'User Specified max lat: ', max_lat Error Check IF (ABS(max_lat).GT ) THEN WRITE(*,'(A35)') 'ERROR: The maximum latitude is > 90' STOP -3-
4 IF (cargs(1:7) == '-lonmin') THEN CALL GETARG(iargs,cargs) READ(cargs,*) min_lon min_lon_ind =.TRUE. IF (debug == 1) THEN WRITE(*,'(A25,F5.2)') 'User Specified min lon: ', min_lon Error Check IF (ABS(min_lon).GT ) THEN WRITE(*,'(A39)') 'ERROR: The minimum longitude is < -180' STOP IF (cargs(1:7) == '-lonmax') THEN CALL GETARG(iargs,cargs) READ(cargs,*) max_lon max_lon_ind =.TRUE. IF (debug == 1) THEN WRITE(*,'(A25,F5.2)') 'User Specified max lon: ', max_lon Error Check IF (ABS(max_lon).GT ) THEN WRITE(*,'(A39)') 'ERROR: The maximum longitude is > 180' STOP IF (cargs(1:3) == '-dt') THEN CALL GETARG(iargs,cargs) READ(cargs,*) delta_mins_minus delta_mins_minus_ind =.TRUE. IF (debug == 1) THEN WRITE(*,'(A29,I5)') 'User Specified -delta time: ', delta_mins_minus IF (cargs(1:3) == '+dt') THEN CALL GETARG(iargs,cargs) READ(cargs,*) delta_mins_add delta_mins_add_ind =.TRUE. IF (debug == 1) THEN WRITE(*,'(A29,I5)') 'User Specified +delta time: ', delta_mins_add IF (cargs(1:2) == '-o') THEN CALL GETARG(iargs,cargs) READ(cargs,*) output_filename output_filename_ind =.TRUE. IF (debug == 1) THEN WRITE(*,*) 'User Specified output file name: ', output_filename iargs = iargs + 1 END DO WRITE(*,*) 'User Specified data vector: ' WRITE(*,*) min_lat_ind, max_lat_ind, min_lon_ind, max_lon_ind, delta_mins_minus_ind, delta_mins_add_ind, output_filename_ind Create the file names -4-
5 airepfile = airepprefix // date pilotfile = pilotprefix // date shiptempfile = shiptempprefix // date tempfile = tempprefix // date tempdropfile = tempdropprefix // date instrument = "ARP" CALL readairepfile(debug,airepfile, instrument, min_lat, max_lat, min_lon, max_lon, delta_mins_minus, delta_mins_add, output_filename, min_lat_ind, max_lat_ind, min_lon_ind, max_lon_ind, delta_mins_minus_ind, delta_mins_add_ind, output_filename_ind) WRITE(*,*) "Completed: ", airepfile instrument = "TMP" CALL readtempfile(debug, tempfile, instrument, min_lat, max_lat, min_lon, max_lon, delta_mins_minus, delta_mins_add, output_filename, min_lat_ind, max_lat_ind, min_lon_ind, max_lon_ind, delta_mins_minus_ind, delta_mins_add_ind, output_filename_ind) WRITE(*,*) "Completed: ", tempfile instrument = "DRP" CALL readdroptempfile(debug, tempdropfile, instrument, min_lat, max_lat, min_lon, max_lon, delta_mins_minus, delta_mins_add, output_filename, min_lat_ind, max_lat_ind, min_lon_ind, max_lon_ind, delta_mins_minus_ind, delta_mins_add_ind, output_filename_ind) WRITE(*,*) "Completed: ", tempdropfile instrument = "stp" CALL readshiptempfile(debug,tempfile, instrument, min_lat, max_lat, min_lon, max_lon, delta_mins_minus, delta_mins_add, output_filename, min_lat_ind, max_lat_ind, min_lon_ind, max_lon_ind, delta_mins_minus_ind, delta_mins_add_ind, output_filename_ind) WRITE(*,*) "Completed: ", shiptempfile instrument = "PLT" CALL readpilotfile(debug, pilotfile, instrument, min_lat, max_lat, min_lon, max_lon, delta_mins_minus, delta_mins_add, output_filename, min_lat_ind, max_lat_ind, min_lon_ind, max_lon_ind, delta_mins_minus_ind, delta_mins_add_ind, output_filename_ind) WRITE(*,*) "Completed: ", pilotfile END PROGRAM SUBROUTINE readairepfile PURPOSE: This subroutine will Read in the data measured from the airep
6 SUBROUTINE readairepfile(debug, airepfile, instrument, min_lat, max_lat, min_lon, max_lon, delta_mins_minus, delta_mins_add, output_filename, min_lat_ind, max_lat_ind, min_lon_ind, max_lon_ind, delta_mins_minus_ind, delta_mins_add_ind, output_filename_ind) IMPLICIT NONE INTEGER*4 FileHandle INTEGER*4 stat file stat CHARACTER(LEN=11) airepfile airep filename CHARACTER(LEN=3) instrument instrument indentifier INTEGER*4 i Counter in the z-direction INTEGER*4 station_no Station Number INTEGER*4 station_hgt Station Hieght INTEGER*4 read_lat Latitude [degree*100] INTEGER*4 read_lon Longitude [degree*100] INTEGER*4 read_year Year INTEGER*4 read_month Month INTEGER*4 read_day Day INTEGER*4 past_hour Concatination by the hour var INTEGER*4 read_hour Hour INTEGER*4 past_minute Concatinate variable INTEGER*4 read_minute Minute INTEGER*4 redovar Var to read catted files INTEGER*4 read_record Total number of logical record INTEGER*4 NumberOfLines Actual number of data lines INTEGER*4, DIMENSION(1) :: read_pres Pressure INTEGER*4, DIMENSION(1) :: read_hght Height INTEGER*4, DIMENSION(1) :: read_temp Temperature INTEGER*4, DIMENSION(1) :: read_dewp Dewpoint INTEGER*4, DIMENSION(1) :: read_wdir Wind Dir INTEGER*4, DIMENSION(1) :: read_wspd Wind speed INTEGER*4, DIMENSION(1) :: remark1 pres flag INTEGER*4, DIMENSION(1) :: remark2 hieght flag INTEGER*4, DIMENSION(1) :: remark3 temp flag INTEGER*4, DIMENSION(1) :: remark4 Wspd flag Command line variables REAL*4 min_lat, max_lat User specified lat BC REAL*4 min_lon, max_lon User specified lon BC INTEGER*4 delta_mins_minus, delta_mins_add User specified time BC CHARACTER(LEN=20) output_filename User specified output filename Command line indicators LOGICAL min_lat_ind, max_lat_ind LOGICAL min_lon_ind, max_lon_ind LOGICAL delta_mins_minus_ind, delta_mins_add_ind LOGICAL output_filename_ind INTEGER*4 debug Debug level Formating statements 1000 FORMAT (12x, 2I5, 2x, 5I2, I3) 2000 FORMAT ( I4, I1, I5, I1, I4, I1, 21X) 3000 FORMAT (10x, 2I3, I1, 37x) Start of the subroutine: opening and reading in the data into their respective variables and arrays. NumberOfLines = 1 FileHandle = 11 redovar = 0 past_hour = 0 past_minute = 0-6-
7 OPEN(UNIT=FileHandle,FILE=airepFile,ACTION='READ',IOSTAT=stat) IF (stat==0) THEN DO This line in the code will read in the header, and it sets up the the rest of the code. READ(FileHandle, 1000,END =10) read_lat, read_lon, read_year, read_month, read_day, read_hour, read_minute, read_record This loop will ensure to keep reading a concatinated file and packages the *.snd files per hour. 10 IF (read_hour.ne. past_hour) THEN past_hour = read_hour read_minute = past_minute This is the part of the code that does the actual reading in of the data (useful and useless). READ(FileHandle,2000,END = 20) read_pres, remark1, read_hght, remark2, read_temp, remark3 20 READ(FileHandle,3000,IOSTAT = redovar) read_wdir, read_wspd, remark4 This is a set of conditions for the code to exit if it has reached the end of the file or something is wrong with the input data, if not, continue running within the do loop. IF (redovar > 0) THEN... something wrong... WRITE(*,*) "... Something is wrong with the data file..." IF (redovar < 0) THEN... end of file reached... EXIT... do normal stuff... Call on the subroutine to convet the units from what was read in to what the model requires. CALL UnitConverter(debug,station_no,station_hgt,read_pres, read_hght, read_temp, read_dewp, read_wdir, read_wspd, NumberOfLines, read_lat, read_lon, read_year, read_month, read_day, read_hour, read_minute, instrument, min_lat, max_lat, min_lon, max_lon, delta_mins_minus, delta_mins_add, output_filename, min_lat_ind, max_lat_ind, min_lon_ind, max_lon_ind, delta_mins_minus_ind, delta_mins_add_ind, output_filename_ind) END DO CLOSE(FileHandle) END SUBROUTINE SUBROUTINE readpilotfile
8 PURPOSE: This subroutine will Read in the data measured from the pilot data SUBROUTINE readpilotfile(debug, pilotfile, instrument, min_lat, max_lat, min_lon, max_lon, delta_mins_minus, delta_mins_add, output_filename, min_lat_ind, max_lat_ind, min_lon_ind, max_lon_ind, delta_mins_minus_ind, delta_mins_add_ind, output_filename_ind) IMPLICIT NONE INTEGER*4 FileHandle INTEGER*4 stat file status CHARACTER(LEN=11) pilotfile pilot data filename CHARACTER(LEN=3) instrument instrument indentifier INTEGER*4 i Counter in the z-direction INTEGER*4 station_no Station Number INTEGER*4 station_hgt Station Hieght INTEGER*4 read_lat Latitude [degree*100] INTEGER*4 read_lon Longitude [degree*100] INTEGER*4 read_year Year INTEGER*4 read_month Month INTEGER*4 read_day Day INTEGER*4 past_hour Concatination by the hour var INTEGER*4 read_hour Hour INTEGER*4 past_minute Concatinate variable INTEGER*4 read_minute Minute INTEGER*4 redovar Var to read catted files INTEGER*4 read_record Total number of logical record INTEGER*4 NumberOfLines Actual number of data lines INTEGER*4, ALLOCATABLE, DIMENSION(:) :: read_pres Pressure INTEGER*4, ALLOCATABLE, DIMENSION(:) :: read_hght Height INTEGER*4, ALLOCATABLE, DIMENSION(:) :: read_temp Temperature INTEGER*4, ALLOCATABLE, DIMENSION(:) :: read_dewp Dewpoint INTEGER*4, ALLOCATABLE, DIMENSION(:) :: read_wdir Wind Dir INTEGER*4, ALLOCATABLE, DIMENSION(:) :: read_wspd Wind speed INTEGER*4, ALLOCATABLE, DIMENSION(:) :: remark1 pres flag INTEGER*4, ALLOCATABLE, DIMENSION(:) :: remark2 var flag INTEGER*4, ALLOCATABLE, DIMENSION(:) :: remark3 Wspd flag Command line variables REAL*4 min_lat, max_lat User specified lat BC REAL*4 min_lon, max_lon User specified lon BC INTEGER*4 delta_mins_minus, delta_mins_add User specified time BC CHARACTER(LEN=20) output_filename User specified output filename Command line indicators LOGICAL min_lat_ind, max_lat_ind LOGICAL min_lon_ind, max_lon_ind LOGICAL delta_mins_minus_ind, delta_mins_add_ind LOGICAL output_filename_ind INTEGER*4 debug Debug level Formating statements 1000 FORMAT (3x, I5, I4, 2I5, 2x, 5I2, I3) 2000 FORMAT (2x, 2I5, 1x, I1, 12x, 2I3, 2I1, 3x) Start of the subroutine: opening and reading in the data into their respective variables and arrays. FileHandle = 11 redovar = 0-8-
9 past_hour = 0 past_minute = 0 OPEN(UNIT=FileHandle,FILE=pilotFile,ACTION='READ',IOSTAT=stat) IF (stat==0) THEN DO This line in the code will read in the header, and it sets up the the rest of the code. READ(FileHandle, 1000, END =10) station_no, station_hgt, read_lat, read_lon, read_year, read_month, read_day, read_hour, read_minute, read_record This loop will ensure to keep reading a concatinated file and packages the *.snd files per hour. 10 IF (read_hour.ne. past_hour) THEN past_hour = read_hour read_minute = past_minute There is data from the instrument that cannot be injested into the model, however the read_record includes those lines as well. Thus the NumberOfLines variable sets the number of lines to read that contains data useful to the model. NumberOfLines = read_record - 1 Allocate the arrays by the length of the data that is useful for the model. Since the remark2 variable is used for two different variables it gets allocated accordingly. ALLOCATE(remark1(NumberOfLines)) ALLOCATE(remark2(2*NumberOfLines)) ALLOCATE(remark3(NumberOfLines)) ALLOCATE(read_pres(NumberOfLines)) ALLOCATE(read_hght(NumberOfLines)) ALLOCATE(read_temp(NumberOfLines)) ALLOCATE(read_dewp(NumberOfLines)) ALLOCATE(read_Wdir(NumberOfLines)) ALLOCATE(read_Wspd(NumberOfLines)) This is the part of the code that does the actual reading in of the data (useful and useless). DO i = 1, NumberOfLines, 1 READ(FileHandle,2000,IOSTAT = redovar) read_pres(i), read_hght(i), remark1(i), read_wdir(i), read_wspd(i), remark2(i), remark3(i) 20 END DO This is a set of conditions for the code to exit if it has reached the end of the file or something is wrong with the input data, if not, continue running within the do loop. IF (redovar > 0) THEN... something wrong... WRITE(*,*) "... Something is wrong with the data file..." EXIT IF (redovar < 0) THEN... end of file reached... EXIT... do normal stuff
10 Call on the subroutine to convet the units from what was read in to what the model requires. CALL UnitConverter(debug,station_no,station_hgt,read_pres, read_hght, read_temp, read_dewp, read_wdir, read_wspd, NumberOfLines, read_lat, read_lon, read_year, read_month, read_day, read_hour, read_minute, instrument, min_lat, max_lat, min_lon, max_lon, delta_mins_minus, delta_mins_add, output_filename, min_lat_ind, max_lat_ind, min_lon_ind, max_lon_ind, delta_mins_minus_ind, delta_mins_add_ind, output_filename_ind) DEALLOCATE(remark2) DEALLOCATE(remark3) DEALLOCATE(read_pres) DEALLOCATE(read_hght) DEALLOCATE(read_temp) DEALLOCATE(read_dewp) DEALLOCATE(read_Wdir) DEALLOCATE(read_Wspd) END DO CLOSE(FileHandle) END SUBROUTINE SUBROUTINE readshiptempfile PURPOSE: This subroutine will Read in the data measured from the rawinsonde SUBROUTINE readshiptempfile(debug, shiptempfile, instrument, min_lat, max_lat, min_lon, max_lon, delta_mins_minus, delta_mins_add, output_filename, min_lat_ind, max_lat_ind, min_lon_ind, max_lon_ind, delta_mins_minus_ind, delta_mins_add_ind, output_filename_ind) IMPLICIT NONE INTEGER*4 FileHandle INTEGER*4 stat file status CHARACTER(LEN=11) shiptempfile ship rawinsonde filename CHARACTER(LEN=3) instrument instrument indentifier INTEGER*4 i Counter in the z-direction INTEGER*4 station_no Station Number INTEGER*4 station_hgt Station Hieght INTEGER*4 read_lat Latitude [degree*100] INTEGER*4 read_lon Longitude [degree*100] INTEGER*4 read_year Year INTEGER*4 read_month Month INTEGER*4 read_day Day INTEGER*4 past_hour Concatination by the hour var INTEGER*4 read_hour Hour INTEGER*4 past_minute Concatinate variable INTEGER*4 read_minute Minute -10-
11 INTEGER*4 redovar Var to read catted files INTEGER*4 read_record Total number of logical record INTEGER*4 NumberOfLines Actual number of data lines INTEGER*4, ALLOCATABLE, DIMENSION(:) :: read_pres Pressure INTEGER*4, ALLOCATABLE, DIMENSION(:) :: read_hght Height INTEGER*4, ALLOCATABLE, DIMENSION(:) :: read_temp Temperature INTEGER*4, ALLOCATABLE, DIMENSION(:) :: read_dewp Dewpoint INTEGER*4, ALLOCATABLE, DIMENSION(:) :: read_wdir Wind Dir INTEGER*4, ALLOCATABLE, DIMENSION(:) :: read_wspd Wind speed CHARACTER(LEN=3), ALLOCATABLE, DIMENSION(:) :: remark1 pres flag INTEGER*4, ALLOCATABLE, DIMENSION(:) :: remark2 var flag INTEGER*4, ALLOCATABLE, DIMENSION(:) :: remark3 Wspd flag Command line variables REAL*4 min_lat, max_lat User specified lat BC REAL*4 min_lon, max_lon User specified lon BC INTEGER*4 delta_mins_minus, delta_mins_add User specified time BC CHARACTER(LEN=20) output_filename User specified output filename Command line indicators LOGICAL min_lat_ind, max_lat_ind LOGICAL min_lon_ind, max_lon_ind LOGICAL delta_mins_minus_ind, delta_mins_add_ind LOGICAL output_filename_ind INTEGER*4 debug Debug level Formating statements 1000 FORMAT (3x, I5, 4x, 2I5, 2x, 5I2, I3) 2000 FORMAT (A2, 2I5, I2, I4, I2, I4, I2, 2I3, I2, 3x) 3000 FORMAT (37x) Start of the subroutine: opening and reading in the data into their respective variables and arrays. FileHandle = 11 redovar = 0 past_hour = 0 past_minute = 0 OPEN(UNIT=FileHandle,FILE=shiptempFile,ACTION='READ', IOSTAT=stat) IF (stat==0) THEN DO This line in the code will read in the header, and it sets up the the rest of the code. READ(FileHandle, 1000, END = 10) station_no, read_lat, read_lon, read_year, read_month, read_day, read_hour, read_minute, read_record This loop will ensure to keep reading a concatinated file and packages the *.snd files per hour. 10 IF (read_hour.ne. past_hour) THEN past_hour = read_hour read_minute = past_minute There is data from the instrument that cannot be injested into the model, however the read_record includes those lines as well. Thus the NumberOfLines variable sets the number of lines to read that contains data useful to the model. NumberOfLines = read_record
12 Allocate the arrays by the length of the data that is useful for the model. Since the remark2 variable is used for three different variables it gets allocated accordingly. ALLOCATE(remark1(NumberOfLines)) ALLOCATE(remark2(3*NumberOfLines)) ALLOCATE(remark3(NumberOfLines)) ALLOCATE(read_pres(NumberOfLines)) ALLOCATE(read_hght(NumberOfLines)) ALLOCATE(read_temp(NumberOfLines)) ALLOCATE(read_dewp(NumberOfLines)) ALLOCATE(read_Wdir(NumberOfLines)) ALLOCATE(read_Wspd(NumberOfLines)) This is the part of the code that does the actual reading in of the data (useful and useless). DO i = 1, NumberOfLines, 1 READ(FileHandle,2000, END = 20) remark1(i), read_pres(i), read_hght(i), remark2(3*i-2), read_temp(i), remark2(3*i-1), read_dewp(i), remark2(3*i), read_wdir(i), read_wspd(i), remark3(i) 20 CONTINUE END DO READ(FileHandle,3000, IOSTAT = redovar) This is a set of conditions for the code to exit if it has reached the end of the file or something is wrong with the input data, if not, continue running within the do loop. IF (redovar > 0) THEN... something wrong... WRITE(*,*) "ERROR: Something is wrong with the data file." EXIT IF (redovar < 0) THEN... end of file reached... EXIT... do normal stuff... Call on the subroutine to convet the units from what was read in to what the model requires. CALL UnitConverter(debug,station_no,station_hgt,read_pres, read_hght, read_temp, read_dewp, read_wdir, read_wspd, NumberOfLines, read_lat, read_lon, read_year, read_month, read_day, read_hour, read_minute, instrument, min_lat, max_lat, min_lon, max_lon, delta_mins_minus, delta_mins_add, output_filename, min_lat_ind, max_lat_ind, min_lon_ind, max_lon_ind, delta_mins_minus_ind, delta_mins_add_ind, output_filename_ind) DEALLOCATE(remark1) DEALLOCATE(remark2) DEALLOCATE(remark3) DEALLOCATE(read_pres) DEALLOCATE(read_hght) DEALLOCATE(read_temp) DEALLOCATE(read_dewp) DEALLOCATE(read_Wdir) DEALLOCATE(read_Wspd) END DO -12-
13 CLOSE(FileHandle) END SUBROUTINE SUBROUTINE readdroptempfile PURPOSE: This subroutine will Read in the data measured from the dropsonde SUBROUTINE readdroptempfile(debug, tempdropfile, instrument, min_lat, max_lat, min_lon, max_lon, delta_mins_minus, delta_mins_add, output_filename, min_lat_ind, max_lat_ind, min_lon_ind, max_lon_ind, delta_mins_minus_ind, delta_mins_add_ind, output_filename_ind) IMPLICIT NONE INTEGER*4 FileHandle INTEGER*4 stat file status CHARACTER(LEN=11) tempdropfile dropsonde filename CHARACTER(LEN=3) instrument instrument indentifier INTEGER*4 i Counter in the z-direction INTEGER*4 station_no Station Number INTEGER*4 station_hgt Station Hieght INTEGER*4 read_lat Latitude [degree*100] INTEGER*4 read_lon Longitude [degree*100] INTEGER*4 read_year Year INTEGER*4 read_month Month INTEGER*4 read_day Day INTEGER*4 past_hour Concatination by the hour var INTEGER*4 read_hour Hour INTEGER*4 past_minute Concatinate variable INTEGER*4 read_minute Minute INTEGER*4 redovar Var to read catted files INTEGER*4 read_record Total number of logical record INTEGER*4 NumberOfLines Actual number of data lines INTEGER*4, ALLOCATABLE, DIMENSION(:) :: read_pres Pressure INTEGER*4, ALLOCATABLE, DIMENSION(:) :: read_hght Height INTEGER*4, ALLOCATABLE, DIMENSION(:) :: read_temp Temperature INTEGER*4, ALLOCATABLE, DIMENSION(:) :: read_dewp Dewpoint INTEGER*4, ALLOCATABLE, DIMENSION(:) :: read_wdir Wind Dir INTEGER*4, ALLOCATABLE, DIMENSION(:) :: read_wspd Wind speed CHARACTER(LEN=3) EndOfFileChecker Checks for the end of file CHARACTER(LEN=3), ALLOCATABLE, DIMENSION(:) :: remark1 pres flag INTEGER*4, ALLOCATABLE, DIMENSION(:) :: remark2 var flag INTEGER*4, ALLOCATABLE, DIMENSION(:) :: remark3 Wspd flag INTEGER*4, ALLOCATABLE, DIMENSION(:) :: remark4 Wsfc flag Command line variables REAL*4 min_lat, max_lat User specified lat BC REAL*4 min_lon, max_lon User specified lon BC INTEGER*4 delta_mins_minus, delta_mins_add User specified time BC CHARACTER(LEN=20) output_filename User specified output filename Command line indicators LOGICAL min_lat_ind, max_lat_ind LOGICAL min_lon_ind, max_lon_ind LOGICAL delta_mins_minus_ind, delta_mins_add_ind LOGICAL output_filename_ind INTEGER*4 debug Formating statements Debug level -13-
14 1000 FORMAT (A3, 9x, 2I5, 2x, 5I2, I3) 2000 FORMAT (A2, 2I5, I2, I4, I2, I4, I2, 2I3, I2, I3) 3000 FORMAT (37x) Start of the subroutine: opening and reading in the data into their respective variables and arrays. FileHandle = 11 redovar = 0 past_hour = 0 past_minute = 0 OPEN(UNIT=FileHandle,FILE=tempdropFile,ACTION='READ', IOSTAT=stat) IF (stat==0) THEN DO This line in the code will read in the header, and it sets up the the rest of the code. READ(FileHandle, 1000, END =10) EndOfFileChecker, read_lat, read_lon, read_year, read_month, read_day, read_hour, read_minute, read_record This loop will ensure to keep reading a concatinated file and packages the *.snd files per hour. 10 IF (read_hour.ne. past_hour) THEN past_hour = read_hour read_minute = past_minute There is data from the instrument that cannot be injested into the model, however the read_record includes those lines as well. Thus the NumberOfLines variable sets the number of lines to read that contains data useful to the model. NumberOfLines = read_record - 5 Allocate the arrays by the length of the data that is useful for the model. Since the remark2 variable is used for three different variables it gets allocated accordingly. ALLOCATE(remark1(NumberOfLines)) ALLOCATE(remark2(3*NumberOfLines)) ALLOCATE(remark3(NumberOfLines)) ALLOCATE(remark4(NumberOfLines)) ALLOCATE(read_pres(NumberOfLines)) ALLOCATE(read_hght(NumberOfLines)) ALLOCATE(read_temp(NumberOfLines)) ALLOCATE(read_dewp(NumberOfLines)) ALLOCATE(read_Wdir(NumberOfLines)) ALLOCATE(read_Wspd(NumberOfLines)) This is the part of the code that does the actual reading in of the data (useful and useless). DO i = 1, NumberOfLines, 1 READ(FileHandle,2000, END = 20) remark1(i), read_pres(i), read_hght(i), remark2(3*i-2), read_temp(i), remark2(3*i-1), read_dewp(i), remark2(3*i), read_wdir(i), read_wspd(i), remark4(i), remark3(i) 20 END DO READ(FileHandle,3000, END = 30) -14-
15 30 READ(FileHandle,3000, END = 40) 40 READ(FileHandle,3000, END = 50) 50 READ(FileHandle,3000, IOSTAT = redovar) This is a set of conditions for the code to exit if it has reached the end of the file or something is wrong with the input data, if not, continue running within the do loop. IF (redovar > 0) THEN... something wrong... WRITE(*,*) "... Something is wrong with the data file..." EXIT IF (redovar < 0) THEN... end of file reached... EXIT... do normal stuff... Call on the subroutine to convet the units from what was read in to what the model requires. CALL UnitConverter(debug,station_no,station_hgt,read_pres, read_hght, read_temp, read_dewp, read_wdir, read_wspd, NumberOfLines, read_lat, read_lon, read_year, read_month, read_day, read_hour, read_minute, instrument, min_lat, max_lat, min_lon, max_lon, delta_mins_minus, delta_mins_add, output_filename, min_lat_ind, max_lat_ind, min_lon_ind, max_lon_ind, delta_mins_minus_ind, delta_mins_add_ind, output_filename_ind) DEALLOCATE(remark1) DEALLOCATE(remark2) DEALLOCATE(remark3) DEALLOCATE(remark4) DEALLOCATE(read_pres) DEALLOCATE(read_hght) DEALLOCATE(read_temp) DEALLOCATE(read_dewp) DEALLOCATE(read_Wdir) DEALLOCATE(read_Wspd) END DO CLOSE(FileHandle) END SUBROUTINE SUBROUTINE readtempfile PURPOSE: This subroutine will Read in the data measured from the rawinsonde SUBROUTINE readtempfile(debug, tempfile, instrument, min_lat, max_lat, min_lon, max_lon, delta_mins_minus, delta_mins_add, output_filename, min_lat_ind, max_lat_ind, min_lon_ind, max_lon_ind, delta_mins_minus_ind, delta_mins_add_ind, output_filename_ind) -15-
16 IMPLICIT NONE INTEGER*4 FileHandle INTEGER*4 stat file status CHARACTER(LEN=11) tempfile rawinsonde filename CHARACTER(LEN=3) instrument instrument indentifier INTEGER*4 i Counter in the z-direction INTEGER*4 station_no Station Number INTEGER*4 station_hgt Station Hieght INTEGER*4 read_lat Latitude [degree*100] INTEGER*4 read_lon Longitude [degree*100] INTEGER*4 read_year Year INTEGER*4 read_month Month INTEGER*4 read_day Day INTEGER*4 past_hour Concatination by the hour var INTEGER*4 read_hour Hour INTEGER*4 past_minute Concatinate variable INTEGER*4 read_minute Minute INTEGER*4 redovar Var to read catted files INTEGER*4 read_record Total number of logical record INTEGER*4 NumberOfLines Actual number of data lines INTEGER*4, ALLOCATABLE, DIMENSION(:) :: read_pres Pressure INTEGER*4, ALLOCATABLE, DIMENSION(:) :: read_hght Height INTEGER*4, ALLOCATABLE, DIMENSION(:) :: read_temp Temperature INTEGER*4, ALLOCATABLE, DIMENSION(:) :: read_dewp Dewpoint INTEGER*4, ALLOCATABLE, DIMENSION(:) :: read_wdir Wind Dir INTEGER*4, ALLOCATABLE, DIMENSION(:) :: read_wspd Wind speed CHARACTER(LEN=3), ALLOCATABLE, DIMENSION(:) :: remark1 pres flag INTEGER*4, ALLOCATABLE, DIMENSION(:) :: remark2 var flag INTEGER*4, ALLOCATABLE, DIMENSION(:) :: remark3 Wspd flag Command line variables REAL*4 min_lat, max_lat User specified lat BC REAL*4 min_lon, max_lon User specified lon BC INTEGER*4 delta_mins_minus, delta_mins_add User specified time BC CHARACTER(LEN=20) output_filename User specified output filename Command line indicators LOGICAL min_lat_ind, max_lat_ind LOGICAL min_lon_ind, max_lon_ind LOGICAL delta_mins_minus_ind, delta_mins_add_ind LOGICAL output_filename_ind INTEGER*4 debug Debug level Formating statements 1000 FORMAT (3x, I5, I4, 2I5, 2x, 5I2, I3) 2000 FORMAT (A2, 2I5, I2, I4, I2, I4, I2, 2I3, I2, 3x) 3000 FORMAT (37x) Start of the subroutine: opening and reading in the data into their respective variables and arrays. FileHandle = 11 redovar = 0 past_hour = 0 past_minute = 0 OPEN(UNIT=FileHandle,FILE=tempFile,ACTION='READ',IOSTAT=stat) IF (stat==0) THEN DO This line in the code will read in the header, and it sets up the the rest of the code. READ(FileHandle, 1000, END = 10) station_no, station_hgt, read_lat, read_lon, read_year, read_month, read_day, read_hour, read_minute, read_record -16-
17 This loop will ensure to keep reading a concatinated file and packages the *.snd files per hour. 10 IF (read_hour.ne. past_hour) THEN past_hour = read_hour read_minute = past_minute There is data from the instrument that cannot be injested into the model, however the read_record includes those lines as well. Thus the NumberOfLines variable sets the number of lines to read that contains data useful to the model. NumberOfLines = read_record - 2 Allocate the arrays by the length of the data that is useful for the model. Since the remark2 variable is used for three different variables it gets allocated accordingly. ALLOCATE(remark1(NumberOfLines)) ALLOCATE(remark2(3*NumberOfLines)) ALLOCATE(remark3(NumberOfLines)) ALLOCATE(read_pres(NumberOfLines)) ALLOCATE(read_hght(NumberOfLines)) ALLOCATE(read_temp(NumberOfLines)) ALLOCATE(read_dewp(NumberOfLines)) ALLOCATE(read_Wdir(NumberOfLines)) ALLOCATE(read_Wspd(NumberOfLines)) This is the part of the code that does the actual reading in of the data (useful and useless). DO i = 1, NumberOfLines, 1 READ(FileHandle,2000, END = 20) remark1(i), read_pres(i), read_hght(i), remark2(3*i-2), read_temp(i), remark2(3*i-1), read_dewp(i), remark2(3*i), read_wdir(i), read_wspd(i), remark3(i) 20 CONTINUE END DO READ(FileHandle,3000, IOSTAT = redovar) This is a set of conditions for the code to exit if it has reached the end of the file or something is wrong with the input data, if not, continue running within the do loop. IF (redovar > 0) THEN... something wrong... WRITE(*,*) "ERROR: Something is wrong with the data file." EXIT IF (redovar < 0) THEN... end of file reached... EXIT... do normal stuff... Call on the subroutine to convet the units from what was read in to what the model requires. CALL UnitConverter(debug,station_no,station_hgt,read_pres, read_hght, read_temp, read_dewp, read_wdir, read_wspd, NumberOfLines, read_lat, read_lon, read_year, read_month, read_day, read_hour, read_minute, instrument, min_lat, max_lat, min_lon, max_lon, delta_mins_minus, -17-
18 delta_mins_add, output_filename, min_lat_ind, max_lat_ind, min_lon_ind, max_lon_ind, delta_mins_minus_ind, delta_mins_add_ind, output_filename_ind) DEALLOCATE(remark1) DEALLOCATE(remark2) DEALLOCATE(remark3) DEALLOCATE(read_pres) DEALLOCATE(read_hght) DEALLOCATE(read_temp) DEALLOCATE(read_dewp) DEALLOCATE(read_Wdir) DEALLOCATE(read_Wspd) END DO CLOSE(FileHandle) END SUBROUTINE SUBROUTINE UnitConverter PURPOSE: This subroutine coverts the data into the units needed for assimulation into the ARPS model. The variables with the prefix read_ contained the original data provided by the temp file in their original units. Whereas, the variables with the prefix output_ contain the data modified from the temp file into the units needed for ARPS dvar SUBROUTINE UnitConverter(debug,station_no,station_hgt,read_pres, read_hght, read_temp, read_dewp, read_wdir, read_wspd, NumberOfLines, read_lat, read_lon, read_year, read_month, read_day, read_hour, read_minute, instrument, min_lat, max_lat, min_lon, max_lon, delta_mins_minus,delta_mins_add, output_filename, min_lat_ind, max_lat_ind, min_lon_ind, max_lon_ind, delta_mins_minus_ind, delta_mins_add_ind, output_filename_ind) IMPLICIT NONE CHARACTER(LEN=20) OutName *.snd filename variable CHARACTER(LEN=3) instrument instrument indentifier INTEGER*4 i Counter in the z-direction INTEGER*4 station_no station number INTEGER*4 station_hgt input station hieght REAL*4 output_station_hgt output station hieght INTEGER*4 NumberOfLines number of data in the vertical INTEGER*4 ActualLines actual number of data INTEGER*4 read_lat Latitude [degree*100] INTEGER*4 read_lon Longitude [degree*100] INTEGER*4 read_year year INTEGER*4 read_month month INTEGER*4 read_day day INTEGER*4 read_hour hour INTEGER*4 read_minute minute -18-
19 REAL*4 output_lat Latitude [degree] REAL*4 output_lon Longitude [degree] INTEGER*4, DIMENSION(NumberOfLines) :: read_pres Pressure INTEGER*4, DIMENSION(NumberOfLines) :: read_hght Hieght INTEGER*4, DIMENSION(NumberOfLines) :: read_temp Temperature INTEGER*4, DIMENSION(NumberOfLines) :: read_dewp Dewpoint INTEGER*4, DIMENSION(NumberOfLines) :: read_wdir Wind dir INTEGER*4, DIMENSION(NumberOfLines) :: read_wspd Wind spd REAL*4, DIMENSION(NumberOfLines) :: output_pres Pressure REAL*4, DIMENSION(NumberOfLines) :: output_temp Temperature REAL*4, DIMENSION(NumberOfLines) :: output_dewp Dewpoint REAL*4, DIMENSION(NumberOfLines) :: output_wdir Wind Dir REAL*4, DIMENSION(NumberOfLines) :: output_wspd Wind Speed REAL*4, DIMENSION(NumberOfLines) :: output_hght Hieght Command line variables REAL*4 min_lat, max_lat User specified lat BC REAL*4 min_lon, max_lon User specified lon BC INTEGER*4 delta_mins_minus, delta_mins_add User specified time BC CHARACTER(LEN=20) output_filename User specified output filename Command line indicators LOGICAL min_lat_ind, max_lat_ind LOGICAL min_lon_ind, max_lon_ind LOGICAL delta_mins_minus_ind, delta_mins_add_ind LOGICAL output_filename_ind LOGICAL datum Data does(n't) fit the date range INTEGER*4 debug Debug level Simple unit and variable types conversions. output_lat = read_lat/100. output_lon = read_lon/100. output_station_hgt = station_hgt*1. output_hght = read_hght output_pres = read_pres/10. output_temp = read_temp/10. DO i = 1, NumberofLines, 1 IF (read_dewp(i) == -999) THEN output_dewp(i) = else output_dewp(i) = (read_temp(i) - ABS(read_dewp(i)))/10. END DO output_wdir = read_wdir output_wspd = read_wspd Change missing data which is represented one way in the temp file into the -999., which is required for the model. ActualLines = 0 DO i = 1, NumberofLines, 1 IF (output_pres(i) == ) THEN output_pres(i) = ENDDO DO i = 1, NumberofLines, 1 IF (output_hght(i) == ) THEN output_hght(i) = ActualLines = ActualLines + 1 ENDDO -19-
20 DO i = 1, NumberofLines, 1 IF (output_temp(i) == -99.9) THEN output_temp(i) = output_dewp(i) = ENDDO DO i = 1, NumberofLines, 1 IF (output_wspd(i) == -99.) THEN output_wspd(i) = ENDDO DO i = 1, NumberofLines, 1 IF (output_wdir(i) == -99.) THEN output_wdir(i) = ENDDO This calls a subroutine that creates the name of the *.snd file and stores it in the OutName variable. CALL createoutname(read_year, read_month, read_day, read_hour, read_minute, delta_mins_minus, delta_mins_add, delta_mins_minus_ind, delta_mins_add_ind, OutName, datum) This calls a subroutine that creates the *.snd file and inputs all the data necessary for data assimulation. CALL outputintoascii(debug, station_no, output_station_hgt, NumberOfLines, ActualLines,output_lat, output_lon, output_pres, output_hght, output_temp, output_dewp,output_wdir, output_wspd, OutName, instrument, min_lat, max_lat, min_lon, max_lon, output_filename, min_lat_ind, max_lat_ind, min_lon_ind, max_lon_ind, output_filename_ind, datum) RETURN ENDSUBROUTINE SUBROUTINE createoutname PURPOSE: Creates the name of the *.snd file and returns the name back in the OutName variable SUBROUTINE createoutname(year, month, day, hour, minute, mins_minus, mins_add, mins_minus_ind, mins_add_ind, OutName, datum) IMPLICIT NONE CHARACTER(LEN=20) OutName *.snd filename variable CHARACTER(LEN=2) centurychar 19/20 century INTEGER*4 filehandle -20-
21 INTEGER*4 startyear, year INTEGER*4 startmonth, month INTEGER*4 startday, day INTEGER*4 starthour, hour INTEGER*4 startminute, minute Command line variables INTEGER*4 mins_minus, mins_add User specified time BC Command line indicators LOGICAL mins_minus_ind, mins_add_ind, datum delta dates INTEGER*4 yearminusone, yearplusone INTEGER*4 monthminusone, monthplusone INTEGER*4 dayminusone, dayplusone INTEGER*4 hourminusone, hourplusone INTEGER*4 minuteminusone, minuteplusone OutName variable format 200 FORMAT(A21,2(I2.2,A),I4,A,2I2) 880 FORMAT(A4,I4.4,4(I2.2),A4) Calculates what century the data is from. IF(year >= 50) THEN centurychar = "19" centurychar = "20" filehandle = 12 OPEN(UNIT=fileHandle, FILE='yearfile') WRITE(fileHandle,'(A2,I2.2)') centurychar, year CLOSE(fileHandle) filehandle = 13 OPEN(UNIT=fileHandle, FILE='yearfile') READ(UNIT=fileHandle,"(I4)") year CLOSE(UNIT=fileHandle, DISP='DELETE') Check to see if the data fits the specified time window, if not then data will not be plotted in the end as datum will equal.false.. startyear = year startmonth = month startday = day starthour = hour startminute = minute datum =.FALSE. CALL timeminusone(year, month, day, hour, minute, mins_minus, mins_minus_ind, yearminusone, monthminusone, dayminusone, hourminusone, minuteminusone) CALL timeplusone(year, month, day, hour, minute, mins_add, mins_add_ind, yearplusone, monthplusone, dayplusone, hourplusone, minuteplusone) IF (startyear.le. yearplusone.and. startyear.ge. yearminusone) THEN IF (startmonth.le. monthplusone.and. startmonth.ge. monthminusone) THEN IF (startmonth == 1) THEN CONTINUE Error Check datum=.false. -21-
22 WRITE (*,200) ' DATA OMITTED on ',startmonth,'/', startday,'/',startyear,'/',starthour, startminute WRITE(*,*) " becuase t < +/- 1 month" IF (startday.le. dayplusone.and. startday.ge. dayminusone)then IF (startday == 1) THEN CONTINUE Error Check datum=.false. WRITE (*,200) ' DATA OMITTED on ',startmonth,'/', startday,'/',startyear,'/',starthour, startminute WRITE(*,*) " becuase t < +/- 1 day" IF (starthour.le. hourplusone.and. starthour.ge. hourminusone) THEN IF (starthour == 0) THEN CONTINUE datum=.false. WRITE (*,200) ' DATA OMITTED on ',startmonth, '/', startday,'/',startyear,'/', starthour,startminute WRITE(*,*) " becuase t < +/-1 hour" IF ((startminute.le. minuteplusone.and. abs(startminute).le. 60-minuteminusone).OR. (starthour.eq. hourminusone.and. startminute.ge. minuteplusone)) THEN datum=.true. IF (startminute == 0) THEN continue Error Check datum=.false. WRITE (*,200) ' DATA OMITTED on ',startmonth,'/', startday,'/',startyear,'/',starthour, startminute WRITE(*,*) " becuase t < +/-60 minutes" Error Check datum=.false. WRITE (*,200) ' DATA OMITTED on ',startmonth,'/', startday,'/',startyear,'/',starthour, startminute WRITE(*,*) " becuase t < +/- 1 year" Data are placed by the hour, thus if we want all the data to be in one file per hour we must set the minutes to a set time. minute=0 Opens up a dummy file, which writes out the OutName variable, which is later on read into the variable. Once its done, this dummy file gets deleted. filehandle = 12 OPEN(UNIT=fileHandle, FILE='namefile') WRITE(fileHandle,880) "uair", year, month, day, hour, minute, ".snd" -22-
23 CLOSE(fileHandle) filehandle = 13 OPEN(UNIT=fileHandle, FILE='namefile') READ(fileHandle,"A20") OutName CLOSE(UNIT=fileHandle, DISP='DELETE') RETURN ENDSUBROUTINE SUBROUTINE timeminusone PURPOSE: This subroutine will calcuate the correct time given the user specified time interval. Default is set to plus or minus one hour SUBROUTINE timeminusone(startyear, startmonth, startday, starthour, startminute, mins_minus, mins_minus_ind, yearminusone, monthminusone, dayminusone, hourminusone, minuteminusone) IMPLICIT NONE INTEGER*4 startyear, year, yearminusone INTEGER*4 startmonth, month, monthminusone INTEGER*4 startday, day, dayminusone INTEGER*4 starthour, hour, hourminusone INTEGER*4 startminute, minute, minuteminusone Command line variables INTEGER*4 mins_minus User specified time BC Command line indicators LOGICAL mins_minus_ind User specified time BC indicator year = startyear month = startmonth day = startday hour = starthour minute = startminute IF (mins_minus_ind.eq..false.) THEN IF (hour == 0) THEN hour = 23 day = day - 1 hour = hour - 1 minute = 00 IF (hour == 0) THEN hour = 23 day = day - 1 hour = hour - 1 minute = 60 - mins_minus -23-
24 If we were to subtract 1 hour it could easily change the day, month, or year. The code below will allow us to subtract one hour properly. IF (day == 0.AND. hour == 23) THEN IF (month == 1) THEN month = 12 day = 31 year = year - 1 IF (month == 3) THEN month = 2 IF(MOD(year,4) == 0.OR. MOD(year,100) == 0.OR. (MOD(year,400) == 0.OR. MOD(year,100) == 0)) THEN Leap Year day = 29 day = 28 IF (month == 5.OR. month == 7.OR. month == 8.OR. month == 10.OR. month == 12) THEN month = month - 1 day = 30 IF (month == 2.OR. month == 4.OR. month == 6.OR. month == 9.OR. month == 11) THEN month = month - 1 day = 31 yearminusone = year monthminusone = month dayminusone = day hourminusone = hour minuteminusone = minute RETURN ENDSUBROUTINE SUBROUTINE timeplusone PURPOSE: This subroutine will calcuate the correct time given the user specified time interval. Default is set to plus or minus one hour SUBROUTINE timeplusone(startyear, startmonth, startday, starthour, startminute, mins_plus, mins_plus_ind, yearplusone, monthplusone, dayplusone, hourplusone, minuteplusone) IMPLICIT NONE INTEGER*4 startyear, year, yearplusone INTEGER*4 startmonth, month, monthplusone INTEGER*4 startday, day, dayplusone INTEGER*4 starthour, hour, hourplusone INTEGER*4 startminute, minute, minuteplusone Command line variables INTEGER*4 mins_plus User specified time BC Command line indicators LOGICAL mins_plus_ind User specified time BC indicator -24-
25 year = startyear month = startmonth day = startday hour = starthour minute = startminute IF (mins_plus_ind.eq..false.) THEN IF (hour.eq. 23) THEN hour = 00 day = day + 1 hour = hour + 1 minute = 00 IF (hour.eq. 23) THEN hour = 00 day = day + 1 hour = hour + 1 minute = mins_plus If we were to add 1 hour it could easily change the day, month, or year. The code below will allow us to add one hour properly. IF (day == 31.AND. hour == 00) THEN IF (month == 12) THEN month = 1 day = 1 year = year + 1 IF (month == 2) THEN month = 2 IF(MOD(year,4).EQ. 0.OR. MOD(year,100).NE. 0.OR. (MOD(year,400).EQ. 0.OR. MOD(year,100).EQ. 0)) THEN Leap Year day = 29 month = 3 day = 1 IF (month == 1.OR. month == 3.OR. month == 5.OR. month == 7.OR. month == 8.OR. month == 10) THEN month = month + 1 day = 1 IF (month == 4.OR. month == 6.OR. month == 9.OR. month == 11) THEN month = month + 1 day = 1 yearplusone = year monthplusone = month dayplusone = day hourplusone = hour minuteplusone = minute RETURN ENDSUBROUTINE
26 SUBROUTINE outputintoascii PURPOSE: This subroutine outputs the data into an *.snd file SUBROUTINE outputintoascii(debug, station_no, station_hgt, NumberOfLines, Actual,lat,lon,pres,hgt, temp, dewp, Wdir, Wspd, OutName, instrument, min_lat, max_lat, min_lon, max_lon, output_filename, min_lat_ind, max_lat_ind, min_lon_ind, max_lon_ind, output_filename_ind, datum) IMPLICIT NONE INTEGER*4 i Counter in the z-direction INTEGER*4 filehandle INTEGER*4 station_no station number REAL*4 station_hgt station height INTEGER*4 NumberOfLines number of line of useful data INTEGER*4 Actual actual number of lines in data CHARACTER(LEN=20) OutName *.snd filename variable CHARACTER(LEN=3) instrument REAL*4 lat Latitude [degree] REAL*4 lon Longitude [degree] REAL*4, DIMENSION(NumberOfLines) :: pres Pressure [mb] REAL*4, DIMENSION(NumberOfLines) :: hgt Height [gpm] REAL*4, DIMENSION(NumberOfLines) :: temp Temperature [C] REAL*4, DIMENSION(NumberOfLines) :: dewp Dewpoint [C] REAL*4, DIMENSION(NumberOfLines) :: Wdir Wind Dir [deg] REAL*4, DIMENSION(NumberOfLines) :: Wspd Wind Speed [m/s] Command line variables REAL*4 min_lat, max_lat User specified lat BC REAL*4 min_lon, max_lon User specified lon BC INTEGER*4 delta_mins_minus, delta_mins_add User specified time BC CHARACTER(LEN=20) output_filename User specified output filename Command line indicators LOGICAL min_lat_ind, max_lat_ind LOGICAL min_lon_ind, max_lon_ind LOGICAL output_filename_ind LOGICAL datum Data does(n't) fit the date range INTEGER*4 debug Debug level Formating statements for the *.snd file. FORMAT 860 is for the header, while FORMAT 870 is for the body of data. 200 FORMAT(A18,F6.2,A2,F6.2,A) 860 FORMAT(2I12,f11.4,f15.4,F15.0,5x,A5,1x,A8) 870 FORMAT(6F10.2) Setting boundaries specified by the user if any. IF (min_lat_ind.eq..false.) THEN min_lat = IF (max_lat_ind.eq..false.) THEN max_lat = IF (min_lon_ind.eq..false.) THEN min_lon = IF (max_lon_ind.eq..false.) THEN max_lon =
27 IF (output_filename_ind.eq..true.) THEN OutName = output_filename Opening and writing into the file the header and body of data, and append data (only if it fits within an one hour time window). IF (datum.eq..true.) THEN IF (lat.gt. min_lat.and. lat.lt. max_lat.and. lon.gt. min_lon.and. lon.lt. max_lon ) THEN filehandle = 13 OPEN(UNIT=fileHandle,FILE=OutName,POSITION='APPEND') IF (instrument == "TMP") THEN WRITE(fileHandle,860) station_no, Actual, lat, lon,station_hgt, "intmp", "CWBRAWIN" DO i = 1, NumberOfLines, 1 IF (hgt(i) == -999.) THEN WRITE(fileHandle,870) hgt(i), pres(i), temp(i), dewp(i), Wdir(i), Wspd(i) ENDDO IF (debug == 9) THEN DO i = 1, NumberOfLines, 1 WRITE(*,860) station_no, NumberOfLines, lat, lon, station_hgt WRITE(*,870) hgt(i), pres(i), temp(i), dewp(i), END DO Wdir(i), Wspd(i) IF (instrument == "DRP") THEN station_no = station_hgt = 0. WRITE(fileHandle,860) station_no, Actual, lat, lon,station_hgt, "indrp", "DROPWIND" DO i = 1, NumberOfLines, 1 IF (hgt(i) == -999.) THEN WRITE(fileHandle,870) hgt(i), pres(i), temp(i), dewp(i), Wdir(i), Wspd(i) ENDDO IF (debug == 9) THEN DO i = 1, NumberOfLines, 1 WRITE(*,860) station_no, NumberOfLines, lat, lon, station_hgt WRITE(*,870) hgt(i), pres(i), temp(i), dewp(i), END DO Wdir(i), Wspd(i) IF (instrument == "STP") THEN station_hgt = 0. WRITE(fileHandle,860) station_no, Actual, lat, lon,station_hgt, "instp", "SHIPDATA" DO i = 1, NumberOfLines, 1 IF (hgt(i) == -999.) THEN WRITE(fileHandle,870) hgt(i), pres(i), temp(i), dewp(i), Wdir(i), Wspd(i) -27-
Getting Started with Milestone 2. From Lat Lon, to Cartesian, and back again
Getting Started with Milestone 2 From Lat Lon, to Cartesian, and back again Initial Steps 1. Download m2 handout 2. Follow the walkthrough in Section 4 3. Read the EZGL QuickStart Guide 4. Modify main.cpp
More informationComputers in Engineering. Subroutines Michael A. Hawker
Computers in Engineering COMP 208 Subroutines Michael A. Hawker Subprograms Functions are one type of subprogram in FORTRAN Another type of subprogram FORTRAN allows is called a subroutine There are many
More informationDynamics of the Atmosphere GEMPAK Supplementary Handout
Dynamics of the Atmosphere GEMPAK Supplementary Handout Vertical coordinates PRES Pressure TROP Tropopause level FRZL Freezing level CLDT Cloud-top level CLDL Cloud-base level HGHT Height above the ground
More informationNoahMP namelist.hrldas: Description of Options
NoahMP namelist.hrldas: Description of Options (notes are in bold blue and indicated with
More informationSyed RH Rizvi.
Community Tools: gen_be Syed RH Rizvi National Center For Atmospheric Research NCAR/ESSL/MMM, Boulder, CO-80307, USA rizvi@ucar.edu 0 Talk overview What is gen_be? How it works? Some technical details
More informationCombining Solr and Elasticsearch to Improve Autosuggestion on Mobile Local Search. Toan Vinh Luu, PhD Senior Search Engineer local.
Combining Solr and Elasticsearch to Improve Autosuggestion on Mobile Local Search Toan Vinh Luu, PhD Senior Search Engineer local.ch AG In this talk Autosuggestion feature Autosuggestion architecture Evaluation
More informationTelFit Documentation. Release Kevin Gullikson
TelFit Documentation Release 1.3.0 Kevin Gullikson June 23, 2015 Contents 1 Introduction to Telluric Modeling with TelFit 3 2 Installation 5 3 TelFit Tutorial 7 3.1 Generating a Telluric Model with TelFit.................................
More informationPACKAGE SPECIFICATION HSL 2013
PACKAGE SPECIFICATION HSL 2013 1 SUMMARY Given a rank-one or rank-two allocatable array, reallocates the array to have a different size, and can copy all or part of the original array into the new array.
More informationOnline Trajectory Module in COSMO - A short user guide
Online Trajectory Module in COSMO - A short user guide Document version: 1.0 (as of June 2014) Annette K. Miltenberger, Stephan Pfahl, Anne Roches, Heini Wernli IAC and C2SM, ETH Zurich Contact: stephan.pfahl@env.ethz.ch
More informationFortran Coding Standards and Style
Fortran Coding Standards and Style The Fortran Company Version 20160112 Copyright 2015-2016, The Fortran Company All rights reserved. Redistribution, with or without modification, is permitted provided
More informationSpecifications of the EMSC testimony s Service
Specifications of the EMSC testimony s Service Version 1.0 Status Final Authors Matthieu Landès (EMSC) Dissemination level Public Related project EPOS, Grant agreement n 676564, WP 8.5 Keywords EPOS, Individual
More informationIn this exercise, you ll create a netcdf raster layer using the variable tmin. You will change the display by selecting a different time step.
Learning to Work with Temporal Data in ArcGIS Working with a netcdf File in ArcGIS Objective NetCDF (network Common Data Form) is a file format for storing multidimensional scientific data (variables)
More informationGrADS for Beginners. Laura Mariotti
GrADS for Beginners Laura Mariotti mariotti@ictp.it Outline n What is GrADS and how do I get it? n GrADS essentials n Getting started n Gridded data sets n Displaying data n Script language n Saving your
More informationC interfaces to HSL routines. J. D. Hogg. Version 1.0 5th December Numerical Analysis Group Internal Report
2011-1 Numerical Analysis Group Internal Report C interfaces to HSL routines J. D. Hogg Version 1.0 5th December 2011 Copyright (c) 2011 Science and Technology Facilities Council C interfaces to HSL routines
More informationEMEP model: SR Calculations, Sites, Sondes, and Nudging. Semeena Valiyaveetil Shamsudheen
EMEP model: SR Calculations, Sites, Sondes, and Nudging Semeena Valiyaveetil Shamsudheen Source Receptor Calculations: Concept: Name says it all. Calculations to find out where the pollutants get deposited
More informationNCL variable based on a netcdf variable model
NCL variable based on a netcdf variable model netcdf files self describing (ideally) all info contained within file no external information needed to determine file contents portable [machine independent]
More informationLesson 14 - Activity 1
13 Lesson 14 - Activity 1 / Term 1: Lesson 14 Coding Activity 1 Test if an integer is not between 5 and 76 inclusive. Sample Run 1 Enter a number: 7 False Sample Run 2 Enter a number: 1 True / class Lesson_14_Activity_One
More informationIntroduction to Modern Fortran
Introduction to Modern Fortran p. 1/?? Introduction to Modern Fortran Advanced Use Of Procedures Nick Maclaren nmm1@cam.ac.uk March 2014 Introduction to Modern Fortran p. 2/?? Summary We have omitted some
More informationComputers in Engineering COMP 208. Subprograms. Subroutines. Subroutines Michael A. Hawker
Computers in Engineering COMP 208 Subroutines Michael A. Hawker Subprograms Functions are one type of subprogram in FORTRAN Another type of subprogram FORTRAN allows is called a subroutine There are many
More informationITACS : Interactive Tool for Analysis of the Climate System
Contents 1 2 3 4 ITACS : Interactive Tool for Analysis of the Climate System Features of the ITACS Atmospheric Analysis Data, Outgoing Longwave Radiation (by NOAA), SST, Ocean Analysis Data, etc. Plain
More informationFORTRAN 90: Functions, Modules, and Subroutines. Meteorology 227 Fall 2017
FORTRAN 90: Functions, Modules, and Subroutines Meteorology 227 Fall 2017 Purpose First step in modular program design Cannot always anticipate all of the steps that will be needed to solve a problem Easier
More informationOld Questions Name: a. if b. open c. output d. write e. do f. exit
Old Questions Name: Part I. Multiple choice. One point each. 1. Which of the following is not a Fortran keyword? a. if b. open c. output d. write e. do f. exit 2. How many times will the code inside the
More informationProjections for use in the Merced River basin
Instructions to download Downscaled CMIP3 and CMIP5 Climate and Hydrology Projections for use in the Merced River basin Go to the Downscaled CMIP3 and CMIP5 Climate and Hydrology Projections website. 1.
More informationFor more detailed instruction, see the KTA-282 user manual. This document is a condensed version; intended as a reference.
For more detailed instruction, see the KTA-282 user manual. This document is a condensed version; intended as a reference. Weather Station Setup Configuring the KTA-282 Connection Description V + Power
More informationPyNGL & PyNIO Geoscience Visualization & Data IO Modules
PyNGL & PyNIO Geoscience Visualization & Data IO Modules SciPy 08 Dave Brown National Center for Atmospheric Research Boulder, CO Topics What are PyNGL and PyNIO? Quick summary of PyNGL graphics PyNIO
More informationAlexander Barth, Aida Alvera-Azcárate, Mohamed Ouberdous, Charles Troupin, Sylvain Watelet & Jean-Marie Beckers
Diva workshop 2014 Diva in 4 dimensions (GODIVA) Alexander Barth, Aida Alvera-Azcárate, Mohamed Ouberdous, Charles Troupin, Sylvain Watelet & Jean-Marie Beckers Acknowledgements: SeaDataNet, EMODnet Chemistry,
More informationeccodes BUFR decoding
eccodes BUFR decoding Fortran 90 and Python API part 1 Marijana Crepulja Marijana.Crepulja@ecmwf.int ECMWF March 7, 2017 Introduction: Fortran 90 subroutines to decode BUFR data Python subroutines to decode
More informationKAshima RAy-Tracing Service (KARATS)
KAshima RAy-Tracing Service (KARATS) Fast ray-tracing algorithms through numerical weather models for real-time positioning applications in East Asia T. Hobiger, R. Ichikawa, Y. Koyama, T. Kondo Overview
More informationWatcom FORTRAN 77. Language Reference. Edition 11.0c
Watcom FORTRAN 77 Language Reference Edition 110c Notice of Copyright Copyright 2000 Sybase, Inc and its subsidiaries All rights reserved No part of this publication may be reproduced, transmitted, or
More informationA hybrid object-based/pixel-based classification approach to detect geophysical phenomena
A hybrid object-based/pixel-based classification approach to detect geophysical phenomena Xiang Li, Rahul Ramachandran*, Sara Graves, Sunil Movva Information Technology and Systems Center University of
More informationStat Analysis Tool. Filtering Summarizing Aggregating. of Grid-Stat, Point-Stat, & Wavelet-Stat output
Stat Analysis Tool Filtering Summarizing Aggregating of Grid-Stat, Point-Stat, & Wavelet-Stat output Presenter: Tara Jensen What can Stat Analysis do for you? Can I get Q: Overall statistics for all gridded
More informationeccodes BUFR encoding
eccodes BUFR encoding Fortran 90 and Python API - part 1 Marijana Crepulja Marijana.Crepulja@ecmwf.int ECMWF February 21, 2018 Introduction: Fortran 90 subroutines to encode BUFR data Python subroutines
More informationDay One Export Documentation
Day One Export Documentation Release 1.0.0 Nathan Grigg May 09, 2018 Contents 1 Use the command line tool 3 1.1 Basic Usage............................................... 3 1.2 Use a custom template..........................................
More informationRecorded Data / Current Readings (XML Format) Specifications. Ver 1.25
Recorded Data / Current Readings (XML Format) Specifications Ver 1.25 Revision History Revision History By Date Version Contents 2010/3/16 1.00 First Release 2010/8/10 1.10 2011/6/30 1.20 Made compatible
More informationBasic Tiger File System for SmartMedia. Version 1.04
Basic Tiger File System for SmartMedia Version 1.04 Introduction...4 BTFS for SmartMedia Card...4 BTFS for SmartMedia File List...4 FS Include Files (directory File_System )...4 FS Examples (directory
More informationENGINEERING 1020 Introduction to Computer Programming M A Y 2 6, R E Z A S H A H I D I
ENGINEERING 1020 Introduction to Computer Programming M A Y 2 6, 2 0 1 0 R E Z A S H A H I D I Today s class Constants Assignment statement Parameters and calling functions Expressions Mixed precision
More informationObject Oriented Methods
Chapter 5 Object Oriented Methods 5.1 Introduction In Section 1.7 we outlined procedures that should be considered while conducting the object-oriented analysis and object-oriented design phases that are
More informationCS 109 C/C ++ Programming for Engineers w. MatLab Summer 2012 Homework Assignment 4 Functions Involving Barycentric Coordinates and Files
CS 109 C/C ++ Programming for Engineers w. MatLab Summer 2012 Homework Assignment 4 Functions Involving Barycentric Coordinates and Files Due: Wednesday July 11th by 8:00 a.m., via Blackboard. Optional
More informationCollect all of the raw.trd files into a directory such as /data/67 (67 was a deployment line). Run 125proci.sh using
Gathering 2005.022 This document describes the general procedure that was used for a particular project. This project had about 600 Texans, about 15 Reftek RT130's, and had both a few land shots and thousands
More information190 Lecture 18 files
190 Lecture 18 files Reading assignment: chapters 12,13,14,22,23. Open SciTE, Lect. 18 READING FROM AND WRITING TO FILES A file is a sequence of lines stored on the hard drive. Each line is character string
More informationIPSL Boot Camp Part 5:
IPSL Boot Camp Part 5: CDO and NCO Sabine Radanovics, Jérôme Servonnat March 24, 2016 1 / 33 Group exercise Suppose... We have Tasks 30 years climate model simulation 1 file per month, 6 hourly data netcdf
More informationBDS Query. JSON Query Syntax
BDS Doc Page 1 BDS Query 23 сентября 2015 г. 17:08 Purpose This document describes how to formulate queries against private and public data in the Biogeochemistry Data System (BDS): First through the User
More informationAn Introduction to Fortran
An Introduction to Fortran Sylvia Plöckinger March 10, 2011 Sylvia Plöckinger () An Introduction to Fortran March 10, 2011 1 / 43 General Information Find this file on: http://homepage.univie.ac.at/nigel.mitchell/numprac/
More informationAcquiring and Processing NREL Wind Prospector Data. Steven Wallace, Old Saw Consulting, 27 Sep 2016
Acquiring and Processing NREL Wind Prospector Data Steven Wallace, Old Saw Consulting, 27 Sep 2016 NREL Wind Prospector Interactive web page for viewing and querying wind data Over 40,000 sites in the
More informationNCAR/NSF GV New Automated Dropsonde System Overview
NCAR/NSF GV New Automated Dropsonde System Overview MPEX Meeting 13 December 2012 National Center for Atmospheric Research Earth Observing Lab Boulder, CO Terry Hock GV Dropsonde Team ISF - Terry Hock,
More informationComputing Seminar Introduction Oct
Computing Seminar Introduction Oct 6 2010 Outline today Programming/computing basics terminology, high level concepts (variables, control flow, input/output) Before next week... Make sure you can login
More informationMANAGEMENT OF IPY 2007/08 NATIONAL DATA
SAON MANAGEMENT OF IPY 2007/08 NATIONAL DATA M.Shaimardanov, A.Sterin, Nickolay Mikhailov, Alexander Kuznetsov, Eugeny Vyazilov R I H M I W D C The scientific programme for participation of Russian Federation
More informationFESTIVAL_DATA OBJECT
FESTIVAL_DATA OBJECT 1/ DESCRIPTION The FESTIVAL_DATA object is used to perform the necessary calculation on the raw FITS data in order to get a final projected image. It is not a displayable object but
More informationPhotoscenery for Realistic Scene Generation and Visualization in Flightgear: A Tutorial
Photoscenery for Realistic Scene Generation and Visualization in Flightgear: A Tutorial Srikanth A 1, Indhu B 2, L Krishnamurthy 1, VPS Naidu 3 Dept. of Mechanical Engineering, NIE, Mysore, India 1 Dept.
More informationROTCTL(1) Rotator Control Program ROTCTL(1)
NAME rotctl control antenna rotators SYNOPSIS rotctl [OPTION]... [COMMAND]... DESCRIPTION Control antenna rotators. rotctl accepts commands from the command line as well as in interactive mode if none
More informationDec 06, 10 18: f95!! To compile and run! pgf f95 o 007.exe &&./007.exe! contains. module grid
Dec 06, 10 18:23 007.f95 1/6 To compile and run pgf95 007.f95 o 007.exe &&./007.exe time development of the temperature field. module constants integer, parameter :: SP = kind(1.0) integer, parameter ::
More informationstoring, retrieving and analysing marine ecosystem data of space. and Jan Erik Stiansen
A framework for storing, retrieving and analysing marine ecosystem data of different origin with variable scale and distribution in time and space. Trond Westgård Geir Odd Johansen Cecilie Kvamme Bjørn
More informationSWOT LAKE PRODUCT. Claire POTTIER(CNES) and P. Callahan (JPL) SWOT ADT project team J.F. Cretaux, T. Pavelsky SWOT ST Hydro leads
SWOT LAKE PRODUCT Claire POTTIER(CNES) and P. Callahan (JPL) SWOT ADT project team J.F. Cretaux, T. Pavelsky SWOT ST Hydro leads Lake, Climate and Remote Sensing Workshop Toulouse June 1&2 2017 High Rate
More informationStart > All Programs > OpenGrADS 2.0 > Grads Prompt
1. GrADS TUTORIAL This document presents a brief tutorial for Brian Doty's Grid Analysis and Display System (GrADS). The following sample session will give you a feeling for how to use the basic capabilities
More informationSAS/GRAPH and ANNOTATE Facility More Than Just a Bunch of Labels and Lines
2015 Paper AD-48 SAS/GRAPH and ANNOTATE Facility More Than Just a Bunch of Labels and Lines Mike Hunsucker, 14th Weather Squadron (USAF), Asheville, NC ABSTRACT SAS/GRAPH procedures enhanced with the ANNOTATE
More information7. Procedures and Structured Programming
7. Procedures and Structured Programming ONE BIG PROGRAM external procedure: separated small and reusable program units to conduct individual subtasks smaller main program Each program unit can be debugged
More informationGeopod User s Guide uideuide Table of Contents
Geopod User s Guide uideuide Table of Contents Introduction...p. 1 Using Geopod With IDV...p. 1 The Geopod Interface...p. 5 Navigating the Geopod...p. 9 Keyboard navigation functions...p. 9 Mouse navigation
More informationFlytec Bluetooth Option
Option English Setup Bluetooth In order to use the Bluetooth/SMS option, the Bluetooth module must be installed and tested by Flytec or Bräuniger. With the BT module installed and the SMS feature unlocked
More informationLesson 14 - Activity 1
13 Lesson 14 - Activity 1 / Term 1: Lesson 14 Coding Activity 1 Test if an integer is not between 5 and 76 inclusive. Sample Run 1 Enter a number: 7 False Sample Run 2 Enter a number: 1 True / class Lesson_14_Activity_One
More informationTechnical English -I 5 th week SURVEYING AND MAPPING
Technical English -I 5 th week SURVEYING AND MAPPING What is surveying? It is the art of defining the positions of natural and man-made made features on the Earth s surface. Basic Tasks and Features in
More informationSES 123 Global and Regional Energy Lab Procedures
SES 123 Global and Regional Energy Lab Procedures Introduction An important aspect to understand about our planet is global temperatures, including spatial variations, such as between oceans and continents
More information3465 Diablo Avenue, Hayward, CA U.S.A Fax:
DriveRight Fleet Management Software Version 3.5 User s Manual Rev D (January 30, 2006) Product Number: 8186 Davis Instruments Part Number: 7395.194 Davis Instruments Corp. 2006. All rights reserved. This
More informationThis user guide covers select features of the desktop site. These include:
User Guide myobservatory Topics Covered: Desktop Site, Select Features Date: January 27, 2014 Overview This user guide covers select features of the desktop site. These include: 1. Data Uploads... 2 1.1
More informationAMath 483/583 Lecture 8
AMath 483/583 Lecture 8 This lecture: Fortran subroutines and functions Arrays Dynamic memory Reading: class notes: Fortran Arrays class notes: Fortran Subroutines and Functions class notes: gfortran flags
More informationAN INTRODUCTION TO FORTRAN 90 LECTURE 2. Consider the following system of linear equations: a x + a x + a x = b
AN INTRODUCTION TO FORTRAN 90 LECTURE 2 1. Fortran 90. Arrays, functions and subroutines. 2. Scientific plotting. Gnuplot 1 Each coefficient and variable is a scalar. Lengthy and cumbersome! Program Scalar
More informationFunctions in C C Programming and Software Tools. N.C. State Department of Computer Science
Functions in C C Programming and Software Tools N.C. State Department of Computer Science Functions in C Functions are also called subroutines or procedures One part of a program calls (or invokes the
More informationARPS-3dvar Program. 1. Introduction
1. Introduction The ARPS variational data assimilation program 3dvar is designed to assimilate the observation data to ARPS model. The program takes an ARPS forecast as background, and surface data, multi-level
More informationChapter 3. Fortran Statements
Chapter 3 Fortran Statements This chapter describes each of the Fortran statements supported by the PGI Fortran compilers Each description includes a brief summary of the statement, a syntax description,
More informationThe sspline Package. October 11, 2007
The sspline Package October 11, 2007 Version 0.1-5 Date 2007/10/10 Title Smoothing Splines on the Sphere Author Xianhong Xie Maintainer Xianhong Xie Depends R (>=
More informationGeoTemporal Reasoning in a Web 3.0 World
GeoTemporal Reasoning in a Web 3.0 World (or the joy of having a spatial database in an RDF Triple Store) Jans Aasman Franz Inc. www.franz.com This talk What do people do with an RDF Database How to combine
More informationgrib_api.h File Reference
grib_api.h File Reference Copyright 2005-2013 ECMWF. More... Defines #define GRIB_API_VERSION (GRIB_API_MAJOR_VERSION*10000+G RIB_API_MINOR_VERSION*100+GRIB_API_REVISION_VERSI ON) #define GRIB_SECTION_PRODUCT
More informationChapter 4. Fortran Arrays
Chapter 4. Fortran Arrays Fortran arrays are any object with the dimension attribute. In Fortran 90/95, and in HPF, arrays may be very different from arrays in older versions of Fortran. Arrays can have
More informationPackage APSIM. July 24, 2017
Type Package Package APSIM July 24, 2017 Title General Utility Functions for the 'Agricultural Production Systems Simulator' Version 0.9.2 Date 2017-07-24 Author Justin Fainges Maintainer Justin Fainges
More informationFORTRAN 90: Formatted Input/Output. Meteorology 227 Fall 2018
FORTRAN 90: Formatted Input/Output Meteorology 227 Fall 2018 Formatted Output Two output statements in FORTRAN PRINT and WRITE PRINT format-descriptor, output-list What is a format descriptor? * A character
More informationCS 221 Lecture. Tuesday, 13 September 2011
CS 221 Lecture Tuesday, 13 September 2011 Today s Agenda 1. Announcements 2. Boolean Expressions and logic 3. MATLAB Fundamentals 1. Announcements First in-class quiz: Tuesday 4 October Lab quiz: Thursday
More informationOur Strategy for Learning Fortran 90
Our Strategy for Learning Fortran 90 We want to consider some computational problems which build in complexity. evaluating an integral solving nonlinear equations vector/matrix operations fitting data
More informationComputational Astrophysics AS 3013 Lecture 6:
Computational Astrophysics AS 3013 Lecture 6: 1) formated input/output 2) file input/output 3) safety checks FORTRAN 90: formatted input/output list-directed (or default) format READ *, variable list PRINT
More informationUNIVERSITY OF OSLO Department of Geosciences. GEO4060: Intro to Fortran 2003 programming. Gunnar Wollan
UNIVERSITY OF OSLO Department of Geosciences GEO4060: Intro to Fortran 2003 programming Gunnar Wollan Spring 2014 Contents 1 Introduction 2 1.1 Why use Fortran?.................................... 2 1.2
More informationMetview FLEXTRA Tutorial. Meteorological Visualisation Section Operations Department ECMWF
Meteorological Visualisation Section Operations Department ECMWF 05/03/2015 This tutorial was tested with Metview version 4.3.0 and will not work for previous versions. Copyright 2015 European Centre for
More informationAn interesting related problem is Buffon s Needle which was first proposed in the mid-1700 s.
Using Monte Carlo to Estimate π using Buffon s Needle Problem An interesting related problem is Buffon s Needle which was first proposed in the mid-1700 s. Here s the problem (in a simplified form). Suppose
More informationObservational DataBase (ODB*) and its usage at ECMWF
Observational DataBase (ODB*) and its usage at ECMWF anne.fouilloux@ecmwf.int Slide 1 *ODB has been developed and maintained by Sami Saarinen Slide 1 Outline Observational usage over the past decades at
More informationDiscussion 1H Notes (Week 3, April 14) TA: Brian Choi Section Webpage:
Discussion 1H Notes (Week 3, April 14) TA: Brian Choi (schoi@cs.ucla.edu) Section Webpage: http://www.cs.ucla.edu/~schoi/cs31 More on Arithmetic Expressions The following two are equivalent:! x = x + 5;
More informationFunctions. Systems Programming Concepts
Functions Systems Programming Concepts Functions Simple Function Example Function Prototype and Declaration Math Library Functions Function Definition Header Files Random Number Generator Call by Value
More informationWinRiver Quick Start Guide
WinRiver Quick Start Guide P/N 957-6203-00 (October 2003) RD Instruments Acoustic Doppler Solutions Table of Contents... 1 Introduction...1 Overview...1 Hardware Overview...2 ADCP Requirements...2 ADCP
More informationNWSDSS. Hydrologic Engineering Center National Weather Service to Data Storage System Conversion Utility. User's Manual. Version 5.
NWSDSS Hydrologic Engineering Center National Weather Service to Data Storage System Conversion Utility User's Manual Version 5.3 March 1995 Hydrologic Engineering Center U.S. Army Corps of Engineers 609
More informationBits, Bytes, and Precision
Bits, Bytes, and Precision Bit: Smallest amount of information in a computer. Binary: A bit holds either a 0 or 1. Series of bits make up a number. Byte: 8 bits. Single precision variable: 4 bytes (32
More informationwrite (unit=*,fmt=*) i =, i! will print: i = 3
I/O (F book, chapters 9, 10 and 15) All I/O in Fortran90 is record-based, typically with record delimiters of some kind. This is in contrast to C, which has stream I/O, with no record delimiters required.
More informationbash Execution Control COMP2101 Winter 2019
bash Execution Control COMP2101 Winter 2019 Bash Execution Control Scripts commonly can evaluate situations and make simple decisions about actions to take Simple evaluations and actions can be accomplished
More informationChapter 2 REXX STATEMENTS. SYS-ED/ Computer Education Techniques, Inc.
Chapter 2 REXX STATEMENTS SYS-ED/ Computer Education Techniques, Inc. Objectives You will learn: Variables. REXX expressions. Concatenation. Conditional programming and flow of control. Condition traps.
More information!=======1=========2=========3=========4=========5=========6=========7=========8=========9=========10========11
C:\files\classes\fem\program code\truss\truss solve\truss.f90 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43! truss.f90! Kurt
More informationGeographic Information System and its Application in Hydro-Meteorology Exercises using SavGIS
Geographic Information System and its Application in Hydro-Meteorology Exercises using SavGIS Jothiganesh Shanmugasundaram Decision Support Tool Development Specialist COPY DATABASE FOLDER BHUTAN in to
More informationAWA6223S Sound Level Calibrator. Instruction Manual HANGZHOU AIHUA INSTRUMENTS CO., LTD
AWA6223S Sound Level Calibrator Instruction Manual HANGZHOU AIHUA INSTRUMENTS CO., LTD Notes 1. Please read the instruction carefully before using the instruments for the first time. 2. The calibrator
More informationGoals for This Lecture:
Goals for This Lecture: Understand what modules are Understand what module procedures are and how to use them Understand explicit and implicit interfaces Understand what automatic arrays are and how to
More informationGoals for This Lecture:
Goals for This Lecture: Learn about multi-dimensional (rank > 1) arrays Learn about multi-dimensional array storage Learn about the RESHAPE function Learn about allocatable arrays & the ALLOCATE and DEALLOCATE
More informationFILSER ELECTRONIC GmbH LXFAI, data-fil, conv-fil, vali-fil programs for PC s, LXFAI data-fil, conv-fil, vali-fil programs for PC s VERSION 2.
FILSER ELECTRONIC GmbH LXFAI, data-fil, conv-fil, vali-fil programs for PC s, 1997 LXFAI data-fil, conv-fil, vali-fil programs for PC s VERSION 2.4 F I L S E R E L E C T R O N I C G m b H LXFAI, data-fil,
More informationSUBPROGRAMS AND MODULES
SUBPROGRAMS AND MODULES FORTRAN PROGRAMING Zerihun Alemayehu AAiT.CED Program structure Advantages of subprograms Program units can be written and tested independently A program unit that has a well defined
More informationTechnical specifications for accessing Water Level Web Services
Technical specifications for accessing Water Level Web Services Version 2.0.3 September 2014 Canadian Hydrographic Service Fisheries and Oceans Canada Contents Introduction... 3 Access and support... 3
More informationGL200 GBD File Specification Sheet
GL200 GBD File Specification Sheet GRAPHTEC CORPORATION 1. Applicable Range Product name: Firmware: File format Compatible data GL200 Version 1.00 to Measurement data files with the.gbd file extension
More informationLab 2: Introduction to mydaq and LabView
Lab 2: Introduction to mydaq and LabView Lab Goals: Learn about LabView Programming Tools, Debugging and Handling Errors, Data Types and Structures, and Execution Structures. Learn about Arrays, Controls
More informationTopic 6: A Quick Intro To C. Reading. "goto Considered Harmful" History
Topic 6: A Quick Intro To C Reading Assumption: All of you know basic Java. Much of C syntax is the same. Also: Some of you have used C or C++. Goal for this topic: you can write & run a simple C program
More information