From 9ef8f69dee647688a6e9f6ba6971a3e96c5305c5 Mon Sep 17 00:00:00 2001 From: biljanaorescanin Date: Wed, 18 Oct 2023 11:43:32 -0400 Subject: [PATCH 1/2] retire make_bcs scripts ; remove obsolete dir --- .../Utils/Raster/makebcs/make_bcs | 1582 ----------------- .../Utils/Raster/obsolete/ConvertAlb.F90 | 43 - .../Utils/Raster/obsolete/asia_tiles.pro | 124 -- .../Utils/Raster/obsolete/compile_mk_runoff | 1 - .../Utils/Raster/obsolete/make_tiles | 72 - .../Utils/Raster/obsolete/mkLISTilesPara.F90 | 812 --------- .../Utils/Raster/obsolete/rmTinyTiles.F90 | 194 -- 7 files changed, 2828 deletions(-) delete mode 100755 GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/make_bcs delete mode 100644 GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/obsolete/ConvertAlb.F90 delete mode 100644 GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/obsolete/asia_tiles.pro delete mode 100755 GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/obsolete/compile_mk_runoff delete mode 100755 GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/obsolete/make_tiles delete mode 100644 GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/obsolete/mkLISTilesPara.F90 delete mode 100644 GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/obsolete/rmTinyTiles.F90 diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/make_bcs b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/make_bcs deleted file mode 100755 index a680ac5cb..000000000 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/make_bcs +++ /dev/null @@ -1,1582 +0,0 @@ -#!/bin/tcsh -f - -################################################################################ -# Help # -################################################################################ - -set HELPMODE = NO -if ( "$1" == "-h" | "$1" == "-help" | "$1" == "--help" ) set HELPMODE = YES - -if ( $HELPMODE == YES ) then - - echo "Usage: `basename $0` [-h] " - echo " " - echo "Boundary Conditions (BCs) Package: " - echo " Creates surface tile and other model parameter input files " - echo " (.til [tiles], .rst [raster], and land parameters) for " - echo " combinations of atmospheric resolution, ocean resolution, " - echo " and land BCs version. " - echo " " - echo " STEP 1: Build the model. (GCM or GEOSldas) " - echo " STEP 2: cd [install-path]/bin " - echo " STEP 3: source g5_modules (for bash or zsh use g5_modules.[z]sh) " - echo " STEP 4: ./make_bcs " - echo " Answer the following interactive questions: " - echo " a) Select Land BCs version. " - echo " b) Select atmospheric resolution(s). " - echo " (If applicable, select EASE grid version.) " - echo " c) Select ocean resolution(s). " - echo " (Not relevant for land-only EASE grid BCs.) " - echo " d) Enter BCs output directory. " - echo " e) Enter sponsor code for computing account. " - echo " " - echo " To skip the generation of land parameter files (ie, mkCatchParam.x), " - echo " use: ./make_bcs -noland " - echo " This option saves time when additional bcs are created that have " - echo " the exact same land parameters as an existing set of bcs because " - echo " the only difference between the two sets of bcs is the [non-tripolar]" - echo " ocean resolution. " - -endif - -####################################################################### - -# process input arguments - -set SKIPLAND = NO -if ( "$1" == "-noland" ) set SKIPLAND = YES - -####################################################################### -# Set GEOS5/ESMADIR Variables -####################################################################### - -if ( $HELPMODE != YES ) then - - #setenv NCPUS `/usr/bin/lscpu | grep '^CPU(s)' | cut -d ':' -f2 | head -1 ` - #@ NCPUS = $NCPUS / 4 - #@ NCPUS = $NCPUS * 3 - set NCPUS = 20 - setenv OMP_NUM_THREADS 1 - -endif - -####################################################################### -# Define Colors -# Note: For No Colors, set C1 and C2 to NONE -####################################################################### - -set BLACK = "\033[30m" -set RED = "\033[31m" -set GREEN = "\033[32m" -set YELLOW = "\033[33m" -set BLUE = "\033[34m" -set MAGENTA = "\033[35m" -set CYAN = "\033[36m" -set WHITE = "\033[37m" -set RESET = "\033[0m" -set BOLD = "\033[1m" - -####################################################################### -####################################################################### - -set bin_dir = `pwd` # make_bcs must be run from install/bin directory - -set C1 = $RED -set C2 = $BLUE -set CR = $RESET - -####################################################################### -# -# Land bcs version (LBCSV) - -# set default land bcs version -set lbcsv = NL3 - -if ( $HELPMODE != YES ) then - echo "${CR}" - echo "----------------------------------------------------------------------------------------------" - echo " Boundary Conditions (BCs) Package:" - echo "----------------------------------------------------------------------------------------------" -endif - -echo " " -echo "Options for land BCs version:" -echo " " -echo " ${C2}F25 = Fortuna-2_5 (archived${CR}${C1}*${CR}${C2}: n/a)${CR}" -echo " ${C2}GM4 = Ganymed-4_0 (archived${CR}${C1}*${CR}${C2}: /discover/nobackup/projects/gmao/bcs_shared/legacy_bcs/Ganymed-4_0/)${CR}" -echo " ${C2}ICA = Icarus (archived${CR}${C1}*${CR}${C2}: /discover/nobackup/projects/gmao/bcs_shared/legacy_bcs/Icarus/)${CR}" -echo " ${C2}NL3 = Icarus-NLv3 (archived${CR}${C1}*${CR}${C2}: /discover/nobackup/projects/gmao/bcs_shared/legacy_bcs/Icarus-NLv3/)${CR}" -echo " ${C2}NL4 = NLv4 [SMAPL4] (archived${CR}${C1}*${CR}${C2}: /discover/nobackup/projects/gmao/bcs_shared/legacy_bcs/Icarus-NLv4/)${CR}" -echo " ${C2} = NL3 + JPL veg height{CR}" -echo " ${C2}NL5 = NLv5 [SMAPL4] (archived${CR}${C1}*${CR}${C2}: /discover/nobackup/projects/gmao/bcs_shared/legacy_bcs/Icarus-NLv5/Icarus-NLv5_EASE/)${CR}" -echo " ${C2} = NL3 + JPL veg height + PEATMAP${CR}" -echo " ${C2}v06 = NL3 + JPL veg height + PEATMAP + MODIS snow alb${CR}" -echo " ${C2}v07 = NL3 + PEATMAP${CR}" -echo " ${C2}v08 = NL3 + MODIS snow alb${CR}" -echo " ${C2}v09 = NL3 + PEATMAP + MODIS snow alb${CR}" -echo " ${C2}v10 = NL3 + PEATMAP + MODIS snow alb v2${CR}" -echo " ${C2}v11 = NL3 + JPL veg height+ PEATMAP + MODIS snow alb v2${CR}" -echo " " -if ( $HELPMODE != YES ) then - echo " ${C1} *BCs produced by this code will differ from BCs in archived directories\!\!\! ${CR}" - echo " These differences are caused by compiler changes, code improvements and bug" - echo " fixes that were implemented since the archived BCs in the above-mentioned" - echo " directories were originally created. The impact of these differences on" - echo " science is insignificant, and the parameter files produced by current" - echo " code are scientifically equivalent to the corresponding archived BCs." - echo " " - echo " Enter one 3-character alphanumeric code for land BCs version from the above list" - echo " OR press ENTER to select $lbcsv (current default):${CR}" - echo " " - - LBCSV: - set dummy = `echo $<` - - if( $dummy == 'F25' | \ - $dummy == 'GM4' | \ - $dummy == 'ICA' | \ - $dummy == 'NL3' | \ - $dummy == 'NL4' | \ - $dummy == 'NL5' | \ - $dummy == 'v06' | \ - $dummy == 'v07' | \ - $dummy == 'v08' | \ - $dummy == 'v09' | \ - $dummy == 'v10' | \ - $dummy == 'v11') then - set lbcsv = $dummy - else if ( $dummy == '' ) then - echo $lbcsv - else - echo " " - echo " ${C1} Invalid choice. Note that entry is case-sensitive. Try again:${CR}" - goto LBCSV - endif - -endif - -####################################################################### -# -# Atmospheric Horizontal Resolution (HRCODE) - -echo "Options for atmospheric horizontal resolution:" -echo " " -echo " Lat/Lon Cubed-Sphere EASE (land-only)" -echo " ${C2}b -- 2 deg c12 -- 8 deg M01 -- 1-km EASE Grid ${CR}" -echo " ${C2}c -- 1 deg c24 -- 4 deg M03 -- 3-km EASE Grid ${CR}" -echo " ${C2}d -- 1/2 deg c48 -- 2 deg M09 -- 9-km EASE Grid ${CR}" -echo " ${C2}e -- 1/4 deg c90 -- 1 deg M25 -- 25-km EASE Grid ${CR}" -echo " ${C2} c180 -- 1/2 deg ${C1}( 56 km) ${CR} ${C2}M36 -- 36-km EASE Grid ${CR}" -echo " ${C2} c360 -- 1/4 deg ${C1}( 28 km) ${CR}" -echo " ${C2} c720 -- 1/8 deg ${C1}( 14 km) ${CR}" -echo " ${C2} c768 -- 1/10 deg ${C1}( 12 km) ${CR}" -echo " ${C2} c1000 -- 1/10 deg ${C1}( 10 km) ${CR}" -echo " ${C2} c1152 -- 1/10 deg ${C1}( 8 km) ${CR}" -echo " ${C2} c1440 -- 1/16 deg ${C1}( 7 km) ${CR}" -echo " ${C2} c1536 -- 1/16 deg ${C1}( 7 km) ${CR}" -echo " ${C2} c2880 -- 1/32 deg ${C1}( 3 km) ${CR}" -echo " ${C2} c3072 -- 1/32 deg ${C1}( 3 km) ${CR}" -echo " ${C2} c5760 -- 1/64 deg ${C1}( 1.5 km) ${CR}" -#echo " ${C2}o -- other${CR} Lat/Lon or Cube" -echo " " - -if ( $HELPMODE != YES ) then - - echo " " - echo "Enter alphanumeric code(s) for atmospheric horizontal resolution from the above list" - echo "Do NOT specify a mix EASE grid and cs/LatLon grid resolutions." - echo "(separate multiple entries by spaces):" - - HRCODE: - set dummy = `echo $<` - if (${%dummy} == 0) set dummy = "BLANK" - - set HRCODES = $dummy[1] - - foreach HRCODE ($dummy) - if( $HRCODE != 'o' & \ - $HRCODE != 'b' & \ - $HRCODE != 'c' & \ - $HRCODE != 'd' & \ - $HRCODE != 'e' & \ - $HRCODE != 'c12' & \ - $HRCODE != 'c24' & \ - $HRCODE != 'c48' & \ - $HRCODE != 'c90' & \ - $HRCODE != 'c180' & \ - $HRCODE != 'c360' & \ - $HRCODE != 'c720' & \ - $HRCODE != 'c768' & \ - $HRCODE != 'c1000' & \ - $HRCODE != 'c1152' & \ - $HRCODE != 'c1440' & \ - $HRCODE != 'c1536' & \ - $HRCODE != 'c2880' & \ - $HRCODE != 'c3072' & \ - $HRCODE != 'c5760' & \ - $HRCODE != 'M01' & \ - $HRCODE != 'M03' & \ - $HRCODE != 'M09' & \ - $HRCODE != 'M25' & \ - $HRCODE != 'M36') then - echo " ${C1} Invalid choice. Note that entries are case-sensitive. Try again:${CR}" - goto HRCODE - endif - if( $HRCODE != "$HRCODES" ) set HRCODES = `echo ${HRCODES} ${HRCODE}` - end - - if( $HRCODE == o ) then - echo "Enter the Atmospheric ${C1}Horizontal Resolution${CR}: ${C2}IM JM${CR}" - echo " Note for ${C1}Cubed-Sphere${CR}: ${C2}JM must equal 6*IM${CR}" - set Resolution = `echo $<` - endif - -else - - set HRCODE = null - set HRCODES = null - -endif # if ( $HELPMODE != YES ) - -# -------------------------------- -# -# EASE Grid Version (EASEVERSION) - -# set default EASE version -set EASEVERSION = EASEv2 - -echo " Options for EASE grid version (land-only):" -echo " ${C2}EASEv1${CR}" -echo " ${C2}EASEv2 (default)${CR}" -echo " " - -set isEASE = 0 - -if ( $HELPMODE != YES ) then - - # figure out if one or more of the selected atmospheric resolutions is an EASE grid - - foreach HRCODE ($HRCODES) - if( $HRCODE == 'M01' | \ - $HRCODE == 'M03' | \ - $HRCODE == 'M09' | \ - $HRCODE == 'M25' | \ - $HRCODE == 'M36') then - set isEASE = 1 - endif - end - - if ( $isEASE > 0 ) then - - echo "Enter one EASE grid version from the above list" - echo " OR press ENTER to select $EASEVERSION (current default):${CR}" - echo " " - - EASE_VERSION: - set dummy = `echo $<` - - if( $dummy == 'EASEv1' | \ - $dummy == 'EASEv2') then - set EASEVERSION = $dummy - else if ( $dummy == '' ) then - echo $EASEVERSION - else - echo " " - echo " ${C1} Invalid choice. Note that entry is case-sensitive. Try again:${CR}" - echo " " - goto EASE_VERSION - endif - endif - -endif - -####################################################################### -# -# Ocean Horizontal Resolution (ORSLV) - -if ($isEASE > 0) then - set orslvs = O1 - - echo " ${C1}----------------------------------------------------------------------- ${CR}" - echo " ${C1} Selected atmospheric resolution(s) include(s) at least one EASE grid.${CR}" - echo " ${C1} Setting ${CR}ocean resolution ${C1}to $orslvs \!\!\! ${CR}" - echo " ${C1} For a choice of ocean resolutions, exclude EASE grid selection(s) ${CR}" - echo " ${C1} from selected atmospheric resolution(s) and process separately. ${CR}" - echo " ${C1}------------------------------------------------------------------------${CR}" - echo " " -else - echo "Options for ocean horizontal resolution:" - echo " " - echo " ${C2}O1 -- Reynolds ${CR} (Lon/Lat Data-Ocean: 360x180 )" - echo " ${C2}O2 -- Reynolds ${CR} (Lon/Lat Data-Ocean: 1440x720 )" - echo " ${C2}O3 -- OSTIA ${CR} (Lon/Lat Data-Ocean: 2880x1440)" - echo " ${C2}T2 -- Tripolar ${CR} (MOM5-Tripolar-Ocean: 360x200 )" - echo " ${C2}T3 -- Tripolar ${CR} (MOM5-Tripolar-Ocean: 720x410 )" - echo " ${C2}T4 -- Tripolar ${CR} (MOM5-Tripolar-Ocean: 1440x1080)" - echo " ${C2}T1MOM6 -- Tripolar ${CR} (MOM6-Tripolar-Ocean: 72x36 )" - echo " ${C2}T3MOM6 -- Tripolar ${CR} (MOM6-Tripolar-Ocean: 580x458 )" - echo " ${C2}T4MOM6 -- Tripolar ${CR} (MOM6-Tripolar-Ocean: 1440x1080)" - echo " ${C2}CS -- Cubed-Sphere Ocean ${CR} (Cubed-Sphere Data-Ocean )" - echo " " - - if ( $HELPMODE == YES ) exit - - echo " " - echo "Enter 2-6 character alphanumeric code(s) for ocean horizontal resolution from the above list." - echo "(Separate multiple entries by spaces.)" - -ORSLV: - - set dummy = `echo $<` - - if (${%dummy} == 0) set dummy = "BLANK" - - set orslvs = $dummy[1] - - foreach orslv ($dummy) - if( $orslv != 'O1' & \ - $orslv != 'O2' & \ - $orslv != 'O3' & \ - $orslv != 'T2' & \ - $orslv != 'T3' & \ - $orslv != 'T4' & \ - $orslv != 'T1MOM6' & \ - $orslv != 'T3MOM6' & \ - $orslv != 'T4MOM6' & \ - $orslv != 'CS') then - echo " ${C1} Invalid choice. Note that entries are case-sensitive. Try again:${CR}" - goto ORSLV - endif - if( $orslv != "$orslvs" ) set orslvs = `echo ${orslvs} ${orslv}` - end - -endif - - -####################################################################### -# -# Experiment directory (for BCS output) - -# define default -set EXPDIR = /discover/nobackup/$USER/BCS_PACKAGE/$lbcsv - -# append minor version string to default bcs output dir name if output from current code differs from archived bcs - -if( $lbcsv == 'F25' | \ - $lbcsv == 'GM4' | \ - $lbcsv == 'ICA' | \ - $lbcsv == 'NL3' | \ - $lbcsv == 'NL4' | \ - $lbcsv == 'NL5') then - set EXPDIR = $EXPDIR'_2/' - echo "----------------------------------------------------------------------------------------------" - echo " " - echo " ${C1} NOTE: $lbcsv BCs produced by this code will differ from BCs in archived directories\!\!\! ${CR}" - echo " ${C1} For clarity, '_[v]' was appended to the default output directory shown below.${CR}" -else - # just append trailing slash - set EXPDIR = $EXPDIR'/' -endif - -if ( $HELPMODE != YES ) then - - echo " " - echo "Enter desired BCS output directory (incl. full path) or press ENTER to use the default:" - echo " [${C2}${EXPDIR}${CR}]" - set NEWEXPDIR = $< - - if( $NEWEXPDIR != '' ) set EXPDIR = $NEWEXPDIR - - mkdir -p $EXPDIR - if ($status>0) then - echo "mkdir ERROR! Exiting..." - exit - endif -endif - - -####################################################################### - -echo "" -echo "${C1} Land BCs version:${CR} ${C2}$lbcsv${CR}" -echo "${C1} Atmospheric resolution:${CR} ${C2}$HRCODES${CR}" -if ( $isEASE > 0) then - echo "${C1} EASE grid version:${CR} ${C2}$EASEVERSION${CR}" -endif -echo "${C1} Ocean resolution:${CR} ${C2}$orslvs${CR}" -echo "${C1} Output directory:${CR} ${C2}$EXPDIR${CR}" - -####################################################################### -####################################################################### - -set IRRIGTHRES = 2 -set make_bcs_jobs = '' - -# ------------------------------------ -# Loop over All Ocean Resolution Codes -# ------------------------------------ - -foreach orslv ($orslvs) - -####################################################################### -# Select land-lakes-ice-ocean mask file -####################################################################### - -set HOSTNAME = `hostname | rev | cut -c3- | rev` - -if ( $HOSTNAME == discover ) then - setenv MAKE_BCS_INPUT_DIR /discover/nobackup/projects/gmao/bcs_shared/make_bcs_inputs/ -else - setenv MAKE_BCS_INPUT_DIR /nobackup/gmao_SIteam/ModelData/make_bcs_inputs/ -endif - -if ( $orslv == O1 | $orslv == T2 | $orslv == T3 | $orslv == T4 | \ - $orslv == T1MOM6 | $orslv == T3MOM6 | $orslv == T4MOM6 ) then - -# Great-Lakes & Caspian-Sea treated as Model LAKE tiles, Surface Temperatures will be Model Derived -# ------------------------------------------------------------------------------------------------- - - if ( $lbcsv == F25 | $lbcsv == GM4 | $lbcsv == ICA ) then - set GLOBAL_CATCH_DATA = ${MAKE_BCS_INPUT_DIR}/shared/mask/global.cat_id.catch.DL - else - set GLOBAL_CATCH_DATA = ${MAKE_BCS_INPUT_DIR}/shared/mask/GEOS5_10arcsec_mask_freshwater-lakes.nc - endif - - -else if ( $orslv == O2 | $orslv == O3 | $orslv == CS ) then - -# Great-Lakes & Caspian-Sea treated as Model OCEAN tiles, Surface Temperatures will be taken from OCEAN SST Data -# -------------------------------------------------------------------------------------------------------------- - - if ( $lbcsv == F25 | $lbcsv == GM4 | $lbcsv == ICA ) then - set GLOBAL_CATCH_DATA = ${MAKE_BCS_INPUT_DIR}/shared/mask/global.cat_id.catch.GreatLakesCaspian_Updated.DL - else - set GLOBAL_CATCH_DATA = ${MAKE_BCS_INPUT_DIR}/shared/mask/GEOS5_10arcsec_mask.nc - endif - -else - - echo " \!\!\!\! Invalid Ocean Resolution, stopping \!\!\!\! " - exit - -endif - -if($HRCODE == M01 | $HRCODE == M03 | $HRCODE == M09 | $HRCODE == M25 | $HRCODE == M36) then - set GLOBAL_CATCH_DATA = ${MAKE_BCS_INPUT_DIR}/shared/mask/GEOS5_10arcsec_mask.nc -endif - -set MASKFILE = `echo ${GLOBAL_CATCH_DATA} | rev | cut -d / -f1 | rev ` - -####################################################################### - -echo "" - -@ imo = 0 -@ jmo = 0 -@ NX = 8640 -@ NY = 4320 -@ NT = 232000000 - -set LATLON_OCEAN = FALSE -set TRIPOL_OCEAN = FALSE -set CUBED_SPHERE_OCEAN = FALSE - -if( $orslv == O1 ) then - @ imo = 360 # Lat/Lon Data-Ocean (Reynolds 1-deg) - @ jmo = 180 # Lat/Lon Data-Ocean (Reynolds 1-deg) -endif -if( $orslv == O2 ) then - @ imo = 1440 # Lat/Lon Data-Ocean (Reynolds 1/4-deg) - @ jmo = 720 # Lat/Lon Data-Ocean (Reynolds 1/4-deg) -endif -if( $orslv == O3 ) then - @ imo = 2880 # Lat/Lon Data-Ocean (OSTIA 1/8-deg) - @ jmo = 1440 # Lat/Lon Data-Ocean (OSTIA 1/8-deg) -endif -if( $orslv == T2 ) then - @ imo = 360 # MOM5 Tripolar-Ocean - @ jmo = 200 # MOM5 Tripolar-Ocean -endif -if( $orslv == T3 ) then - @ imo = 720 # MOM5 Tripolar-Ocean - @ jmo = 410 # MOM5 Tripolar-Ocean -endif -if( $orslv == T4 ) then - @ imo = 1440 # MOM5 Tripolar-Ocean - @ jmo = 1080 # MOM5 Tripolar-Ocean -endif -if( $orslv == T1MOM6 ) then - @ imo = 72 # MOM6 Tripolar-Ocean - @ jmo = 36 # MOM6 Tripolar-Ocean -endif -if( $orslv == T3MOM6 ) then - @ imo = 540 # MOM6 Tripolar-Ocean - @ jmo = 458 # MOM6 Tripolar-Ocean -endif -if( $orslv == T4MOM6 ) then - @ imo = 1440 # MOM6 Tripolar-Ocean - @ jmo = 1080 # MOM6 Tripolar-Ocean -endif - -if( $orslv == O1 | $orslv == O2| $orslv == O3 ) then - set LATLON_OCEAN = TRUE - set DATENAME = DE - set POLENAME = PE -endif -set MOM_VERSION = UNDEF -if( $orslv == T2 | $orslv == T3 | $orslv == T4 ) then - set TRIPOL_OCEAN = TRUE - set MOM_VERSION = MOM5 - set DATENAME = TM - set POLENAME = TM -else if ( $orslv == T1MOM6 | $orslv == T3MOM6 | $orslv == T4MOM6 ) then - set TRIPOL_OCEAN = TRUE - set MOM_VERSION = MOM6 - set DATENAME = TM - set POLENAME = TM -endif -if( $orslv == CS ) set CUBED_SPHERE_OCEAN = TRUE - -# ------------------------------------- -# Loop over All Atmospheric Resolutions -# ------------------------------------- - -foreach HRCODE ($HRCODES) - -if( $HRCODE == o ) then - set im = $Resolution[1] - set jm = $Resolution[2] - @ im6 = $im * 6 - if( $im6 == $jm ) then - set nc = ${im} - set RC = ${im}x${jm} - set grid = cube - else - set grid = latlon - endif -endif - -if( $HRCODE == b ) then - set im = 144 - set jm = 91 - set grid = latlon -endif -if( $HRCODE == c ) then - set im = 288 - set jm = 181 - set grid = latlon -endif -if( $HRCODE == d ) then - set im = 576 - set jm = 361 - set grid = latlon -endif -if( $HRCODE == e ) then - set im = 1152 - set jm = 721 - set grid = latlon -endif -if( $HRCODE == c12 ) then - set nc = 12 - set RC = 12x72 - set grid = cube -endif -if( $HRCODE == c24 ) then - set nc = 24 - set RC = 24x144 - set grid = cube -endif -if( $HRCODE == c48 ) then - set nc = 48 - set RC = 48x288 - set grid = cube -endif -if( $HRCODE == c90 ) then - set nc = 90 - set RC = 90x540 - set grid = cube -endif -if( $HRCODE == c180 ) then - set nc = 180 - set RC = 180x1080 - set grid = cube -endif -if( $HRCODE == c360 ) then - set nc = 360 - set RC = 360x2160 - set grid = cube -endif -if( $HRCODE == c720 ) then - set nc = 720 - set RC = 720x4320 - set grid = cube -endif -if( $HRCODE == c768 ) then - set nc = 768 - set RC = 768x4608 - set grid = cube - @ NX = 17280 - @ NY = 8640 -endif -if( $HRCODE == c1000 ) then - set nc = 1000 - set RC = 1000x6000 - set grid = cube -endif -if( $HRCODE == c1152 ) then - set nc = 1152 - set RC = 1152x6912 - set grid = cube -endif -if( $HRCODE == c1440 ) then - set nc = 1440 - set RC = 1440x8640 - set grid = cube - @ NX = 17280 - @ NY = 8640 -endif -if( $HRCODE == c1536 ) then - set nc = 1536 - set RC = 1536x9216 - set grid = cube - @ NX = 43200 - @ NY = 21600 -endif -if( $HRCODE == c2880 ) then - set nc = 2880 - set RC = 2880x17280 - set grid = cube - @ NX = 21600 - @ NY = 10800 -endif -if( $HRCODE == c3072 ) then - set nc = 3072 - set RC = 3072x18432 - set grid = cube - @ NX = 43200 - @ NY = 21600 -endif -if( $HRCODE == c5760 ) then - set nc = 5760 - set RC = 5760x34560 - set grid = cube - @ NX = 43200 - @ NY = 21600 -endif - -if ( $isEASE > 0 ) then - - set grid = ease - - # im, jm must be consistent with values Fortran module EASE_conv - - if ( $EASEVERSION == EASEv1 ) then - - if( $HRCODE == M01 ) then - set im = 34668 - set jm = 14688 - endif - if( $HRCODE == M03 ) then - set im = 11556 - set jm = 4896 - endif - if( $HRCODE == M09 ) then - set im = 3852 - set jm = 1632 - endif - if( $HRCODE == M25 ) then - set im = 1383 - set jm = 586 - endif - if( $HRCODE == M36 ) then - set im = 963 - set jm = 408 - endif - - else if ( $EASEVERSION == EASEv2 ) then - - if( $HRCODE == M01 ) then - set im = 34704 - set jm = 14616 - endif - if( $HRCODE == M03 ) then - set im = 11568 - set jm = 4872 - endif - if( $HRCODE == M09 ) then - set im = 3856 - set jm = 1624 - endif - if( $HRCODE == M25 ) then - set im = 1388 - set jm = 584 - endif - if( $HRCODE == M36 ) then - set im = 964 - set jm = 406 - endif - - else - - echo " \!\!\!\! Invalid EASE grid version, stopping \!\!\!\! " - exit - - endif -endif - - -if( $MASKFILE == GEOS5_10arcsec_mask_freshwater-lakes.nc | $MASKFILE == GEOS5_10arcsec_mask.nc ) then - @ NX = 43200 - @ NY = 21600 -endif - -set OUTDIR = `date +'%Y%m%d%H%M%S'` - -# ------------------------- -# Get SPONSOR GROUP ID -# ------------------------- - -set group = "" -set sponsorinfo = `getsponsor` - -while ("$group" == "") - @ n = 1 - while ($n < $#sponsorinfo) - if ($sponsorinfo[$n] =~ g[0..9]*) then - set group = $sponsorinfo[$n] - #--break # uncomment this line to make 1st entry the default - endif - @ n++ - end - - getsponsor - if ("$group" != "") then - echo -n "select group: [$group] " - else - echo -n "select group: " - endif - - set reponse = $< - if ("$reponse" != "") set group = $reponse - -end - -####################################################################### -# LatLon Case -####################################################################### - - - -if( $grid == latlon ) then - -set RS = ${im}x${jm} -set IM = `echo ${im} | awk '{printf "%4.4i", $1}'` -set JM = `echo ${jm} | awk '{printf "%4.4i", $1}'` -set IMO = `echo ${imo} | awk '{printf "%4.4i", $1}'` -set JMO = `echo ${jmo} | awk '{printf "%4.4i", $1}'` - -set DATENAME = DE -set POLENAME = PE - -set BCNAME = DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO} -set BCDIR = $EXPDIR/$OUTDIR/$BCNAME.scratch -set BCJOB = $BCDIR/$BCNAME.j - -set nfiles = `find $EXPDIR -maxdepth 5 -name ${BCNAME}".j" | wc -l` -if( $nfiles >= 1 ) then - echo "" - echo "${C1} ----------------------------------------------------${CR}" - echo "${C1} Abort: ${CR}" - echo "${C2} This BCS run $BCDIR ${CR}" - echo "${C2} will create resolution dir already present: $BCNAME ${CR}" - echo "${C2} Please delete run dir and same resolution BCS files and resubmit" - echo "${C1} ----------------------------------------------------${CR}" - echo "" - exit -endif - -mkdir -p $BCDIR -mkdir -p $EXPDIR/$OUTDIR/logs/$BCNAME - -echo "${C1} Creating:${CR} ${C2}$BCJOB${CR}" -/bin/rm -f $BCJOB -cat << _EOF_ > $BCJOB -#!/bin/csh -x - -#SBATCH --output=$EXPDIR/$OUTDIR/logs/$BCNAME/$BCNAME.log -#SBATCH --error=$EXPDIR/$OUTDIR/logs/$BCNAME/$BCNAME.err -#SBATCH --account=$group -#SBATCH --time=12:00:00 -#SBATCH --nodes=1 -#SBATCH --job-name=$BCNAME.j -#SBATCH --constraint=sky|cas - -cd $BCDIR - -/bin/ln -s $bin_dir -source bin/g5_modules -mkdir -p geometry land til rst data/MOM5 data/MOM6 clsm/plots - -ln -s $MAKE_BCS_INPUT_DIR/ocean/MOM5/360x200 data/MOM5/360x200 -ln -s $MAKE_BCS_INPUT_DIR/ocean/MOM5/720x410 data/MOM5/720x410 -ln -s $MAKE_BCS_INPUT_DIR/ocean/MOM5/1440x1080 data/MOM5/1440x1080 -ln -s $MAKE_BCS_INPUT_DIR/ocean/MOM6/72x36 data/MOM6/72x36 -ln -s $MAKE_BCS_INPUT_DIR/ocean/MOM6/540x458 data/MOM6/540x458 -ln -s $MAKE_BCS_INPUT_DIR/ocean/MOM6/1440x1080 data/MOM6/1440x1080 - -cd data - -cd ../ - -if( -e DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO}.stdout ) /bin/rm -f DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO}.stdout -setenv MASKFILE $MASKFILE -limit stacksize unlimited -bin/mkLatLonRaster.x -x ${NX} -y ${NY} -t -1 ${IM} ${JM} >/dev/null -bin/mkLandRaster.x -x ${NX} -y ${NY} -v -t ${NT} - -if( $LATLON_OCEAN == TRUE ) then - bin/mkLatLonRaster.x -x ${NX} -y ${NY} -b DE -p PE -t 0 ${IMO} ${JMO} >/dev/null - bin/CombineRasters.x -f 0 -t ${NT} DE${IMO}xPE${JMO} Pfafstetter >/dev/null - bin/CombineRasters.x -t ${NT} DC${IM}xPC${JM} DE${IMO}xPE${JMO}-Pfafstetter - setenv OMP_NUM_THREADS 1 - if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g DC${IM}xPC${JM}_DE${IMO}xPE${JMO}-Pfafstetter -v $lbcsv - setenv OMP_NUM_THREADS ${NCPUS} - if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g DC${IM}xPC${JM}_DE${IMO}xPE${JMO}-Pfafstetter -v $lbcsv - chmod 755 bin/create_README.csh - bin/create_README.csh -endif -if( $TRIPOL_OCEAN == TRUE ) then - bin/mkMOMAquaRaster.x -x $NX -y $NY data/${MOM_VERSION}/${imo}x${jmo}/MAPL_Tripolar.nc > /dev/null - /bin/cp til/Pfafstetter.til til/Pfafstetter-ORIG.til - /bin/cp rst/Pfafstetter.rst rst/Pfafstetter-ORIG.rst - bin/FillMomGrid.x -f 0 -g Pfafstetter-M ${DATENAME}${IMO}x${POLENAME}${JMO} Pfafstetter data/${MOM_VERSION}/${imo}x${jmo}/MAPL_Tripolar.nc - /bin/mv til/Pfafstetter-M.til til/Pfafstetter.til - /bin/mv rst/Pfafstetter-M.rst rst/Pfafstetter.rst - bin/CombineRasters.x -f 0 -t ${NT} ${DATENAME}${IMO}x${POLENAME}${JMO} Pfafstetter >/dev/null - bin/CombineRasters.x -t ${NT} DC${IM}xPC${JM} ${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter - bin/mk_runofftbl.x DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter - setenv OMP_NUM_THREADS 1 - if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g DE${IMO}xPE${JMO}_DE${IMO}xPE${JMO}-Pfafstetter -v $lbcsv - setenv OMP_NUM_THREADS ${NCPUS} - if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g DE${IMO}xPE${JMO}_DE${IMO}xPE${JMO}-Pfafstetter -v $lbcsv - chmod 755 bin/create_README.csh - bin/create_README.csh -endif - -/bin/mv clsm clsm.${IM}x${JM} -/bin/cp til/DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til clsm.${IM}x${JM} -if( $TRIPOL_OCEAN == TRUE ) /bin/cp til/DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.TRN clsm.${IM}x${JM} -/bin/rm clsm.${IM}x${JM}/DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.file - -cd clsm.${IM}x${JM} - /bin/mv irrig.dat irrigation_${RS}_DC.dat - /bin/mv vegdyn.data vegdyn_${RS}_DC.dat - /bin/mv nirdf.dat nirdf_${RS}_DC.dat - /bin/mv visdf.dat visdf_${RS}_DC.dat - /bin/mv lai.dat lai_clim_${RS}_DC.data - /bin/mv green.dat green_clim_${RS}_DC.data - /bin/mv lnfm.dat lnfm_clim_${RS}_DC.data - /bin/mv ndvi.dat ndvi_clim_${RS}_DC.data - -/bin/rm -f sedfile -cat > sedfile << EOF -s/DC${IM}xPC${JM}/PC${im}x${jm}-DC/g -s/${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter/PE${imo}x${jmo}-${DATENAME}/g -EOF -sed -f sedfile DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til > tile.file -/bin/mv -f tile.file DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til -/bin/rm -f sedfile - -cd ../ - -/bin/rm -rf DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO} -/bin/mv clsm.${IM}x${JM} DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO} - cd DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO} - mkdir clsm - /bin/mv ar.new \ - bf.dat \ - ts.dat \ - catchment.def \ - cti_stats.dat \ - tau_param.dat \ - soil_param.dat \ - mosaic_veg_typs_fracs \ - soil_param.first \ - README \ - bad_sat_param.tiles \ - lai.* \ - AlbMap* \ - plots \ - CLM_veg_typs_fracs \ - mkCatchParam.log \ - CLM_NDep_SoilAlb_T2m \ - CLM4.5_abm_peatf_gdp_hdm_fc \ - catch_params.nc4 \ - catchcn_params.nc4 \ - country_and_state_code.data \ - clsm - cd ../ - -/bin/mv rst DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO} -/bin/mv til DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO} - -cd ../../ -/bin/mv $BCDIR/$BCNAME . -/bin/mv $BCJOB $BCNAME -/bin/mv $EXPDIR/$OUTDIR/logs $BCNAME/. -/bin/mv $BCNAME/clsm/mkCatchParam.log $BCNAME/logs/$BCNAME/mkCatchParam.log - -mkdir -p $BCNAME/geometry/DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO} -mkdir -p $BCNAME/land/DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO} - -/bin/mv $BCNAME/DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til $BCNAME/geometry/DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO}/. -if( $TRIPOL_OCEAN == TRUE ) /bin/mv $BCNAME/DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.TRN $BCNAME/geometry/DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO}/. - - -/bin/mv $BCNAME/clsm $BCNAME/land/DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO}/. -/bin/mv $BCNAME/irrigation_${RS}_DC.dat \ - $BCNAME/vegdyn_${RS}_DC.dat \ - $BCNAME/nirdf_${RS}_DC.dat \ - $BCNAME/visdf_${RS}_DC.dat \ - $BCNAME/lai_clim_${RS}_DC.data \ - $BCNAME/green_clim_${RS}_DC.data \ - $BCNAME/lnfm_clim_${RS}_DC.data \ - $BCNAME/ndvi_clim_${RS}_DC.data \ - $BCNAME/land/DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO}/. - -/bin/mv $BCNAME/rst $BCNAME/til $BCNAME/geometry/DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO}/. -/bin/mv $BCNAME/DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO}.j $BCNAME/geometry/DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO}/. - -/bin/rm -r $OUTDIR - -#mkdir -p IRRIG/$BCNAME/clsm -#bin/mkIrrigTiles.x -b $BCNAME -t DC${IM}xPC${JM}_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til -r _${RS}_DC -p $IRRIGTHRES - -_EOF_ -chmod 755 $BCJOB -set make_bcs_jobs = `echo $make_bcs_jobs $BCJOB` - -endif # End Latlon Test - -####################################################################### -# Cube Case -####################################################################### - -if( $grid == cube ) then - - @ nc6 = $nc * 6 -set NC = `echo ${nc} | awk '{printf "%4.4i", $1}'` -set IMO = `echo ${imo} | awk '{printf "%4.4i", $1}'` -set JMO = `echo ${jmo} | awk '{printf "%4.4i", $1}'` - -if( $CUBED_SPHERE_OCEAN == TRUE ) then - set BCNAME = CF${NC}x6C_CF${NC}x6C - set DATENAME = CF - set POLENAME = - set IMO = ${NC} - set JMO = 6C -else - set BCNAME = CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO} -endif - -set BCDIR = $EXPDIR/$OUTDIR/$BCNAME.scratch -set BCJOB = $BCDIR/$BCNAME.j - -set nfiles = `find $EXPDIR -maxdepth 5 -name ${BCNAME}".j" | wc -l` -if( $nfiles >= 1 ) then - echo "" - echo "${C1} ----------------------------------------------------${CR}" - echo "${C1} Abort: ${CR}" - echo "${C2} This BCS run $BCDIR ${CR}" - echo "${C2} will create resolution dir already present: $BCNAME ${CR}" - echo "${C2} Please delete run dir and same resolution BCS files and resubmit" - echo "${C1} ----------------------------------------------------${CR}" - echo "" - exit -endif - -mkdir -p $BCDIR -mkdir -p $EXPDIR/$OUTDIR/logs/$BCNAME - -echo "${C1} Creating:${CR} ${C2}$BCJOB${CR}" -/bin/rm -f $BCJOB -if ($HRCODE == c2880 | $HRCODE == c3072 | $HRCODE == c5760) then -cat << _EOF_ > $BCJOB -#!/bin/csh -x - -#SBATCH --output=$EXPDIR/$OUTDIR/logs/$BCNAME/$BCNAME.log -#SBATCH --error=$EXPDIR/$OUTDIR/logs/$BCNAME/$BCNAME.err -#SBATCH --account=$group -#SBATCH --time=12:00:00 -#SBATCH --nodes=1 -#SBATCH --job-name=$BCNAME.j -#SBATCH --constraint=sky|cas - -cd $BCDIR - -/bin/ln -s $bin_dir -source bin/g5_modules -mkdir -p geometry land til rst data/MOM5 data/MOM6 clsm/plots - -ln -s $MAKE_BCS_INPUT_DIR/ocean/MOM5/360x200 data/MOM5/360x200 -ln -s $MAKE_BCS_INPUT_DIR/ocean/MOM5/720x410 data/MOM5/720x410 -ln -s $MAKE_BCS_INPUT_DIR/ocean/MOM5/1440x1080 data/MOM5/1440x1080 -ln -s $MAKE_BCS_INPUT_DIR/ocean/MOM6/72x36 data/MOM6/72x36 -ln -s $MAKE_BCS_INPUT_DIR/ocean/MOM6/540x458 data/MOM6/540x458 -ln -s $MAKE_BCS_INPUT_DIR/ocean/MOM6/1440x1080 data/MOM6/1440x1080 - - -cd data -cd ../ - -if( -e CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}.stdout ) /bin/rm -f CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}.stdout -setenv MASKFILE $MASKFILE -limit stacksize unlimited -bin/mkCubeFVRaster.x -x ${NX} -y ${NY} ${NC} >/dev/null -bin/mkLandRaster.x -x ${NX} -y ${NY} -v -t ${NT} - -if( $LATLON_OCEAN == TRUE ) then - bin/mkLatLonRaster.x -x ${NX} -y ${NY} -b DE -p PE -t 0 ${IMO} ${JMO} >/dev/null - bin/CombineRasters.x -f 0 -t ${NT} DE${IMO}xPE${JMO} Pfafstetter >/dev/null - bin/CombineRasters.x -t ${NT} CF${NC}x6C DE${IMO}xPE${JMO}-Pfafstetter - setenv OMP_NUM_THREADS 1 - if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_DE${IMO}xPE${JMO}-Pfafstetter -v $lbcsv -endif - -if( $TRIPOL_OCEAN == TRUE ) then - bin/mkMOMAquaRaster.x -x ${NX} -y ${NY} data/${MOM_VERSION}/${imo}x${jmo}/MAPL_Tripolar.nc > /dev/null - /bin/cp til/Pfafstetter.til til/Pfafstetter-ORIG.til - /bin/cp rst/Pfafstetter.rst rst/Pfafstetter-ORIG.rst - bin/FillMomGrid.x -f 0 -g Pfafstetter-M ${DATENAME}${IMO}x${POLENAME}${JMO} Pfafstetter data/${MOM_VERSION}/${imo}x${jmo}/MAPL_Tripolar.nc - /bin/mv til/Pfafstetter-M.til til/Pfafstetter.til - /bin/mv rst/Pfafstetter-M.rst rst/Pfafstetter.rst - bin/CombineRasters.x -f 0 -t ${NT} ${DATENAME}${IMO}x${POLENAME}${JMO} Pfafstetter >/dev/null - bin/CombineRasters.x -t ${NT} CF${NC}x6C ${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter - bin/mk_runofftbl.x CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter - setenv OMP_NUM_THREADS 1 - if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter -v $lbcsv -endif - -if( $CUBED_SPHERE_OCEAN == TRUE ) then - bin/CombineRasters.x -f 0 -t ${NT} CF${NC}x6C Pfafstetter >/dev/null - bin/CombineRasters.x -t ${NT} CF${NC}x6C CF${NC}x6C-Pfafstetter - setenv OMP_NUM_THREADS 1 - if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_CF${NC}x6C-Pfafstetter -v $lbcsv -endif -_EOF_ - -chmod 755 $BCJOB -set make_bcs_jobs = `echo $make_bcs_jobs $BCJOB` - -cat << _EOF_ > $BCJOB-2 -#!/bin/csh -x - -#SBATCH --output=$EXPDIR/$OUTDIR/logs/$BCNAME/$BCNAME-2.log -#SBATCH --error=$EXPDIR/$OUTDIR/logs/$BCNAME/$BCNAME-2.err -#SBATCH --account=$group -#SBATCH --time=12:00:00 -#SBATCH --nodes=1 -#SBATCH --job-name=$BCNAME-2.j -#SBATCH --constraint=sky|cas - -cd $BCDIR - -source bin/g5_modules - -setenv MASKFILE $MASKFILE -limit stacksize unlimited - -if( $LATLON_OCEAN == TRUE ) then - setenv OMP_NUM_THREADS ${NCPUS} - if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_DE${IMO}xPE${JMO}-Pfafstetter -v $lbcsv - chmod 755 bin/create_README.csh - bin/create_README.csh -endif - -if( $TRIPOL_OCEAN == TRUE ) then - setenv OMP_NUM_THREADS ${NCPUS} - if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter -v $lbcsv - chmod 755 bin/create_README.csh - bin/create_README.csh -endif - -if( $CUBED_SPHERE_OCEAN == TRUE ) then - setenv OMP_NUM_THREADS ${NCPUS} - if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_CF${NC}x6C-Pfafstetter -v $lbcsv - chmod 755 bin/create_README.csh - bin/create_README.csh -endif - -/bin/mv clsm clsm.C${NC} -/bin/cp til/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til clsm.C${NC} -if( $TRIPOL_OCEAN == TRUE ) /bin/cp til/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.TRN clsm.C${NC} -/bin/rm clsm.C${NC}/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.file - -cd clsm.C${NC} - /bin/mv irrig.dat irrigation_${RC}.dat - /bin/mv vegdyn.data vegdyn_${RC}.dat - /bin/mv nirdf.dat nirdf_${RC}.dat - /bin/mv visdf.dat visdf_${RC}.dat - /bin/mv lai.dat lai_clim_${RC}.data - /bin/mv green.dat green_clim_${RC}.data - /bin/mv lnfm.dat lnfm_clim_${RC}.data - /bin/mv ndvi.dat ndvi_clim_${RC}.data - -/bin/rm -f sedfile -if( $CUBED_SPHERE_OCEAN == TRUE ) then -cat > sedfile << EOF -s/${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter/OC${nc}x${nc6}-CF/g -s/CF${NC}x6C/PE${nc}x${nc6}-CF/g -EOF -sed -f sedfile CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til > tile.file -/bin/mv -f tile.file CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til -/bin/rm -f sedfile -else -cat > sedfile << EOF -s/CF${NC}x6C/PE${nc}x${nc6}-CF/g -s/${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter/PE${imo}x${jmo}-${DATENAME}/g -EOF -sed -f sedfile CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til > tile.file -/bin/mv -f tile.file CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til -/bin/rm -f sedfile -endif - -cd ../ - -/bin/rm -rf CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO} -/bin/mv clsm.C${NC} CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO} - cd CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO} - mkdir clsm - /bin/mv ar.new \ - bf.dat \ - ts.dat \ - catchment.def \ - cti_stats.dat \ - tau_param.dat \ - soil_param.dat \ - mosaic_veg_typs_fracs \ - soil_param.first \ - README \ - bad_sat_param.tiles \ - lai.* \ - AlbMap* \ - plots \ - CLM_veg_typs_fracs \ - mkCatchParam.log \ - CLM_NDep_SoilAlb_T2m \ - CLM4.5_abm_peatf_gdp_hdm_fc \ - catch_params.nc4 \ - catchcn_params.nc4 \ - country_and_state_code.data \ - clsm - cd ../ - -/bin/mv rst CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO} -/bin/mv til CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO} -/bin/mv $BCJOB-2 CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}/. - -cd ../../ - - -/bin/mv $BCDIR/$BCNAME . -/bin/mv $BCJOB-2 $BCNAME -/bin/mv $EXPDIR/$OUTDIR/logs $BCNAME/. -/bin/mv $BCNAME/clsm/mkCatchParam.log $BCNAME/logs/$BCNAME/mkCatchParam.log - -mkdir -p $BCNAME/geometry/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO} -mkdir -p $BCNAME/land/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO} - -/bin/mv $BCNAME/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til $BCNAME/geometry/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}/. -if( $TRIPOL_OCEAN == TRUE ) /bin/mv $BCNAME/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.TRN $BCNAME/geometry/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}/. - - -/bin/mv $BCNAME/clsm $BCNAME/land/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}/. -/bin/mv $BCNAME/irrigation_${RC}.dat \ - $BCNAME/vegdyn_${RC}.dat \ - $BCNAME/nirdf_${RC}.dat \ - $BCNAME/visdf_${RC}.dat \ - $BCNAME/lai_clim_${RC}.data \ - $BCNAME/green_clim_${RC}.data \ - $BCNAME/lnfm_clim_${RC}.data \ - $BCNAME/ndvi_clim_${RC}.data \ - $BCNAME/land/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}/. - -/bin/mv $BCNAME/rst $BCNAME/til $BCNAME/geometry/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}/. -/bin/mv $BCNAME/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}.j $BCNAME/geometry/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}/. -/bin/rm -r $OUTDIR - -#mkdir -p IRRIG/$BCNAME/clsm -#bin/mkIrrigTiles.x -b $BCNAME -t CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til -r _${RC} -p $IRRIGTHRES - -_EOF_ -chmod 755 $BCJOB-2 -set make_bcs_jobs = `echo $make_bcs_jobs $BCJOB-2` - -else -cat << _EOF_ > $BCJOB -#!/bin/csh -x - -#SBATCH --output=$EXPDIR/$OUTDIR/logs/$BCNAME/$BCNAME.log -#SBATCH --error=$EXPDIR/$OUTDIR/logs/$BCNAME/$BCNAME.err -#SBATCH --account=$group -#SBATCH --time=12:00:00 -#SBATCH --nodes=1 -#SBATCH --job-name=$BCNAME.j -#SBATCH --constraint=sky|cas - -cd $BCDIR - -/bin/ln -s $bin_dir -source bin/g5_modules -mkdir -p geometry land til rst data/MOM5 data/MOM6 clsm/plots - -ln -s $MAKE_BCS_INPUT_DIR/ocean/MOM5/360x200 data/MOM5/360x200 -ln -s $MAKE_BCS_INPUT_DIR/ocean/MOM5/720x410 data/MOM5/720x410 -ln -s $MAKE_BCS_INPUT_DIR/ocean/MOM5/1440x1080 data/MOM5/1440x1080 -ln -s $MAKE_BCS_INPUT_DIR/ocean/MOM6/72x36 data/MOM6/72x36 -ln -s $MAKE_BCS_INPUT_DIR/ocean/MOM6/540x458 data/MOM6/540x458 -ln -s $MAKE_BCS_INPUT_DIR/ocean/MOM6/1440x1080 data/MOM6/1440x1080 - -cd data - -cd ../ - -if( -e CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}.stdout ) /bin/rm -f CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}.stdout -setenv MASKFILE $MASKFILE -limit stacksize unlimited -bin/mkCubeFVRaster.x -x ${NX} -y ${NY} ${NC} >/dev/null -bin/mkLandRaster.x -x ${NX} -y ${NY} -v -t ${NT} - -if( $LATLON_OCEAN == TRUE ) then - bin/mkLatLonRaster.x -x ${NX} -y ${NY} -b DE -p PE -t 0 ${IMO} ${JMO} >/dev/null - bin/CombineRasters.x -f 0 -t ${NT} DE${IMO}xPE${JMO} Pfafstetter >/dev/null - bin/CombineRasters.x -t ${NT} CF${NC}x6C DE${IMO}xPE${JMO}-Pfafstetter - setenv OMP_NUM_THREADS 1 - if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_DE${IMO}xPE${JMO}-Pfafstetter -v $lbcsv - setenv OMP_NUM_THREADS ${NCPUS} - if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_DE${IMO}xPE${JMO}-Pfafstetter -v $lbcsv - chmod 755 bin/create_README.csh - bin/create_README.csh -endif - -if( $TRIPOL_OCEAN == TRUE ) then - bin/mkMOMAquaRaster.x -x ${NX} -y ${NY} data/${MOM_VERSION}/${imo}x${jmo}/MAPL_Tripolar.nc > /dev/null - /bin/cp til/Pfafstetter.til til/Pfafstetter-ORIG.til - /bin/cp rst/Pfafstetter.rst rst/Pfafstetter-ORIG.rst - bin/FillMomGrid.x -f 0 -g Pfafstetter-M ${DATENAME}${IMO}x${POLENAME}${JMO} Pfafstetter data/${MOM_VERSION}/${imo}x${jmo}/MAPL_Tripolar.nc - /bin/mv til/Pfafstetter-M.til til/Pfafstetter.til - /bin/mv rst/Pfafstetter-M.rst rst/Pfafstetter.rst - bin/CombineRasters.x -f 0 -t ${NT} ${DATENAME}${IMO}x${POLENAME}${JMO} Pfafstetter >/dev/null - bin/CombineRasters.x -t ${NT} CF${NC}x6C ${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter - bin/mk_runofftbl.x CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter - setenv OMP_NUM_THREADS 1 - if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter -v $lbcsv - setenv OMP_NUM_THREADS ${NCPUS} - if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter -v $lbcsv - chmod 755 bin/create_README.csh - bin/create_README.csh -endif - -if( $CUBED_SPHERE_OCEAN == TRUE ) then - bin/CombineRasters.x -f 0 -t ${NT} CF${NC}x6C Pfafstetter >/dev/null - bin/CombineRasters.x -t ${NT} CF${NC}x6C CF${NC}x6C-Pfafstetter - setenv OMP_NUM_THREADS 1 - if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_CF${NC}x6C-Pfafstetter -v $lbcsv - setenv OMP_NUM_THREADS ${NCPUS} - if ($SKIPLAND != YES) bin/mkCatchParam.x -x ${NX} -y ${NY} -g CF${NC}x6C_CF${NC}x6C-Pfafstetter -v $lbcsv - chmod 755 bin/create_README.csh - bin/create_README.csh -endif - -/bin/mv clsm clsm.C${NC} -/bin/cp til/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til clsm.C${NC} -if( $TRIPOL_OCEAN == TRUE ) /bin/cp til/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.TRN clsm.C${NC} -/bin/rm clsm.C${NC}/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.file - -cd clsm.C${NC} - /bin/mv irrig.dat irrigation_${RC}.dat - /bin/mv vegdyn.data vegdyn_${RC}.dat - /bin/mv nirdf.dat nirdf_${RC}.dat - /bin/mv visdf.dat visdf_${RC}.dat - /bin/mv lai.dat lai_clim_${RC}.data - /bin/mv green.dat green_clim_${RC}.data - /bin/mv lnfm.dat lnfm_clim_${RC}.data - /bin/mv ndvi.dat ndvi_clim_${RC}.data - -/bin/rm -f sedfile -if( $CUBED_SPHERE_OCEAN == TRUE ) then -cat > sedfile << EOF -s/${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter/OC${nc}x${nc6}-CF/g -s/CF${NC}x6C/PE${nc}x${nc6}-CF/g -EOF -sed -f sedfile CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til > tile.file -/bin/mv -f tile.file CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til -/bin/rm -f sedfile -else -cat > sedfile << EOF -s/CF${NC}x6C/PE${nc}x${nc6}-CF/g -s/${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter/PE${imo}x${jmo}-${DATENAME}/g -EOF -sed -f sedfile CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til > tile.file -/bin/mv -f tile.file CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til -/bin/rm -f sedfile -endif - -cd ../ - -/bin/rm -rf CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO} -/bin/mv clsm.C${NC} CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO} - cd CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO} - mkdir clsm - /bin/mv ar.new \ - bf.dat \ - ts.dat \ - catchment.def \ - cti_stats.dat \ - tau_param.dat \ - soil_param.dat \ - mosaic_veg_typs_fracs \ - soil_param.first \ - README \ - bad_sat_param.tiles \ - lai.* \ - AlbMap* \ - plots \ - CLM_veg_typs_fracs \ - mkCatchParam.log \ - CLM_NDep_SoilAlb_T2m \ - CLM4.5_abm_peatf_gdp_hdm_fc \ - catch_params.nc4 \ - catchcn_params.nc4 \ - country_and_state_code.data \ - clsm - cd ../ - -/bin/mv rst CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO} -/bin/mv til CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO} -/bin/mv $BCJOB CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}/. -cd ../../ -/bin/mv $BCDIR/$BCNAME . -/bin/mv $BCJOB $BCNAME -/bin/mv $EXPDIR/$OUTDIR/logs $BCNAME/. -/bin/mv $BCNAME/clsm/mkCatchParam.log $BCNAME/logs/$BCNAME/mkCatchParam.log - -mkdir -p $BCNAME/geometry/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO} -mkdir -p $BCNAME/land/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO} - -/bin/mv $BCNAME/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til $BCNAME/geometry/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}/. -if( $TRIPOL_OCEAN == TRUE ) /bin/mv $BCNAME/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.TRN $BCNAME/geometry/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}/. - - -/bin/mv $BCNAME/clsm $BCNAME/land/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}/. -/bin/mv $BCNAME/irrigation_${RC}.dat \ - $BCNAME/vegdyn_${RC}.dat \ - $BCNAME/nirdf_${RC}.dat \ - $BCNAME/visdf_${RC}.dat \ - $BCNAME/lai_clim_${RC}.data \ - $BCNAME/green_clim_${RC}.data \ - $BCNAME/lnfm_clim_${RC}.data \ - $BCNAME/ndvi_clim_${RC}.data \ - $BCNAME/land/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}/. - -/bin/mv $BCNAME/rst $BCNAME/til $BCNAME/geometry/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}/. -/bin/mv $BCNAME/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}.j $BCNAME/geometry/CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}/. -/bin/rm -r $OUTDIR - -#mkdir -p IRRIG/$BCNAME/clsm -#bin/mkIrrigTiles.x -b $BCNAME -t CF${NC}x6C_${DATENAME}${IMO}x${POLENAME}${JMO}-Pfafstetter.til -r _${RC} -p $IRRIGTHRES - -_EOF_ -chmod 755 $BCJOB -set make_bcs_jobs = `echo $make_bcs_jobs $BCJOB` -endif - -endif # End Cube Test - -####################################################################### -# EASE Case -####################################################################### - -if( $grid == ease ) then - echo $HRCODE - - set RS = ${im}x${jm} - set IM = `echo ${im} | awk '{printf "%4.4i", $1}'` - set JM = `echo ${jm} | awk '{printf "%4.4i", $1}'` - - set BCNAME = ${EASEVERSION}_${HRCODE} - set BCDIR = $EXPDIR/$OUTDIR/$BCNAME.scratch - set BCJOB = $BCDIR/$BCNAME.j - - set nfiles = `find $EXPDIR -maxdepth 5 -name ${BCNAME}".j" | wc -l` - if( $nfiles >= 1 ) then - echo "" - echo "${C1} ----------------------------------------------------${CR}" - echo "${C1} Abort: ${CR}" - echo "${C2} This BCS run $BCDIR ${CR}" - echo "${C2} will create resolution dir already present: $BCNAME ${CR}" - echo "${C2} Please delete run dir and same resolution BCS files and resubmit" - echo "${C1} ----------------------------------------------------${CR}" - echo "" - exit - endif - - mkdir -p $BCDIR - mkdir -p $EXPDIR/$OUTDIR/logs/$BCNAME - - echo "${C1} Creating:${CR} ${C2}$BCJOB${CR}" - /bin/rm -f $BCJOB - -cat << _EOF_ > $BCJOB -#!/bin/csh -x - -#SBATCH --output=$EXPDIR/$OUTDIR/logs/$BCNAME/$BCNAME.log -#SBATCH --error=$EXPDIR/$OUTDIR/logs/$BCNAME/$BCNAME.err -#SBATCH --account=$group -#SBATCH --time=12:00:00 -#SBATCH --nodes=1 -#SBATCH --job-name=$BCNAME.j -#SBATCH --constraint=sky|cas - -cd $BCDIR - -/bin/ln -s $bin_dir -source bin/g5_modules -mkdir -p geometry land til rst data/MOM5 data/MOM6 clsm/plots -cd data -cd ../ -limit stacksize unlimited - -setenv MASKFILE ${MASKFILE} -setenv OMP_NUM_THREADS 1 -bin/mkEASETilesParam.x -ease_label ${BCNAME} - -setenv OMP_NUM_THREADS 1 -bin/mkCatchParam.x -g ${BCNAME} -v $lbcsv -x ${NX} -y ${NY} -setenv OMP_NUM_THREADS ${NCPUS} -bin/mkCatchParam.x -g ${BCNAME} -v $lbcsv -x ${NX} -y ${NY} -chmod 755 bin/create_README.csh -bin/create_README.csh - -/bin/mv clsm clsm.${IM}x${JM} -/bin/cp til/${EASEVERSION}_${HRCODE}_${RS}.til clsm.${IM}x${JM} - -cd clsm.${IM}x${JM} - /bin/mv irrig.dat irrigation_${RS}_DE.dat - /bin/mv vegdyn.data vegdyn_${RS}_DE.dat - /bin/mv nirdf.dat nirdf_${RS}_DE.dat - /bin/mv visdf.dat visdf_${RS}_DE.dat - /bin/mv lai.dat lai_clim_${RS}_DE.data - /bin/mv green.dat green_clim_${RS}_DE.data - /bin/mv lnfm.dat lnfm_clim_${RS}_DE.data - /bin/mv ndvi.dat ndvi_clim_${RS}_DE.data - - -cd ../ - -/bin/rm -rf ${EASEVERSION}_${HRCODE} -/bin/mv clsm.${IM}x${JM} ${EASEVERSION}_${HRCODE} - cd ${EASEVERSION}_${HRCODE} - mkdir clsm - /bin/mv ar.new \ - bf.dat \ - ts.dat \ - catchment.def \ - cti_stats.dat \ - tau_param.dat \ - soil_param.dat \ - mosaic_veg_typs_fracs \ - soil_param.first \ - bad_sat_param.tiles \ - README \ - lai.* \ - AlbMap* \ - g5fmt \ - vegetation.hst2 \ - pfaf_fractions.dat \ - plots \ - CLM_veg_typs_fracs \ - mkCatchParam.log \ - Grid2Catch_TransferData.nc \ - CLM_NDep_SoilAlb_T2m \ - CLM4.5_abm_peatf_gdp_hdm_fc \ - catch_params.nc4 \ - catchcn_params.nc4 \ - country_and_state_code.data \ - clsm - cd ../ - -/bin/mv rst ${EASEVERSION}_${HRCODE} -/bin/mv til ${EASEVERSION}_${HRCODE} - -cd ../../ -/bin/mv $BCDIR/$BCNAME . -/bin/mv $BCJOB $BCNAME -/bin/mv $EXPDIR/$OUTDIR/logs $BCNAME/. -/bin/mv $BCNAME/clsm/mkCatchParam.log $BCNAME/logs/$BCNAME/mkCatchParam.log - -mkdir -p $BCNAME/geometry/${EASEVERSION}_${HRCODE} -mkdir -p $BCNAME/land/${EASEVERSION}_${HRCODE} - -/bin/mv $BCNAME/${EASEVERSION}_${HRCODE}_${RS}.til $BCNAME/geometry/${EASEVERSION}_${HRCODE}/. - - -/bin/mv $BCNAME/clsm $BCNAME/land/${EASEVERSION}_${HRCODE}/. -/bin/mv $BCNAME/irrigation_${RS}_DE.dat \ - $BCNAME/vegdyn_${RS}_DE.dat \ - $BCNAME/nirdf_${RS}_DE.dat \ - $BCNAME/visdf_${RS}_DE.dat \ - $BCNAME/lai_clim_${RS}_DE.data \ - $BCNAME/green_clim_${RS}_DE.data \ - $BCNAME/lnfm_clim_${RS}_DE.data \ - $BCNAME/ndvi_clim_${RS}_DE.data \ - $BCNAME/land/${EASEVERSION}_${HRCODE}/. - -/bin/mv $BCNAME/rst $BCNAME/til $BCNAME/geometry/${EASEVERSION}_${HRCODE}/. -/bin/mv $BCNAME/$BCNAME.j $BCNAME/geometry/${EASEVERSION}_${HRCODE}/. - - -/bin/rm -r $OUTDIR - -#mkdir -p IRRIG/$BCNAME/clsm IRRIG/$BCNAME/rst -#bin/mkIrrigTiles.x -x 43200 -y 21600 -b $BCNAME -t ${EASEVERSION}_${HRCODE}_${RS}.til -r _${RS}_DE -p $IRRIGTHRES -_EOF_ - - -chmod 755 $BCJOB -set make_bcs_jobs = `echo $make_bcs_jobs $BCJOB` -endif # End if directory -endif # End ease Test -end # End Atmospheric Resolution Loop - -# ----------------------------- - -end # End Ocean Resolution Loop - -####################################################################### - -#echo " " -#echo "Are you planning to run ${C2}MAKE_BCS${CR} jobs on an interactive node? (Y/N)" -#echo "Enter N if you wish to submit to the SLURM queue instead " -#echo "-----------------------------------------------------------------------------" -#echo " " -#set dummy = `echo $<` -#set dummy = `echo $dummy | tr "[:lower:]" "[:upper:]"` -#if(.$dummy == .Y | .$dummy == YES ) then -# foreach job ($make_bcs_jobs) -# nohup ./$job & -# end -#else -foreach job ($make_bcs_jobs) -set jobid="`sbatch $job | cut -d' ' -f4`" -echo $jobid -echo $job - -if( -e $job-2) then -set jobid="`sbatch --dependency=afterok:$jobid $make_bcs_jobs[2] | cut -d' ' -f4`" -echo $jobid -exit -endif -end -#endif - diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/obsolete/ConvertAlb.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/obsolete/ConvertAlb.F90 deleted file mode 100644 index 360179290..000000000 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/obsolete/ConvertAlb.F90 +++ /dev/null @@ -1,43 +0,0 @@ - -integer, parameter :: nx=8640, ny=4320 - - -real, allocatable :: alb_in(:,:), albo(:,:) -integer*1, allocatable :: alb_out(:,:) -character*128 :: ifile, ofile - - -allocate(alb_in(nx,ny)) -allocate(albo(nx,ny)) -allocate(alb_out(nx,ny)) - -call get_command_argument(1,ifile) - -ofile = "data/Attic/foo"!trim(ifile)//'int1' - -open(10, file="data/Attic/"//ifile, status='old', form='unformatted',convert='big_endian') -open(11, file=ofile, status='unknown', form='unformatted',convert='big_endian') - -do m=1,12 - read(10) alb_in - where(alb_in>1.) alb_in=0. - alb_out=nint((alb_in-0.50)*255.) - write(11) alb_out - - albo=(alb_out+128)/255.0_8 - -!!$ do j=1,ny -!!$ do i=1,nx -!!$ if(albo(i,j)>0.9) & -!!$ print *, i, j, albo(i,j),alb_in(i,j),alb_out(i,j) -!!$ end do -!!$ end do - - print *, "month ",m - print *, minval(alb_out), maxval(alb_out) - print *, minval(albo) , maxval(albo) - print *, minval(alb_in) , maxval(alb_in) -enddo - -stop -end diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/obsolete/asia_tiles.pro b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/obsolete/asia_tiles.pro deleted file mode 100644 index 00210be9d..000000000 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/obsolete/asia_tiles.pro +++ /dev/null @@ -1,124 +0,0 @@ -; -; This IDL code is good to plot land-tile boundaries for the lat/lon -; extermeties bounded by xylim=[20.,110.,50.,150.] -; Contact - Sarith (sarith.p.mahanama@nasa.gov) -; -; Usage -Set path to rst and til files -gfile = '../clsm/DC0144xPC0091_DE0360xPE0180-Pfaf.notiny' -; End user defined variables - -sp,1,1,/f,/h,/color,/land -;!p.multi=[0,1,2] -loadct2,0 -ncb=8640 -nrb=4320 -dx25=2.5/60. -dy25=2.5/60. -x1b=-180. + dx25/2. -xeb= x1b +(ncb-1)*dx25 -y1b= -90. + dy25/2. -yeb= y1b +(nrb-1)*dy25 - -; -xlim=intarr(2) -ylim=intarr(2) -; -nbm=10 -levp=findgen(nbm+1)+1 -pfstat=lonarr(1) -; -; ZOOM IN HERE -xylim=[20.,110.,50.,150.] ;Asia -xlen=xylim(3)-xylim(1) -ylen=xylim(2)-xylim(0) -print,'xlen=',xlen -print,'ylen=',ylen -print,xylim -init=replicate(0.,xlen,ylen) -x = indgen(xlen)+xylim(1) -y = indgen(ylen)+xylim(0) - -;; BEGINNING THE PLOT -;; ------------------ - -tit='CATCHMENT DEFINITIONS' -fmt='(i3)' -levp=[0,99999,199999,299999,399999,499999,599999,699999,799999,899999,999999] -colors=[16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,128,130,132] -; -sp,1,1,/f,/h,/color,/land -contour,init,x,y,title=tit,xrange=[x(0),x(xlen-1)+1.],yrange=[y(0),y(ylen-1)+1.],xstyle=1,ystyle=1 - -;; READING AND PLOTTING STEP BY STEP -;; --------------------------------- - -cc=0 - -pfc=long(0.) -pfc1=long(0.) -pfcl=long(0.) -pfcr=long(0.) - - cumar=0. - cat25=lonarr(ncb) - cat25p=lonarr(ncb) - - file15=gfile+'.rst' - idum=0l - openr,15,file15;,/xdr - for i=0,nrb-1 do begin - - readu,15,idum,cat25,idum - yu=y1b+i*dy25+dy25/2. - yl=y1b+i*dy25-dy25/2. - - for j=0,8160 do begin ;ASIA - pfc=cat25(j) - pfc1=cat25(j) - if(j ne 0)then pfcl=cat25(j-1) - if(j ne ncb-1)then pfcr=cat25(j+1) - - if(pfc ne 0) then begin - - if(i eq 0)then cat25p(j)=pfc - xl=x1b+j*dx25-dx25/2. - xr=x1b+j*dx25+dx25/2. - xx=fltarr(5) - yy=fltarr(5) - xx=[xl,xl,xr,xr,xl] - yy=[yu,yl,yl,yu,yu] - if((xl ge min(x)) and (xr le max(x)+1.) and (yl ge min(y)) and (yu le max(y)+1.)) then begin - - ccid=strtrim((string(pfc)),2) - if(pfc le 9999) then begin - n=fix(strmid(ccid,3,1)) - endif - if(pfc gt 9999) then begin - n=fix(strmid(ccid,4,1)) - endif - n = pfc mod 18 - - polyfill,xx,yy,color=colors(n) - cc=cc+1 - - if(pfc ne cat25p(j)) then oplot,[xl,xr],[yl,yl] - if(pfc ne pfcl) then oplot,[xl,xl],[yl,yu] - if(pfc ne pfcr) then oplot,[xr,xr],[yl,yu] - endif - endif - - cat25p(j)=pfc - endfor - - endfor - close,15 - -xleg=-80. -yleg1=12. -close,12 - -fileps1=gfile+'-asia.ps' - -closeps,fileps1 -end - diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/obsolete/compile_mk_runoff b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/obsolete/compile_mk_runoff deleted file mode 100755 index ec6ca173d..000000000 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/obsolete/compile_mk_runoff +++ /dev/null @@ -1 +0,0 @@ -f90 -o ../bin/mk_runofftbl -p. MAPL_Hash.F90 MAPL_Sort.F90 sort.c hash.c mk_runofftbl.F90 -lU77 diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/obsolete/make_tiles b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/obsolete/make_tiles deleted file mode 100755 index a60838ef1..000000000 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/obsolete/make_tiles +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/csh -f - -gmake clean -gmake BUILD - -###################################################################### - -set cubes = `echo c0048 \ - c0090 \ - c0180 \ - c0360 \ - c0720 \ - c1000 \ - c1440 \ - c2880` - -###################################################################### - -set latlons = `echo 0144x0091 \ - 0180x0091 \ - 0288x0181 \ - 0360x0180 \ - 0360x0181 \ - 0540x0361 \ - 0576x0361 \ - 0720x0361 \ - 1152x0721 \ - 3600x1800 ` - -###################################################################### - -foreach cube ($cubes) - set NC = `echo $cube | cut -dc -f2` - set nx = 8640 - set ny = 4320 - if($NC == 1440) then - set nx = 17280 - set ny = 8640 - endif - if($NC == 2880) then - set nx = 21600 - set ny = 10800 - endif - set nt = 95000000 - - bin/mkCubeFVRaster -x $nx -y $ny $NC - -foreach latlon ($latlons) - set IM = `echo $latlon | cut -dx -f1` - set JM = `echo $latlon | cut -dx -f2` - - @ z = $JM - @ n = $JM / 2 - @ x = $n * 2 - @ y = $x + 1 - - # Dateline Center, Pole Center - # ---------------------------- - if( $y == $z ) then - bin/mkLatLonRaster -x $nx -y $ny -b DC -p PC $IM $JM - bin/CombineRasters -v -t $nt DC${IM}xPC${JM} CF${NC}x6C - endif - - # Dateline Edge, Pole Edge - # ------------------------ - if( $x == $z ) then - bin/mkLatLonRaster -x $nx -y $ny -b DE -p PE $IM $JM - bin/CombineRasters -v -t $nt DE${IM}xPE${JM} CF${NC}x6C - endif -end - -end diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/obsolete/mkLISTilesPara.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/obsolete/mkLISTilesPara.F90 deleted file mode 100644 index 99ad7b2a9..000000000 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/obsolete/mkLISTilesPara.F90 +++ /dev/null @@ -1,812 +0,0 @@ -PROGRAM mkLISTilesPara - - use process_hres_data - use MAPL_ConstantsMod - use process_hres_data - use rmTinyCatchParaMod - use MAPL_SortMod - - implicit none - integer , parameter :: nc_esa = 129600, nr_esa = 64800 - real , parameter :: pi= MAPL_PI - integer , parameter :: HYDRO1k_maxcat = 6000000 - integer, parameter :: nc_gswp2 = 360, nr_gswp2 = 180, n_gswp2 =15238 - integer, parameter :: max_pfaf_smap = 100 - character(40) :: arg - integer :: i, N_args, command_argument_count, status - character*300 :: latlon_vector_file - integer :: nc, nr - character*200 :: gfile - character*200 :: tmpstring, tmpstring1, tmpstring2 - character*128 :: MaskFile - character*100 :: char_string - real :: dx, dy - integer :: ncells, dateline, nc_domain,nr_domain,i_offset,j_offset - - N_args = command_argument_count() - - if(N_args /= 2) then - print *,'USAGE : bin/mkLISTilesPara -vfile filename' - stop - end if - - i=0 - - do while ( i < N_args ) - - i = i+1 - - call get_command_argument(i,arg) - - if ( trim(arg) == '-vfile' ) then - i = i+1 - call get_command_argument(i,latlon_vector_file) - - else ! stop for any other arguments - - print *,'USAGE : bin/mkLISTilesPara -vfile filename' - stop - - endif -end do - -call execute_command_line('mkdir -p data/ ; mkdir -p til/ ; mkdir -p rst/ ; mkdir -p clsm/plots') -call execute_command_line('cd data/ ; ln -s /discover/nobackup/projects/gmao/ssd/land/l_data/LandBCs_files_for_mkCatchParam/V001/ CATCH') -call execute_command_line('cd ..') - -! Check for the 10 arc-sec MaskFile -! ----------------------------------- - -call get_environment_variable ("MASKFILE" ,MaskFile ) - -if (index(MaskFile,'GEOS5_10arcsec_mask') /= 0) then - ! Use new ESA based MaskFile - print *, 'Using MaskFile ', trim(MaskFile) - call create_files_esa (nc, nr, gfile,latlon_vector_file) - -else - ! Use old mask file (Ganymed-4_0 and before - call create_files (nc,nr,gfile,latlon_vector_file) -endif - - open (10,file= trim(latlon_vector_file), form = 'formatted',action= 'read', status = 'old') - - read (10,'(a)') char_string - - read (char_string,*,IOSTAT=status) ncells, dx,dy, dateline,nc_domain,nr_domain,i_offset,j_offset - - close (10, status='keep') - - ! create Grid2Catch transfer file - ! ------------------------------- - - ! CALL CREATE_ROUT_PARA_FILE (NC, NR, trim(gfile), deltaXY=dx) - -tmpstring1 = '-e EASE -g '//trim(gfile) -write(tmpstring2,'(2(a2,x,i5,x))')'-x',nc,'-y',nr -tmpstring = 'bin/mkCatchParam.x '//trim(tmpstring2)//' '//trim(tmpstring1) -print *,trim(tmpstring) - -call execute_command_line(tmpstring) - -contains - - - -! -! -------------------------------------------------------------------------------------------- -! - -SUBROUTINE create_files (nc,nr,gfile,filename) - - implicit none - - real, allocatable, dimension (:,:) :: & - cti_mean, cti_std, cti_min, cti_max, cti_skew - character (*), intent (in) :: filename - character*200, intent (out) :: gfile - integer, intent(out) :: nc,nr - integer :: ncells,status,i,j,k,ix1,ix2,iy1,iy2,im,jm,ii,jj, dateline, CatCount - real :: dx, dy, dxh, dyh,d2r,lats - integer :: n,nc_domain,nr_domain,i_offset,j_offset, nc_global,nr_global - integer :: catid_index, NBINS, NPLUS, catNo - character*11 :: glabel1 - character*9 :: glabel2 - character*100 :: gtopo30,char_string - real :: x0, y0 - real :: lat,lon,da, x1,x2,x3,x4,x5, ox1,ox2,ox3,ox4,ox5 - integer, dimension(:,:), allocatable :: tileid - real*4, dimension (:,:), allocatable :: q0 - real, dimension (:), allocatable :: tile_ele,tile_area_land - integer, allocatable :: catid(:,:) - integer, allocatable :: subset_catid(:,:) - REAL, allocatable, DIMENSION (:) :: loc_val - INTEGER, ALLOCATABLE, DIMENSION (:) :: density, loc_int - logical, dimension (:), allocatable :: unq_mask - logical :: counted - - nc = 8640 - nr = 4320 - - allocate(catid (1:nc,1:nr)) - nc_domain = 0 - nr_domain = 0 - i_offset = 0 - j_offset = 0 - - open (10,file='data/CATCH/global.cat_id.catch.DL', form='formatted', & - action='read', status='old')! - - do j=1,nr - read(10,*)(catid(i,j),i=1,nc) - end do - - print *,'CATID MIN/MAX : ',minval(catid),maxval(catid) - - close (10,status='keep') - ! - ! opening LIS latlon vector file - ! - dateline = 1 - open (10,file= trim(filename), form = 'formatted',action= 'read', status = 'old') - - read (10,'(a)') char_string - - ! Reading #of grid cells in the domain or the global file, dx, dy, dateline, nc_domain,nr_domain,i_offset,j_offset - ! added dateline - (1) SET DATELINE = 1 for GSWP2, NLDAS if the dateline is along the western edge, (2) - ! SET DATELINE = 0 for MERRA GEOS5 grids when the dateline lies along the center of the 1st column - ! nc_domain,nr_domain,i_offset,j_offset are optional, they are only used when working on a rectangular subset of the globe - !(for e.g. NLDAS), where nc_domain = # of columns in the domain, nr_domain = # of rows in the domain, - ! i_offset = i index of LL grid cell of the domain minus 1, when the domain grid is overlayed on the similar global grid, - ! counting columns from the dateline to the dateline, - ! j_offset is the same counting rows from the south pole to the north pole. Note that the global grid has the - ! dateline and the south pole as the western and sothern edges - - read (char_string,*,IOSTAT=status) ncells, dx,dy, dateline, nc_domain,nr_domain,i_offset,j_offset - - da = dx*dy*MAPL_RADIUS*MAPL_RADIUS*pi*pi/180./180./1000000. - - if (dateline == 0) then - - !For MERRA, GEOS5 type - ! -------------------- - x0 = -180. ! DC - y0 = -90. + dy ! PC - - else - - ! For GSWP-2, NLDAS - ! ----------------- - x0 = -180. + dx/2. - y0 = -90. + dy/2. - - endif - - dxh= 360._8/nc - dyh= 180._8/nr - d2r= PI/180._8 - - catCount = 0 - - nc_global = nint(360./dx) - nr_global = nint(180./dy) - - IM = nc/nc_global ! i-Pixels in GCM box - JM = nr/nr_global - - if (nc_domain == 0) nc_domain = nc_global - if (nr_domain == 0) nr_domain = nr_global - - write(glabel2,'(i4.4,1a,i4.4)')nc_domain,'x',nr_domain - write(glabel1,'(i5.5,1a,i5.5)')nc_global,'x',nr_global - - if (dateline == 0) then - gfile = 'DC_'//glabel1//'_PC_'//glabel2 - else - gfile = 'DE_'//glabel1//'_PE_'//glabel2 - endif - -! reading in other input data files -! --------------------------------- - - allocate (cti_mean(1:nc_gswp2,1:nr_gswp2)) - allocate (cti_std (1:nc_gswp2,1:nr_gswp2)) - allocate (cti_min (1:nc_gswp2,1:nr_gswp2)) - allocate (cti_max (1:nc_gswp2,1:nr_gswp2)) - allocate (cti_skew(1:nc_gswp2,1:nr_gswp2)) - allocate (q0 (1:nc ,1:nr )) - - - cti_mean = 0. - cti_std = 0. - cti_min = 0. - cti_max = 0. - cti_skew = 0. - q0 = 0. - - -! opening and writing .til and .rst cti_stat and catchment.def files -! ------------------------------------------------------------------- - - open (11,file='/discover/nobackup/projects/gmao/ssd/land/l_data/geos5/bcs/SiB2_V2/DE/GSWP2_1by1/FV_360x180_DE_360x180_DE.til', & - form='formatted',action='READ',status='OLD') - open (12,file='/discover/nobackup/projects/gmao/ssd/land/l_data/geos5/bcs/SiB2_V2/DE/GSWP2_1by1/cti_stats.dat', & - form='formatted',action='READ',status='OLD') - - read (11,*) i - read (11,*) i - read (11,'(a)') - read (11,*) i - read (11,*) i - read (11,'(a)') - read (11,*) i - read (11,*) i - read (12,*) i - - do n =1,n_gswp2 - - read(11,'(i10,i9,2f10.4,2i5,f16.12,3i8,f16.12,i8,f13.4)')k,k,lon,lat,i,j - read(12,'(i8,i8,5(1x,f8.4))')k,k, x1,x2,x3,x4,x5 - cti_mean(i,j) = x1 - cti_std (i,j) = x2 - cti_min (i,j) = x3 - cti_max (i,j) = x4 - cti_skew(i,j) = x5 - - end do - - close(11,status='keep') - close(12,status='keep') - - gtopo30 = 'data/CATCH/srtm30_withKMS_2.5x2.5min.data' - open (13,file=trim(gtopo30),form='unformatted',status='old',convert='little_endian') - read (13) q0 - close(13,status='keep') - - open (20,file ='til/'//trim(gfile)//'.til-first',form = 'formatted' ,action= 'write', status = 'unknown') - open (21,file ='rst/'//trim(gfile)//'.rst',form = 'unformatted',action= 'write', status = 'unknown') - open (22,file ='clsm/cti_stats.dat-first', form = 'formatted' ,action= 'write', status = 'unknown') - open (23,file ='clsm/catchment.def', form = 'formatted' ,action= 'write', status = 'unknown') - - allocate (tileid (1:nc ,1:nr )) - - tileid = 0 - - write (20,*) ncells - write (20,*) 2 - write (20,'(a11)') glabel1 - write (20,*) nc_global - if (dateline == 0) then - write (20,*) nr_global + 1 - else - write (20,*) nr_global - endif - write (20,'(a9)') glabel2 - write (20,*) nc_domain - if (dateline == 0) then - write (20,*) nr_domain + 1 - else - write (20,*) nr_domain - endif - - write(22,*) ncells - - allocate(subset_catid (1:IM, 1:JM)) - - do CatNo = 1, ncells - - read (10,*) k,lat,lon - - i = nint((lon - x0)/dx) + 1 - j = nint((lat - y0)/dy) + 1 - - ix1 = NINT ((lon -dx/2. + 180.) / dxh) + 1 - ix2 = NINT ((lon +dx/2. + 180.) / dxh) - - if(ix1 < 0) ix1 = 1 ! a vertical strip of 0.5 dx that lies on the Eastern hemesphere in DC grid is discarded - - iy1 = NINT ((lat - dy/2. +90.) / dyh) + 1 - iy2 = NINT ((lat + dy/2. +90.) / dyh) - - counted = .false. - subset_catid = -9999 - do jj = iy1,iy2 - do ii = ix1,ix2 - if ((catid (ii,jj) >= 10000) .and. (catid (ii,jj) <= HYDRO1k_maxcat)) then - if (.not. counted) catCount = catCount + 1 - subset_catid (ii - ix1 +1, jj -iy1 +1) = catid (ii,jj) - tileid (ii,jj) = catCount - counted = .true. - endif - end do - end do - - IF(COUNTED) THEN - - NPLUS = count(subset_catid >= 1 .and. subset_catid <= HYDRO1k_maxcat) - allocate (loc_int (1:NPLUS)) - allocate (unq_mask(1:NPLUS)) - loc_int = pack(subset_catid,mask = (subset_catid >= 1 .and. subset_catid <= HYDRO1k_maxcat)) ! loc_int contains catch_indices of non-ocean ESA pixels - call MAPL_Sort (loc_int) - unq_mask = .true. - do n = 2,NPLUS - unq_mask(n) = .not.(loc_int(n) == loc_int(n-1)) ! count number of unique numbers in loc_int for binning - end do - NBINS = count(unq_mask) - - if (NBINS >= 1) then - allocate(loc_val (1:NBINS)) - allocate(density (1:NBINS)) - loc_val = 1.*pack(loc_int,mask =unq_mask) ! loc_val contains available non-ocean catch_indices within the i,j grid cell, - ! Those numbers will be used as bin values - call histogram (im*jm, NBINS, density, loc_val, real(subset_catid)) ! density is the pixel count for each bin value - catid_index = loc_val (maxloc(density,1)) - deallocate (loc_val, density) - else - print *,'Check suspicous' - catid_index = loc_int (1) - endif - - deallocate (loc_int, unq_mask) - x1 =cti_mean(ceiling(real(i)/(real(nc_global)/360.)),ceiling(real(j)/(real(nr_global)/180.))) - x2 =cti_std (ceiling(real(i)/(real(nc_global)/360.)),ceiling(real(j)/(real(nr_global)/180.))) - x3 =cti_min (ceiling(real(i)/(real(nc_global)/360.)),ceiling(real(j)/(real(nr_global)/180.))) - x4 =cti_max (ceiling(real(i)/(real(nc_global)/360.)),ceiling(real(j)/(real(nr_global)/180.))) - x5 =cti_skew(ceiling(real(i)/(real(nc_global)/360.)),ceiling(real(j)/(real(nr_global)/180.))) - - if((CatCount == 1).and.(x1==0.)) then - x1 = 12.5830 - x2 = 2.6039 - x3 = 7.8878 - x4 = 23.1378 - x5 = 0.8388 - endif - - if(x1.gt.0.) then - ox1 = x1 - ox2 = x2 - ox3 = x3 - ox4 = x4 - ox5 = x5 - endif - - if (nr_global < 1000) then - write(20,'(i10,i9,2f10.4,2i5,f19.12,i10,e13.4,i15,i8)') 100,catid_index,lon,lat,i-i_offset, & - j-j_offset,real(count(tileid (ix1:ix2,iy1:iy2) > 0))/real((ix2-ix1+1)*(iy2-iy1+1)), & - CatNo,da*cos(lat*pi/180.) - if(x1.gt.0.) then - write(22,'(i8,i8,5(1x,f8.4))')catcount,catid_index, x1,x2,x3,x4,x5 - else - write(22,'(i8,i8,5(1x,f8.4))')catcount,catid_index, ox1,ox2,ox3,ox4,ox5 - endif - else - write(20,'(i10,i9,2f10.4,2i5,f19.12,i10,e13.4,i15,i8)') 100,catid_index,lon,lat,i-i_offset,j-j_offset, & - real(count(tileid (ix1:ix2,iy1:iy2) > 0))/real((ix2-ix1+1)*(iy2-iy1+1)),CatNo,da*cos(lat*pi/180.) - if(x1.gt.0.) then - write(22,'(i8,i8,5(1x,f8.4))')catcount,catid_index, x1,x2,x3,x4,x5 - else - write(22,'(i8,i8,5(1x,f8.4))')catcount,catid_index, ox1,ox2,ox3,ox4,ox5 - endif - endif - else - ncells = ncells - 1 - ENDIF - end do - - allocate (tile_ele(1:ncells)) - allocate (tile_area_land (1:ncells)) - tile_ele = 0. - tile_area_land = 0. - - do j = 1,nr - write(21) tileid(:,j) - lats = -90._8 + (j - 0.5_8)*dyh - - do i = 1,nc - if((tileid(i,j) > 0).and.(tileid(i,j) <= ncells))then - tile_ele(tileid(i,j)) = tile_ele(tileid(i,j)) + q0(i,j)* & - (sin(d2r*(lats+0.5*dyh)) -sin(d2r*(lats-0.5*dyh)))*(dxh*d2r) - tile_area_land(tileid(i,j)) = tile_area_land(tileid(i,j)) + & - (sin(d2r*(lats+0.5*dyh)) -sin(d2r*(lats-0.5*dyh)))*(dxh*d2r) - endif - enddo - end do - - tile_ele = tile_ele/tile_area_land - - ! adjustment Global Mean Topography to 614.649 (615.662 GTOPO 30) m - ! --------------------------- - tile_ele =tile_ele*(614.649D0 /656.7712) - - close (10,status = 'keep') - close (20,status = 'keep') - open (19,file ='til/'//trim(gfile)//'.til-first',form = 'formatted' ,action= 'read', status = 'old') - open (20,file ='til/'//trim(gfile)//'.til',form = 'formatted' ,action= 'write', status = 'unknown') - open (21,file ='clsm/cti_stats.dat-first', form = 'formatted' ,action= 'read', status = 'old') - open (22,file ='clsm/cti_stats.dat', form = 'formatted' ,action= 'write', status = 'unknown') - - read (19,*) i - read (21,*) i - write(20,*) ncells - write(22,*) ncells - write(23,*) ncells - - read (19,*) i - write(20,*) i - read (19,'(a11)') glabel1 - write (20,'(a11)') glabel1 - read (19,*) nc_global - write (20,*) nc_global - read (19,*) nr_global - write (20,*) nr_global - read (19,'(a9)') glabel2 - write (20,'(a9)') glabel2 - read (19,*) nc_domain - write (20,*) nc_domain - read (19,*) nr_domain - write (20,*) nr_domain - - do n =1,ncells - - read (21,'(i8,i8,5(1x,f8.4))') k,ix1,x1,x2,x3,x4,x5 - write (22,'(i8,i8,5(1x,f8.4))') k,ix1,x1,x2,x3,x4,x5 - read (19,'(i10,i9,2f10.4,2i5,f19.12,i10,e13.4,i15,i8)')k,ix1,lon,lat,i,j, x1, catid_index,x2 - - if (dateline == 0) then - write(20,'(i10,i9,2f10.4,2i5,f19.12,i10,e13.4,i15,i8)')k,ix1,lon,lat,i,j+1, x1, catid_index,x2 - else - write(20,'(i10,i9,2f10.4,2i5,f19.12,i10,e13.4,i15,i8)')k,ix1,lon,lat,i,j, x1, catid_index,x2 - endif - write(23,'(i8,i8,5(2x,f9.4))')n,ix1,lon-dx/2.,lon+dx/2.,lat-dy/2.,lat+dy/2.,tile_ele(n) - end do - close (19,status = 'keep') - close (20,status = 'keep') - close (21,status = 'keep') - close (22,status = 'keep') - close (23,status = 'keep') - close (10,status = 'keep') - -END SUBROUTINE create_files - -! -! -------------------------------------------------------------------------------------------- -! - -SUBROUTINE create_files_esa (nc, nr, gfile,filename) - - implicit none - integer, intent (out) :: nc, nr - ! For regridding - integer :: LakeType =10, IceType =11, OceanType =0 - integer, allocatable, target, dimension (:,:) :: geos_msk, high_msk - REAL, allocatable, DIMENSION (:) :: loc_val - INTEGER, ALLOCATABLE, DIMENSION (:) :: density, loc_int - logical, dimension (:), allocatable :: unq_mask - integer :: dx_esa, dy_esa, NBINS, NPLUS - integer :: catid_index, catNo,catCount - integer*8, allocatable, dimension (:) :: SRTM_catid - integer*8 :: pfaf_dbl - real, dimension (max_pfaf_smap) :: pfaf_area - integer, dimension (max_pfaf_smap) :: pfaf_index - character (*), intent (in) :: filename - character*200, intent (out) :: gfile - integer :: ncells,status,i,j,k,ix1,ix2,iy1,iy2,im,jm, dateline, ix,jx - integer :: ncid,ii,jj - real :: dx, dy - real (kind =8) :: dxh, dyh,d2r,lats, dyvh, dxvh - integer :: n,nc_domain,nr_domain,i_offset,j_offset, nc_global,nr_global,msk2rst - character*11 :: glabel1 - character*9 :: glabel2 - character*100 :: gtopo30,char_string - real :: x0, y0 - real :: lat,lon,da, x1,x2,x3,x4,x5, ox1,ox2,ox3,ox4,ox5 - integer, dimension(:,:), allocatable :: tileid - real*4, dimension (:,:), allocatable :: q0, raster - real, dimension (:), allocatable :: tile_ele,tile_area_land - logical :: regrid, counted - - include 'netcdf.inc' - - nc_domain = 0 - nr_domain = 0 - i_offset = 0 - j_offset = 0 - dateline = 1 ! Default DE - ! - ! opening LIS latlon vector file - !------------------------------- - - open (10,file= trim(filename), form = 'formatted',action= 'read', status = 'old') - - read (10,'(a)') char_string - - ! Reading #of grid cells in the domain or the global file, dx, dy, ,nc_domain,nr_domain,i_offset,j_offset - ! added dateline - (1) SET DATELINE = 1 for GSWP2, NLDAS if the dateline is along the western edge, (2) - ! SET DATELINE = 0 for MERRA GEOS5 grids when the dateline lies along the center of the 1st column - ! nc_domain,nr_domain,i_offset,j_offset are optional, they are only used when working on a rectangular subset of the globe - !(for e.g. NLDAS), where nc_domain = # of columns in the domain, nr_domain = # of rows in the domain, - ! i_offset = i index of LL grid cell of the domain minus 1, when the domain grid is overlayed on the similar global grid, - ! counting columns from the dateline to the dateline, - ! j_offset is the same counting rows from the south pole to the north pole. Note that the global grid has the - ! dateline and the south pole as the western and sothern edges - - read (char_string,*,IOSTAT=status) ncells, dx,dy, dateline,nc_domain,nr_domain,i_offset,j_offset - - da = MAPL_RADIUS*MAPL_RADIUS/1000000. - - if (dateline == 0) then - ! For MERRA, GEOS5 type - x0 = -180. ! DC - y0 = -90. + dy ! PC - else - ! For GSWP-2, NLDAS - x0 = -180. + dx/2. - y0 = -90. + dy/2. - endif - - ! Output raster file resolution - ! ----------------------------- - - nc = 43200 - nr = 21600 - - nc_global = nint(360./dx) - nr_global = nint(180./dy) - - if (nc_domain == 0) nc_domain = nc_global - if (nr_domain == 0) nr_domain = nr_global - - write(glabel2,'(i4.4,1a,i4.4)')nc_domain,'x',nr_domain - write(glabel1,'(i5.5,1a,i5.5)')nc_global,'x',nr_global - - if (dateline == 0) then - gfile = 'DC_'//glabel1//'_PC_'//glabel2 - else - gfile = 'DE_'//glabel1//'_PE_'//glabel2 - endif - ! - ! reading in other input data files - ! --------------------------------- - - allocate (raster (1:8640, 1:4320 )) - allocate (q0 (1:nc ,1:nr)) - allocate (tile_ele(1:ncells)) - allocate (tile_area_land (1:ncells)) - raster = 0. - q0 = 0. - tile_ele = 0. - tile_area_land = 0. - - ! opening and writing .til and .rst and catchment.def files - ! ---------------------------------------------------------- - - gtopo30 = 'data/CATCH/srtm30_withKMS_2.5x2.5min.data' - open (13,file=trim(gtopo30),form='unformatted',status='old',convert='little_endian') - read (13) raster - close(13,status='keep') - - call RegridRasterReal(raster,q0) - deallocate (raster) - - open (20,file ='til/'//trim(gfile)//'.til-first',form = 'formatted' ,action= 'write', status = 'unknown') - open (21,file ='rst/'//trim(gfile)//'.rst',form = 'unformatted',action= 'write', status = 'unknown') - open (23,file ='clsm/catchment.def', form = 'formatted' ,action= 'write', status = 'unknown') - - allocate (tileid (1:nc ,1:nr )) - - tileid = 0 - - write (20,*) ncells - write (20,*) 1 - write (20,'(a11)') glabel1 - write (20,*) nc_global - if (dateline == 0) then - write (20,*) nr_global + 1 - else - write (20,*) nr_global - endif - ! write (20,'(a9)') glabel2 - ! write (20,*) nc_domain - ! if (dateline == 0) then - ! write (20,*) nr_domain + 1 - ! else - ! write (20,*) nr_domain - ! endif - - regrid = .true. - dx_esa = ceiling(real(nc_esa) / real(nc_global)) ! x-dimension (or # of ESA columns within the raster grid cell) - dy_esa = ceiling(real(nr_esa) / real(nr_global)) ! y-dimension (or # of ESA rows within the raster grid cell) - msk2rst = nc_esa/nc - - allocate(SRTM_catid (1:SRTM_maxcat+2)) - allocate(geos_msk (1:dx_esa,1:dy_esa)) - allocate(high_msk (1:msk2rst,1:msk2rst)) - - status = NF_OPEN ('data/CATCH/GEOS5_10arcsec_mask.nc', NF_NOWRITE, ncid) - status = NF_GET_VARA_INT64 (ncid,3,(/1/),(/SRTM_maxcat/),SRTM_catid(1:SRTM_maxcat)) ! Read pfafstetter IDs - if(status /=0) then - PRINT *, NF_STRERROR(STATUS) - print *, 'Problem with NF_OPEN : GEOS5_10arcsec_mask.nc' - endif - - SRTM_catid (SRTM_maxcat + 1) = 190000000 - SRTM_catid (SRTM_maxcat + 2) = 200000000 - dxvh= 360._8/nc_esa - dyvh= 180._8/nr_esa - d2r= PI/180._8 - - dxh = 360._8/nc - dyh = 180._8/nr - - catCount = 0 - - do catNo = 1, ncells - - pfaf_index = 0 - pfaf_area = 0. - - read (10,*) k,lat,lon - - i = nint((lon - x0)/dx) + 1 - j = nint((lat - y0)/dy) + 1 - - ix1 = NINT ((lon -dx/2. + 180.)/dxh) + 1 - ix2 = NINT ((lon +dx/2. + 180.)/dxh) - - if(ix1 < 0) ix1 = 1 ! a vertical strip of 0.5 dx that lies on the Eastern hemesphere in DC grid is discarded - - iy1 = NINT ((lat - dy/2. +90.)/dyh) + 1 - iy2 = NINT((lat + dy/2. +90.)/dyh) - - counted = .false. - - do jj = iy1,iy2 - do ii = ix1,ix2 - status = NF_GET_VARA_INT (ncid,4,(/(ii-1)*msk2rst+1,(jj-1)*msk2rst +1/), & - (/msk2rst,msk2rst/),high_msk) - if(count(high_msk >= 1 .and. high_msk <= SRTM_maxcat) > 0) then - if (.not. counted) catCount = catCount + 1 - tileid (ii,jj) = catCount - counted = .true. - endif - end do - end do - - if (counted) then - status = NF_GET_VARA_INT (ncid,4,(/(ix1-1)*msk2rst+1,(iy1-1)*msk2rst +1/), & - (/dx_esa,dy_esa/),geos_msk) ! Read 10-arcsec rows that lie within the raster row 'j' - if(status /=0) then - PRINT *, NF_STRERROR(STATUS) - print *, 'Problem with NF_GET_VARA_INT GEOS5_10arcsec_mask.nc',status - endif - - catid_index = 0 - - if(maxval (geos_msk) > SRTM_maxcat) then - if(maxval (geos_msk) == 200000000) where (geos_msk == 200000000) geos_msk = SRTM_maxcat + 2 - if(maxval (geos_msk) == 190000000) where (geos_msk == 190000000) geos_msk = SRTM_maxcat + 1 - endif - - NPLUS = count(geos_msk >= 1 .and. geos_msk <= SRTM_maxcat) ! Count non-ocean ESA pixels within - - if (NPLUS > 0) then ! check whether there are Non-ocean ESA pixels - ! catID of the largest Pfafstetter catchment within the grid cell - allocate (loc_int (1:NPLUS)) - allocate (unq_mask(1:NPLUS)) - loc_int = pack(geos_msk,mask = (geos_msk >= 1 .and. geos_msk <= SRTM_maxcat)) ! loc_int contains catch_indices of non-ocean ESA pixels - call MAPL_Sort (loc_int) - unq_mask = .true. - do n = 2,NPLUS - unq_mask(n) = .not.(loc_int(n) == loc_int(n-1)) ! count number of unique numbers in loc_int for binning - end do - NBINS = count(unq_mask) - - if(NBINS > max_pfaf_smap) then - print *,' # of Pfaf within exceeded : ', NBINS - stop - endif - - if (NBINS >= 1) then - allocate(loc_val (1:NBINS)) - allocate(density (1:NBINS)) - loc_val = 1.*pack(loc_int,mask =unq_mask) ! loc_val contains available non-ocean catch_indices within the i,j grid cell, - ! Those numbers will be used as bin values - call histogram (dx_esa*dy_esa, NBINS, density, loc_val, real(geos_msk)) ! density is the pixel count for each bin value - catid_index = loc_val (maxloc(density,1)) ! picks maximum density as the dominant catchment_index at i,j - - do n = 1, nbins - - pfaf_index(n) = nint (loc_val (n)) - - do jx = iy1,iy2 - lats = -90._8 + (jx - 0.5_8)*dyvh - do ix = ix1, ix2 - if(geos_msk (ix -ix1 + 1,jx - iy1 + 1) == nint (loc_val (n))) then - pfaf_area(n) = pfaf_area(n) + (sin(d2r*(lats+0.5*dyvh)) -sin(d2r*(lats-0.5*dyvh)))*(dxvh*d2r) - endif - end do - end do - end do - - deallocate (loc_val, density) - else - print *,'Check suspicous' - catid_index = loc_int (1) - endif - deallocate (loc_int, unq_mask) - - endif - - write(20,'(i10,i9,2f10.4,2i5,f19.12,i10,e13.4,i15,i8)') 100,catid_index,lon,lat,i-i_offset,j-j_offset, & - real(count(tileid (ix1:ix2,iy1:iy2) > 0))/real((ix2-ix1+1)*(iy2-iy1+1)),catid_index,da*sum(pfaf_area (1:nbins)), & - SRTM_catid(catid_index), catNo - else - ncells = ncells - 1 - endif - end do - close (20, status = 'keep') - status = NF_CLOSE (ncid) - deallocate (geos_msk) - -! rst file creating raster file -! ----------------------------- - - - do j = 1,nr - write(21) tileid(:,j) - lats = -90._8 + (j - 0.5_8)*dyh - - do i = 1,nc - if((tileid(i,j) > 0).and.(tileid(i,j) <= ncells))then - tile_ele(tileid(i,j)) = tile_ele(tileid(i,j)) + q0(i,j)* & - (sin(d2r*(lats+0.5*dyh)) -sin(d2r*(lats-0.5*dyh)))*(dxh*d2r) - tile_area_land(tileid(i,j)) = tile_area_land(tileid(i,j)) + & - (sin(d2r*(lats+0.5*dyh)) -sin(d2r*(lats-0.5*dyh)))*(dxh*d2r) - endif - enddo - end do - - tile_ele = tile_ele/(tile_area_land + 1.e-20) - - ! adjustment Global Mean Topography to 614.649 (615.662 GTOPO 30) m - ! --------------------------- - tile_ele =tile_ele*(614.649D0 /656.7712) - open (19,file ='til/'//trim(gfile)//'.til-first',form = 'formatted' ,action= 'read', status = 'old') - open (20,file ='til/'//trim(gfile)//'.til',form = 'formatted' ,action= 'write', status = 'unknown') - read (19,*) i - write(20,*) ncells - read (19,*) i - write(20,*) i - read (19,'(a11)') glabel1 - write (20,'(a11)') glabel1 - read (19,*) nc_global - write (20,*) nc_global - read (19,*) nr_global - write (20,*) nr_global -! read (19,'(a9)') glabel2 -! write (20,'(a9)') glabel2 -! read (19,*) nc_domain -! write (20,*) nc_domain -! read (19,*) nr_domain -! write (20,*) nr_domain - - write(23,*) ncells - - do n =1,ncells - read (19,'(i10,i9,2f10.4,2i5,f19.12,i10,e13.4,i15,i8)')k,ix1,lon,lat,i,j, x1, catid_index,x2,pfaf_dbl,catNo - if (dateline == 0) then - write(20,'(i10,i9,2f10.4,2i5,f19.12,i10,e13.4,i15,i8)')k,ix1,lon,lat,i,j+1, x1, catid_index,x2,pfaf_dbl,catNo - else - write(20,'(i10,i9,2f10.4,2i5,f19.12,i10,e13.4,i15,i8)')k,ix1,lon,lat,i,j , x1, catid_index,x2,pfaf_dbl,catNo - endif - write(23,'(i8,i8,5(2x,f9.4))')n,ix1,lon-dx/2.,lon+dx/2.,lat-dy/2.,lat+dy/2.,tile_ele(n) - end do - close (19,status = 'keep') - close (20,status = 'keep') - close (21,status = 'keep') - close (23,status = 'keep') - close (10,status = 'keep') - -END SUBROUTINE create_files_esa - -END PROGRAM mkLISTilesPara diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/obsolete/rmTinyTiles.F90 b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/obsolete/rmTinyTiles.F90 deleted file mode 100644 index dfbad30e7..000000000 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/obsolete/rmTinyTiles.F90 +++ /dev/null @@ -1,194 +0,0 @@ -#define VERIFY_(A) IF(A/=0)THEN;PRINT *,'ERROR AT LINE ', __LINE__;STOP;ENDIF -#define ASSERT_(A) if(.not.A)then;print *,'Error:',__FILE__,__LINE__;stop;endif - - PROGRAM rmTinyTiles - -! !INTERFACE: -! -! rmTinyTiles -x nx -y ny -b lon0 -p pos -T type im jm -! -! !ARGUMENTS: -! -! -x: Size of longitude (1st) dimension of raster. default: 8640 -! -y: Size of latitude (2nd) dimension of raster. default: 4320 -! -b: longitude of left edge of first box. This can be a -! floating point number in degrees or one of the following -! two character strings denoting the standard positions: -! DE, DC, GE, GC, for Dateline or Greenwich, Center or Edge. -! default: 'DC' -! -p: Position of poes relative to grid.This can be a -! one of the following two character strings: PE or PC, for -! Pole on the Edge, or Pole on the Center of the first box. -! PC is the FV convention, with the firat and last boxes being -! half as big as the others. -! default: 'PC' -! -t: Grid type used in .til file. Usually only Atmophere(=-1) -! or Ocean(=0); default is the default of LLrasterize, currently -! Atmosphere. -! im: Size of longitude (1st) dimension of grid. -! jm: Size of latitude (2nd) dimension of grid. -! -! This program removes tiny tiles in -! DC${IM}xPC${JM}_DE0360xPE0180-Pfafstetter.til/ -! DC${IM}xPC${JM}_DE0360xPE0180-Pfafstetter.rst, and -! creates a new pair, -! DC${IM}xPC${JM}_DE0360xPE0180-Pfaf.update.til/ -! DC${IM}xPC${JM}_DE0360xPE0180-Pfaf.update.rst -! -! Sarith Mahanama - Feb 6, 2010 -! Email: sarith.p.mahanama@nasa.gov - - use rmTinyCatchParaMod - - implicit none - - integer :: NC = 8640, NR = 4320 - character*20 :: DQ = 'DC' - character*2 :: PT = 'PC' - integer :: PUSHLEFT = 10000 - character*128 :: GridName = '' - character*128 :: ARG - character*1 :: opt - integer :: II, JJ, Type - logical :: UseType = .false., DoZip=.false., Verb=.false. - logical :: Here = .false. - integer :: I, J, status, command_argument_count, nxt - real*8 :: dx, dy, lon0 - real*8, allocatable :: xs(:), ys(:) - character*128 :: & - Usage = "rmTinyTiles -x nx -y ny -v -h -z -g Gridname -b lon0 -p pos -t type im jm" - character*2 :: dateline,poles - - CHARACTER*128 :: Grid2 - - print *,'>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>' - print *,'Begin removing tiny tiles.................................:' - print *,'>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>' - - -! Process Arguments -!------------------ - - I = command_argument_count() - - if(I < 2 .or. I > 17) then - print *, "Wrong Number of arguments: ", i - print *, trim(Usage) - call exit(1) - end if - - nxt = 1 - - call get_command_argument(nxt,arg) - - do while(arg(1:1)=='-') - opt=arg(2:2) - if(len(trim(arg))==2) then - if(scan(opt,'zvh')==0) then - nxt = nxt + 1 - call get_command_argument(nxt,arg) - endif - else - arg = arg(3:) - end if - select case (opt) - case ('x') - read(arg,'(i6)') nc - case ('y') - read(arg,'(i6)') nr - case ('b') - dq = trim(arg) - case ('p') - pt = arg(1:2) - case ('z') - DoZip = .true. - case ('v') - Verb = .true. - case ('h') - Here = .true. - case ('g') - GridName = trim(arg) - case ('t') - read(arg,*) type - UseType = .true. - case default - print *, trim(Usage) - call exit(1) - end select - nxt = nxt + 1 - call get_command_argument(nxt,arg) - end do - - read(arg,'(i5)') ii - - nxt = nxt + 1 - call get_command_argument(nxt,arg) - - read(arg,'(i5)') jj - - nxt = nxt + 1 - call get_command_argument(nxt,arg) - Grid2 = ARG - - if(trim(Gridname) == '') then - write(Gridname,'(A2,I4.4,A1,A2,I4.4)') dq(1:2),ii,"x",pt(1:2),jj - endif - - write (dateline,'(A2)')dq(1:2) - write (poles, '(A2)')pt(1:2) - -! Allocate and define the Cell vertices -!-------------------------------------- - - allocate(xs(ii+1),ys(jj+1),stat=STATUS) - VERIFY_(STATUS) - - dx = 360.0_8/float(ii) - - select case (dq(1:2)) - case ('DC') - lon0 = -180. - dx*0.5 - case ('DE') - lon0 = -180. - case ('GC') - lon0 = - dx*0.5 - case ('GE') - lon0 = 0.0 - case default - read(dq,*) lon0 - dq = 'XX' - end select - - do i=1,ii+1 - xs(i) = lon0 + (i-1)*dx - enddo - - ys( 1) = -90._8 - ys(jj+1) = 90._8 - - select case (pt) - case ('PC') - dy = 180._8 / (jj-1) - ys(2) = ys(1) + 0.5*dy - case ('PE') - dy = 180._8 / (jj ) - ys(2) = ys(1) + dy - case default - print *, " Bad pole grid type. Must be PE or PC:", PT - print *, trim(Usage) - call exit(1) - end select - - Gridname =trim(Gridname)//'_'//adjustl(Grid2) - print *,'Input tile space....:','til/'//trim(Gridname)//'-Pfafstetter' - - call remove_tiny_tiles ( & - dateline,poles,Gridname) - - print *,'============================================================' - print *,'DONE removing tiny tiles....................................' - print *,'============================================================' - - -END PROGRAM rmTinyTiles - From ea5699502385bfa443aef5bd1950c8056054a3a9 Mon Sep 17 00:00:00 2001 From: biljanaorescanin Date: Wed, 18 Oct 2023 15:40:30 -0400 Subject: [PATCH 2/2] remove make_bcs script --- .../GEOSsurface_GridComp/Utils/Raster/makebcs/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/CMakeLists.txt b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/CMakeLists.txt index bd72f24a8..d7b221423 100755 --- a/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/CMakeLists.txt +++ b/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/CMakeLists.txt @@ -46,6 +46,6 @@ ecbuild_add_executable (TARGET FillMomGrid.x SOURCES FillMomGrid.F90 LIBS MAPL $ ecbuild_add_executable (TARGET mk_runofftbl.x SOURCES mk_runofftbl.F90 LIBS MAPL ${this}) ecbuild_add_executable (TARGET mkEASETilesParam.x SOURCES mkEASETilesParam.F90 LIBS MAPL ${this}) -install(PROGRAMS make_bcs clsm_plots.pro create_README.csh DESTINATION bin) +install(PROGRAMS clsm_plots.pro create_README.csh DESTINATION bin) file(GLOB MAKE_BCS_PYTHON CONFIGURE_DEPENDS "./make_bcs*.py") install(PROGRAMS ${MAKE_BCS_PYTHON} DESTINATION bin)