diff --git a/Source/Python/Classes/ControlFile.py b/Source/Python/Classes/ControlFile.py index 5fd17989d04fc34a2f1bf4e563da4bdffa3102a4..96e901e97949030f81f3b9ff42790d891748d996 100644 --- a/Source/Python/Classes/ControlFile.py +++ b/Source/Python/Classes/ControlFile.py @@ -23,20 +23,12 @@ # (C) Copyright 2014-2019. # Anne Philipp, Leopold Haimberger # +# SPDX-License-Identifier: CC-BY-4.0 +# # This work is licensed under the Creative Commons Attribution 4.0 # International License. To view a copy of this license, visit # http://creativecommons.org/licenses/by/4.0/ or send a letter to # Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. -# -# @Class Methods: -# __init__ -# _read_controlfile -# __str__ -# assign_args_to_control -# assign_envs_to_control -# check_conditions -# check_install_conditions -# to_list #******************************************************************************* # ------------------------------------------------------------------------------ diff --git a/Source/Python/Classes/EcFlexpart.py b/Source/Python/Classes/EcFlexpart.py index 7326e86c5cae5b000c40d7fa5994be44ff9964ba..67b0c90987b83fc8434ccaacc5c2c8f9e256fd57 100644 --- a/Source/Python/Classes/EcFlexpart.py +++ b/Source/Python/Classes/EcFlexpart.py @@ -41,6 +41,8 @@ # (C) Copyright 2014-2019. # Anne Philipp, Leopold Haimberger # +# SPDX-License-Identifier: CC-BY-4.0 +# # This work is licensed under the Creative Commons Attribution 4.0 # International License. To view a copy of this license, visit # http://creativecommons.org/licenses/by/4.0/ or send a letter to @@ -414,15 +416,23 @@ class EcFlexpart(object): # ADDITIONAL FIELDS FOR FLEXPART-WRF MODEL (IF QUESTIONED) # ----------------------------------------------------------------------- if wrf: - self.params['OG__ML'][0] += '/Z/VO' - if '/D' not in self.params['OG__ML'][0]: - self.params['OG__ML'][0] += '/D' + # @WRF + # THIS IS NOT YET CORRECTLY IMPLEMENTED !!! + # + # UNDER CONSTRUCTION !!! + # + + print('WRF VERSION IS UNDER CONSTRUCTION!') # dummy argument + + #self.params['OG__ML'][0] += '/Z/VO' + #if '/D' not in self.params['OG__ML'][0]: + # self.params['OG__ML'][0] += '/D' - wrf_sfc = ['SP','SKT','SST','CI','STL1','STL2', 'STL3','STL4', - 'SWVL1','SWVL2','SWVL3','SWVL4'] - for par in wrf_sfc: - if par not in self.params['OG__SL'][0]: - self.params['OG__SL'][0] += '/' + par + #wrf_sfc = ['SP','SKT','SST','CI','STL1','STL2', 'STL3','STL4', + # 'SWVL1','SWVL2','SWVL3','SWVL4'] + #for par in wrf_sfc: + # if par not in self.params['OG__SL'][0]: + # self.params['OG__SL'][0] += '/' + par return @@ -1501,11 +1511,16 @@ class EcFlexpart(object): end_period = datetime.strptime(c.end_date + c.time[-1], '%Y%m%d%H') end_period = end_period + timedelta(hours=int(c.step[-1])) - if c.wrf: - table128 = init128(_config.PATH_GRIBTABLE) - wrfpars = to_param_id('sp/mslp/skt/2t/10u/10v/2d/z/lsm/sst/ci/sd/\ - stl1/stl2/stl3/stl4/swvl1/swvl2/swvl3/swvl4', - table128) + # @WRF + # THIS IS NOT YET CORRECTLY IMPLEMENTED !!! + # + # UNDER CONSTRUCTION !!! + # + #if c.wrf: + # table128 = init128(_config.PATH_GRIBTABLE) + # wrfpars = to_param_id('sp/mslp/skt/2t/10u/10v/2d/z/lsm/sst/ci/sd/\ + # stl1/stl2/stl3/stl4/swvl1/swvl2/swvl3/swvl4', + # table128) # these numbers are indices for the temporary files "fort.xx" # which are used to seperate the grib fields to, @@ -1584,11 +1599,16 @@ class EcFlexpart(object): if timestamp < start_time or timestamp > end_time: continue - if c.wrf: - if 'olddate' not in locals() or cdate != olddate: - fwrf = open(os.path.join(c.outputdir, - 'WRF' + cdate + '.' + ctime + '.000.grb2'), 'w') - olddate = cdate[:] + # @WRF + # THIS IS NOT YET CORRECTLY IMPLEMENTED !!! + # + # UNDER CONSTRUCTION !!! + # + #if c.wrf: + # if 'olddate' not in locals() or cdate != olddate: + # fwrf = open(os.path.join(c.outputdir, + # 'WRF' + cdate + '.' + ctime + '.000.grb2'), 'w') + # olddate = cdate[:] #============================================================================================ # savedfields remembers which fields were already used. savedfields = [] @@ -1626,11 +1646,16 @@ class EcFlexpart(object): codes_set(gid, 'paramId', 201031) codes_write(gid, fdict['22']) scwc = None - elif c.wrf and paramId in [129, 138, 155] and \ - levtype == 'hybrid': # Z, VO, D - # do not do anything right now - # these are specific parameter for WRF - pass + # @WRF + # THIS IS NOT YET CORRECTLY IMPLEMENTED !!! + # + # UNDER CONSTRUCTION !!! + # + #elif c.wrf and paramId in [129, 138, 155] and \ + # levtype == 'hybrid': # Z, VO, D + # # do not do anything right now + # # these are specific parameter for WRF + # pass else: if paramId not in savedfields: # SD/MSL/TCC/10U/10V/2T/2D/Z/LSM/SDOR/CVL/CVH/SR @@ -1639,18 +1664,22 @@ class EcFlexpart(object): savedfields.append(paramId) else: print('duplicate ' + str(paramId) + ' not written') - - try: - if c.wrf: - # model layer - if levtype == 'hybrid' and \ - paramId in [129, 130, 131, 132, 133, 138, 155]: - codes_write(gid, fwrf) - # sfc layer - elif paramId in wrfpars: - codes_write(gid, fwrf) - except AttributeError: - pass + # @WRF + # THIS IS NOT YET CORRECTLY IMPLEMENTED !!! + # + # UNDER CONSTRUCTION !!! + # + #try: + # if c.wrf: + # # model layer + # if levtype == 'hybrid' and \ + # paramId in [129, 130, 131, 132, 133, 138, 155]: + # codes_write(gid, fwrf) + # # sfc layer + # elif paramId in wrfpars: + # codes_write(gid, fwrf) + #except AttributeError: + # pass codes_release(gid) gid = codes_new_from_index(iid) @@ -1720,8 +1749,14 @@ class EcFlexpart(object): shutil.copyfileobj(open(os.path.join(c.inputdir, 'fort.25'), 'rb'), fout) # ============================================================================================ - if c.wrf: - fwrf.close() + + # @WRF + # THIS IS NOT YET CORRECTLY IMPLEMENTED !!! + # + # UNDER CONSTRUCTION !!! + # + #if c.wrf: + # fwrf.close() codes_index_release(iid) diff --git a/Source/Python/Classes/GribUtil.py b/Source/Python/Classes/GribUtil.py index b7a66a2c4a6cef2a59a75598f1a5021115575cde..68e874634b799a9b1ad19959a2be47be8ef6836c 100644 --- a/Source/Python/Classes/GribUtil.py +++ b/Source/Python/Classes/GribUtil.py @@ -12,31 +12,15 @@ # - changed some naming # # @License: -# (C) Copyright 2014-2018. +# (C) Copyright 2014-2019. +# Anne Philipp, Leopold Haimberger # -# This software is licensed under the terms of the Apache Licence Version 2.0 -# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. -# -# @Class Description: -# The GRIB API provides all necessary tools to work directly with the -# grib files. Nevertheless, the GRIB API tools are very basic and are in -# direct connection with the grib files. This class provides some higher -# functions which apply a set of GRIB API tools together in the respective -# context. So, the class initially contains a list of grib files (their -# names) and the using program then applies the methods directly on the -# class objects without having to think about how the actual GRIB API -# tools have to be arranged. -# -# @Class Content: -# - __init__ -# - get_keys -# - set_keys -# - copy_dummy_msg -# - index -# -# @Class Attributes: -# - filenames +# SPDX-License-Identifier: CC-BY-4.0 # +# This work is licensed under the Creative Commons Attribution 4.0 +# International License. To view a copy of this license, visit +# http://creativecommons.org/licenses/by/4.0/ or send a letter to +# Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. #******************************************************************************* # ------------------------------------------------------------------------------ @@ -52,6 +36,15 @@ import os class GribUtil(object): ''' Class for GRIB utilities (new methods) based on GRIB API + + The GRIB API provides all necessary tools to work directly with the + grib files. Nevertheless, the GRIB API tools are very basic and are in + direct connection with the grib files. This class provides some higher + functions which apply a set of GRIB API tools together in the respective + context. So, the class initially contains a list of grib files (their + names) and the using program then applies the methods directly on the + class objects without having to think about how the actual GRIB API + tools have to be arranged. ''' # -------------------------------------------------------------------------- # CLASS FUNCTIONS diff --git a/Source/Python/Classes/MarsRetrieval.py b/Source/Python/Classes/MarsRetrieval.py index c87f878afdf66e7f829a40c43982bf604b5cc3eb..5fe22118a781f2f427c487cd9ffac817143ec6cf 100644 --- a/Source/Python/Classes/MarsRetrieval.py +++ b/Source/Python/Classes/MarsRetrieval.py @@ -22,6 +22,8 @@ # (C) Copyright 2014-2019. # Anne Philipp, Leopold Haimberger # +# SPDX-License-Identifier: CC-BY-4.0 +# # This work is licensed under the Creative Commons Attribution 4.0 # International License. To view a copy of this license, visit # http://creativecommons.org/licenses/by/4.0/ or send a letter to diff --git a/Source/Python/Classes/UioFiles.py b/Source/Python/Classes/UioFiles.py index 8c1c26966cdbf0bb3ab3850fdb9123a19ed58529..10bcfb15bc17054af9efe453da3d5fda42c64403 100644 --- a/Source/Python/Classes/UioFiles.py +++ b/Source/Python/Classes/UioFiles.py @@ -25,6 +25,8 @@ # (C) Copyright 2014-2019. # Anne Philipp, Leopold Haimberger # +# SPDX-License-Identifier: CC-BY-4.0 +# # This work is licensed under the Creative Commons Attribution 4.0 # International License. To view a copy of this license, visit # http://creativecommons.org/licenses/by/4.0/ or send a letter to diff --git a/Source/Python/Mods/checks.py b/Source/Python/Mods/checks.py index 54db0dcabfbfaf45f88e1d9c8747b77c94c48e08..74e7ba677c00842816ac3043e3658f9d640138ce 100644 --- a/Source/Python/Mods/checks.py +++ b/Source/Python/Mods/checks.py @@ -11,6 +11,8 @@ # (C) Copyright 2014-2019. # Anne Philipp, Leopold Haimberger # +# SPDX-License-Identifier: CC-BY-4.0 +# # This work is licensed under the Creative Commons Attribution 4.0 # International License. To view a copy of this license, visit # http://creativecommons.org/licenses/by/4.0/ or send a letter to diff --git a/Source/Python/Mods/disaggregation.py b/Source/Python/Mods/disaggregation.py index a5d36ca3612f8cf7e4468728c6b98041c9eebb9d..07c593b2ae840516fb9fcc5bd3a7b6b7fe0e2055 100644 --- a/Source/Python/Mods/disaggregation.py +++ b/Source/Python/Mods/disaggregation.py @@ -22,6 +22,8 @@ # (C) Copyright 2014-2019. # Anne Philipp, Leopold Haimberger # +# SPDX-License-Identifier: CC-BY-4.0 +# # This work is licensed under the Creative Commons Attribution 4.0 # International License. To view a copy of this license, visit # http://creativecommons.org/licenses/by/4.0/ or send a letter to diff --git a/Source/Python/Mods/get_mars_data.py b/Source/Python/Mods/get_mars_data.py index e3c794752768a9ab377e9aa024a5fac6a5334b3c..48a1d36f31bcf6a9b70a99e8498ea71ad461b091 100755 --- a/Source/Python/Mods/get_mars_data.py +++ b/Source/Python/Mods/get_mars_data.py @@ -28,6 +28,8 @@ # (C) Copyright 2014-2019. # Anne Philipp, Leopold Haimberger # +# SPDX-License-Identifier: CC-BY-4.0 +# # This work is licensed under the Creative Commons Attribution 4.0 # International License. To view a copy of this license, visit # http://creativecommons.org/licenses/by/4.0/ or send a letter to diff --git a/Source/Python/Mods/prepare_flexpart.py b/Source/Python/Mods/prepare_flexpart.py index ba4026ef31b74048823ff9571704d423411a7e62..5c1fd478bc24001a3b87a6d497b0bb02859995f4 100755 --- a/Source/Python/Mods/prepare_flexpart.py +++ b/Source/Python/Mods/prepare_flexpart.py @@ -31,6 +31,8 @@ # (C) Copyright 2014-2019. # Anne Philipp, Leopold Haimberger # +# SPDX-License-Identifier: CC-BY-4.0 +# # This work is licensed under the Creative Commons Attribution 4.0 # International License. To view a copy of this license, visit # http://creativecommons.org/licenses/by/4.0/ or send a letter to diff --git a/Source/Python/Mods/tools.py b/Source/Python/Mods/tools.py index 5b57f3078f60492cd5270bb318546f25d9ef6a15..8a94f586e5e417ff9074d60e1457964b5bb42794 100644 --- a/Source/Python/Mods/tools.py +++ b/Source/Python/Mods/tools.py @@ -26,6 +26,8 @@ # (C) Copyright 2014-2019. # Anne Philipp, Leopold Haimberger # +# SPDX-License-Identifier: CC-BY-4.0 +# # This work is licensed under the Creative Commons Attribution 4.0 # International License. To view a copy of this license, visit # http://creativecommons.org/licenses/by/4.0/ or send a letter to diff --git a/Source/Python/_config.py b/Source/Python/_config.py index 591a6c9cfbc19b58ef4f0a31880fa23bae9f01e9..03126f7a334eb59b4cccd1356b95760052031e02 100644 --- a/Source/Python/_config.py +++ b/Source/Python/_config.py @@ -11,6 +11,8 @@ # (C) Copyright 2014-2019. # Anne Philipp, Leopold Haimberger # +# SPDX-License-Identifier: CC-BY-4.0 +# # This work is licensed under the Creative Commons Attribution 4.0 # International License. To view a copy of this license, visit # http://creativecommons.org/licenses/by/4.0/ or send a letter to diff --git a/Source/Python/install.py b/Source/Python/install.py index 172a0600fdacf448ddaf079ebcb8ca3e475316c4..1c9d8b7588c268b3a701a8f17b4d2a805f6cadf9 100755 --- a/Source/Python/install.py +++ b/Source/Python/install.py @@ -21,6 +21,8 @@ # (C) Copyright 2014-2019. # Anne Philipp, Leopold Haimberger # +# SPDX-License-Identifier: CC-BY-4.0 +# # This work is licensed under the Creative Commons Attribution 4.0 # International License. To view a copy of this license, visit # http://creativecommons.org/licenses/by/4.0/ or send a letter to diff --git a/Source/Python/submit.py b/Source/Python/submit.py index 399ffbaf9fd74663290aa3cc6b1d58164d1c88a9..62a042ab6fadf89f064b8be1e08cab83551d780f 100755 --- a/Source/Python/submit.py +++ b/Source/Python/submit.py @@ -25,6 +25,8 @@ # (C) Copyright 2014-2019. # Anne Philipp, Leopold Haimberger # +# SPDX-License-Identifier: CC-BY-4.0 +# # This work is licensed under the Creative Commons Attribution 4.0 # International License. To view a copy of this license, visit # http://creativecommons.org/licenses/by/4.0/ or send a letter to