PROGRAM myglob ! ! for hao sun ! am 2001-8-17 ! f90 -o my.run myglob.F apex_mod.F magfld.F ggrid.f ! SunOS ! f90 -o my_sun.run -I/opt/share/PUBLIC/include myglob.F apex_mod.F magfld.F ggrid.f ! for cm3e: f90 -o my_sun.run -I/opt/share/PUBLIC/include myglob.F -xpp=cpp -DSUN -DMSS -xtypemap=real:64 apex_mod.F magfld.F ggrid.f ! Linux ! pgf90 -o my_linux.run -r8 -I/opt/local/include myglob.F apex_mod.F magfld.F ggrid.f ! ! generate an interpolation array which is used for calculating ! the magnetic pertubation ! C Make global grids, will create global interpolation arrays C for available DGRF/IGRF dates. Note that this takes a while C to execute and a substantial file is created; for a global C grid C C 6300 sec, 32 MB, 8 epochs, NVERT=30, Cray J924se, ouray, 1998? C 12700 sec, 66 MB, 8 epochs, NVERT=40, Cray J924se, ouray, May 1999 C 16943 sec, 74 MB, 9 epochs, NVERT=40, Cray J924se, ouray, May 2000 C C 4500 sec, 16 MB, 8 epochs, NVERT=30, Sun 4, 70MHz? C 1740 sec, 33 MB, 8 epochs, NVERT=40, Sun 4, 248MHz C 1218 sec, 37 MB, 9 epochs, NVERT=40, Sun Ultra v5.7, 400MHz, huron, may 2000 C C 944 sec, 37 MB, 9 epochs, NVERT=40, SGI Origin2000 IRIX64 v6.5, C 250MHZ (2 flops/cycle), dataproc, may 2001 C C GGRID defines the grid points which are then input to APXWRA C to calculate and write look-up tables. Comments in GGRID C explain its algorithm which is driven by the requested lat/lon C extent and vertical resolution (NVERT). Array dimensions are C affected by these choices. A global grid covering altitudes C from 0 to 1000 km: C C NVERT=30 requires MLAT= 91, MLON=121, MALT=6 C NVERT=40 requires MLAT=121, MLON=201, MALT=7 C C If a different maximum altitude is desired, the following table C may be used to select a new ALTMX and matching MALT: C C ---- NVERT=30 ---- ---- NVERT=40 ---- C Actual Grid Actual Grid C - ALTMX - MALT maximum MALT maximum C 500. 4 707. 4 517. C 1000. 6 1274. 7 1124. C 2000. 9 2316. 11 2124. C 3000. 11 3185. 14 3068. C 4000. 13 4247. 17 4248. C 5000. 15 5574. 19 5213. C 10000. 20 11004. 26 10619. C 20000. 24 20933. 32 21945. C 30000. 26 31855. 34 30036. C C Questions should be directed to Roy Barnes (bozo@ucar.edu C 303/497-1230). See file README for compilation instructions. C FILNAM is the name of the file to be created/overwritten CHARACTER*80 FILNAM ! PARAMETER (FILNAM = '/tmp/apxntrp.grid.1980-1985') PARAMETER (FILNAM = | './apxntrp.magion_time.grid.alt90_1000.linux_64.1995-2010') ! | './apxntrp.magion_time.grid.alt90_1000.linux.1995-2005') ! | './apxntrp.grid.alt90_1000.linux.1997') CNV30 PARAMETER (FILNAM = '/d/bozo/apxntrp.grid.1965-2000') C PARAMETER (FILNAM = 'apxntrp.grid.1965-2000') C Declarations needed for APXMKA, APXWRA, or APXRDA C MSGUN = Fortran unit number for diagnostics C IUN = Fortran unit number for I/O C MLAT,MLON,MALT = Maximum number of grid latitudes, longitudes C and altitudes. C NGRF = Number of epochs in the current DGRF/IGRF; see COFRM in C file magfld.f ! PARAMETER (MSGUN=6, IUN=12, MLAT=121,MLON=201,MALT=2, NGRF=1, ! PARAMETER (MSGUN=6, IUN=12, MLAT=121,MLON=201,MALT=7, NGRF=4, PARAMETER (MSGUN=6, IUN=12, MLAT= 121,MLON=201,MALT=7, NGRF=4, + LWK= MLAT*MLON*MALT*5 + MLAT+MLON+MALT) DIMENSION GPLAT(MLAT),GPLON(MLON),GPALT(MALT),WK(LWK),TGRF(NGRF) DATA TGRF /1995,2000,2005.,2010/ NVERT = 30 GLAMN = -90. GLAMX = 90. GLOMN = -180. GLOMX = 180. ALTMN = 90. ALTMX = 1000. CALL GGRID (NVERT,GLAMN,GLAMX,GLOMN,GLOMX,ALTMN,ALTMX, + GPLAT,GPLON,GPALT,NLAT,NLON,NALT) WRITE (6,'(1X,/,''GGRID produced for NVERT='',I3,'' and limits: la +titude '',F8.3,'' - '',F8.3,/,40X,''longitude '',F8.3,'' - '',F8.3 +,/,40X,'' altitude '',F8.3,'' - '',F8.3)') NVERT,GLAMN,GLAMX, + GLOMN,GLOMX,ALTMN,ALTMX WRITE (6,'(9X,''NLAT ='',I4,'' Latitudes:'',5F8.3,/,(31X,5F8.3))' + ) NLAT,(GPLAT(I),I=1,NLAT) WRITE (6,'(9X,''NLON ='',I4,'' Longitudes:'',5F8.3,/,(31X,5F8.3))' + ) NLON,(GPLON(I),I=1,NLON) WRITE (6,'(9X,''NALT ='',I4,'' Altitudes:'',5F8.1,/,(31X,5F8.1))' + ) NALT,(GPALT(I),I=1,NALT) CALL APXWRA (MSGUN,FILNAM,IUN, TGRF,NGRF, + GPLAT,GPLON,GPALT,NLAT,NLON,NALT, WK,LWK, IST) END